You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
though, the app.add_js_file() method for the main MathJax.js script is called before the config scripts are added; the solution to this would be to move the first part of the code here, dealing with the MathJax.js script, after the two if blocks which handle the mathjax2_config and mathjax3_config.
How to Reproduce
$ git clone https://github.com/juliangilbey/abydos.git
$ cd abydos
$ git checkout sphinxbug
$ pip install cython
$ pip install -r requirements-dev.txt
$ pip install abydos
$ cd docs
$ make html SPHINXOPTS="-D language=de"
$ # open _build/html/abydos.distance.html and see the MathJax header lines, somewhere around line 18
(Note that there may be a lot of "undefined label" warnings, but I do not yet understand the source of these; this is an unrelated issue.)
Expected behavior
The MathJax lines in the above html file appear as:
Oh, and it turns out this fix, while harmless, is not actually needed, because the defer option means that MathJax.js is not actually loaded until later. But this order is the way it appears in the MathJax documentation, so it might be beneficial anyway. Sorry for the unnecessary issue, and thanks for dealing with it so efficiently.
Describe the bug
According to the MathJax docs (see v2.7: http://docs.mathjax.org/en/v2.7-latest/configuration.html#using-in-line-configuration-options and v3.2: http://docs.mathjax.org/en/v3.2-latest/web/configuration.html#configuration-using-an-in-line-script), it is necessary to run the configuration before loading MathJax itself. In
sphinx/sphinx/ext/mathjax.py
Lines 82 to 98 in 6473141
app.add_js_file()
method for the main MathJax.js script is called before the config scripts are added; the solution to this would be to move the first part of the code here, dealing with the MathJax.js script, after the twoif
blocks which handle themathjax2_config
andmathjax3_config
.How to Reproduce
(Note that there may be a lot of "undefined label" warnings, but I do not yet understand the source of these; this is an unrelated issue.)
Expected behavior
The MathJax lines in the above html file appear as:
but should appear in the opposite order as:
Your project
https://github.com/juliangilbey/abydos.git
Screenshots
No response
OS
Linux
Python version
3.9
Sphinx version
4.2.0 (same issue occurs with 4.3.0)
Sphinx extensions
sphinx.ext.mathjax
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: