Ask Your Question

SageTeX, TeXShop, and

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 to

(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/ 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 to

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

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 is given (something like /Applications/ blah blah), change the application name to (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


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


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

Seen: 57 times

Last updated: Jun 07 '17