orsharir / github-mathjax

Chrome extension for rendering LaTeX equations in GitHub with MathJax
Other
154 stars 49 forks source link

newline is ignored. #27

Closed ghost closed 5 years ago

ghost commented 5 years ago

It seems that newline(\\) is ignored. For example:

$$
x\\
x^2
$$

Actual:

$$ x\ x^2 $$

muzimuzhi commented 5 years ago

Try

$$
x \\\\
x^2
$$

$$ x \\ x^2 $$

BTW, LaTeX + amsmath does not support raw newline in display math, unless it is inside some multi-row amsmath math environment. But MathJax supports this kind of input, as I have tested on mathjax.org. So personally I suggest to use a amsmath env, e.g. align(ed).

muzimuzhi commented 5 years ago

Also, this issue is duplicate of #26 .