Skip to content

Commit

Permalink
Add documentation for mathjax2_config and mathjax3_config
Browse files Browse the repository at this point in the history
  • Loading branch information
mgeier authored and tk0miya committed Apr 24, 2021
1 parent fde1f41 commit 778faff
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions doc/usage/extensions/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ are built:
Version 4.0 changes the version of MathJax used to version 3. You may need to
override ``mathjax_path`` to
``https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML``
or update your configuration options for version 3.
or update your configuration options for version 3
(see :confval:`mathjax3_config`).

.. versionadded:: 1.1

Expand Down Expand Up @@ -199,24 +200,58 @@ Sphinx but is set to automatically include it from a third-party site.

.. versionadded:: 1.8

.. confval:: mathjax_config
.. confval:: mathjax3_config

The configuration options for MathJax v3 (which is used by default).
The given dictionary is assigned to the JavaScript variable
``window.MathJax``.
For more information, please read `Configuring MathJax`__.

__ https://docs.mathjax.org/en/latest/web/configuration.html#configuration

The default is empty (not configured).

.. versionadded:: 4.0

.. confval:: mathjax2_config

The configuration options for MathJax v2 (which can be loaded via
:confval:`mathjax_path`).
The value is used as a parameter of ``MathJax.Hub.Config()``.
For more information, please read `Using in-line configuration options`__.

The inline configuration options for mathjax. The value is used as a
parameter of ``MathJax.Hub.Config()``. For more information, please
read `Using in-line configuration options`_.
__ http://docs.mathjax.org/en/v2.7-latest/
configuration.html#using-in-line-configuration-options

For example::

mathjax_config = {
mathjax2_config = {
'extensions': ['tex2jax.js'],
'jax': ['input/TeX', 'output/HTML-CSS'],
}

The default is empty (not configured).

.. versionadded:: 4.0

:confval:`mathjax_config` has been renamed to :confval:`mathjax2_config`.

.. confval:: mathjax_config

Former name of :confval:`mathjax2_config`.

For help converting your old MathJax configuration to to the new
:confval:`mathjax3_config`, see `Converting Your v2 Configuration to v3`__.

__ https://docs.mathjax.org/en/latest/web/
configuration.html#converting-your-v2-configuration-to-v3

.. versionadded:: 1.8

.. _Using in-line configuration options: https://docs.mathjax.org/en/latest/configuration.html#using-in-line-configuration-options
.. versionchanged:: 4.0

This has been renamed to :confval:`mathjax2_config`.
:confval:`mathjax_config` is still supported for backwards compatibility.

:mod:`sphinx.ext.jsmath` -- Render math via JavaScript
------------------------------------------------------
Expand Down

0 comments on commit 778faff

Please sign in to comment.