I am using sagetex to write a document (may become a book), and am
running into some difficulties.  If I use the \sage command inside of
a caption or inside of a tabular environment, LaTeX chokes.  Here is a
sample code that illustrates the problem:

\documentclass[12pt]{memoir}
\usepackage{sagetex}
\begin{document}
\begin{figure}[h]
\begin{center}
\sageplot{plot(sin(x),(x,0,3))}
\end{center}
\caption{Test with sage in caption $\sage{N(14/3)}$.}
\end{figure}
\end{document}

If I LaTeX the code I get the following error:



./figuretest.tex:8: Argument of \@caption has an extra }.
<inserted text>
                \par
l.8 ...est with sage in caption $\sage{N(14/3)}$.}

This is an error that occurs when footnotes are referenced inside a
caption,  but it was unclear to me whether the problem is the same.
The solutions certainly does not translate. Not all uses of braces
inside caption indicate an error.

Has anyone seen this?  It seems to be something to do with sagetex,
because not all inclusions into caption will break it. (Admittedly, I
didn't try a lot of things, but a simple test seemed to work).

If you think I should post on tex.stackexchange.com, I will but I
don't see a lot of discussion about sagetex there.

Thanks,
S.M.

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to