Skip to content

mathjax loading on per page basis causes issue for nodes containing math in reference onlyΒ #40

@mmcky

Description

@mmcky

Describe the problem

It looks like mathjax doesn't get loaded by sphinx on page that contains nodes that reference math but don't explicitly include math on that page

For example:

.. solution:: exercise-1
    :label: solution-1

    This is a solution to exercise 1

references

.. exercise:: :math:`n!` factorial
    :label: exercise-1

    Exercise 1 about :math:`n!` factorial

But will result in:

Screen Shot 2021-11-29 at 12 23 25 pm

but if you add a math role anywhere on that page it will be correctly rendered.

Link to your repository or website

No response

Steps to reproduce

  1. Have a page with solution nodes only with references to exercise nodes that contain math in the titles

The version of Python you're using

No response

Your operating system

No response

Versions of your packages

No response

Additional context

I suspect this relates to loading mathjax on a per page basis

sphinx-doc/sphinx#9686

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions