-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add mathjax3_config config option
#9094
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
Conversation
|
I also don't have a magical bullet for this problem. But I think this would help for Sphinx users who have their own |
|
It's not perfect, but I think we can use this! Thanks to the new explicit config names |
|
@tk0miya Should I add a If you decide to merge this, I can add some documentation (either here or in a separate PR). |
|
To suppress the warning is meaningless to me. If my understanding correct, the math configuration would not work when the warning is shown. Users should update their configuration instead of suppressing. So it's not needed.
I'll merge this after a while (maybe 3-4 hours later). If you have time until then, please add a document and CHANGES entry. It's helpful to me. |
|
OK, I'm on it ... |
|
OK, done, I've added some docs: https://sphinx--9094.org.readthedocs.build/en/9094/usage/extensions/math.html#confval-mathjax3_config I didn't know a good example value for |
|
Thank you for your update! Merging now. |
|
Oops. I wrongly merged this into the 4.x branch. I'll cherry-pick this into the 4.0.x branch manually. |
|
Thanks @tk0miya! |
|
This looks great, thanks very much @mgeier - many will benefit from this! |
refactor: Add testcase for mathjax3_config (refs: #9094)
This is a draft for an alternative to #8940 and #8971, and it might eventually close #8195 (or not!).
The limitation (for me) is that this still doesn't solve my problem mentioned in #8195 (comment).
Let me describe the problem in more detail:
In
nbsphinxI would like to provide default values for bothmathjax2_configandmathjax3_config, in order for users to be free to choose whichever version they want withmathjax_pathand always get my defaults.If I provide defaults for both
mathjax2_configandmathjax3_config, the current logic in this PR will not raise a warning.This may sound OK, but if a user previously (and correctly) used
mathjax_config, their custom config will stop working and there will be no warning!I could instead only provide a default in
nbsphinxformathjax3_config(and leavemathjax2_config/mathjax_configuntouched), but this wouldn't help in the previous case where a user usesmathjax_config, because the warning would still not be shown.Any ideas how to make this work?
Feature or Bugfix
Something in-between.
Purpose
Provide a way to specify MathJax v3 settings.
Details
If both
mathjax2_configandmathjax3_configare given, both configurations will be written to the HTML output.