On 12/24/11 12:27 PM, Sony wrote:
In section 4.2 of the SageLaTeX manual (page 11) explains how to
create a LaTeX document with a Mathematica plot using SageLaTeX.  I
tried the following code but no output is produced.  I get an error
message "Example3 not found."

\documentclass{article}
\usepackage{sagetex}
\begin{document}
\begin{sagesilent}
mathematica('myplot = Plot[Sin[x], {x, 0, 2 Pi}]')
mathematica('Export["%s/example3.eps", myplot]'%os.getcwd())
\end{sagesilent}
\includegraphics{example3}
\end{document}



Did you go through the whole process? The first time you latex the file, it will complain that the figure is missing since it hasn't been generated yet. Do this (assuming the file is tst.tex)

latex tst.tex # this will complain about the missing figure
sage tst.sagetex.sage   # this generates the figure
latex tst.tex # this typesets and includes the generated figure

Thanks,

Jason

--
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

Reply via email to