Skip to main content

A Sphinx extension for rendering math on HTML pages.

Project description

The extension uses KaTeX for rendering of math in HTML pages. Itis designed as a replacement for mathjax which is slower in rednering, but comes as a build in extension with sphinx sphinx.ext.mathjax.

Usage

Installation:

pip install sphinxcontrib-katex

In your sphinx project, add the extension with:

extensions = [
    'sphinxcontrib.katex',
    ]

If you would like to add some LaTeX macros (\def) you can use the katex_macros config setting, for example:

katex_macros = r'''
    "\\i": "\\mathrm{i}",
    "\\e": "\\mathrm{e}^{#1}",
    "\\w": "\\omega",
    "\\vec": "\\mathbf{#1}",
    "\\x": "\\vec{x}",
    "\\d": "\\operatorname{d}\\!{}",
    "\\dirac": "\\operatorname{\\delta}\\left(#1\\right)",
    "\\scalarprod": "\\left\\langle#1,#2\\right\\rangle",
    '''

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinxcontrib-katex-0.1.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

sphinxcontrib_katex-0.1.6-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sphinxcontrib-katex-0.1.6.tar.gz.

File metadata

File hashes

Hashes for sphinxcontrib-katex-0.1.6.tar.gz
Algorithm Hash digest
SHA256 eeeee1a083cc58da47051fe4770c051342d36577fc2c5bf9f627efee7188c971
MD5 9668817b167e4ce94f2f67633574209a
BLAKE2b-256 e2d08b90dcb3d34e69ede9a9e7f0d4e1611e503923d12b2cf0742302e9682d9f

See more details on using hashes here.

File details

Details for the file sphinxcontrib_katex-0.1.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sphinxcontrib_katex-0.1.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eed82f4d15ac03119fd394d97290ae67be2d52262a0ae97e9cb98f2535d9b2fb
MD5 75e2cad97847de7cccd88c75911196f7
BLAKE2b-256 cd79842908cc9e673273f81ec49df3397d68ec3dbc8e986c1d0df962051d5beb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page