2

I found this example of mathjax code that overflows when rendered:

$\color{red}{\textrm{Bacon ipsum dolor amet spare ribs shank cupim salami shoulder meatball sirloin chislic kevin swine cow meatloaf landjaeger filet mignon prosciutto. Hamburger cow salami ham jerky bresaola shankle porchetta sausage shoulder. Short ribs tail fatback porchetta pastrami brisket pork chop, doner rump sausage. Cupim swine flank porchetta rump. Biltong jowl corned beef kevin.}}$ 

I believe it is the \textrm command that causes it, as removing it makes the text obey the constraints.

I also think this issue is present on all sites that have mathjax rendering enabled - Physics, and Math, among others. Ironically, not the TeX site.

This is what it looks like in the preview:

Adding the very long text to a post has it overflow to the right of the post.

The same issue is present after you post, as well. I initially saw the issue in a posted answer:

Answer which has overflowing text.

1 Answer 1

10

MathJax is designed to display mathematics, not text. While it can handle some text-mode commands, its text-mode processing is very limited. Versions 2 and 3 do not support automatic line-breaking within text-mode. Version 4 does add this functionality, but I don't think SE has switched to version 4 yet.

Using MathJax simply to change the color of text is not an appropriate (or supported) use of MathJax.

The upshot is, this isn't a bug, it is a feature (that is, this is how MathJax works). Remember, MathJax is not LaTeX, it is a javascript implementation of a LaTeX-like input format.

1

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.