Current mathjax loading on per-page basis breaks math in table of contents #9686
Labels
extensions:mathematics
The `sphinx.ext.imgmath`, `sphinx.ext.jsmath`, or `sphinx.ext.mathjax` extensions
type:bug
Milestone
Describe the bug
When a page doesn't use mathjax (:math:) it doesn't load mathjax. This breaks titles in the table of contents that do use math.
How to Reproduce
add otherpage to toctree of index.rst.
Expected behavior
Math is properly rendered in table of contents of index.html
Your project
n/a
Screenshots
OS
Linux
Python version
3.9.1
Sphinx version
3.5.1 and also 4.2.0 (probably also newer)
Sphinx extensions
sphinx.ext.mathjax
Extra tools
No response
Additional context
See implementation on per-page loading #6241
The text was updated successfully, but these errors were encountered: