-
Notifications
You must be signed in to change notification settings - Fork 50
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
mdformat escapes backslashes in LaTeX expressions #325
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Thanks for the issue! What do you use to render your Markdown? Mdformat is CommonMark compatible and CommonMark doesn't support LaTeX syntax. The added backslash will not change rendered CommonMark. It may change rendering of some other Markdown flavor/extension though. You'd probably need a plugin to support that though, unless you wrap your LaTeX in a code block. |
Hey 👋 Thanks for this cool module and for the fast answer! I was not aware LaTeX is not supported by CommonMark. I close the issue since I guess it's out of the scope. The above screenshots are from a Jupyter notebook in VsCode. It is rendered the same in Jupyter Lab. Jupyter Lab uses MathJax to render LaTeX and supports GitHub flavored markdown. But I'm not sure how everything is rendered under the hood. Do you know of such plugins or are they yet to be created 😅 ? |
Sorry for the delay. pip install mdformat-myst should bring support for the LaTeX syntax used in MyST. |
Describe the bug
Before formatting


After formatting
Reproduce the bug
I'm using pre-commit with the following configuration
pre-commit run --all-files
List your environment
The text was updated successfully, but these errors were encountered: