[texhax] Line breaks in plain TeX

zsdc zsdc at wp.pl
Wed Jun 11 03:43:29 CEST 2003

Karl Berry wrote:

>    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.
When I was reading the TeXbook and I read the exercise 7.2, which was 
the only place where \\ was mentioned so far, asking me why do I think 
\\ wasn't chosen for the literal backslash like, say, \$ for the literal 
dollar sign, I thought that because it is used as line breaks. But it is 
just a convenient placeholder and using it as a line break is just a 
convention rather than a rule, am I right?

>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=\\
> ...
Does it mean that when I use \\ it has some old temporary value, instead 
of being undefined?

>This also explains the error message -- TeX is looking for a category
>code 12 `p' after the \\, and you didn't supply one :).
If I got "Undefined control sequence" I would know that \\ is undefined, 
but when I got this strange error I was sure it just has to be defined, 
but I had no idea what was going on...

>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.
Thanks. I think now it will be the first line of every TeX file I write. :-)

>    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.

>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.
Yes, I also have it, but I never could find anything there. Maybe it's 
just me, but I find browsing Texinfo docs quite inconvenient.


More information about the texhax mailing list