Hello, I've been working on a new version of SageTeX and I'd like some feedback. There are two major changes:
First, the auxilliary files that SageTeX produces now (mostly) include
".sagetex". So you need to run Sage on foo.sagetex.sage. This will
prevent SageTeX from clobbering the user's other Sage files, and makes
it easier to find files that can safely be deleted. (The
foo_doctest.sage file keeps its name, because, IIRC, problems with the
doctesting framework.)
Second, Volker Braun contributed a big patch that implements something
that I've wanted for a long time: an environment that automatically
fills in Sage output. You put in your TeX file:
\begin{sagecommandline}
sage: 1+1
sage: factor(2^(2^5)+1)
\end{sagecommandline}
and the outputs are neatly colored and typeset in your document (imagine
the following is neatly typeset):
sage: 1+1
2
sage: factor(2^(2^5)+1)
641 * 6700417
This needs testing. If you are adventurous, you can do
sage -f http://sagenb.kaist.ac.kr/~drake/sagetex-2.2.5.p1.spkg
to get the new spkg. (The "real" release will likely be version 2.3 and
include proper updates to SPKG.txt and friends.) Look in the example.tex
file and experiment. If you are especially adventurous, check out the
TeX and Sage code for the new environment.
I'm aware of several issues:
* The documentation needs to be updated.
* Any commands you give with no output get put into the _doctest.sage
file with no output, and fail the doctest because it expects nothing.
I'm not sure what to do about this; perhaps not write sagecommandline
stuff into that file?
* Is "sagecommandline" a good name for the environment?
* Should sageexample and sagecommandline be merged? There is certainly
unnecessary code duplication there. My impression is that there
should be one environment, with two modes: a "figure out the answer
for me" mode, and a "here's the answer, make sure Sage gets it
right" mode.
* The new environment creates yet another auxilliary file. Is there a
way around this? Some output can't be typeset because they're
statements, not expressions (or the other way around; I forget). Can
we work around this in a reasonable way?
Please test, report, and comment on anything above. Thanks!
Dan
--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
signature.asc
Description: Digital signature
