2010-02-23

Single Quote, Double Quotes in LaTeX

To typeset quotes in LaTeX is ordinarily very easy. For single quotes, the opening quote is:
`
and the closing quote is:
'
For double quotes, the opening quote is double the single opening quotes:
``
and the closing is obviously double the single closing quotes:
''

All that is fine until you try to do a nested quotation, say to do something like this:
 "'Hi' is single quoted, as is the following word: 'Bye'" said the typesetter.
If you try to do something like this (wrong):
```Hi' is single quoted, as is the following word: `Bye''' said the typesetter.
LaTeX would typeset it to something like this:
"'Hi' is single quoted, as is the following word: 'Bye"' said the typesetter.
which is wrong in two ways: (1) the spacing between the nested quote and the outer quote is wrong, and (2) the rightmost two quotes are typeset reversed.

The proper way to type this in LaTeX is this:
``\,`Hi' is single quoted, as is the following word: `Bye'\,'' said the typesetter.
The \, macro expands to \thinspace, giving you the correct amount of space between the nested quotes. Note also that the symbol ` expands to \lq, and the symbol ' expands to \rq.

No comments: