Skip to content

Instantly share code, notes, and snippets.

Created July 22, 2020 19:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?

Script levels in MathML are about managing the font-size in subexpressions (like scripts and fractions). This example illustrates and describes some of the concepts/implications. The method for doing this is not quite as simple as inheriting, so the MathML-Core spec introduces a new scriptlevel() function

e example in

Depending on context (exponents, fractions, etc) and particulars of rendering style (compact/inline), the font-size of of parts of expressions scale down at different and fairly well established rates - for example, the scaling factor adjustment of a superscript is not the same as that of a root's prescript. The example below shows several contextual scaling variations.

rendering of An exponent with an exponent, a root with a prescript and a fraction containing another fraction

The common rules derive from TexBook, but they are subtle and deserve to be exposed for tweaking and extension by authors. To this end, MathML adds a new scriptlevel function for CSS Fonts Module Level 4 which allows authors to express that the value should be automatically derived (default), or explicitly set to a specific level or that it should be the current level + some integer with rules defined in section 4.5 of the spec

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