Where are the math font parameters?

I must post an answer because 600 characters are not enough. As D.C. has already pointed out (see comments), you are probably misunderstanding how math typesetting works: I’ll try to give you a brief (and oversimplified!) explanation of it.

There is no concept of “the font in which a formula is typeset”: indeed, each formula can, and in general will, make use of several fonts at the same time. By convention (more or less) at least four fonts are always available in every formula, each at three different sizes: a size for the “main level” symbols, one for subscripts, and the third one to be used at all subscript levels below the first one. In The TeXbook, this four fonts are referred to as “families”, numbered from 0 to 3: in the setting of plain TeX, and in the default setting for LaTeX, family 0 corresponds to cmr, family 1 to cmmi, family 2 to cmsy, and family 3 to cmex. In LaTeX, which uses the NFSS (New Font Selection Scheme), the terminology is different and more abstract, but the concept is exactly the same:

  • family 0 corresponds to the operators math group, that supplies, among other things, the characters for the ten digits and for operator names like “log”, “sin”, “lim”…;

  • family 1 corresponds to the letters math group, used for variables like “x”, “y”, “z”…;

  • family 2 corresponds to the symbols math group, from which characters like “∩”, “∪”, or “∈” are taken;

  • family 3 corresponds to the largesymbols math group, that comprises characters like “∑” (in two sizes) and the various growing delimiters.

Below, however, we’ll stick to the terminolgy used in The TeXbook. The three sizes, on the other hand, are distinguished by the three prefixes \textfont, \scripfont, and \scriptscriptfont; so, for example, \textfont1 is the font used for variables (letters) in the main size, \scriptfont0 is the font used for digits and operator names that appear in first-level subscripts, and \scriptscriptfont2 is the font used for symbols like “∩” that happen to occur at the second, or higher, subscript level. Let’s make a typical example: given the source code

$x_{A_{0}\cup B_{i}}$

the “x” will be in \textfont1, the “A” and the “B” will be in \scriptfont1, the “0” will be in \scripscriptfont0, the “∩” will be in \scriptfont2, and the “i” will be in \scriptscriptfont1. To make another example, the (in-line) formula

$\lim_{x\to0} \frac{\sin x}{x}$

will be typeset as follows (recall that the numerator and denominator of the fraction are set in \scriptstyle):

  • the word “lim” is in \textfont0;

  • all occurences of the variable “x” are in \scriptfont1;

  • “0” and the word “sin” are in \scriptfont0;

  • the arrow (\to) is in \scriptfont2.

The normal setting, if the formula is typeset at 10 points, is \textfont0 = cmr10, \scriptfont0 = cmr7, \scripscriptfont0 = cmr5, \textfont1 = cmmi10, and so on (exception: family 3 could exist only at 10 points, that is, as cmex10, but there are packages that give access to other sizes).

Additional fonts may be used in a formula: for example, you might want to use calligraphic letters. This is achieved by defining additional font families. Up to sixteen different families (each one in three sizes) can be used in a single formula. Different formulas can have different groups of 48.

You will now understand that the parameters that govern the placement of subscripts, the height of the math axis, and so on, cannot be bound to each single font, but are a property of the formula as a whole: indeed, in the formula $\frac{1}{x^{\bullet}}$, for example, the numerator, the denominator, and the superscript of the latter come from three different fonts (normally, cmr7, cmmi7, and cmsy5). The TeX engine assumes that certain parameters must be given as \fontdimen parameters of the font associated to family 2, and others as \fontdimen parameters of the font associated to family 3 (the values 2 and 3 are “hard-wired” into TeX itself); the current style of the (sub-)formula being typeset determines whether their \textfont, \scriptfont, or \scripscriptfont variants will be used. You find the details about which parameters are taken from which font in the table on p. 447 of The TeXbook that you mention in your question: all parameters denoted by a “σ” are looked for in the font associated to family 2, while those indicated with a “ξ” are assumed to be found in the font associated with family 3.

For further information, see The TeXbook, Chapter 17 and Appendix G.


The parameters described in Appendix G of the TeXbook are taken from the fonts in math families 2 and 3. If a (sub)formula is typeset in display or text style, the values are taken from \textfont2 and \textfont3; script and scriptscript styles use \scriptfont2, \scriptfont3,\scriptscriptfont2and\scriptscriptfont3`.

The fonts current at the end of a formula will be used.

You can see which ones are used by stix with an input such as

\documentclass{article}
\usepackage{stix}

\begin{document}

$a$ \expandafter\show\the\textfont2 \expandafter\show\the\textfont3

\stop

that will display on the terminal (hit return twice)

> \LS1/stixscr/m/n/10=select font stix-mathscr.
<inserted text> \LS1/stixscr/m/n/10 

l.6 $a$ \expandafter\show\the\textfont2 
                                        \expandafter\show\the\textfont3
? 
> \LS2/stixex/m/n/10=select font stix-mathex.
<inserted text> \LS2/stixex/m/n/10 

l.6 ...e\textfont2 \expandafter\show\the\textfont3

? 

We need to typeset a formula, because in LaTeX math font families are set only at the last moment, in order to allow different sizes in the same document.

If we do tftopl stix-mathscr, we get

(FAMILY STIXMATHSCRIPT)
(FACE F MRR)
(CODINGSCHEME STIXMATHSCR)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 7425717650)
(SEVENBITSAFEFLAG TRUE)
(FONTDIMEN
   (SLANT R 0.0)
   (SPACE R 0.0)
   (STRETCH R 0.0)
   (SHRINK R 0.0)
   (XHEIGHT R 0.45)
   (QUAD R 1.0)
   (EXTRASPACE R 0.0)
   (PARAMETER D 8 R 0.58)
   (PARAMETER D 9 R 0.48)
   (PARAMETER D 10 R 0.48)
   (PARAMETER D 11 R 0.7)
   (PARAMETER D 12 R 0.48)
   (PARAMETER D 13 R 0.4)
   (PARAMETER D 14 R 0.35)
   (PARAMETER D 15 R 0.275)
   (PARAMETER D 16 R 0.25)
   (PARAMETER D 17 R 0.35)
   (PARAMETER D 18 R 0.375)
   (PARAMETER D 19 R 0.05)
   (PARAMETER D 20 R 2.4)
   (PARAMETER D 21 R 1.0)
   (PARAMETER D 22 R 0.25)
   )

whereas tftopl stix-mathex gives

(FAMILY STIXMATHEXTENSIONS)
(FACE F MRR)
(CODINGSCHEME STIXMATHEX)
(DESIGNSIZE R 10.0)
(COMMENT DESIGNSIZE IS IN POINTS)
(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
(CHECKSUM O 7636115355)
(SEVENBITSAFEFLAG TRUE)
(FONTDIMEN
   (SLANT R 0.0)
   (SPACE R 0.0)
   (STRETCH R 0.0)
   (SHRINK R 0.0)
   (XHEIGHT R 0.45)
   (QUAD R 1.0)
   (EXTRASPACE R 0.0)
   (PARAMETER D 8 R 0.066)
   (PARAMETER D 9 R 0.15)
   (PARAMETER D 10 R 0.15)
   (PARAMETER D 11 R 0.3)
   (PARAMETER D 12 R 0.6)
   (PARAMETER D 13 R 0.1)
   )

These fonts are scalable, so for script and scriptscript styles you just scale the values.

Tags:

Fonts