Ask Your Question
0

MathJax stopped working

asked 2015-12-08 02:00:37 -0500

marmistrz gravatar image

updated 2015-12-13 08:10:07 -0500

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
solve(w,x)

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

Comments

1

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 02:18:53 -0500 )edit

3 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-10 04:50:58 -0500

tmonteil gravatar image

updated 2015-12-13 08:09:10 -0500

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:

sqrt(2)

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

EDIT:

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

Comments

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 12:29:48 -0500 )edit
marmistrz gravatar imagemarmistrz ( 2015-12-12 12:31:11 -0500 )edit

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

tmonteil gravatar imagetmonteil ( 2015-12-13 08:07:36 -0500 )edit
0

answered 2015-12-13 02:08:10 -0500

marmistrz gravatar image

updated 2015-12-13 02:14:59 -0500

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

Comments

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

tmonteil gravatar imagetmonteil ( 2015-12-13 07:48:31 -0500 )edit
0

answered 2015-12-11 15:14:54 -0500

updated 2015-12-11 15:15:34 -0500

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

Comments

No success here. Sage 6.9 was my first install

marmistrz gravatar imagemarmistrz ( 2015-12-12 12:38:08 -0500 )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

Stats

Asked: 2015-12-08 02:00:37 -0500

Seen: 316 times

Last updated: Dec 13 '15