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.Wed, 07 Jun 2017 21:05:49 +0200SageTeX, TeXShop, and Sage.apphttps://ask.sagemath.org/question/37828/sagetex-texshop-and-sageapp/I'm trying to get SageTeX to work with TeXShop, but there seems to be a conflict about the name of the application.
TeXShop is able to see sagemath.sty, and Sage was working fine, and then I did the following things:
(0) Quit Sagemath.
(1) Rename Sagemath7.6.app to Sage.app
(2) Followed instructions in Ron Bannon's Embedding Sage in LATEX with SageTEX for TEXShop Users, as follows:
(a) Went to ~/Library/TeXShop/Engines/Inactive/Sage and copied the file sage.engine to ~/Library/TeXShop/Engines/
(b) in Terminal, executed
cd /usr/local/texlive/texmf-local/tex/latex
sudo ln -s /Applications/Sage.app/Contents/Resources/sage/data/texmf/tex/generic/sagetex/sagetex.sty sagetex.sty
sudo mktexlsr
(3) Tried to compile an example of SageTex and seemingly nothing happened. I remembered I was not running Sage, so I started Sage.
(4) Got a pile of python errors in Terminal. Oh no!
(5) Looked at the TeXShop console and discovered an error message saying that Sage had gone missing and it looked like I'd tried to rename the Sage application and that this would Not Work.
(6) Renamed Sage.app to Sagemath-7.6.app.
Now Sage runs fine, but TeXShop says it can't find Sage! Help?Wed, 07 Jun 2017 20:45:36 +0200https://ask.sagemath.org/question/37828/sagetex-texshop-and-sageapp/Answer by smbelcas for <p>I'm trying to get SageTeX to work with TeXShop, but there seems to be a conflict about the name of the application.</p>
<p>TeXShop is able to see sagemath.sty, and Sage was working fine, and then I did the following things:</p>
<p>(0) Quit Sagemath.</p>
<p>(1) Rename Sagemath7.6.app to Sage.app</p>
<p>(2) Followed instructions in Ron Bannon's Embedding Sage in LATEX with SageTEX for TEXShop Users, as follows:</p>
<p>(a) Went to ~/Library/TeXShop/Engines/Inactive/Sage and copied the file sage.engine to ~/Library/TeXShop/Engines/</p>
<p>(b) in Terminal, executed</p>
<p>cd /usr/local/texlive/texmf-local/tex/latex</p>
<p>sudo ln -s /Applications/Sage.app/Contents/Resources/sage/data/texmf/tex/generic/sagetex/sagetex.sty sagetex.sty</p>
<p>sudo mktexlsr</p>
<p>(3) Tried to compile an example of SageTex and seemingly nothing happened. I remembered I was not running Sage, so I started Sage.</p>
<p>(4) Got a pile of python errors in Terminal. Oh no!</p>
<p>(5) Looked at the TeXShop console and discovered an error message saying that Sage had gone missing and it looked like I'd tried to rename the Sage application and that this would Not Work.</p>
<p>(6) Renamed Sage.app to Sagemath-7.6.app.</p>
<p>Now Sage runs fine, but TeXShop says it can't find Sage! Help?</p>
https://ask.sagemath.org/question/37828/sagetex-texshop-and-sageapp/?answer=37829#post-id-37829Here is the answer!
In Terminal, navigate to
/Users/yourusernamehere/Library/TeXShop/Engines
Then pico sage.engine (to edit the file) and on line approx. 31, where the path including Sage.app is given (something like /Applications/Sage.app/Contents/Resources/blah blah blah), change the application name to SageMath-7.6.app (where of course you want it to be your current version number). In case you can't remember how pico works, do Ctrl-X and say Y.
(This is of course partly a note to my future self, because I will update Sage and wonder how to get SageTeX to run again, and not remember where to look to edit what file.)Wed, 07 Jun 2017 20:49:14 +0200https://ask.sagemath.org/question/37828/sagetex-texshop-and-sageapp/?answer=37829#post-id-37829Comment by kcrisman for <p>Here is the answer!</p>
<p>In Terminal, navigate to
/Users/yourusernamehere/Library/TeXShop/Engines</p>
<p>Then pico sage.engine (to edit the file) and on line approx. 31, where the path including Sage.app is given (something like /Applications/Sage.app/Contents/Resources/blah blah blah), change the application name to SageMath-7.6.app (where of course you want it to be your current version number). In case you can't remember how pico works, do Ctrl-X and say Y.</p>
<p>(This is of course partly a note to my future self, because I will update Sage and wonder how to get SageTeX to run again, and not remember where to look to edit what file.)</p>
https://ask.sagemath.org/question/37828/sagetex-texshop-and-sageapp/?comment=37831#post-id-37831Ah, this is a VERY good point because now one cannot "move" Sage binaries any more (not without experiencing nasty things happening). So this may be necessary in the future.Wed, 07 Jun 2017 21:05:49 +0200https://ask.sagemath.org/question/37828/sagetex-texshop-and-sageapp/?comment=37831#post-id-37831