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.Wed, 23 Dec 2015 20:19:24 +0100Jupyter doesn't use the built-in MathJaxhttps://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/I have two copies of MathJax. One in /usr/lib/sagemath/local/share/mathjax, another in /usr/share/javascript/mathjax.
I open up the jupyter notebook: `sage -n jupyter`. I open a notebook and what I get is
> Math/LaTeX rendering will be disabled.
>
> If you have administrative access to
> the notebook server and a working
> internet connection, you can install a
> local copy of MathJax for offline use
> with the following command on the
> server at a Python or Jupyter prompt:
>
> >>> from Jupyter.external import mathjax; mathjax.install_mathjax()
But I don't want a third (sic!) copy of MathJax on my computer! How can I make Jupyter use the existing ones?
I'm using Linux Mint 17.2, used the sagemath-upstream-binary package from the PPA.Sun, 13 Dec 2015 09:18:10 +0100https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/Answer by tmonteil for <p>I have two copies of MathJax. One in /usr/lib/sagemath/local/share/mathjax, another in /usr/share/javascript/mathjax.</p>
<p>I open up the jupyter notebook: <code>sage -n jupyter</code>. I open a notebook and what I get is </p>
<blockquote>
<p>Math/LaTeX rendering will be disabled.</p>
<p>If you have administrative access to
the notebook server and a working
internet connection, you can install a
local copy of MathJax for offline use
with the following command on the
server at a Python or Jupyter prompt:</p>
<blockquote>
<blockquote>
<blockquote>
<p>from Jupyter.external import mathjax; mathjax.install_mathjax()</p>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<p>But I don't want a third (sic!) copy of MathJax on my computer! How can I make Jupyter use the existing ones?</p>
<p>I'm using Linux Mint 17.2, used the sagemath-upstream-binary package from the PPA.</p>
https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/?answer=31551#post-id-31551According to [this log](http://paste.ubuntu.com/13974887/) you posted on [this question](http://ask.sagemath.org/question/31404/mathjax-stopped-working/), you have a correct mathjax install, but it seems that jupyter is not pointing to it. Can you try the following:
sudo mkdir -p /usr/lib/sagemath/local/share/jupyter/nbextensions
cd /usr/lib/sagemath/local/share/jupyter/nbextensions
sudo ln -s ../../mathjax mathjax
While you are at it, you can also let jupyter point to jsmol as follows:
sudo ln -s ../../jsmol jsmol
However, it seems that you will not have a `/usr/lib/sagemath/local/share/jupyter/kernels` directory, so i do not know which problem you might encounter then, let us see.
Sun, 13 Dec 2015 15:06:19 +0100https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/?answer=31551#post-id-31551Comment by marmistrz for <p>According to <a href="http://paste.ubuntu.com/13974887/">this log</a> you posted on <a href="http://ask.sagemath.org/question/31404/mathjax-stopped-working/">this question</a>, you have a correct mathjax install, but it seems that jupyter is not pointing to it. Can you try the following:</p>
<pre><code>sudo mkdir -p /usr/lib/sagemath/local/share/jupyter/nbextensions
cd /usr/lib/sagemath/local/share/jupyter/nbextensions
sudo ln -s ../../mathjax mathjax
</code></pre>
<p>While you are at it, you can also let jupyter point to jsmol as follows:</p>
<pre><code>sudo ln -s ../../jsmol jsmol
</code></pre>
<p>However, it seems that you will not have a <code>/usr/lib/sagemath/local/share/jupyter/kernels</code> directory, so i do not know which problem you might encounter then, let us see.</p>
https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/?comment=31709#post-id-31709Before your answer I was playing around a while, so I reinstalled Sage once again (the fourth time) magically, Jupyter works now...Sun, 20 Dec 2015 13:15:46 +0100https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/?comment=31709#post-id-31709Comment by marmistrz for <p>According to <a href="http://paste.ubuntu.com/13974887/">this log</a> you posted on <a href="http://ask.sagemath.org/question/31404/mathjax-stopped-working/">this question</a>, you have a correct mathjax install, but it seems that jupyter is not pointing to it. Can you try the following:</p>
<pre><code>sudo mkdir -p /usr/lib/sagemath/local/share/jupyter/nbextensions
cd /usr/lib/sagemath/local/share/jupyter/nbextensions
sudo ln -s ../../mathjax mathjax
</code></pre>
<p>While you are at it, you can also let jupyter point to jsmol as follows:</p>
<pre><code>sudo ln -s ../../jsmol jsmol
</code></pre>
<p>However, it seems that you will not have a <code>/usr/lib/sagemath/local/share/jupyter/kernels</code> directory, so i do not know which problem you might encounter then, let us see.</p>
https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/?comment=31812#post-id-31812Ok, I noticed a weird thing. I have my .ipynb notebook in a directory `~/proj/sage`. If I launch sage from within this directory, MathJax is detected properly. But if I launch sage from my home directory and then navigate to the notebook file and select it, Jupyter can't find MathJax. Any ideas?Wed, 23 Dec 2015 20:19:24 +0100https://ask.sagemath.org/question/31542/jupyter-doesnt-use-the-built-in-mathjax/?comment=31812#post-id-31812