The math reference hover tips only work in furo theme, but not for other themes.
and It has been observed by other users, like this
It‘s caused by "filter the div with class 'math-wrapper' to build id_to_html". The 'math-wrapper' class is provided by furo theme but not by the mathjax extension. So in other themes, we will miss the equation element and fail to build the tips.
This commit aims to change the filter to div with class "math", "notranslate" and "no highlight", which is provieded by mathjax extension. and make the math preview work in other themes.
Fix the Equation hover in other themes
The math reference hover tips only work in furo theme, but not for other themes.
and It has been observed by other users, like this
It‘s caused by "filter the div with class 'math-wrapper' to build id_to_html". The 'math-wrapper' class is provided by furo theme but not by the mathjax extension. So in other themes, we will miss the equation element and fail to build the tips.
This commit aims to change the filter to div with class "math", "notranslate" and "no highlight", which is provieded by mathjax extension. and make the math preview work in other themes.
Visualzation test
before
With Furo
With classic
After
With Furo
With classic
References
Furo init function code that adds math-wrapper div
sphinx ext mathjax code that adds those three class