Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 14 years ago

kcrisman gravatar image

Percent directives in the notebook literally call other systems directly. (So you need LATEX in your PATH to do this, of course, which I don't.)

So there should be a way to use the stuff in sage.misc.latex to do this. In theory,

sage: show(latex('mystring'))

should work for anything. Certainly it will work if you put Sage objects and numbers in it, but with strings I think it's tricky - latex() wraps them with \texttt{} in general, while %latex wraps LATEX_HEADER around things - see

sage: sage.misc.latex.Latex??

or the whole source for sage.misc.latex.

So that's not a full answer, but maybe it will lead to a full answer. I just don't understand well enough how the notebook calls other systems, otherwise I'd look there and give a complete answer.