summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Geier <Matthias.Geier@gmail.com>2021-04-24 10:39:34 +0200
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2021-04-24 18:30:44 +0900
commit778faffecc1fbee8dda6d5af51fb0bd2209826c8 (patch)
treed7a3ec8cffe832fba1820dbd8efc9696805b0521
parentfde1f417c8e3cfc797538b96a58be9e080f71d99 (diff)
downloadsphinx-git-778faffecc1fbee8dda6d5af51fb0bd2209826c8.tar.gz
Add documentation for mathjax2_config and mathjax3_config
-rw-r--r--doc/usage/extensions/math.rst49
1 files changed, 42 insertions, 7 deletions
diff --git a/doc/usage/extensions/math.rst b/doc/usage/extensions/math.rst
index 655364767..5ac369a79 100644
--- a/doc/usage/extensions/math.rst
+++ b/doc/usage/extensions/math.rst
@@ -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
@@ -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
------------------------------------------------------