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

Document Mathjax escaping #26

Open
cellio opened this issue Nov 5, 2020 · 3 comments
Open

Document Mathjax escaping #26

cellio opened this issue Nov 5, 2020 · 3 comments

Comments

@cellio
Copy link
Member

cellio commented Nov 5, 2020

https://math.codidact.com/questions/278763 reports a problem where somebody tried to use \ to create a newline in mathjax, which failed. It failed because \ needs to be escaped in markdown, so you have to write \\. See also https://math.codidact.com/questions/278270.

I don't know if there are other special cases besides .

Could we find a place in the mathjax help topic to cover this?

@pjt33
Copy link

pjt33 commented Nov 6, 2020

Correction: the standard MathJax (well, TeX) markup for a newline is \\, which has to be escaped to \\\\ at present.

There are various other escapes in TeX which begin \, and I think that some of them are passed through by Markdown and others not. E.g. \pi is fine, but \{ needs to be double-escaped to \\{.

@superplane39
Copy link
Member

Instead of trying to document every edge case, would it be simpler to make a code change so that the renderer doesn't try to process Markdown inside of a MathJax element? cc @ArtOfCode- @luap42

@MoshiKoi
Copy link
Member

This has come up again (https://math.codidact.com/posts/280742) so I'm bumping this thread. Like @superplane39 said, it's better to actually fix the renderer to be compatible with standard LaTeX, since we shouldn't expect people to have to go through a ton of effort to convert their LaTeX code into Codidact code (especially since the latex rendering is already painful enough).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants