# 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, Gabriel

edit retag close merge delete

Sort by » oldest newest most voted

Unfortunately, it seems this is a known problem in SageTeX. See this TeX.SX question, among others. The answer to this by the author of SageTeX on a Sage group is not that encouraging since it's a TeX limitation, but there are some potential workarounds that don't involved \newcommand in that thread.

more