-
Notifications
You must be signed in to change notification settings - Fork 80
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
Dollar math in markdown cells is incorrectly rendered #590
Comments
I believe me and @agriyakhetarpal have pinpointed this to the MathJax distribution being hardcoded in MyST-NB. Since SciPy (the target project for these changes) uses a custom MathJax package, MyST-NB does not find it and can't render the math nodes. Would it be acceptable to propose a feature to customize the MathJax distribution used by MyST-NB? Thanks! |
It is to be noted that this issue, when a custom MathJax distribution is used, is fixed1 by adding the following line in myst_update_mathjax = False I hope this is helpful towards isolating the cause of the bug and narrowing it down to a specific configuration value. We would be happy to make a contribution to MyST-NB by proposing this as a feature, as mentioned by @melissawm above. xref: scipy/scipy#20518 Footnotes |
Describe the bug
context
I am using MyST-NB to write some of the SciPy documentation pages in Markdown and execute them as notebooks.
When I use the
{math}
role for displaying math, everything works as expected. Using thedollarmath
myst extension, however, results in\(
syntax showing in the displayed html file, instead of the dollar signs. The generated .ipynb file correctly displays dollar signs for math.I have experimented with
but it doesn't change anything for this case.
expectation
I expected math expressions to be correctly rendered as math in the html output.
bug
But instead I see the following output: (note, for example,
\(F^{-1}\)
)As I mentioned, the generated notebook is correct:
problem
This is a problem because I'd like the notebooks to be downloadable, and having dollar sign syntax instead of the
{math}
role syntax is more user-friendly in that case.Reproduce the bug
I know this is not the best reproducible set up but I can point to a branch where I have this set up: scipy/scipy#20303
And the corresponding output: https://output.circle-artifacts.com/output/job/f515f0f8-09d2-495c-a5bc-782826ff51e8/artifacts/0/html/tutorial/stats/sampling.html
List your environment
Full environment
The text was updated successfully, but these errors were encountered: