executablebooks / markdown-it-docutils

A markdown-it plugin for implementing docutils style roles/directives.
https://executablebooks.github.io/markdown-it-docutils/
MIT License
12 stars 8 forks source link

Align math parsing with Sphinx? #38

Open agoose77 opened 2 years ago

agoose77 commented 2 years ago

Context

Sphinx applies some heuristics to determine what kind of outer environment to apply to math blocks: Unfortunately for us, they don't do the same thing for mathjax as they do for LaTeX: https://github.com/sphinx-doc/sphinx/blob/4b28bdd83bd30cc05986b8573b348a9853fb44fe/sphinx/util/math.py#L23-L55 https://github.com/sphinx-doc/sphinx/blob/4b28bdd83bd30cc05986b8573b348a9853fb44fe/sphinx/ext/mathjax.py#L36-L65

In any case, we should align ourselves with whatever Sphinx ultimately runs with (probably the LaTeX impl as it is newer).

Proposal

No response

Tasks and updates

No response