Skip to content

Do not include MathJax.js unless it is really needed #5497

@mitya57

Description

@mitya57

When a project does not have any math directives or roles, still every HTML page has this tag when built with Sphinx 1.8:

<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

This is unwanted, and did not happen with Sphinx 1.7.

It would be nice if the tag was included only when the page (or the project as a whole) has a math directive or role.

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensions:mathematicsThe `sphinx.ext.imgmath`, `sphinx.ext.jsmath`, or `sphinx.ext.mathjax` extensionsmarkuptype:proposala feature suggestion

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions