5

On page 15 of the book The TEXbook : a complete user's guide to computer typesetting with TEX, Mr. KNUTH said that

Each font used in a TEX manuscript is associated with a control sequence; for example, the 10-point font in this paragraph is called \tenrm, and the corresponding 9-point font is called \ninerm. The slanted fonts that match \tenrm and \ninerm are called \tensl and \ninesl. These control sequences are not built into TEX, nor are they the actual names of the fonts; TEX users are just supposed to make up convenient names, whenever new fonts are introduced into a manuscript. Such control sequences are used to change typefaces.

If it is true, \tenrm should not be used directly in TeX. However, this code can be run directly, which indicates that the \tenrm is built in,

    \tenrm Ten-point is difference between from
    \bye % end the document
10
  • They are not built into the program TeX, but they are defined in the plain format.
    – campa
    Commented Nov 7, 2023 at 12:04
  • @campa Does TeX use plain format?
    – Y. zeng
    Commented Nov 7, 2023 at 12:05
  • The program tex or pdftex preload format tex, which is indeed the format generated using plain.tex. AFAIK only initex does not preload formats (because it is used to create formats).
    – cabohah
    Commented Nov 7, 2023 at 12:12
  • 2
    Because he is referring to the program, not the format.
    – campa
    Commented Nov 7, 2023 at 12:18
  • 1
    The ones marked by an asterisk in the index.
    – campa
    Commented Nov 7, 2023 at 12:20

1 Answer 1

11

You are confusing the TeX the program (or sometimes engine), i.e. the piece of software that actually does the typesetting, with the TeX the format (to which we commonly refer as "plain TeX"), i.e. a set of macros which the engine uses.

When I type tex on my prompt I get

This is TeX, Version 3.141592653 (TeX Live 2023) (preloaded format=tex)
**

meaning that the program TeX has started by loading the format tex, i.e. by loading the file plain.tex first.1) The program itself doesn't have any preloaded fonts, but the format file plain.tex has

\font\tenrm=cmr10

in line 400.

If I type latex on a prompt I get on the other hand

This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=latex)
 restricted \write18 enabled.
**

which shows that the program pdfTeX (which is a different engine than TeX but can do everything TeX can, plus a couple of other things) is being run with format latex, meaning that a different set of macros (defined by latex.ltx and a couple of other files) is being used. You can of course use the program pdfTeX with the plain tex format: that what happens when you type pdftex in a prompt.

Admittedly, the TeX Book isn't always 100% transparent as to which commands are primitives and which ones are macros defined in the format. The primitive control sequences are marked with an asterisk in the index. Another good resource is https://www.tug.org/utilities/plain/cseq.html.


Further reading:


1) White lie... the format is built in a more efficient way.

1
  • Why \fiverm Ten-point is difference between from will procude overlapping text?
    – Y. zeng
    Commented Nov 7, 2023 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .