Skip to content

Instantly share code, notes, and snippets.

Last active Jul 22, 2020
What would you like to do?

In some cases in mathematical rendering it is desirable to minimize the logical height of an equation. This is generally done by common norms about font-sizing adjustments to parts of the equation, how some operators are drawn, how/where scripts are measured, and how vertical gaps and shifts are applied. Below is an example of the same equation rendered in two common ways, the one on the left applying the common rules to minimize the logical height, the one on the left, not.

math with normal and compact math-styles

For this purpose, we introduce the math-style property with values normal (default) and ``compact`.

MathML supported this via an attribute called displaystyle which was either the string 'true' or the string 'false' ()the rules and the term were derived from The TeXbook). MathML-Core introduces the math-style CSS property and defines how it works for rendering and layout. It maps this attribute's values as a presentational hint to the CSS property for reasons of compatibility with widely deployed content and the existing ecosystem of tools, but strongly recommends authors use CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment