Ask Your Question

MathJax stopped working

asked 2015-12-08 09:00:37 +0200

marmistrz gravatar image

updated 2015-12-13 15:10:07 +0200

tmonteil gravatar image

I created a couple of commands and realized they produce no output. If typesetting is turned to false, then the output is produced. When I go to the print tab, I get the following error:

File failed to load: localhost:8080/javascript/mathjax/jax/output/SVG/config.js

Why did it suddenly stop working?

I'm using Linux Mint 17.2, used the sagemath-upstream-binary package from the PPA. I'm using the Sage notebook. My commands are

x = var('x')
w = x^4 - (1+3*i)*x^3 - (2-4*i)*x^2 + (6-2*i)*x - 4 - 4*i
p = x^4 + (1-3*i)*x^3 - (4+3*i)*x^2 - (4-2*i)*x + 2*i

I tried using Jupyter but I get the following error while creating a notebook in Jupyter:

 Failed to retrieve MathJax from '../nbextensions/mathjax/MathJax.js'

although I have MathJax installed locally in /usr/share/javascript/mathjax and in /usr/lib/sagemath/local/share/mathjax

edit retag flag offensive close merge delete



It is hard to tell, could you please give us some informations so that we can try to reproduce it:

  • which version of Sage did you use ?
  • which OS ?
  • did you install Sage from the binaries, and which ones ?
  • did you compile Sage ?
  • which notebook did you use (Sage notebook or jupyter notebook) ?
  • which command did you type precisely to get the error ?
  • ... ?
tmonteil gravatar imagetmonteil ( 2015-12-08 09:18:53 +0200 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2015-12-11 22:14:54 +0200

slelievre gravatar image

updated 2015-12-11 22:15:34 +0200

This looks very similar to the problem with MathJax that was discussed in this sage-devel thread.

Could you try the hints suggested there, and report here?

edit flag offensive delete link more


No success here. Sage 6.9 was my first install

marmistrz gravatar imagemarmistrz ( 2015-12-12 19:38:08 +0200 )edit

answered 2015-12-13 09:08:10 +0200

marmistrz gravatar image

updated 2015-12-13 09:14:59 +0200

I found the root of the problem.

While browsing the net I switched the MathJax renderer to SVG. But only my global MathJax installation has the SVG renderer, the shipped version lacks it.

After changing the renderer to HTML/CSS, the problem disappeared.

I'll file a bug in trac. And for the Jupyter problem, I'll open a new question

edit flag offensive delete link more


I edited my answer to answer this part of the problem.

tmonteil gravatar imagetmonteil ( 2015-12-13 14:48:31 +0200 )edit

answered 2015-12-10 11:50:58 +0200

tmonteil gravatar image

updated 2015-12-13 15:09:10 +0200

It is hard to help without the same configuration.

It worked with the Sage notebook, right ? If you try again with Sage notebook, does it work ?

Do you use the Jupyter shipped with Sage ?

If you open jupyter notebook and create a new notebook and type in the first cell:

%display typeset

and on the second:


what do you see ?

If you open a terminal and type the following commands, what do you get:

ls -l /usr/lib/sagemath/local/share

ls -l /usr/lib/sagemath/local/share/jupyter/nbextensions

ls -l /usr/lib/sagemath/local/share/mathjax


To answer the problem you had with the Sage notebook, the shipped version is stripped so that it is smaller to download, so indeed the SVG rendering is disabled. If you want to use your system's mathjax in Sage, you can do the following:

cd /usr/lib/sagemath/local/share
sudo mv mathjax mathjax_stripped
sudo ln -s  /usr/share/javascript/mathjax mathjax
edit flag offensive delete link more


It initially worked with the Sage notebook. Suddenly the notebook ceased to work. I tried the Jupyter notebook afterwards. When I open the jupyter notebook, nothing is printed at all. Even if I remove the %display typeset line

marmistrz gravatar imagemarmistrz ( 2015-12-12 19:29:48 +0200 )edit
marmistrz gravatar imagemarmistrz ( 2015-12-12 19:31:11 +0200 )edit

Thanks fot the output, i will answer this issue on this question

tmonteil gravatar imagetmonteil ( 2015-12-13 15:07:36 +0200 )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: 2015-12-08 09:00:37 +0200

Seen: 1,108 times

Last updated: Dec 13 '15