Ask Your Question
0

SageTeX, TeXShop, and Sage.app

asked 2017-06-07 20:45:36 +0100

smbelcas gravatar image

updated 2019-02-22 21:08:10 +0100

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 20:49:14 +0100

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 21:05:49 +0100 )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

2 followers

Stats

Asked: 2017-06-07 20:45:36 +0100

Seen: 446 times

Last updated: Jun 07 '17