Table 1.2: Special characters in LATEX
| Key | Special meaning alone | Otherwise type this | Example |
| \ | The command character | \textbackslash | |
| $ | Old TEX math delimiter | \$ | \$37.46 |
| % | The comment character | \% | 42% |
| ^ | Math superscript character | \^ | \^{} |
| & | Tabular column separator | \& | AT\&T |
| _ | Math subscript character | \_ | A\_B |
| ~ | Non-breaking space | \~ | \~{} |
| # | Macro parameter symbol | \# | #42 |
| { | Argument start delimiter | \{ | $\{$ |
| } | Argument end delimiter | \} | $\}$ |
The LATEX mathematics delimiters are
\[…\] for display math
and \(…\) for inline
math. The use of the dollar and double-dollar is
deprecated: see the tip ‘Delimiters’ below
There are ten keyboard characters which have special
meanings to LATEX, and cannot be used
on their own without a backslash prefix, except for the
purposes shown in Table 1.2 above.
These characters were chosen deliberately, either because
they are rare in normal text, or (in the case of $,
#, &, and %) they already had an
established special meaning on computers as metacharacters
(characters standing as symbols for something else) when TEX
was written.
We saw at the start of this section how to use the
backslash to begin a command, and how to use curly braces to
delimit an argument, and we are not covering the
mathematical uses in this book. The only special characters
remaining from the list in Table 1.2 above are
therefore:
- ~ (non-breaking space) character
The tilde in LATEX
prints as a normal space, but prevents a linebreak
ever occurring at that point. It’s often used between
a person’s initials and their surname, such as
P.~Flynn, in case it might fall
at the end of a line where a
linebreak would make it harder to read.
- & (column delimiter) character
The ampersand
is used in
tabular setting (rows and columns) to separate the
cell values within each row. We’ll see how this works
in § 4.2 below.
- # (number or pound-weight) character
Also called the hash
mark or octothorpe is the
American ‘pound’ [weight] or
‘number’ sign.
For the pound (sterling) currency sign use the
\textsterling command if there is no £
on your keyboard.
While we’re on the subject of money, not every
font has a Euro character (€), especially those designed
before the currency came into being. The default € sign in
many fonts is a crummy design based on the letter C instead of
a rounded E. The official (sans-serif) Euro sign is in
the marvosym package and is done with the
\EUR command. A slightly unusual but more
interesting serif Euro sign
is in the
textcomp package using the
\texteuro command with the the TS1 font
encoding (see § 6.2.3 below for details of
switching typefaces and settings in mid-text).
Ordinal superscripts
Don’t use them in normal English text. Superscripted
ordinals like 21st are a
historical relic of Victorian and earlier typography. Unless
done with skill by a typographer, they are usually ugly and
unnecessary, and are almost never used in modern
professional typesetting. They were re-introduced by
Microsoft Word apparently because
some American corporations liked their wordprocessing to
look like what they fondly imagine print used to be.
If you want to try to mimic low-grade wordprocessing, or
if you are trying to make a genuine typographic facsimile of
antiquarian typesetting, use the
\textsuperscript command from the
textcomp package. Never,
never,
NEVER use math mode
superscripting for text superscripts — it’s the wrong
height, wrong size, and the wrong font.
In non-English languages (European ones, at least) the
position is completely different: the ordinal feminine and
masculine characters like 2ª
(‘secunda’) or 8º
(‘octavo’) are always superscripted,
and are the normal method of representation. Their use
in Latin-derived terminology in printing and binding remains
standard.