Linebreaking

From formulasearchengine
Jump to navigation Jump to search

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 , or -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 and the comma or between 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:

Rule Example
The sum of the first integers is
The sum of the squares of the first integers is


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

Function Fourier transform unitary, ordinary frequency Fourier transform unitary, angular frequency Fourier transform non-unitary, angular frequency Remarks
301 The distribution denotes the Dirac delta function.
302 Dual of rule 301.
303 This follows from 103 and 301.
304 This follows from rules 101 and 303 using Euler's formula:
305 This follows from 101 and 303 using
306
307
308 Here, is a natural number and is the -th distribution derivative of the Dirac delta function. This rule follows from rules 107 and 301. Combining this rule with 101, we can transform all polynomials.
309 Here is the sign function. Note that is not a distribution. It is necessary to use the Cauchy principal value when testing against Schwartz functions. This rule is useful in studying the Hilbert transform.
310 is the homogeneous distribution defined by the distributional derivative
311 This formula is valid for . For some singular terms arise at the origin that can be found by differentiating 318. If Re α > −1, then is a locally integrable function, and so a tempered distribution. The function is a holomorphic function from the right half-plane to the space of tempered distributions. It admits a unique meromorphic extension to a tempered distribution, also denoted for (See homogeneous distribution.)
Special case of 311.
312 The dual of rule 309. This time the Fourier transforms need to be considered as Cauchy principal value.
313 The function is the Heaviside unit step function; this follows from rules 101, 301, and 312.
314 This function is known as the Dirac comb function. This result can be derived from 302 and 102, together with the fact that as distributions.
315 The function is the zeroth order Bessel function of first kind.
316 This is a generalization of 315. The function is the -th order Bessel function of first kind. The function is the Chebyshev polynomial of the first kind.
317 is the Euler–Mascheroni constant.
318 This formula is valid for . Use differentiation to derive formula for higher exponents. is the Heaviside function.