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.Thu, 23 Jul 2020 23:16:26 +0200Problems with SageTex on MacOShttps://ask.sagemath.org/question/52612/problems-with-sagetex-on-macos/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.Wed, 22 Jul 2020 09:01:02 +0200https://ask.sagemath.org/question/52612/problems-with-sagetex-on-macos/Answer by slelievre for <p>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.</p>
https://ask.sagemath.org/question/52612/problems-with-sagetex-on-macos/?answer=52616#post-id-52616## 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
Wed, 22 Jul 2020 16:23:15 +0200https://ask.sagemath.org/question/52612/problems-with-sagetex-on-macos/?answer=52616#post-id-52616Comment by emasp for <h2>Typesetting with LaTeX and SageTeX</h2>
<p>Given a document <code>something.tex</code> using SageTeX,
the steps for typesetting are:</p>
<ul>
<li><p>one round of typesetting with latex</p>
<p>for instance with this terminal command:</p>
<pre><code>$ pdflatex something.tex
</code></pre>
<p>This produces a file <code>something.sagetex.sage</code>.</p></li>
<li><p>one round of running Sage on that file</p>
<p>for instance with this terminal command:</p>
<pre><code>$ sage something.sagetex.sage
</code></pre>
<p>This requires <code>sage</code> to be somewhere in your <code>PATH</code>.</p>
<p>This prepares all the Sage output
for the next round of typesetting.</p></li>
<li><p>two rounds of typesetting with latex</p>
<p>for instance with this terminal command:</p>
<pre><code>$ pdflatex something.tex
$ pdflatex something.tex
</code></pre>
<p>This produces the desired file <code>something.pdf</code>.</p></li>
</ul>
<h2>What if <code>sage</code> is not in my <code>PATH</code>?</h2>
<p>Here is one way to get it there.</p>
<ul>
<li><p>start Sage</p></li>
<li><p>in Sage, run this command:</p>
<pre><code>sage: !sudo ln -sf $SAGE_ROOT/sage /usr/local/bin
</code></pre></li>
<li><p>type in the password for your user account on your mac</p></li>
<li><p>quit Sage</p></li>
</ul>
https://ask.sagemath.org/question/52612/problems-with-sagetex-on-macos/?comment=52640#post-id-52640Thank you so much!!! So many hours trying to fix the problem.Thu, 23 Jul 2020 23:16:26 +0200https://ask.sagemath.org/question/52612/problems-with-sagetex-on-macos/?comment=52640#post-id-52640