ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 31 Aug 2013 21:33:49 +0200Using sagesilent LaTeX commandhttps://ask.sagemath.org/question/10491/using-sagesilent-latex-command/Hello all,
I'm trying to make a piece of code using SageTex, and saw that the problem really comes down to this:
\newcommand{\test}[1] {
\begin{sage silent} #1 \end{sagesilent}
}
\test{f = sin(x) - 1}
(please note, I have added a blank space in the begin{sage silent} as the editor of this piece of code would otherwise give some weird result. hope you don't mind...)
This gives then the following error:
Runaway argument ? File ended while scanning use of \next.
What am I doing wrong here? Any feedback would be greatly appreciated!
All the best,
GabrielSat, 31 Aug 2013 21:18:08 +0200https://ask.sagemath.org/question/10491/using-sagesilent-latex-command/Answer by kcrisman for <p>Hello all,</p>
<p>I'm trying to make a piece of code using SageTex, and saw that the problem really comes down to this:</p>
<p>\newcommand{\test}[1] {
\begin{sage silent} #1 \end{sagesilent}
}</p>
<p>\test{f = sin(x) - 1}</p>
<p>(please note, I have added a blank space in the begin{sage silent} as the editor of this piece of code would otherwise give some weird result. hope you don't mind...)</p>
<p>This gives then the following error:</p>
<p>Runaway argument ? File ended while scanning use of \next.</p>
<p>What am I doing wrong here? Any feedback would be greatly appreciated!</p>
<p>All the best,
Gabriel</p>
https://ask.sagemath.org/question/10491/using-sagesilent-latex-command/?answer=15399#post-id-15399Unfortunately, it seems this is a known problem in SageTeX. See [this TeX.SX question](http://tex.stackexchange.com/questions/102953/how-to-make-a-package-using-sagetex-and-sage-commands), among others. The [answer to this by the author of SageTeX on a Sage group](https://groups.google.com/forum/#!topic/sage-edu/vjLP3JdycFQ) is not that encouraging since it's a TeX limitation, but there are some potential workarounds that don't involved `\newcommand` in that thread.Sat, 31 Aug 2013 21:33:49 +0200https://ask.sagemath.org/question/10491/using-sagesilent-latex-command/?answer=15399#post-id-15399