sphinxcontrib-katex
A Sphinx extension for rendering math in HTML pages
Decision gist · record as of 2026-08-14
Yes, if you maintain Sphinx documentation with mathematical content and want faster rendering than MathJax. The extension is stable, permissively licensed, and has low install friction. However, note that the package is aging (413 days since last release) and optional server-side pre-rendering adds a nodejs dependency; verify compatibility with your Sphinx version before committing to it in a large project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Server-side pre-rendering requires nodejs and a katex executable installed and in your PATH; browser-only rendering has no additional system dependencies.
- Low install friction with a single runtime dependency on sphinx.
- The package is in production/stable status and maintained actively, with a recent commit in June 2025.
License · maintenance · safety
permissive license (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.
last release 2025-06-27 (413 days) · last repo commit 2025-06-27 · 30 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 129,229 downloads/mo, #11,678 on PyPI
Alternatives
Verify before relying
pip install sphinxcontrib-katex
# In conf.py of your Sphinx project:
extensions = ['sphinxcontrib.katex']
# Optional: enable server-side pre-rendering
katex_prerender = True- Whether the package's aging maintenance status (413 days since last release) affects compatibility with recent Sphinx versions.
- Performance characteristics of server-side pre-rendering compared to browser-side rendering for large documentation sets.
- Completeness of KaTeX feature coverage relative to MathJax for complex mathematical notation.
What it is and what it does
sphinxcontrib-katex is a Sphinx extension that replaces the built-in MathJax renderer with KaTeX for displaying mathematical equations in HTML documentation. It processes LaTeX math delimiters in your documentation source and renders them using KaTeX's faster, lighter-weight engine. The extension supports custom LaTeX macros, configurable math delimiters, and optional server-side pre-rendering to shift rendering work from user browsers to your documentation build process.
The package integrates directly into Sphinx's build pipeline via its conf.py configuration file. It handles both inline and display math modes, allows fine-grained control over rendering options through katex_options, and can synchronize LaTeX macros across HTML and PDF builders. Optional nodejs-based pre-rendering trades build time for faster page loads in browsers.
Use it for
- Replace MathJax with faster KaTeX rendering in scientific or technical Sphinx documentation projects.
- Pre-render mathematical equations on your documentation server to reduce browser load and improve page load speed.
- Define custom LaTeX macros once and use them consistently across both HTML and PDF documentation builds.
- Configure math delimiters and KaTeX rendering options to match your documentation's mathematical notation style.
- Migrate existing Sphinx documentation from the built-in mathjax extension to KaTeX with minimal configuration changes.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you maintain Sphinx documentation with mathematical content and want faster rendering than MathJax.
The extension is stable, permissively licensed, and has low install friction. However, note that the package is aging (413 days since last release) and optional server-side pre-rendering adds a nodejs dependency; verify compatibility with your Sphinx version before committing to it in a large project.
Install
sphinxcontrib-katex on PyPI
Before you install
Low install friction with a single runtime dependency on sphinx. The package is in production/stable status and maintained actively, with a recent commit in June 2025. However, it is aging relative to its release cadence, and optional server-side pre-rendering requires a separate nodejs installation.
Server-side pre-rendering requires nodejs and a katex executable installed and in your PATH; browser-only rendering has no additional system dependencies.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open and closed projects.
Quickstart
pip install sphinxcontrib-katex
# In conf.py of your Sphinx project:
extensions = ['sphinxcontrib.katex']
# Optional: enable server-side pre-rendering
katex_prerender = True
Verify before relying
- Whether the package's aging maintenance status (413 days since last release) affects compatibility with recent Sphinx versions.
- Performance characteristics of server-side pre-rendering compared to browser-side rendering for large documentation sets.
- Completeness of KaTeX feature coverage relative to MathJax for complex mathematical notation.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesphinx |
| Maintenance | Aging 413 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 129,229 / month, #11,678 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: DocumentationTopic :: Scientific/EngineeringTopic :: Utilities |
Evidence: sphinxcontrib_katex-0.9.11-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sphinx math rendering”
- sphinxcontrib-katexA Sphinx extension that renders mathematical equations in HTML…
- sphinxcontrib-jsmathA Sphinx extension that renders mathematical display equations in…
- sphinx-math-dollarA Sphinx extension that lets you write LaTeX math in reStructuredText…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also python-markdown-math · sphinxcontrib-jsmath · sphinx-math-dollar · sphinx-jupyterbook-latex · sphinxcontrib-htmlhelp · py-asciimath · sphinx-markdown-tables · simple-equ · latex2sympy2-extended · sphinxcontrib-serializinghtml