Aller au contenu

Introduction

When it comes to quotations and quotation marks, each language has its own symbols and rules. For this reason, several LaTeX packages have been created to assist in typesetting quotations in-line, in display mode or at the beginning of each chapter. It's important to remark that even if you are typing English quotes, different quotation marks used in English (UK) and English (US). Plenty of different quotation marks can be typeset with LaTeX, and there are options for almost every language (see the reference guide).

We will look at several packages suited to typesetting different types of quotation.

dirtytalk package

dirtytalk is a small LaTeX package with only one available command: \say, as shown in the next example:

\documentclass{article}
\usepackage{dirtytalk}
\begin{document}
\section{Introduction}

Typing quotations with this package is quite easy:

\say{Here, a quotation is written and even some \say{nested} quotations 
are possible}
\end{document}

 Open this example in Overleaf.

This example produces the following output:

OLV2EnglishDirtyTalk.png

The dirtytalk package can be loaded by putting the following line in your document preamble:

\usepackage{dirtytalk}

dirtytalk supports one nested quotation and has options to redefine the characters used for the quotes. For example, in a document written in French the following code could be used:

\usepackage[french]{babel}
\usepackage[T1]{fontenc}
\usepackage[
    left = \flqq{},% 
    right = \frqq{},% 
    leftsub = \flq{},% 
    rightsub = \frq{} %
]{dirtytalk}

The first two commands define the primary left and right quotation marks, the second pair of commands define the secondary set of quotation marks. Here is an example using the code above:

\documentclass{article}
\usepackage[french]{babel}
\usepackage[T1]{fontenc}

\usepackage[
    left = \flqq{},% 
    right = \frqq{},% 
    leftsub = \flq{},% 
    rightsub = \frq{} %
]{dirtytalk}

\begin{document}
\section{Introduction}

Typing quotations with this package is quite easy:

\say{Here, a quotation is written and even some \say{nested} quotations are possible}
\end{document}

 Open this example in Overleaf.

This example produces the following output:

OLV2FrenchDirtyTalk.png

This package is suitable for most situations: it's very simple, since only one command is needed, and it supports nesting quotations to one degree. If a more complex quotation mark structure is required, the options listed in the following sections may be more effective.

csquotes package

The csquotes package provides advanced facilities for in-line and display quotations. It supports a wide range of commands, environments and user-definable quotes. Quotes can be automatically adjusted to the current language by means of the babel or polyglossia packages. This package is suitable for documents with complex quotation requirements, therefore it has a vast variety of commands to insert in-line quotes, quotes with sources, block-quotes with the support of changing language.

The following example uses the csquotes package, in conjunction with babel, within a document written in Spanish. It automatically loads the correct quotation characters "«" and "»"— known as guillemets (or "comillas angulares", in Spanish).

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{csquotes}

\begin{document}
\section{Introducción}

La siguiente frase es atribuída a Linus Torvals:

\begin{displayquote}
Sé que tengo un ego del tamaño de un planeta pequeño, pero incluso yo a veces me equivoco
\end{displayquote}

La frase revela un aspecto importante de su \textquote{jocosa} personalidad.
\end{document}

 Open this example in Overleaf.

This example produces the following output:

OLV2csquotes.png

In the example the environment displayquote prints a display quotation and the command \textquote and in-line quotation.

epigraph package

Some authors like to write quotations at the beginning of a chapter: those quotations are known as epigraphs. The epigraph package provides a vast set of options to typeset epigraphs and epigraphs lists. To use the package, add the following line to your document preamble:

\usepackage{epigraph}

Here is an example showing an epigraph quotation typed using the command \epigraph{}{}, whose first parameter is the quotation itself and the second parameter is the quotations source (author, book, etc.):

\documentclass{book}
\usepackage{blindtext} %This package generates automatic text
\usepackage{epigraph} 

\title{Epigraph example}
\author{Overleaf}
\date{August 2021}

\begin{document}
\frontmatter
\mainmatter

\chapter{Something}
\epigraph{All human things are subject to decay, and when fate summons, Monarchs must obey}{\textit{Mac Flecknoe \\ John Dryden}}
\blindtext
\end{document}

 Open this example in Overleaf

This example produces the following output:

OLV2epigraph.png

The epigraph package can handle several quotations by means of a special environment and also has many customization options.

fancychapters package (obsolete)

This package typesets epigraphs or quotations at the beginning of each chapter but was designed for use with LaTeX 2.09 so we no longer recommend using it.

quotchap package

The package quotchap redefines the commands chapter, and its starred version, to reformat them. You can change the colour of the chapter number with this package. It also provides a special environment to typeset quotations and the corresponding authors.

To use this package include the following line in your document preamble:

\usepackage{quotchap}

Quotes are typed inside the environment savequote. In the example below, the parameter inside brackets, [45mm], sets the width of the quotation area. After each quote the command \qauthor{} is used to typeset and format the author's name.

\documentclass{book}
\usepackage{blindtext}
\usepackage{quotchap}

\begin{document}
\begin{savequote}[45mm]
---When shall we three meet again
in thunder, lightning, or in rain?
---When the hurlyburly’s done,
when the battle’s lost and won.
\qauthor{Shakespeare, Macbeth}
Cookies! Give me some cookies!
\qauthor{Cookie Monster}
\end{savequote}

\chapter{Classic Sesame Street}
\blindtext
\end{document}

 Open this example in Overleaf.

This example produces the following output:

OLV2quotchap.png

Reference guide

A small table of quotation marks in several languages:

Language Primary Secondary
English, UK ‘…’ “…”
English, US “…” ‘…’
Danish »…« ›…‹
Lithuanian „…“
French «…» «…»
German „…“ ‚…‘
Russian «…» „…“
Ukrainian «…»
Polish „…“ ‚…‘ or «…»

Further reading

For more information see

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX