Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

TeX/relax

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

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. <to be read again> 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