How to enable MathJax in Jupyter 4 again

4,558 views
Skip to first unread message

Dietmar Winkler

unread,
Aug 13, 2015, 9:26:20 AM8/13/15
to Project Jupyter
Hi,

I've noticed that since upgrading from ipython notebook 3.2.1 to jupyter 4 the LaTeX in my notebooks and the output of sympy is no longer rendered using MathJax.

Looking at the source I notice that in 3.2.1 this line was included:


which now in 4 has become:

<script type="text/javascript" src="/static/components/MathJax/MathJax.js?config=TeX-AMS_HTML-full&delayStartupUntil=configured" charset="utf-8"></script>


So that means one needs to have MathJax locally installed in order to use it. Is there anywhere a configuration setting to make Jupyter use the cdn again instead?

Thanks,
Dietmar



Dietmar Winkler

unread,
Aug 13, 2015, 12:02:11 PM8/13/15
to Project Jupyter
So it turns out (after a long search and trial and error session) it was a Firefox problem only on my side (but might just as well have been Chromeium or any other browser) because it was the evil cookies that did this. I had at some point in the past played around with MML rendering and that was stuck in a cookie.

Solution: Clear the cookie.

One can also test this quite easy by using the private mode just to see if MathJax then loads.

Thanks to @jasongrout on gitter for his patience and help.

/D/

Matthias Bussonnier

unread,
Aug 13, 2015, 1:31:58 PM8/13/15
to jup...@googlegroups.com
Thanks for reporting back on the Mailing list !

--
M
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+u...@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/a5c9e44a-c189-4754-a829-d7c9bb1b0074%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Klaus Scheicher

unread,
Aug 25, 2015, 8:32:19 AM8/25/15
to Project Jupyter
I encountered the same problem. 
However cleaning the coockie does not work...

Oleksandr Vasiliev

unread,
Sep 3, 2015, 10:05:30 AM9/3/15
to Project Jupyter
Clearing cookie doesn't help. 
Notebook server log in CLI gives this: 404 GET /static/components/MathJax/extensions/TeX/mhchem.js?rev=2.5.3 (127.0.0.1) 8.81ms referer=http://localhost:8888/notebooks/gdriveinsync/my_notebook.ipnb.

Any thoughts?

Kristijonas Broga

unread,
Sep 3, 2015, 10:51:56 AM9/3/15
to jup...@googlegroups.com
If you are using anaconda then there is/was a problem with the MathJax version installed. If you download mathjax and replace <anaconda path>/lib/python2.7/site-packages/notebook/static/components/MathJax with downloaded version all the errors should disappear. Well at least they did disappear for me.

Cheers,
Kris
--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

nil...@gmail.com

unread,
Sep 4, 2015, 7:02:06 PM9/4/15
to Project Jupyter
I also had the problem. The folder /usr/local/lib//python2.7/dist-packages/notebook/static/components/MathJax/
extensions/TeX didn't exist at all. I replaced the existing MathJax folder by a https://github.com/mathjax/MathJax clone, after that everything worked as before (only the font seems slightly different to me).


MinRK

unread,
Sep 5, 2015, 3:56:26 PM9/5/15
to jup...@googlegroups.com
@nilqed how did you install the notebook?

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.

nil...@gmail.com

unread,
Sep 5, 2015, 6:14:45 PM9/5/15
to Project Jupyter
Well, on Ubuntu 14.04 I did: sudo pip install -U jupyter
Before that I had IPython 3.0dev.

Actually the MathJax folder was there, only the TeX extensions were lacking ... so all '\def ...' ignored.

 ... freeze
ipykernel==4.0.3
ipython==4.0.0
ipython-genutils==0.1.0
ipywidgets==4.0.2
jsonschema==2.5.1
jupyter==1.0.0
jupyter-client==4.0.0
jupyter-console==4.0.2
jupyter-core==4.0.4
lockfile==0.8
lxml==3.3.3
mercurial==2.8.2
mistune==0.7
nbconvert==4.0.0
nbformat==4.0.0
notebook==4.0.4


Oleksandr Vasiliev

unread,
Sep 24, 2015, 8:45:05 AM9/24/15
to Project Jupyter
Thanks! Cloning MathJax works.
Reply all
Reply to author
Forward
0 new messages