# TeX macro/primitive vs Plain TeX macro

I know there are TeX primitives and Plain TeX macros created (directly/indirectly) by TeX primitives. My question is are there TeX macro? E. g. I can use `\break` in pdfTeX without defining it and `\break` is not a TeX primitive. Is it a TeX macro or a Plain TeX macro? Plain TeX is a format like LaTeX. Does the TeX engine load Plain TeX by default? If not `\break` must be a TeX macro.

• There are primitives, and there are macros: how we 'call' the latter is something of a semantic issue. For example, LaTeX defines `\centerline` as in plain TeX, but it's not a documented part of LaTeX ... – Joseph Wright Oct 27 '18 at 18:57
• Does the TeX engine load Plain TeX by default? — yes if you invoke it as `tex` or `pdftex` (in a typical TeX distribution), it does load plain TeX by default (you should see something like “preloaded format=pdftex” or “preloaded format=tex” in the first line of the program output, which are both references to plain). – ShreevatsaR Oct 27 '18 at 19:29

## 1 Answer

When TeX starts, it does not know a single macro, only primitives. If it runs as iniTeX, it expects to be given a file to execute (or you could enter commands interactively), and that file could (and for sure, will) define a bunch of macros. If it does not run as iniTeX, it expects to be told the name of a format file, which will also contain a bunch of macro definitions, among other things. (Normally, TeX looks at the name it is being called by to figure out what format to load.) By the way, a format file is nothing but a binary representation of the internal state of iniTeX before it executed a `\dump` primitive.

In particular, no, TeX does not load the plain macros by default, and no, there are no “TeX macros” the way you think there are, if I understood you correctly.

However, the LaTeX format does contain the vast majority of plain TeX macros, sometimes unchanged, sometimes in modified form.

• When I execute pdfTeX (miktex-pdftex.exe) I can use `\break` macro and as the TeXbook say `\break` is a plain TeX macro. How does miktex-pdftex.exe know to load Plain TeX? Why are Plain TeX macro available without explicitly being loaded? The only argument of miktex-pdftex.exe is `\$fullname``. – John webner Oct 27 '18 at 19:33
• +1, but "TeX does not load the plain macros by default" might be correct in theory, although in practice the user will call something like "pdftex" which preloads plain. – TeXnician Oct 27 '18 at 19:33
• @Johnwebner Simply start pdftex without any argument, you will drop into interactive mode and have something like `preloaded format=pdftex` in the first few lines. – TeXnician Oct 27 '18 at 19:34
• As I said in my answer, if it does not run as iniTeX, it will typically look at the name it is being run as (for example, `pdftex` or `miktex-pdftex.exe`, apparently), and use that information to decide what preloaded format to load. You can override that with the command line option `-fmt=…`, naming the format to be loaded. – Harald Hanche-Olsen Oct 27 '18 at 21:06
• The point made by @TeXnician (and I agree) is that statements like “When TeX starts, it does not know a single macro…” and “TeX does not load the plain macro by default” are rather misleading, because “by default” one invokes TeX as `tex` or `pdftex` or something like that; it's the `-ini` form (INITEX) that is rare and unusual (i.e., not the default) — calling INITEX the default is a very unconventional usage of “default” IMO; even Knuth's original design had “TEX” like present-day `tex` (called the “production version of TeX” in the TeX program source code), and “INITEX” was special. – ShreevatsaR Oct 27 '18 at 21:23