On Sun, 13 Jan 2008 at 03:41PM -0800, Harald Schilly wrote: > Inside SAGE_BASE/examples/latex_embed is a small script for including > SAGE code in latex files. This is in my opinion very useful for > creating documents: reduces errors, no copy/paste and therefore takes > less time to write tex files! Parsing and computing is separated and > therefore no computational overhead when editing the file without > changing the sage code.
Oh, wow. That's awesome. Great work! One thing that I'd like to further reduce errors is to include TeX inside the \sage call. For instance, right now we write: This year is $2008=\sage{factor(2008)}$. which, since I have to type the same thing twice, brings in the possibility of changing one thing but not the other and introducing errors into the document. I'd rather do something like \renewcommand{\year}{2008} % in the preamble, or wherever This year is $\year=\sage{factor(\year)}$. Now the factorization is guaranteed to be correct. We'd need to get the \year processed before writing the Sage command to the \jobname.sage file. Is that possible? Dan -- --- Dan Drake <[EMAIL PROTECTED]> ----- KAIST Department of Mathematical Sciences ------- http://math.kaist.ac.kr/~drake
signature.asc
Description: Digital signature