# Revision history [back]

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.