Special symbols in the input file

Last revision August 3, 2004

 Table of Contents: Features of LaTeX Basic layout of a LaTeX document Required parts of a LaTeX input file Basic LaTeX topics LaTeX environments LaTeX modes Special symbols in the input file. Running LaTeX LaTeX by example LaTeX Frequent Questions

Some ASCII characters in your input file are not interpreted as simple text, but rather as special or reserved symbols that act like commands. That is, these symbols cause some action to be performed, and do not appear in the typeset output. The dollar sign has already been mentioned as one of these. Clearly, the backslash and curly braces are others.

The table below shows the text characters that are reserved for special commands in LaTeX documents. If you simply include one of these characters in your input file, it will not be typeset into the output, but rather cause some unexpected mode change or (likely) error condition. The table shows how to produce the actual character in the typeset output. The input formats that use enclosing dollar signs are examples of using "math mode" to produce special symbols rather than equations.

 Special character How interpreted by LaTeX What input characters to use to actually typeset the special character \ Signal start of command name. \$\backslash\$ { Start a new environment or command argument. \{ } End an environment or command argument. \} \$ Delimit in-line math mode. \\$ % % and following text on same line is comment that is not typeset. \% & Separate column entries in tables. \& _ Underscore, signals math mode subscript. \_ # Refer to arguments in macro definitions. \# ~ Tie words with unbreakable space. \$\sim\$ ^ Caret, signals math mode superscript. \$\wedge\$ < In text mode, gives upside down exclamation point for foreign languages; no special meaning in math mode. \$<\$ > In text mode, gives upside down question mark for foreign languages; no special meaning in math mode. \$>\$