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

"\\" do not render a newline. #2045

Closed
DayuanJiang opened this issue Aug 7, 2018 · 1 comment
Closed

"\\" do not render a newline. #2045

DayuanJiang opened this issue Aug 7, 2018 · 1 comment
Labels
Expected Behavior This is how MathJax works

Comments

@DayuanJiang
Copy link

DayuanJiang commented Aug 7, 2018

$$ a \\ b $$ should render

a
b

But I only get

a b

in my blog.
And this is my test page http://www.jiang.jp/blog/test/ .
I use python-markdown to convert the code to html. Dose this the reason "\\" do not work?
I know this issue maybe not related to mathjax but I have googled for near 1 hour and didn't find anyone who had the same problem.

@dpvc
Copy link
Member

dpvc commented Aug 7, 2018

Markdown uses the backslash (\) as an escape character to prevent a special character from having its usual meaning, and \\ means include a literal \. This means your \\ is being turned into a \ by markdown, so the HTML page that MathJax processes only has a single \, not a double one, and that does not produce a new line.

You will need to double all the backslashes (so use \\\\ rather than \\), and will probably have to use \_ instead of _, if your flavor of Markdown uses _ to indicate italics.

See the MathJax documentation for more details about using MathJax in HTML and Markdown documents.

@dpvc dpvc added the Expected Behavior This is how MathJax works label Aug 7, 2018
@dpvc dpvc closed this as completed May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expected Behavior This is how MathJax works
Projects
None yet
Development

No branches or pull requests

2 participants