Open JustTheCoolest opened 1 month ago
Well, version 2.7.5 used by StackExchange sites is pretty old (over six years old now). The current release is 3.2.2, and they have recently added an opt-in preference for using that instead of v2. but v3 doesn't support automatic line breaks. That is available in v4 (currently in beta release).
The issue you are seeing is due to the fact that when an inline formula is wider than the container, MathJax will break it, but it is in a box of its own, and in HTML-CSS output, that box is only as wide as the broken math rather than as wide as the whole container. If you switch to CommonHTML output (which is faster and less fragile), that should work better for you.
The issue was fixed in a later version of v2, though I don't remember which. In version 2.7.9 (the highest v2 version) HTML-CSS works like CommonHTML, making the box as wide as the container. That puts the broken inline math on lines separate from the preceding and following text, which is better but not idea. The in-line breaking in v4 is much better, and would put the first part of the math at the end of the same line with the preceding text, and the remainder of the math at the beginning of the next line of text, as you would expect.
When v4 is released, I expect StackExchange will move to that, though it may still be opt-in for the initial testing.
I'm marking as "expected behavior", as that is how MathJax works in v2, and that is not likely to change.
Issue Summary
When inline MathJax is getting rendered and has to wrap, it's wrapping only the MathJax portion of it, and not the surrounding normal text
Steps to Reproduce:
This is incredibly misleading especially when dealing with brackets in mathematics
Technical details: