mathjax / MathJax

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

The \verb macro loses leading and trailing spaces, and multiple spaces #381

Closed dpvc closed 11 years ago

dpvc commented 11 years ago

The \verb macro passes its argument to <mtext> verbatim, but <mtex> removes leading and trailing spaces, and collapses multiple spaces.

dpvc commented 11 years ago

This issue is easily fixed by replacing spaces with non-breaking spaces before passing the string to <mtext>.

fred-wang commented 11 years ago

The test will be

LaTeXToMathML/verb-2.html

=> In testsuite

dpvc commented 11 years ago

The issue381 branch of my fork of MathJax includes the fix.

fred-wang commented 11 years ago

=> Ready for Release

dpvc commented 11 years ago

=> Merged

novoselt commented 11 years ago

For me everything works with SVG rendering, but not HTML-CSS, where multiple spaces inside of verb are too small - less than half of their spaces, which seems to be related to #380