LaTeX Quotation Marks and Quotes: `` '', csquotes and Block Quotes
Typing "text" in LaTeX gives you two closing marks instead of an opening and a closing one. The fix is a convention that dates back to TeX: two backticks open a quotation and two apostrophes close it. This guide explains that convention, the csquotes package that automates it, German and French quote styles, the quote, quotation and verse environments, block quotes with attribution, quotes in Beamer, straight quotes in code, and the errors that come from smart quotes pasted in from a word processor.
Why "text" Comes Out Wrong
LaTeX's default fonts have no straight double-quote character in the text font. In the classic OT1 encoding the " key prints a closing double quote, so "text" is typeset as ”text”. With \usepackage[T1]{fontenc} you get a straight typewriter-style " on both sides, which is still not a typographic quotation mark. Either way the glyphs are wrong; LaTeX simply has no idea whether a given " is opening or closing.
The Backtick Convention: ``double'' and `single'
Opening marks are typed with the backtick (grave accent) key, closing marks with the apostrophe. The font's ligatures turn two backticks into “ and two apostrophes into ”:
``A double-quoted phrase.''
`A single-quoted phrase.'
She said ``the word `quote' is overused.'' % nestedWhen a single closing quote meets a double closing quote, three apostrophes in a row are ambiguous. Insert a thin space with \, between them:
``He shouted `run'\,'' and we did. % ' then thin space then ''
``\,`Nested at the start' is rarer.'' % opening marks: `` then thin space then `British style reverses the roles (single quotes outside, double inside): `She said ``hello'' to me'. Apostrophes inside words need no special handling at all: don't, Lamport's.
The csquotes Package
Typing backticks is fine for a short paper, but a book with hundreds of quotations in several languages is better served by csquotes. Its \enquote command picks the correct marks for the current language and nests automatically:
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}
\enquote{A quotation with \enquote{a nested quotation} inside.}
% "A quotation with 'a nested quotation' inside."
\enquote*{Inner-level marks on demand} % 'single' in EnglishThe autostyle option makes the quote style follow babel (or polyglossia) whenever the language changes, so one source file produces “English”, „Deutsch“ and « français » without touching the markup. You can also pin a style explicitly with the style option or \setquotestyle:
\usepackage[style=british]{csquotes} % 'single outside', "double inside"
\usepackage[style=german]{csquotes} % „German“ quotes
\usepackage[style=french]{csquotes} % « French » guillemets with spacing
% change the style for a passage
\setquotestyle{german}
\enquote{Zitat}
\setquotestyle* % back to following the document languageMaking straight quotes smart: \MakeOuterQuote
If your text already contains plain " characters, or you prefer to type them, tell csquotes to treat " as an active quote that toggles between opening and closing marks:
\usepackage{csquotes}
\MakeOuterQuote{"}
"Now straight quotes become proper quotation marks."Do not do this with German babel, which already uses " as a shorthand for umlauts and hyphenation. For a foreign-language quotation that should also switch hyphenation patterns, use \foreignquote{french}{texte}.
German and French Quotation Marks
The low-high German style and the French guillemets are available without csquotes through babel and the T1 font encoding:
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\glqq Anführungszeichen\grqq{} % „…“ (German low-9 / high-6)
\glq einfach\grq{} % ‚…‘
\frqq Französisch\flqq{} % »…« (German style with guillemets)
\guillemotleft\,texte\,\guillemotright % «…» (T1 encoding, any language)With \usepackage[french]{babel} the commands \og and \fg{} produce guillemets with the correct non-breaking spaces: \og texte\fg{}. Note the empty braces after \grqq and \fg; without them LaTeX swallows the following space.
If you would rather type the characters directly, that works too: with UTF-8 input and T1 encoding, „, “, «, », “ and ” typed into the source are mapped to the right glyphs by inputenc (loaded automatically since LaTeX 2018). XeLaTeX and LuaLaTeX accept them natively.
quote, quotation and verse
For a displayed passage, LaTeX offers three environments. They differ in how they handle paragraphs:
\begin{quote}
Indented on both sides. Paragraphs are separated by vertical space
and have no first-line indent. Best for one or two short paragraphs.
\end{quote}
\begin{quotation}
Indented on both sides. Each paragraph starts with a first-line indent
and there is no extra space between paragraphs, as in a book.
So a second paragraph looks like this.
\end{quotation}
\begin{verse}
Lines are broken with a double backslash, \\
and a line that runs too long to fit \\
is wrapped with a hanging indent.
A blank line starts a new stanza.
\end{verse}None of them adds quotation marks: a displayed quotation is marked by its indentation alone. The indent is \leftmargin of the enclosing list; to make all quotes italic or smaller, redefine the environment once with etoolbox:
\usepackage{etoolbox}
\AtBeginEnvironment{quote}{\itshape\small}Block Quotes with Attribution
The simplest attribution is a right-aligned line after the quotation. A \par followed by \hfill pushes the author to the right margin of the quote block:
\begin{quote}
Premature optimization is the root of all evil.
\par\medskip\hfill--- Donald Knuth, \emph{Computer Programming as an Art}
\end{quote}csquotes provides \blockquote, which typesets short quotations inline with marks and long ones (more than three lines, by default) as a block without marks, and takes the citation as an optional argument:
\blockquote[Knuth 1974, p.~671]{Premature optimization is the root of all evil.}
% change the threshold: quotations longer than two lines become block quotes
\SetBlockThreshold{2}With biblatex, \blockcquote takes a bibliography key instead and prints a proper citation. For a motto at the start of a chapter, the epigraph package puts the quotation in a narrow right-aligned box with the source underneath:
\usepackage{epigraph}
\setlength{\epigraphwidth}{0.55\textwidth}
\setlength{\epigraphrule}{0pt} % no rule between text and source
\chapter{Beginnings}
\epigraph{The best way to predict the future is to invent it.}{--- Alan Kay}Quotes in Beamer
Everything above works in Beamer frames; the quote environment is typeset in the theme's quote font and color. For a highlighted quotation, a block with the speaker as title is the idiomatic choice:
\documentclass{beamer}
\usepackage{csquotes}
\setbeamerfont{quote}{shape=\itshape}
\setbeamercolor{quote}{fg=gray}
\begin{document}
\begin{frame}{On Optimization}
\begin{block}{Donald Knuth, 1974}
\enquote{Premature optimization is the root of all evil.}
\end{block}
\begin{quote}
A plain displayed quotation, italic and gray via the templates above.
\end{quote}
\end{frame}
\end{document}Straight Quotes in Code and Verbatim
In program listings you want the straight ASCII characters, not curly ones. \verb, verbatim and lstlisting use the typewriter font, which has a straight "; for straight quotes in ordinary text use the text symbol commands:
\verb|print("hello")| % straight " in typewriter
\texttt{\textquotedbl hello\textquotedbl} % straight " (needs \usepackage[T1]{fontenc})
\textquotesingle % straight '
\textasciigrave % straight `By default verbatim still turns ' and ` into curly marks in some fonts. The upquote package fixes that so that quotes in verbatim and \verb are always straight:
\usepackage{upquote} % straight ' and ` in verbatim, \verb and listingsApostrophes vs Primes in Math
In math mode the apostrophe is not a quote at all: $f'(x)$ typesets a prime, $f''$ a double prime. This is correct and intended; you do not need ^\prime. Only in text inside math, such as \text{Alice's}, does the apostrophe revert to its text meaning.
Common Errors
| Symptom or message | Cause | Fix |
|---|---|---|
| Both quotation marks look the same (”text”) | Straight " typed in the source | Type ``text'', use \enquote, or add \MakeOuterQuote{"} |
| Opening mark missing after a paste from Word | The editor converted `` to a single curly “ or to " | Turn off smart quotes in the editor; curly characters are fine only with UTF-8 input and T1 encoding |
| Unicode character “ (U+201C) not set up for use with LaTeX | Curly quotes in the source with an old LaTeX or non-UTF-8 input encoding | Update TeX Live or add \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc} |
| Command \guillemotleft unavailable in encoding OT1 | Guillemets need the T1 font encoding | \usepackage[T1]{fontenc} |
| Three apostrophes run together | Single and double closing quotes adjacent | Separate them with \, |
Umlauts break after \MakeOuterQuote{"} | German babel also uses " as a shorthand | Use \enquote instead of active quotes, or choose another character |
Space missing after \grqq or \fg | TeX swallows the space after a command name | Write \grqq{} / \fg{} |
Complete Example
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[french, ngerman, english]{babel} % last language (english) is the default
\usepackage[autostyle]{csquotes}
\usepackage{upquote}
\usepackage{epigraph}
\setlength{\epigraphwidth}{0.5\textwidth}
\begin{document}
\section{Quotation Marks}
Typed by hand: ``double'' and `single', nested as
``she said `go'\,'' and done.
With csquotes: \enquote{outer with \enquote{inner} marks}.
\selectlanguage{ngerman}
Auf Deutsch: \enquote{Zitat mit \enquote{innerem} Zitat} oder
\glqq von Hand\grqq{} gesetzt.
\selectlanguage{english}
French marks on demand: \foreignquote{french}{bonjour}.
\section{Displayed Quotations}
\epigraph{The best way to predict the future is to invent it.}{--- Alan Kay}
\begin{quote}
Premature optimization is the root of all evil.
\par\medskip\hfill--- Donald Knuth
\end{quote}
\blockquote[Knuth 1974, p.~671]{We should forget about small efficiencies,
say about 97\% of the time: premature optimization is the root of all evil.
Yet we should not pass up our opportunities in that critical 3\%.}
\section{Code}
A straight quote in code: \verb|s = "text"|, and a prime in math: $f'(x)$.
\end{document}Quick Reference
| Task | Command |
|---|---|
| “Double quotes” | ``text'' |
| ‘Single quotes’ | `text' |
| Nested quotes | ``outer `inner'\,'' |
| Language-aware quotes | \enquote{text} (csquotes) |
| Inner-level marks | \enquote*{text} |
| Follow babel language | \usepackage[autostyle]{csquotes} |
Make " smart | \MakeOuterQuote{"} |
| German „…“ | \glqq text\grqq{} (babel ngerman) or \usepackage[style=german]{csquotes} |
| French « … » | \og text\fg{} (babel french) or \guillemotleft/\guillemotright with T1 |
| Indented quotation | \begin{quote}...\end{quote} |
| Multi-paragraph quotation | \begin{quotation}...\end{quotation} |
| Poetry | \begin{verse}...\end{verse} |
| Quote with attribution | \par\hfill--- Author inside quote |
| Automatic inline/block quote | \blockquote[cite]{text} |
| Chapter epigraph | \epigraph{text}{--- Author} (epigraph) |
| Straight quotes in verbatim | \usepackage{upquote} |
Straight " in text | \textquotedbl |
Next Steps
Quotation marks sorted? These guides cover the rest of the apparatus:
- LaTeX Footnotes – Footnotes for sources and asides, including inside tables and headings
- Bold, Italics & Underline – Emphasis inside and around quotations
- Strikethrough and Cross Out – Mark deleted text with ulem, soul and the changes package
- LaTeX Hyperlinks – Link quoted sources with hyperref
- Learn LaTeX – Complete beginner tutorial covering all the basics
Free LaTeX Tools
- LaTeX Preview – Check how your quotation marks render with a live PDF preview
- Citation Generator – Generate BibTeX entries for the works you quote
- LaTeX Symbols Reference – Browse text symbols and special characters
Related Articles
Degree Symbol: How to Type ° on Keyboard, Mac, iPhone, Word, LaTeX
Best LaTeX Editors for Mac: Complete Comparison Guide 2026
From Crixet to Prism: The Evolution of AI-Powered LaTeX Editing
How to Create a Professional Resume in LaTeX (Complete Guide 2026)
Fix quotation marks faster with AI
Octree's AI editor converts pasted smart quotes, picks the right csquotes setup for your languages, and compiles your document in seconds.
Try Octree Free →