Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Very roughly :

  • create your text in LaTeX, interspeding Sage fragments as needed : this will be, say, yourtext.tex.

  • pdflatex yourtext.tex : this will create yourtext.sagetex.sage, and give warninges about undefined references.

  • sage yourtext.sagetex.sage. This will, among other effects, update yourtext.tex.

  • pdflatex yourtext.tex (usually, you have to do it twice).

yourtext.pdf is now the sought document...

To know more : in your installation, you have:

(sage-sh) charpent@zen-book-flip:~$ ls $SAGE_ROOT/local/share/texmf/tex/latex/sagetex/
CONTRIBUTORS        py-and-sty.dtx       sagetex.dtx      scripts.dtx
example.tex     remote-sagetex.dtx       sagetex.ins
extractsagecode.py  remote-sagetex.py        sagetexparse.py
makestatic.py       run-sagetex-if-necessary.py  sagetex.sty

Compiling sagetex.dtx with pdflatex (in a scratch directory) will give you instructions on how to compile both Sagetex and its documentation. More details here.

This cannot be done automatically in Sage's oinstallation, becauise it requires a (not inconsequential) functional installation of LaTeX, which is not a Sage dependency.

The fie example.tex is also quite instructive... Fiddle with it a bit.

HTH,

Very roughly :

  • create your text in LaTeX, interspeding Sage fragments as needed : this will be, say, yourtext.tex.

  • pdflatex yourtext.tex : this will create yourtext.sagetex.sage, and give warninges about undefined references.

  • sage yourtext.sagetex.sage. This will, among other effects, update yourtext.tex.

  • pdflatex yourtext.tex (usually, you have to do it twice).

yourtext.pdf is now the sought document...

To know more : in your installation, you have:

(sage-sh) charpent@zen-book-flip:~$ ls $SAGE_ROOT/local/share/texmf/tex/latex/sagetex/
CONTRIBUTORS        py-and-sty.dtx       sagetex.dtx      scripts.dtx
example.tex     remote-sagetex.dtx       sagetex.ins
extractsagecode.py  remote-sagetex.py        sagetexparse.py
makestatic.py       run-sagetex-if-necessary.py  sagetex.sty

Compiling sagetex.dtx with pdflatex (in a scratch directory) will give you instructions on how to compile both Sagetex and its documentation. More details here.

This cannot be done automatically in Sage's oinstallation, becauise installation, because it requires a (not inconsequential) functional installation of LaTeX, which is not a Sage dependency.

The fie example.tex is also quite instructive... Fiddle with it a bit.

HTH,

EDIT: a good starting point is this documentation.

Very roughly :

  • create your text in LaTeX, interspeding Sage fragments as needed : this will be, say, yourtext.tex.

  • pdflatex yourtext.tex : this will create yourtext.sagetex.sage, and give warninges about undefined references.

  • sage yourtext.sagetex.sage. This will, among other effects, update yourtext.tex.

  • pdflatex yourtext.tex (usually, you have to do it twice).

yourtext.pdf is now the sought document...

EDIT : The documenntation compiled in PDF form an an example tec=xt are available in $SAGE_ROOT/local/share/doc/sagetex/.

To know more recompile it (and get the indices) : in your installation, you have:

(sage-sh) charpent@zen-book-flip:~$ ls $SAGE_ROOT/local/share/texmf/tex/latex/sagetex/
CONTRIBUTORS        py-and-sty.dtx       sagetex.dtx      scripts.dtx
example.tex     remote-sagetex.dtx       sagetex.ins
extractsagecode.py  remote-sagetex.py        sagetexparse.py
makestatic.py       run-sagetex-if-necessary.py  sagetex.sty

Compiling sagetex.dtx with pdflatex (in a scratch directory) will give you instructions on how to compile both Sagetex and its documentation. More details here.

This cannot be done automatically in Sage's installation, because it requires a (not inconsequential) functional installation of LaTeX, which is not a Sage dependency.

The fie example.tex is also quite instructive... Fiddle with it a bit.

HTH,