[tex-k] A factual error in The TeXbook (p.214)

Ruixi Zhang rzhan56 at uwo.ca
Fri Nov 1 10:55:11 CET 2024


Hello,

While reading The TeXbook I spotted a factual error in A214 line 27 (or line -18). As it turns out, \the\fontdimen6\tenrm does not expand to the stated six tokens 10.0pt; the actual tokens produced are 10.00002pt (equal to 655361sp in TeX dimension, exactly 1sp more than 10pt). That's ten tokens.

Looking into all 10-point Computer Modern designs (including math italic[!], but excluding text italic, text bold extended, text small caps), their TFM files all have 1.000003 as the "quad" decimal value (stored as an integer multiple of 2^{-20}, "equal to" a base-ten integer 1,048,579; 1,048,579/2^20≈1.00000286). When this fixed-point binary decimal gets multiplied to the loaded font size, say 10pt or 655360sp, the result is floored to an integer representing the \fontdimen6 "em". This gives cmr10 at 10pt an em that is 655,361sp or 10.00002pt (since TeX displays 1sp as 0.00002pt).

All these can be traced back to the METAFONT sources, where a "unit" is set to 20/36pt and the "em" is set to 18 units. Thus, a series of rounding and flooring follow: (1) 20/36pt converts to 36,409sp; (2) em then equals 655,362sp (18*36,409) in METAFONT; (3) this is then divided by the design size 10pt to yield the "quad" fraction, 655,362/(10*2^16)≈1.00000305; (4) which is then stored as 1,048,579/2^20≈1.00000286; (5) and finally when TeX reads this fraction, it gets multiplied to 10pt (so 655,361.875) and the result is floored (so 655,361), producing 10.00002pt.

Regards,
Ruixi Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/tex-k/attachments/20241101/09fbfaa4/attachment.htm>


More information about the tex-k mailing list.