Ask Your Question
1

Problems with SageTex on MacOS

asked 2020-07-22 09:01:02 +0100

emasp gravatar image

updated 2020-08-14 14:42:27 +0100

FrédéricC gravatar image

I have follow the instructions according with the sage tutorial guide for install SageTex and for "LaTex to know Sage", to being able to use SageTex on MacOS, but although it's recognize the sage.sty file when I compile a document on each part of sage it displays "??", I have no more ideas what to do, I have use a lot of differents versions of Sage but no one works.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-07-22 16:23:15 +0100

slelievre gravatar image

Typesetting with LaTeX and SageTeX

Given a document something.tex using SageTeX, the steps for typesetting are:

  • one round of typesetting with latex

    for instance with this terminal command:

    $ pdflatex something.tex
    

    This produces a file something.sagetex.sage.

  • one round of running Sage on that file

    for instance with this terminal command:

    $ sage something.sagetex.sage
    

    This requires sage to be somewhere in your PATH.

    This prepares all the Sage output for the next round of typesetting.

  • two rounds of typesetting with latex

    for instance with this terminal command:

    $ pdflatex something.tex
    $ pdflatex something.tex
    

    This produces the desired file something.pdf.

What if sage is not in my PATH?

Here is one way to get it there.

  • start Sage

  • in Sage, run this command:

    sage: !sudo ln -sf $SAGE_ROOT/sage /usr/local/bin
    
  • type in the password for your user account on your mac

  • quit Sage

edit flag offensive delete link more

Comments

Thank you so much!!! So many hours trying to fix the problem.

emasp gravatar imageemasp ( 2020-07-23 23:16:26 +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: 2020-07-22 09:01:02 +0100

Seen: 334 times

Last updated: Jul 22 '20