TeX/definition/modes/Math mode

< TeX

Math mode, represented by $...$ in the code file, is a mode used by TeX compilers to specify the spacing between various glyphs. To this end, TeX has math glue, which functions almost identically to text glue, except that there are more nuances to the spacing interactions.

There are eight math styles, which affect scaling, subscripts and exponents, etc.: -display (D) -text (T) -script (S) -scriptscript (SS) and their cramped counterparts, D', T', S', SS'.

There are eight CLASSES of math objects, which behave differently from one another in math mode: 0. ordinary (\mathord, or {...}) is "just symbols," e.g. numbers -- not italicized 1. large operator (\mathop) is centered vertically on the axis, changes in size and placement of subscript and superscript depending on D or T -- can be controlled by \limits\displaylimits or \nolimits\displaylimits -- e.g. \sum and \lim 2. binary operator (\mathbin) e.g. + and \pm 3. relation (\mathrel) e.g. = and < (note that : is a relation, whereas \colon is punctuation) 4. opening symbol (\mathopen) -- note that this refers only to spacing, and that delimiter sizing is controlled by other means 5. closing symbol (\mathclose) 6. punctuation (\mathpunct) e.g. , and \colon 7. variable family (\fam) e.g. letters -- italicized