Install & Compatibility
Where this runs
tested against v0.2.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 78.6MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 8.7s · import 0.000s · 76MB
78MB installed
● package 78MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
MathJaxExtension
✓ from jupyter_server_mathjax import MathJaxExtension
✗ from jupyter_server_mathjax import load_jupyter_server_extension
Install the extension and enable it for your Jupyter server. Once enabled, MathJax will automatically be available for rendering mathematical expressions in notebooks, typically through Markdown LaTeX syntax. No direct Python code is required to use the MathJax functionality after the server extension is active.
# Install the package
# pip install jupyter-server-mathjax
# Enable the server extension (usually done once per environment)
# import subprocess
# subprocess.run(["jupyter", "server", "extension", "enable", "jupyter_server_mathjax", "--sys-prefix"])
# This library provides server-side MathJax resources. Its effect is observed
# in Jupyter notebooks/Lab where MathJax is used for rendering LaTeX.
# Example of Math in a Jupyter Notebook cell (Markdown):
# $$\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$$
# Or inline: The famous equation $E=mc^2$.
# No direct Python code interaction is typically needed to "use" MathJax itself after installation.
print("Jupyter Server MathJax is installed and enabled via the command line.")
print("To verify, start Jupyter (e.g., 'jupyter lab') and render a LaTeX equation in a Markdown cell.")
Debug
Known issues
gotchaThe extension requires explicit enabling after installation using `jupyter server extension enable jupyter_server_mathjax`. Simply installing the package via pip is not enough for it to become active.fixRun `jupyter server extension enable jupyter_server_mathjax` after `pip install jupyter-server-mathjax`.
affects: All versions
breakingFor JupyterLab users, the method of enabling extensions changed significantly with JupyterLab 3.0+. Older versions used `jupyter labextension install`, but modern JupyterLab (3.0+) relies on `jupyter server extension enable` for this type of server extension.fixFor JupyterLab 3.0+, use `jupyter server extension enable jupyter_server_mathjax`. For JupyterLab 2.x, `jupyter labextension install @jupyter-server/mathjax` might have been used for similar functionality, but this package specifically targets `jupyter_server`.
affects: JupyterLab < 3.0 vs >= 3.0
gotchaIf MathJax rendering issues occur, ensure no other frontend extensions or custom configurations are conflicting with `jupyter-server-mathjax`'s provision of MathJax resources.fixCheck your browser's developer console for JavaScript errors. Temporarily disable other frontend extensions to isolate the issue. Consult JupyterLab/Notebook documentation for advanced MathJax configuration.
affects: All versions
deprecatedUsing `jupyter nbextension enable` for this package is incorrect. `jupyter-server-mathjax` is a `jupyter_server` extension, not an `nbextension` (which is an older type of extension primarily for classic Jupyter Notebook).fixAlways use `jupyter server extension enable jupyter_server_mathjax`.
affects: All versions
Upgrade
Version history
0.2.6latest on PyPI · released Jul 14, 2022
Audit
Dependencies
No dependency data recorded yet.