1

Creating a LaTeX document on the Sage Math Cloud. Whenever I use a sageblock, I end up with endless typesetting warnings because the notes and code inside the sageblock does not automatically wrap when a line gets too long. Is there a simple fix for this?

edit: I'm referring specifically to overfull \hbox warnings. For example, in trying to define the following plot, the sageblock code that displays in the finished pdf will not automatically wrap onto the next line.

\begin{sageblock}
realtopcircleplot=plot(realtopcircle,downbaseterminus-1,circleEnd-1)
\end{sageblock}
  • Welcome to TeX.SX! Do you mean overfull hbox warnings? Can you add a complete, minimal example of code that reproduces the problem? – Torbjørn T. May 20 '14 at 13:06
  • To be precise, those are warnings, not errors. As far as I can see, sagetex uses a verbatim environment for sageblock, and loads the verbatim package. I'm afraid I have no idea whether it's possible to redefine that environment to allow linebreaking though. (Oh, and by 'complete' I meant starting with \documentclass, including necessary packages (notably sagetex), ending with \end{document}. It makes it easier for those trying to help, as they won't have to set up a complete document, and they don't have to make any guesses or assumptions about your code.) – Torbjørn T. May 20 '14 at 13:39
  • If no one posts a solution, you could ask the sagetex developers if it is possible to add this feature. The main developer is Dan Drake (mathsci.kaist.ac.kr/~drake) – Torbjørn T. May 20 '14 at 13:46
1

Right now there's no way to do this. SageTeX uses the verbatim environment to both typeset the Sage code and to write out that code to the .sagetex.sage file. It seems like the listings package can do the typesetting, but I don't know if listings can write out its input to a file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.