Ask Your Question

Revision history [back]

If your Sage app is /Applications/Sage.app, for example, then from a Terminal window, run

$ /Applications/Sage.app/Contents/Resources/sage/sage example.sagetex.sage

You can instead add the directory /Applications/Sage.app/Contents/Resources/sage to your $PATH, and then you'll be able to do

$ sage example.sagetex.sage

Actually, once you add the sage directory to your $PATH, if you have latexmk, you can just do

$ latexmk example.tex

and it will run LaTeX and sage as many times as needed for the document (and also bibtex and any other needed TeX components).