The following characters play a special role in LaTeX and are called special printing characters, or simply special characters.
# $ % & ~ _ ^ \
{ }
Whenever you put one of these special characters into your file, you
are doing something special, as described below.
If you simply want the character to be
printed just as any other letter, include a \
in front of the
character. For example, \$
will produce $ in your output.
Exceptions to this rule:
\
itself because
\\
has its own
special meaning. Use $\backslash$
.
~
and ^
because \~
and \^
produce
accents. Use
\verb
or the
verbatim environment.
\newcommand
command.
\verb
or the
verbatim environment (or cheat by using
\~{}
, i.e., placing a
tilde accent over a "blank" letter).
\verb
or the
verbatim environment.