Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MathJax lazy loading. #11597

Merged

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Aug 15, 2023

Fix #9686 (html output).
Fix #10192 (math in toctree).
Fix #11483 (singlehtml output).

  • html: MathJax is not loaded when the math equation is in a title and the document is included in a toctree. At least, this does not require to always include HTML assets (which may be an overkill when you have a lot of pages but only one containing math equations).
  • singlehtml: MathJax is only loaded depending on whether index.rst contains math equations or not. Previously, the hack was to use set_html_assets_policy('always'), but this may have side-effects in the future.

@picnixz
Copy link
Member Author

picnixz commented Sep 21, 2023

I'll update the CHANGES as well.

CHANGES.rst Outdated Show resolved Hide resolved
sphinx/domains/math.py Outdated Show resolved Hide resolved
@AA-Turner AA-Turner merged commit 46f8f76 into sphinx-doc:master Sep 21, 2023
22 of 23 checks passed
@picnixz picnixz deleted the feature/11483-force-include-mathjax branch September 22, 2023 07:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants