matplotlib.sphinxext.mathmpl
#
A role and directive to display mathtext in Sphinx#
The mathmpl
Sphinx extension creates a mathtext image in Matplotlib and
shows it in html output. Thus, it is a true and faithful representation of what
you will see if you pass a given LaTeX string to Matplotlib (see
Writing mathematical expressions).
Warning
In most cases, you will likely want to use one of Sphinx's builtin Math
extensions
instead of this one. The builtin Sphinx math directive uses MathJax to
render mathematical expressions, and addresses accessibility concerns that
mathmpl
doesn't address.
Mathtext may be included in two ways:
Inline, using the role:
This text uses inline math: :mathmpl:`\alpha > \beta`.
which produces:
This text uses inline math: