Notebook with mathjax without internet connection

There are several use cases where one wants to use a notebook without an internet access, e.g. while travelling, or while giving a talk using a notebook for presentation.

However, in the latest notebook releases MathJax is normally only available from a CDN,
and there seem to be no easy way to customize it to use a locally installed MathJax.

Are there any resources to check to see how this can be done?
I only found here a similar thread, where the only solution offered seemed to be wildly complicated - use ngnix to replace requests to CDN resources with requests to a local installation.

1 Like

Which version of notebook are you using? I’ve just tested version 7.1.0 with the examples from Motivating Examples — Jupyter Notebook 7.1.0 documentation and all requests were to localhost:8888 only.

I can reproduce this with the latest jupyterlab from PyPI and jupyter-mathjax2 from PyPI.

However, with jupyter-mathjax3 it indeed works - probably close to your setup?

Perhaps there is a hacky way to install extra mathjax2 things to fix this, but it’s not clear.

I don’t have any version of jupyter-mathjax* installed and Markdown equations are still rendered.

What happens if you create a new virtual environment with just Notebook 7 or JupyterLab 4?

OK, indeed, just jupyterlab alone suffices.

However, what does break offline MathJax in a notebook, it’s jupyterlab-mathjax2 package. Not sure this is a bug or a feature, or just something obsolete and bitrotten.