# Linebreaking

Note: You can resize your browser window to test line breaking at different position.

For mathematical formulas intended to be displayed on the Web, manual line breaking is not enough to ensure compatibility with the various screen resolutions of mobile, laptop or desktop computers. Contrary to static images, the new MathML mode opens the possibility for Web rendering engines to automatically break mathematical expressions in a clever way. Unfortunately, none of the existing MathML rendering engines implements a line breaking algorithm that is compatible with the CSS line breaking. Hopefully, this test page will help developers to improve the situation.

This paragraph contains a very long display expressions where we typically expect the break to happen at operators.

This paragraph contains several inline expressions like ${\displaystyle a+b+c+d}$, ${\displaystyle 1+{\frac {p}{q}}-{\sqrt {3}}}$ or ${\displaystyle {\frac {\pi }{2}}}$-periodic. Browsers generally have good line breaking for normal words but they should improve their support for mathematical line breaking. On the one hand, when we arrive at the end of a line of text, it should be possible to break a formula at operator position and to continue the formula on the next line. On the other hand, breaking a line between ${\displaystyle a+b+c+d}$ and the comma or between ${\displaystyle {\frac {\pi }{2}}}$ and the "-periodic" suffix does not seem good compared to what happens with normal words.

Finally, it is also very common to have table of formulas. Line breaking inside table cells is a bit more complicated but browsers are able to do it with normal text and could theory do the same for MathML too:

Below is a larger example taken from the Fourier transform article, with the manual line breaks removed.