Ask Your Question
0

SageTeX, TeXShop, and Sage.app

asked 2017-06-07 13:45:36 -0500

smbelcas gravatar image

updated 2017-07-31 14:13:23 -0500

FrédéricC gravatar image

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?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2017-06-07 13:49:14 -0500

smbelcas gravatar image

Here 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.)

edit flag offensive delete link more

Comments

Ah, 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.

kcrisman gravatar imagekcrisman ( 2017-06-07 14:05:49 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-06-07 13:45:36 -0500

Seen: 37 times

Last updated: Jun 07