Warning
In most cases, you will likely want to use one of Sphinx's builtin Math extensions instead of this one.
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: .
Standalone, using the directive:
Here is some standalone math: .. mathmpl:: \alpha > \beta
which produces:
Here is some standalone math:
The mathmpl
role and directive both support the following options:
The font set to use when displaying math. See rcParams["mathtext.fontset"]
(default: 'dejavusans'
).
The font size, in points. Defaults to the value from the extension configuration option defined below.
The mathtext extension has the following configuration options:
Default font size, in points.
Additional image sizes to generate when embedding in HTML, to support responsive resolution images. The list should contain additional x-descriptors ('1.5x'
, '2x'
, etc.) to generate (1x is the default and always included.)
The .. mathmpl::
directive, as documented in the module's docstring.
© 2012–2021 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.5.1/api/sphinxext_mathmpl_api.html