TeX/relax

Synopsis
\relax

Description
Donald Knuth describes this as telling TeX to "do nothing." This seems like a pointless control sequence at first thought. However, some control sequences act on tokens that follow it, and \relax tells TeX to stop accepting new tokens for this control sequence. This is sometimes necessary to resolve otherwise ambiguous expressions.

Examples
The following piece of code looks just fine, but... \begin{tabular}{ll} Number & Text \\ [a] & lorem ipsum \\ [b] & lorem ipsum \\ \end{tabular}

... TeX throws an Error "! Missing number, treated as zero. a". TeX just ignores the end-of-line and reads the tokens "\\[a]" as \\[length]. To stop TeX reading into such things just tell it to \relax \begin{tabular}{ll} Number & Text \\ \relax [a] & lorem ipsum \\ \relax [b] & lorem ipsum \\ \end{tabular}

so TeX (and you) keep it cool.

Exercises
de:LaTeX-Wörterbuch:_TeX_Primitiven:_\relax