-
Notifications
You must be signed in to change notification settings - Fork 196
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
Sphinx 4.0 Support (including Mathjax 3) #378
Comments
cc also @mgeier, in relation to: spatialaudio/nbsphinx#560 (thanks also for the work on |
In my case (nbsphinx) it is quite annoying that I have to tell users to use I've tried to solve the problem in the past by only parsing "math" elements: sphinx-doc/sphinx#5504. However now with both MathJax2 and MathJax3 being around this got a little more complicated. And BTW, please never use double dollars ( |
Why? |
https://tex.stackexchange.com/questions/503/why-is-preferable-to For me, the main reason is that there should be only one obvious way to do block equations, and that's math environments. I've seen several reports of confused users who used math environments nested within Probably related: #380 |
But then (a) you can't use them inline, and (b) a lot of people already use |
(but I do understand your viewpoint, and will have a think about it) |
Can you please clarify (a)? And yes, (b) is unfortunate, but at least Fernando shows signs of changing to proper environments in jupyter-book/jupyter-book#1181 (comment). |
My intuition is that if we deviate from |
I personally will never use double dollars, and I won't recommend it in any material I'm writing. It would be great if MyST-Parser would support math environments out-of-the-box and never use double dollars, but if it keeps doing it, the world will not end because of it. |
Hi all - What's the expected time frame on removing the version pinning? What are the main blockers to support sphinx >= 4.0.0? It seems only What are our options here? As someone who does not use |
You damn bleeding edge people 😆 Right I'll get this done on Monday 👍 |
@chrisjsewell any updates? |
Sphinx 4.0 is now out 🎉 and I'm sure there are some that are anxious to upgrade their documentation to use it.
We also certainly want to allow this.
However, there is currently one known blocker for trivially changing the dependency pinning in
setup.cfg
: sphinx-doc/sphinx#7425 / sphinx-doc/sphinx#9094 (Mathjax 3 support) and its interplay with the "dollarmath"/"amsmath" extension.In https://myst-parser.readthedocs.io/en/latest/using/syntax.html#mathjax-and-math-parsing, I discuss why we want to override default mathjax configuration;
in short because we do not want Mathjax to act as a parser (searching for math, since the Markdown parser already does this), only a renderer (rendering already identified math).
For example, if you set
myst_update_mathjax = False
, and did not have "dollarmath" nor "amsmath" inmyst_enable_extensions
, then all of these would still be rendered as math (only with HTML builders but not with other builders like LaTeX)or, another example, if you did have "dollarmath" enabled, but
myst_update_mathjax = False
, then escaped dollar signs would still be rendered as math (again only for HTML builders):The way we stop this occuring is to override some of the mathjax extension logic in myst_parser/mathjax.py. But this needs updating for Mathjax 3, plus I also want to revisit the logic and check that this is the best approach.
I should be able to do this by next week though 👍
Cheers,
Chris
The text was updated successfully, but these errors were encountered: