What is "plain TeX"?

The "smallest" possible TeX is what Knuth called "virgin" TeX (TeXbook, p.342): it knows just primitive commands, no macros. Plain TeX is the set of macros (developed by Knuth) which makes TeX usable in everyday life of a typist.

And yes, these days we're using many different sets of macros ... one popular set is of course LaTeX. Plain TeX is, well ... the plainest of these ;-)

Regarding formats (as far as I understand). "Teaching" TeX all the macros (of plain TeX, for example) on each run would take too long (well, at least in the old days). Thus, we do it once for good: we input the definitions and take a snapshot, called a format.


The available commands can be classified into primitive commands and macros. Macros are composite commands built from primitive commands and/or other macros.

The "virgin" TeX knows only the primitive commands. Which primitive commands are known to TeX depends on the particular engine. For example, eTeX has more primitives than the original (Knuth's) TeX; \unexpanded is an example of a new eTeX primitive. Examples of primitive commands: \relax, \def, \halign. (There's about 300 of them.)

Formats (plain TeX, LaTeX, etc.) extend TeX's vocabulary by defining macros. (Actually, packages also do that.) For example, plain TeX defines macros \item, \rm, \newdimen, \loop, etc. (Plain TeX defines about 600 macros. The complete vocabulary of plain TeX has thus about 900 words.)

To check whether a command is primitive or a macro, one can:

  • look into the index of the TeXbook: primitive operations are marked with an asterisk
  • Use (primitive) command \show: \show\cs writes the meaning of \cs to the terminal. If you \show a primitive command, it will simply tell you its "name": \relax=\relax, halign=\halign, etc. In contrast, if you use \show on a macro, you will get its definition, e.g. \newdimen=macro:->\alloc@ 1\dimen \dimendef \insc@unt.

To reiterate, there are two types of commands:

  • primitives (these are the only things that "virgin" TeX knows about)
  • macros ("virgin" TeX knows no macros; macros are defined by formats and packages; formats and packages define only macros)

Just a little note on Saso's answer (hopefully) clearing any inconveniences that may have been stated in the comments on his answer:

  • TeX . Computer Language that is Turing Complete (as capable as any other language eg. C, Java, pyhton, ...). The word 'TeX' is often synonymic used to refer to 'plainTeX'. TeX (the language) is highly specialised as it was aimed to provide a markup language rather than a computer language.

  • plainTeX . so called 'format' of TeX: you run iniTeX (eg. $ tex -ini on linux shell); you define your fonts and macros as you like; you run \dump in iniTeX. This produces a 'format-file' that can be loaded using virTeX to sort of proceed where you left. plainTeX has been provided by Don Knuth himself and is referred to by the word 'TeX'. You can experiment with it by (linux shell again):

    $ tex hereafter some random stuff enganged by TeX is spawning
    ** proceed by entering \relax
    * [your code goes here]
    * \bye is what you enter at the end what you get is a file named 'texput.dvi' that can be viewed at with a pdfviewer

Sorry for the sidestep, have a Summary:

  • iniTeX . Thing were the \dump primitive is enabled. Meant to create format files. Only knows about TeX primitives.

  • virTeX . Thing were format files can be loaded with ease. Before loading any it only knows about TeX primitives.

  • plainTeX . Sort of but not equivalent to 'virTeX with a file called 'plain.tex' already loaded '. Things like this are like everywhere, they're called LaTeX, ConTeXt AMSTeX, ... referred to as 'formats', as different with 'format-files ' they can only be made with an external (wrt TeX) programm.