or commands, are what you use to make TeX do what you want it to do. Here is a list of the 960 or so control sequences of primitive and Plain TeX which I found on the Internet: csname.tex
. (Original file here.
For those who aren’t interested in typesetting mathematics I made a shorter version with the math-related commands taken out: csname-text.tex
‘csname-math’ contains all the missing math commands: csname-math.tex
The file ‘keywords’ contains some other things worth knowing about: special characters, keywords, dimensions, catcodes: keywords.tex
If you look at ‘csname’ you will see that about a third of the control sequences are primitives, i.e. they are built into the TeX program. The remainder are defined in the file
plain.tex (see here →, or search your TeX installation).
1. sets up code tables:
2. allocates registers:
\toks, input streams, output streams, math families, languages, insertions
3. sets parameters (e.g.
4. loads information about fonts
5. then come text macros, e.g.
\centerline, tabbing macros
6. macros for math
7. macros for output e.g.
8. hyphenation and everything else.
This list is from Appendix B of the TeXbook, which begins with a table showing commonly used Plain TeX control sequences with an example of their use, followed by a description of the macros contained in
Some macros are used as auxiliary macros in the construction of other macros, e.g.
\textindent which is used in
\joinrel, which is used to join math symbols together to make new ones, e.g.
\bowtie is constructed like this:
The private macros (those with ‘@’ in them) are also auxiliary macros used by
\@foot are used in building the
\m@g is used in the
\magnification macro. The idea of having ‘@’ in the control sequences is so that they will not be accidentally overwritten by user-defined macros.
David Bausum’s webpage (→) lists and gives definitions of all the TeX primitives. The appendix of ‘TeX by Topic’ also has a list of the primitives. ‘TeX for the Impatient’ has a ‘Capsule summary of commands’ which gives short definitions of the primitives and Plain TeX commands. If you read German ‘Einführung in TeX’ has a very full glossary of Plain and primitive TeX commands and the private macros too. (See below for links to these books.)
Resources and materials for learning TeX
Getting Started with TeX, LaTeX, and Friends: →
help page for those new to TeX.
TeX Reference Manual by David Bausum: →
list of TeX primitive control sequences with definitions and examples. Also available as a PDF: →
Plain TeX Reference by Norman Walsh: →
The ‘parameters’ section at the end lists the default settings of Plain TeX.
TeX Reference Card by J.H. Silverman:
A page in French with information about typesetting French in plain XeTeX:
This site seems to be defunct, but the files can be accessed via the Internet Archive: https://web.archive.org/web/*/http://visuel.ouvaton.org/*
The file Velene.pdf contains most of the information that was on the web page.
A Summary of Common TeX Control Sequences by Daniel J. Plonsey: →
Other resources on the same server: →
Plain TeX quick reference from New Mexico Tech (seems to be a précis of the non-mathematical chapters of the TeXbook):
The teTeX HOWTO (for Linux users) has a short section on TeX commands:
Big collection of TeX links: →
Longer resources (books) arranged roughly beginner to advanced.
(Those followed by ‘→’ are available for free from the internet.)
Getting Started with Plain TeX by D. R. Wilkins →
Summary of Commonly-Used Features of Plain TeX by the same author →
A Gentle Introduction to TeX by Michael Doob →
Available as a PDF and .tex file.
TeX for the Impatient (Abrahams, Hargreaves, Berry)
Another page →
with a link to the source files: →
Einführung in TeX by Norbert Schwarz (sehr gutes Buch)
English version: Introduction to TeX by Krieger/Schwarz
A Plain TeX Primer by Malcolm Clark
TeX in a Nutshell by Petr Olšák. Deals mainly with the primitive commands, but it also gives a summary of the Plain TeX macros →
Notes On Programming in TeX from Christian Feursänger →
TeX by Topic by Victor Eijkhout
By the same author: The Computer Science of TeX and LaTeX
The Advanced Texbook by David Salomon
The TeXbook by D. E. Knuth
This page →
has the source file of the TeXbook (texbook.tex). You can’t run it, but you can read it to see how it’s done.
See also this page →
which has a link to
, macros written by Knuth to aid in typesetting the TeXbook.
TeX: The Program, volume B of ‘Computers and Typesetting’ (volume A is the TeXbook) →
contains the Pascal source code of the TeX program, mixed with descriptive text. (Knuth calls this ‘literate programming’.)
Some collections of macros I found on the internet.
Paragraphing macros: →
Michigan macros. Lots of useful macros here. I had to tinker with/adapt some of them to get them to work. →
Stanford macros. Huge collection of TeX macros from Stanford University: →
Petr Olšák’s TeX macros: OPmac →
and OpTeX (for use with LuaTeX) →
a set of macros that extends the capabilities of Plain TeX, covering (among other things) cross-references (with hyperlinks), double-, triple-, quadruple-columns, a verbatim command, indexing, table of contents. A few LaTeX packages can also be loaded. →