Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\sagestr seems (subtly) broken #13

Open
EmmanuelCharpentier opened this issue Jul 5, 2017 · 0 comments
Open

\sagestr seems (subtly) broken #13

EmmanuelCharpentier opened this issue Jul 5, 2017 · 0 comments

Comments

@EmmanuelCharpentier
Copy link
Contributor

The Pascal's triangle example on example.tex wokks. But this much simpler minimal example :

\documentclass{article}
\usepackage{sagetex}
\begin{document}

Sage won't admit that 2+2=\sagestr{2+2}. Ouch\,!

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:

won't compile. The initial latex compilation fails with the following error :

ERROR: Missing $ inserted.

--- TeX said ---
<inserted text> 
                $
l.5 Sage won't admit that 2+2=\sagestr{2+2}

            .                                                            Ouch\,!
--- HELP ---
TeX probably found a command that can be used only in math mode when
it wasn't in math mode.  Remember that unless stated otherwise, all
all the commands of Section 3.3 in LaTeX Book (Lamport) can be used
only in math mode. TeX is not in math mode when it begins processing
the argument of a box-making command, even if that command is inside a
math environment. This error also occurs if TeX encounters a blank
line when it is in math mode.

Modifying the same minimal example to use \sage works, of course :

                              
\documentclass{article}
\usepackage{sagetex}
\begin{document}

Sage will admit that $2+2=\sage{2+2}$. Aaaahhh\,!

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant