Quotes in LaTeX: Quotation Marks, Block Quotes and csquotes

Quick answer

  • Double quotes: ``text'' gives “text” (two backticks, two apostrophes).
  • Single quotes: `text' gives ‘text’.
  • Not "text": the straight key prints two closing marks, or straight typewriter marks with T1 encoding.
  • By command: \textquotedblleft text\textquotedblright, \textquoteleft and \textquoteright.
  • Automatic: \usepackage[autostyle]{csquotes}, then \enquote{text}, or \textquote[source]{text} with a citation.
  • Block quotes: the quote, quotation and verse environments.

Quotes in LaTeX are typed with the backtick and apostrophe keys, not with the " key you use everywhere else: typing "text" gives you two closing marks. This guide covers that convention, the commands for each quote character, the csquotes package that picks the marks for you, German and French styles, block quotes with the quote, quotation and verse environments, attribution, Beamer, straight quotes in code, and the errors that come from pasted smart quotes.

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.

Quotation Marks in LaTeX: ``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.''   % nested

When 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.

Quote Characters by Command: \textquotedblleft and Friends

Every quotation mark also has a command name. You rarely need them in running text, but they are useful inside macros, in places where a backtick is awkward to type, and when a quote must sit directly against another symbol:

MarkShortcutCommand
“``\textquotedblleft
”''\textquotedblright
‘`\textquoteleft
’'\textquoteright
„none\quotedblbase (T1)
‚none\quotesinglbase (T1)
" (straight)none\textquotedbl (T1)
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}

\textquotedblleft Double\textquotedblright{} and
\textquoteleft single\textquoteright{} by command.

\quotedblbase low-high\textquotedblleft{} for German style.

\end{document}

Add {} after a closing command such as \textquotedblright when a space follows, or TeX swallows the space.

Quotes in LaTeX with csquotes: \enquote and \textquote

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 English

To quote a source inline, use \textquote. It adds the marks like \enquote and prints an optional citation after the closing mark; the second optional argument holds punctuation that belongs inside the quotation:

\textquote[Knuth 1974]{Premature optimization is the root of all evil}
% "Premature optimization is the root of all evil" (Knuth 1974)

\textquote[Knuth][.]{We should forget about small efficiencies}
% with biblatex: \textcquote[671]{knuth1974}{...} takes a bibliography key

The 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:

% Load csquotes once, with one of these styles:
\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 language

Making 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.

Block Quotes in LaTeX: 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 and \verb (listings: upquote=true)

Apostrophes 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

Most quote problems are one of three things: backwards marks, a straight " in the source, or nested marks that run together.

Symptom or messageCauseFix
Opening quote is backwards (”text” or ’text’)Opening mark typed with ' or "Open with backticks: ``text'', `text'
Closing quote is backwards (“text“)Closing mark typed with backticksClose with apostrophes: ''
Straight typewriter " marks in the PDF" typed with \usepackage[T1]{fontenc} loadedSame fixes as below; T1 makes " straight instead of curly
Both quotation marks look the same (”text”)Straight " typed in the sourceType ``text'', use \enquote, or add \MakeOuterQuote{"}
Opening mark missing after a paste from WordThe 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 LaTeXCurly quotes in the source with an old LaTeX or non-UTF-8 input encodingUpdate TeX Live or add \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc}
Command \guillemotleft unavailable in encoding OT1Guillemets need the T1 font encoding\usepackage[T1]{fontenc}
Nested quotes run together (’” looks like three marks)Single and double closing quotes adjacentSeparate them with \,, or nest \enquote
Umlauts break after \MakeOuterQuote{"}German babel also uses " as a shorthandUse \enquote instead of active quotes, or choose another character
Space missing after \grqq or \fgTeX swallows the space after a command nameWrite \grqq{} / \fg{}

Backwards Quotes

\documentclass{article}
\begin{document}

% Wrong: both marks print as closing marks
"quoted text" and ''quoted text''

% Right: backticks open, apostrophes close
``quoted text'' and `single'

\end{document}

Nested Quotes

\documentclass{article}
\usepackage{csquotes}
\begin{document}

% By hand: thin space between the closing marks
``She said `yes'\,'' and left.

% With csquotes: the inner level is automatic
\enquote{She said \enquote{yes} and left.}

\end{document}

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}

Quote LaTeX Quick Reference

TaskCommand
“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
Quote with inline citation\textquote[source]{text} (csquotes)

Frequently Asked Questions

How do you write quotation marks in LaTeX?

Type two backticks to open and two apostrophes to close: ``text'' gives “text”. Single quotes are `text'. Do not use the straight " key for quotes in running text: LaTeX prints it as a closing mark, or as a straight typewriter mark with T1 encoding.

Why are my quotes backwards in LaTeX?

Both marks come out as closing marks when the opening one is typed with " or '. The opening mark must be the backtick key (`), usually below Esc. Write ``like this'' instead of "like this" or ''like this''.

What does \enquote do in LaTeX?

\enquote{text} comes from the csquotes package. It prints the correct opening and closing marks for the document language and switches to the inner marks automatically when one \enquote is nested in another. Load it with \usepackage[autostyle]{csquotes}.

How do I make a block quote in LaTeX?

Put the passage in \begin{quote} ... \end{quote} for a short block, quotation for several paragraphs with first-line indents, or verse for poetry. These environments indent both margins and add no quotation marks. The csquotes command \blockquote chooses between an inline quote and a block by length.

How do I type nested quotes in LaTeX?

Put single quotes inside double ones and separate the closing marks with a thin space: ``She said `yes'\,''. Without \, the three apostrophes run together. With csquotes, nest \enquote inside \enquote and the inner marks are chosen for you.

What is the difference between \enquote and \textquote?

\enquote{text} only adds quotation marks. \textquote[source]{text} also takes an optional citation that is printed after the closing mark, and \textcquote does the same with a biblatex key. Use \textquote when you quote a source inline.

Next Steps

Quotation marks sorted? These guides cover the rest of the apparatus:

Free LaTeX Tools

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 →