Mathematical typesetting 2026-11-05
Mathematical typesetting arranges symbolic expressions in two dimensions. It must coordinate computer fonts, glyph positioning, typesetting boxes and text baselines while preserving the expression's visible structure. A typeset fraction positions its components above and below a bar; superscripts, subscripts, square roots and mathematical delimiters impose other geometric relationships.[ref]
For example,
contains a superscript inside the upper component and a square root inside the lower component. Their dimensions help determine the height of the complete typeset fraction. A larger expression may then require larger surrounding mathematical delimiters. Laying out the smallest parts first makes this a recursive geometric construction.
An OpenType MATH table supplies font-specific information such as placement constants and suitable glyph variants. The table supplies data for layout; different implementations can use those data in different algorithms. TeX and LaTeX provide established authoring systems for expressing such mathematical structure.[ref]
OpenType MATH table 2026-11-05
For example, a tall typeset fraction can require larger surrounding mathematical delimiters. The font may offer several ready-made parentheses and parts for assembling still taller ones. An implementation can use those data together with the expression's measured dimensions. Merely scaling one outline uniformly could change its stroke weight along with its height; the supplied variants and parts give the font designer more control over the result.
The same general division of labour applies to subscripts and superscripts: a font supplies relevant dimensions and placement information, while the layout process combines them with the actual expression. The table is a data interface used by layout algorithms. It does not uniquely prescribe the complete appearance of every formula.[ref]
Superscript 2026-11-05
A superscript is a component raised relative to a base expression, commonly also reduced in size. An exponent in is one use. The superscript in can instead denote a derivative when that convention has been specified. The typographic position supports several meanings.
In TeX, x^2 supplies one token as the superscript and x^{n+1} groups a longer expression. In MathML, msup lays out the base and superscript separately, with vertical placement and gap constraints.[ref]
For example, the base and raised expression in
have different local baselines. A mathematical typesetting style determines how the raised expression is presented. When subscripts and superscripts are both attached, their mutual clearance also matters; independently moving each one without considering the other could cause a collision. An OpenType MATH table provides font-specific data used for these choices.