[texhax] Line breaks in plain TeX

Karl Berry karl at freefriends.org
Sat Jun 7 09:11:45 CEST 2003

    By the way, what does \\ mean then? 

In plain TeX, \\ is not officially defined at all.  This is explicitly
mention in the TeXbook; Knuth felt that it was so easy to type, he
shouldn't define a standard meaning.

Unfortunately, Knuth uses it as a temporary control sequence in plain.tex:

{\catcode`p=12 \catcode`t=12 \gdef\\#1pt{#1}} \let\getf at ctor=\\

I don't know why he used \\ instead of something like \temp.  It has
caused confusion before this.

This also explains the error message -- TeX is looking for a category
code 12 `p' after the \\, and you didn't supply one :).

As Phil said, the right way to force a line break is \hfil\break (or
just \break if you want TeX to justify the line).  This is also
discussed in the TeXbook.  If you want to use \\, then just define it
Many people do do this.

    Is there any plain TeX index of commands or reference manual in HTML or 
    plain text, 

I feel sure that there is, but I don't have a specific reference at
hand.  And the index of the TeXbook is pretty definitive.  And obviously
the plain.tex source file will tell you everything that is defined in
plain, although it won't help too much with primitives.  There's
Eijkhout's TeX by Topic book, available in pdf form.

See http://tug.org/interest.html#doc for this and other links.

    something like Sheldon Green's LaTeX reference manual 

Although I appreciate Sheldon's work, you have to take it with a grain
of salt: it is for LaTeX 2.09, not LaTeX 2e.  And since Sheldon
unfortunately passed away a few years ago, it won't be updated.

On TeX Live (and my Red Hat Linux system), there's a Texinfo document
called simply `latex' which at least says it's for LaTeX 2e in the Top
node.  I don't know where the original source is, though, or when it was
last updated.

Happy TeXing,

More information about the texhax mailing list