Subscript 2026-11-05
A subscript is a component placed below the usual baseline of a base expression, commonly at a smaller size. It can label a term of a sequence, as in , or identify a matrix entry, as in . Its position does not by itself determine the mathematical meaning of the label.
In TeX,
x_i attaches a single-token subscript, while x_{i+1} groups a compound subscript. In MathML, msub supplies a base and subscript as separate children. Their layout uses baseline shifts and clearances rather than putting both components on the ordinary text baseline.[ref]MathML Core by World Wide Web Consortium. Subscripts and superscripts: msub child layout and shift calculations
For example, keeps together as one attached component. A mathematical typesetting style controls the treatment of the smaller expression. An OpenType MATH table can supply the font-specific placement data. This is why adding an underscore as an ordinary printed glyph would not reproduce the layout.
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]MathML Core by World Wide Web Consortium. Subscripts and superscripts: msup layout
For example, the base and raised expression inhave 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.
Typeset fraction 2026-11-05
A typeset fraction is a two-dimensional layout that places one expression above another, commonly with a horizontal rule between them. The components are laid out as typesetting boxes before they are assembled. In MathML, an
mfrac element supplies the two components; mathematical typesetting style affects their presentation.[ref]For example,has a superscript in its upper component and a square root in its lower component. Their dimensions influence the space above and below the fraction rule. The expression's algebraic meaning and its geometry are related but distinct: the layout can contain arbitrary expressions, including ones whose values are not rational numbers.
A simple own box model makes the horizontal placement explicit. Suppose the component widths are and , and the layout adds a chosen side allowance . If both components are centred in widththeir left offsets are and . This is an illustrative centring model; real layouts also use vertical clearances, rule thickness and font data from an OpenType MATH table.