Skip to content
Advertisement

Why doesn’t \ display a newline in mathjax?

I am under the impression that you should use \ for newlines with mathjax, however I can’t get it to work. What am I doing wrong here?

JavaScript

I expect to see 3 lines, but I get this:

unexpected formatting

Other stackoverflow posts claim that \ should work, eg: https://math.meta.stackexchange.com/questions/11720/new-line-within-mathjax

Advertisement

Answer

You should use HTML to break lines as MathJax only handles math mode and does not process the backslashes:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement