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.Mon, 05 Sep 2016 15:11:49 +0200Does sagetex require math environment around \sage{}?https://ask.sagemath.org/question/34713/does-sagetex-require-math-environment-around-sage/I have problems in typesetting the sagetex example file example.tex with the sage engine in TeXShop 3.71. Namely, the output of the command \sage{pascals_triangle(n)} near the end is a string containing LaTeX code, which should then be processed as LaTeX input by LaTeX. However, the typesetter complains that the $$ around the sage output are missing. Putting them results in the string be reproduced verbatim in the output, which is not the expected behavior. I checked that at least in my current version of sagetex.sty ALL output of \sage{} is expected to be placed in a math environment, otherwise a LaTeX error is raised. In the documentation, it is mentioned that it is useful, but not generally required, to put \sage{} commands in a math environment. I remember that the file was smoothly typeset a year or two ago. Has anything changed in the meantime?Sun, 04 Sep 2016 13:53:11 +0200https://ask.sagemath.org/question/34713/does-sagetex-require-math-environment-around-sage/Comment by slelievre for <p>I have problems in typesetting the sagetex example file example.tex with the sage engine in TeXShop 3.71. Namely, the output of the command \sage{pascals_triangle(n)} near the end is a string containing LaTeX code, which should then be processed as LaTeX input by LaTeX. However, the typesetter complains that the $$ around the sage output are missing. Putting them results in the string be reproduced verbatim in the output, which is not the expected behavior. I checked that at least in my current version of sagetex.sty ALL output of \sage{} is expected to be placed in a math environment, otherwise a LaTeX error is raised. In the documentation, it is mentioned that it is useful, but not generally required, to put \sage{} commands in a math environment. I remember that the file was smoothly typeset a year or two ago. Has anything changed in the meantime?</p>
https://ask.sagemath.org/question/34713/does-sagetex-require-math-environment-around-sage/?comment=34728#post-id-34728Please provide more detail: version of Sage, version of SageTeX, operating system.Mon, 05 Sep 2016 15:11:49 +0200https://ask.sagemath.org/question/34713/does-sagetex-require-math-environment-around-sage/?comment=34728#post-id-34728