pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Absorb surrounding punctuation into inline math

Open rbeezer opened this issue 9 years ago • 5 comments

Browsers and MathJax do not always handle line breaks well for punctuation adjacent to inline math. We can absorb these into the math via \text{}. This seems to be limited to HTML and not necessary for LaTeX.

Similar work for display math is at 63c228d3 and 774a7e58

rbeezer avatar Jan 28 '17 18:01 rbeezer

For something like (such as y=mx+b) we may need to be careful about the fonts used for the two parentheses. See the MathJax config flag mtextFontInherit documented at

http://docs.mathjax.org/en/latest/options/HTML-CSS.html

rbeezer avatar Feb 04 '17 20:02 rbeezer

Trailing, clause-ending punctuation has been implemented at ff534cfe

But there is more to do before closing this.

rbeezer avatar Feb 05 '17 20:02 rbeezer

At the accessibility workshop, we learned that having HTML where punctuation has been pulled inside the math is bad. Can we wrap the math and adjacent punctuation (including things like "-axis") inside a span that does not permit line breaking?

Alex-Jordan avatar Nov 16 '18 19:11 Alex-Jordan

A complicated problem, mostly resolved.

davidfarmer avatar Feb 22 '22 04:02 davidfarmer

We are still putting things like \text{.} inside inline math. We should stop doing that, and PR #1596 is one approach.

Alex-Jordan avatar Feb 22 '22 05:02 Alex-Jordan