I'm trying to represent Sage non-native elements in a LaTeX document using SageTeX. Sage generates the representation without complaint, but the result does not compile properly on the second LaTeX step (LaTeX-Sage-LaTeX*). Latex complains about missing $ inserted. I've included a simple illustration below with a numpy array.
Thanks for any pointers. Mark \documentclass{article} \usepackage{sagetex} \begin{document} \begin{sagesilent} import numpy as np npmatrix = np.matrix([[1,2],[3,4]]) sgmatrix = matrix([[1,2],[3,4]]) \end{sagesilent} Below is the Sage representation of the matrix \[ \sage{sgmatrix} \] Here is the numpy representation of the matrix. \[ \sage{npmatrix} \] The above fails in LaTeX with the message: Missing \$ inserted. Yet the generated code from the *.sout file seems to work just fine (after removing a few empty braces \{\}). \[ \begin{array}{l} \verb|[[1|\phantom{x}\verb|2]|\\ \phantom{x}\verb|[3|\phantom{x}\verb|4]]| \end{array} \] \end{document} -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org