Understanding the Challenge: Why Your Keyboard is Lying to You
When you first start using LaTeX, one of the most common frustrations is typing quotation marks. On a standard keyboard, you likely use the " (double quote) or ' (single quote) keys. However, in professional typesetting, there is a distinct difference between an "opening" quote and a "closing" quote.
If you type the standard double-quote key in LaTeX:
"This is a quote."LaTeX will often render these as "straight" or "dumb" quotes, or even worse, it might render them both as closing quotes. This results in a document that looks amateurish. To achieve professional "curly" or "smart" quotes, LaTeX uses a specific syntax depending on the language of your document.
The Traditional Way: English Quotation Marks
In standard English LaTeX documents, the traditional way to create quotation marks is by using the backtick key (found next to the number 1) for opening quotes and the apostrophe key for closing quotes.
Single Quotations
- Open: ` (backtick)
- Close: ' (apostrophe)
Double Quotations
- Open: ` ` (two backticks)
- Close: ' ' (two apostrophes)
\documentclass{article}
\begin{document}
This is a `single quote' example.
This is a ``double quote'' example.
\end{document}Note: Do not use the actual double-quote character (
") on your keyboard for English text. While some modern editors and packages can handle it, using backticks and apostrophes is the most portable and standard way to ensure your quotes curve in the right directions.
The Modern Solution: The csquotes Package
While the manual method works for English, it becomes incredibly difficult when dealing with other languages (like French or German) that use entirely different characters, such as guillemets (« ») or bottom-aligned quotes (,, “).
The best practice for modern LaTeX users is to use the csquotes (Context Sensitive Quotes) package. It automates the process, handles nested quotes perfectly, and integrates with language packages like babel.
Basic Usage
To use it, add \usepackage{csquotes} to your preamble and use the \enquote{} command.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[autostyle=true]{csquotes}
\begin{document}
According to the professor, \enquote{LaTeX is the best tool for scientists.}
\end{document}By using \enquote, you tell LaTeX: "This text is a quotation." LaTeX then decides which marks to use based on your document's language settings.
International Quotation Marks
Different languages have different typographic rules. For example:
- German: Uses „quotes like this“ (bottom-start, top-end).
- French: Uses « quotes like this » (guillemets with specific spacing).
- English: Uses “quotes like this”.
When you use csquotes in combination with the babel package, LaTeX automatically switches the quotation style when you change the language.
Example: Switching Between Languages
In this example, notice how the same \enquote command produces different results based on the active language.
\documentclass{article}
\usepackage[T1]{fontenc} % Important for European characters
\usepackage[french, german, english]{babel}
\usepackage[autostyle=true]{csquotes}
\begin{document}
\selectlanguage{english}
In English: \enquote{Hello World.}
\selectlanguage{german}
In German: \enquote{Hallo Welt.}
\selectlanguage{french}
In French: \enquote{Bonjour le monde.}
\end{document}Warning: When working with French or German, ensure you have
\usepackage[T1]{fontenc}in your preamble. This ensures that the guillemet characters and other accents are rendered correctly as actual glyphs rather than composite characters.
Handling Nested Quotations
One of the most difficult parts of typesetting is managing quotes within quotes. In English, we usually switch from double quotes to single quotes for the inner layer. In other languages, the rules differ significantly.
The \enquote command handles this logic for you automatically. If you nest one \enquote inside another, csquotes will detect the depth and apply the correct secondary quotation marks for that specific language.
\documentclass{article}
\usepackage[english]{babel}
\usepackage[autostyle=true]{csquotes}
\begin{document}
\enquote{The witness said, \enquote{I saw him do it,} before leaving the stand.}
\end{document}In the output of the example above, the outer quote will be double (`` '') and the inner quote will be single (` '). If you were to switch the document language to British English, it would automatically flip those (single on the outside, double on the inside).
Best Practices and Common Mistakes
To ensure your document looks professional, follow these guidelines:
1. Avoid "Dumb" Quotes
Never use the " key for quotes in your final document. It is a relic of typewriter technology and does not belong in a professionally typeset PDF.
2. Always use csquotes for Multilingual Work
If you are writing in any language other than English, or if you are writing a document that might be translated, \enquote is mandatory. It saves you from having to find special characters on your keyboard or remembering complex shortcuts.
3. Watch Your Spacing (Especially in French)
French typography requires a non-breaking space inside the guillemets. If you use \enquote with the babel French module, LaTeX handles this invisible spacing for you automatically. Hard-coding them manually often leads to errors where the guillemet ends up on a different line than the text.
4. Direct Character Input
If you prefer not to use commands, modern LaTeX engines like XeLaTeX or LuaLaTeX allow you to type the actual curly quotes (“, ”, «, ») directly into your editor if your file is saved in UTF-8 encoding. However, \enquote remains the recommendation for its flexibility and ability to handle nesting.
Summary Table of Common Manual Quotes
If you decide not to use csquotes, here are the manual codes for common languages:
| Language | Opening | Closing |
|---|---|---|
| English (Double) | `` | '' |
| English (Single) | ` | ' |
| German (Double) | ,, | `` |
| French (Guillemets) | << | >> |
Note: For the German and French manual shortcuts to work, you often need specific babel options or the \usepackage[T1]{fontenc} package enabled.
