You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the dollarmath 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.
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
Write a jupytext markdown file with dollar math expressions
Include it in a sphinx documentation set up with the myst_nb extension enabled
Build the documentation site and look at the outputs.
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
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?
It is to be noted that this issue, when a custom MathJax distribution is used, is fixed1 by adding the following line in conf.py:
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.
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: