-
Notifications
You must be signed in to change notification settings - Fork 197
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
⬆️ UPGRADE: sphinx v4 (& drop sphinx v2, change mathjax override) #390
Conversation
Codecov Report
@@ Coverage Diff @@
## master #390 +/- ##
==========================================
- Coverage 90.54% 90.39% -0.16%
==========================================
Files 14 14
Lines 1830 1843 +13
==========================================
+ Hits 1657 1666 +9
- Misses 173 177 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
🥳 -- thanks @chrisjsewell. Will do some testing. What's your timeframe for feedback (i.e. when do you want to merge this?) |
Well ASAP I guess for those waiting on it, can you look in the next day or 2? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me, just one minor under-the-hood thought but it's no biggie. Exciting to see support for v4!
Also I believe this will close #378 so added that to the top comment
FYI this was already in the linked issues. In case you didn't know adding in the initial comment is only useful when you first create the PR; to auto-add to the linked issues, after that it doesn't do anything |
The main change is with mathjax. It's still a bit of a faff, but I think the approach is a little better:
tex2jax_process
andmathjax_process
classes are added to the top-level sections of myst documents (this "fixes" having to override setting for RST documents), this tells mathjax not to render for any math under this section (i.e. the entire document) by default. Themath
class is then added to the process list, which overrides the default, and so tells mathjax to render elements (and child elements) with this class.So basically it constricts mathjax to only rendering the elements we want.
This is also explained at; https://myst-parser--390.org.readthedocs.build/en/390/using/syntax.html#mathjax-and-math-parsing
As well as this, most of the sphinx test regression files have been split into sphinx3 (docutils<0.17) and sphinx4 (docutil 0.17) variants.
closes #378