mathjax / MathJax

Beautiful and accessible math in all browsers
http://www.mathjax.org/
Apache License 2.0
10.22k stars 1.16k forks source link

Checking the compiled HTML file, I found that there has <mspace linebreak="newline"></mspace> , but there is actually no line break #3286

Open Beibeisheep opened 1 month ago

Beibeisheep commented 1 month ago

MathJax.version: 3.2.2 Configuration: import 'mathjax/es5/tex-svg.js'

When I first changed from version 2 to 3, I found that the line breaks did not work. I thought it was an escape problem at first, I tried many methods but couldn't solve it. Finally I find it tryed to break the line, but for some reason didn't work.

Example: original text:

$$
Hello\\world
$$

I want:

Hello
world

compiled HTML:

<mi>H</mi>
<mi>e</mi>
<mi>l</mi>
<mi>l</mi>
<mi>o</mi>
<mspace linebreak="newline"></mspace>
<mi>w</mi>
<mi>o</mi>
<mi>r</mi>
<mi>l</mi>
<mi>d</mi>

Actually, it shows

Helloworld

I would greatly appreciate any help or suggestions regarding this issue. Thank you!

dpvc commented 1 month ago

This is a duplicate of #2312, #3230, and others.

Line-breaking isn't available in v3, but is in v4, now out in beta release.