[comp.text.tex] TeXBook questions: font family numbers

xiaofei@acsu.buffalo.edu (Xiaofei Wang) (12/28/90)

I exchanged info w/ local TeXperts but there are still questions
I am not able to comprehend.

In TeX Book, Pg 153, it mentions that there are 16 font families [I
presume this refers plain TeX]. What is the all names of fonts and
their family numbers?

Partial answer can be found through different channels:

cmr10 \rm \fam=0 
cmmi10 \mit \fam=1 
cmsy10 \cal \fam=2 
cmex10      \fam=3 
cmti10 \it [\fam=4]
cmsl10 \sl [\fam=5]
cmbx10 \bf [\fam=6]
cmtt10 \tt [\fam=7]

Foot note: bold face italic \fam=9 (pg 156)

The first 4 are provided by the TeX Book (Pg 351, 427). And the last
4's family numbers \itfam, \slfam, \bffam, \ttfam are never defined (pg
351). And I found out myself using, e.g.  
``\show \itfam'' which tells me ``\itfam=\char"4''.

Questions:
1. Complete answer. Why does the TeX Book does not have one? It is clear
that TeXBook or TeX implimentation has *default* definitions of all family 
numbers of fonts. But if this is not introduced in the TeXBook, where
are people supposed to look for further info? [I am advised to define
my own family numbers, but I think it is better to stick to default 
definitions if they are there.]

2. While \itfam, for example, is never defined in the book, why \show
gives an answer? [I am not comfortable with this inconsistency of TeX.]
[This is independent of implementation: emTeX and our local unix TeX
gives the same answer.] Why doesn't the book carry complete info?

3. While I understand that \char"4 in the phrase ``\itfam=\char"4''
means number 4. But \char"4 reminds me a character in a certain font
table, but not a number. e.g. \char"4 is really a \Xi in cmr10 font
table [pg 427]. I don't understand why TeX gives seemingly misleading info
like ``\itfam=\char"4''. I would think ``\itfam=4'' makes more sense.

4. emTeX library has more than 16 fonts and I presume this is true for
other TeX'es. Are there default definitions of family numbers of these
extra fonts or I have to define myself? [This is necessary to find
family numbers, see my comments at the end.]

Comments: [Why I need family numbers?]
While the defaut font for math is cmmi10, one can change the *ordinary
text* (class 0, see pg 154) to *any* family of fonts by changing family 
numbers [That is why I need to find family numbers]. For example:

$\fam7 \partial ABCDEFGHIJKLMNOPQRSTUVWXYZ$
$\fam2 \partial ABCDEFGHIJKLMNOPQRSTUVWXYZ$

However if one change fonts [see example below], all the characters
(not only the the *regular characters*) are replaced by the corresponding
characters in the font table assigned. The \partial (\char'100 of
cmmi10) is replaced by @ (char'100 of cmtt10) in the first example, by
\char'100 of cmsy10 in the second example. This really mess things up.

\font\cmttten=cmtt10
\font\cmsyten=cmsy10
$\textfont1=\cmttten \partial ABCDEFGHIJKLMNOPQRSTUVWXYZ$
$\textfont1=\cmsyten \partial ABCDEFGHIJKLMNOPQRSTUVWXYZ$