mathjax / MathJax

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

v4-beta3 SVG inline linebreaking creating invalid markup #3087

Open pkra opened 1 year ago

pkra commented 1 year ago

With inline linebreaking, mathjax generates mjx-linestrut elements inside svg element - which doesn't seem to affect layout but is invalid.

E.g. $a \overset{\text{hello world}}{=} b$ exhibits the problem for me.

dpvc commented 1 year ago

In order to handle embellished operators when in-line breaking is allowed, I had to add a function to lay out embellished operators separately from normal ones. It looks like I wrote the CHTML version first, then copied it for SVG and modified it. The mjx-linestrut is needed for CHTML, but not for SVG, and I missed it when adapting the function to the SVG output.

I've made a PR to remove it.