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]
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.
Text baseline 2026-11-05
A text baseline is the reference line used to align glyphs in a run of text. It supplies a placement reference rather than the edge of every visible shape. In a horizontal coordinate system with the baseline at , a descender can extend below the line, while an ascender extends above the main body of a lowercase letter. Aligning ink bounding boxes at their bottom edges would therefore fail to align the writing.[ref]
The reference depends on the writing system and layout. OpenType distinguishes an alphabetic baseline (romn), a hanging baseline (hang) and a mathematical baseline (math), among others. The last is the reference about which mathematical forms are centred; it need not coincide with the alphabetic baseline. Vertical layout also requires an appropriate baseline convention.[ref]
For a simple horizontal run, start the logical pen position at on the chosen text baseline. A glyph advance moves the next pen position to . A vertical placement adjustment can move an accent glyph while leaving that baseline and the subsequent logical positions intact. This distinction lets glyph positioning align the run while placing individual forms precisely.
Typesetting box 2026-11-05
A typesetting box is a piece of material treated as one unbreakable item at a given stage of line breaking. The simple paragraph model assigns it a width. A word already assembled from glyphs, or a small diagram placed within text, can be represented by such an item.[ref]
For example, three boxes of widths 8, 6 and 10 separated by two spaces of width 3 occupy . Keeping the boxes fixed while changing only the spaces is the model used by typesetting glue. If hyphenation makes an internal split available, the word must instead be represented with that discretionary break; a single indivisible box would hide the choice.
A box's width describes layout advance, which need not equal the exact ink extent of its glyphs. A more complete TeX box also has height and depth relative to a text baseline. These measurements allow boxes to be combined while maintaining baseline geometry.[ref] The CSS box model uses its own rules for content, padding, borders and margins; interpreting every CSS box as an indivisible paragraph item would lose those distinctions.