Skip to content

Instantly share code, notes, and snippets.

@bkardell
Last active July 22, 2020 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkardell/8317c76db494bb80b37799d9f183d51b to your computer and use it in GitHub Desktop.
Save bkardell/8317c76db494bb80b37799d9f183d51b to your computer and use it in GitHub Desktop.

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