ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 25 Nov 2016 21:12:42 -0600using sage engine during compilation of tex filehttp://ask.sagemath.org/question/35741/using-sage-engine-during-compilation-of-tex-file/I would like to automate calling sage after compiling a tex file in TeXShop. I have copied the `sage.engine` file from `~/Library/TeXShop/Engines/Inactive/Sage` to `~/Library/TeXShop/Engines/` and followed the instructions in `About Sage.pdf`.
I've included the line `% !TEX TS-program = sage` in my tex file, but when I compile the file the sage expressions don't compute. I only get `??` for sage expressions. If I run sage on the sagetex.sage file and re-compile the tex file, then everything looks good.
I'm running TeXShop 3.75 on MacOS 10.10.5Fri, 25 Nov 2016 16:21:45 -0600http://ask.sagemath.org/question/35741/using-sage-engine-during-compilation-of-tex-file/Answer by markus for <p>I would like to automate calling sage after compiling a tex file in TeXShop. I have copied the <code>sage.engine</code> file from <code>~/Library/TeXShop/Engines/Inactive/Sage</code> to <code>~/Library/TeXShop/Engines/</code> and followed the instructions in <code>About Sage.pdf</code>. </p>
<p>I've included the line <code>% !TEX TS-program = sage</code> in my tex file, but when I compile the file the sage expressions don't compute. I only get <code>??</code> for sage expressions. If I run sage on the sagetex.sage file and re-compile the tex file, then everything looks good. </p>
<p>I'm running TeXShop 3.75 on MacOS 10.10.5</p>
http://ask.sagemath.org/question/35741/using-sage-engine-during-compilation-of-tex-file/?answer=35743#post-id-35743I've figured it out. I needed to edit the file `~/Library/TeXShop/Engines/sage.engine`.
The line `/Applications/Sage.app/Contents/Resources/sage/sage "$sagename"` needed to be changed to `/Applications/Sage-6.5.app/Contents/Resources/sage/sage "$sagename"`Fri, 25 Nov 2016 21:12:42 -0600http://ask.sagemath.org/question/35741/using-sage-engine-during-compilation-of-tex-file/?answer=35743#post-id-35743