0

I am trying to use sagetex. Now in the console in sage it is written:"Sage processing complete. Run LaTeX on Beiapiel5.tex again." But when I compile the latex code again nothing happens. Now I have taken the example at the Sagemath site. I have pasted the code into Texmaker called the file st_example.tex. After running it in sage I have got the files, st_example.sagetex.sout,st_example.sagetex.scmd,sage-plots-for-st_example.tex,st_example.sagetex.sage.py.

  • 1
    You never said you used LaTeX before Sage. To use sagetex you need LaTeX code such as the example at the Sagemath site; call it MyFile.tex. First, you run LaTeX on that, to create a .sage file. Second, you process that using Sage, as explained here. Finally, run LaTeX on that to create MyFile.pdf which will be in the same directory. If you have no pdf file, there should be an error message in MyFile.log. What does it say? – DJP Jun 13 '20 at 16:55
  • Be sure your tex system knows the location of the current version of sagetex.sty. That style file is included within the Sage distribution or may be downloaded from CTAN. – murray Jun 13 '20 at 17:08
  • You give no information whatsoever as to your platform or configuration. Please do! – murray Jun 13 '20 at 17:13
  • If you are using MacTeX, then things are easy: after you have made tex aware of the location of sagetex.sty, then either: (1) copy the file sage.engine from ~/Library/TeXShop/Engines/Inactive/Sage to ~/Library/TeXShop/Engines, edit it so that the version of Sage referenced is your actual version, put % !TEX TS-program = sage at the top of your file, and Typeset using the sage engine; or else copy platexmkrc from ~/Library/TeXShop/Engines/Inactive/Sage into the same folder as your source .tex file, put % !TEX TS-program = pdflatexmk, and Typeset using the pdflatexmk engine. – murray Jun 13 '20 at 17:17
  • Now that you have run latex on the .tex file and run Sage on the .sage file, run latex on the .tex file again. It will take the files you mentioned to construct the final document. If you ran latex with a pdflatex command, you should have a MyFile.pdf at the end. If you ran latex with a latex command, you should have a MyFile.dvi file at the end. If you have neither, open MyFile.log and read the error message. What does it say? – DJP Jun 14 '20 at 12:18
  • I have got both st_example.dvi and st_example.pdf but there are still the question marks – AnabolicHorse Jun 14 '20 at 13:34
  • the log file says :Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO) – AnabolicHorse Jun 14 '20 at 14:37
  • That's not the error message. It should be near the bottom, before the final stats are shown. Someone is having essentially the same problem on AskSagemath. See the post here along with the answer and comments. – DJP Jun 14 '20 at 16:14

0 Answers0