Skip to content
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

Differences between KaTeX and MathJax (underscore in text math) #1267

Open
Tracked by #1270
rowanc1 opened this issue Jun 4, 2024 · 1 comment
Open
Tracked by #1270

Differences between KaTeX and MathJax (underscore in text math) #1267

rowanc1 opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rowanc1
Copy link
Member

rowanc1 commented Jun 4, 2024

It looks like if you have \text{something_with_underscores} in a math block, this works in MathJax and Jupyter, but with fail in MyST. This is due to the differences between LaTeX/KaTeX/MathJax:

Apparently this is actually incorrect LaTeX, but has been introduced as acceptable by MathJax. I think that MyST should parse this (via regexp) and patch it (and or react to the error, and fix it at that stage). This would support, for example, numpy-tutorials to have a smoother onboarding experience.

cc @melissawm @fperez (Note also that the numpy-tutorials content currently doesn't render in VSCode becase of this!)

@rowanc1 rowanc1 added the bug Something isn't working label Jun 4, 2024
@melissawm
Copy link

Thanks, @rowanc1 ! We got around it by escaping the underscore, but would definitely be great to see a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants