Quotation Marks and the LaTeX dirtytalk package

When typesetting documents in LaTeX, users must be aware of the rules regarding quotations for different languages. In the English language, there are differences between the primary and secondary quotation marks used in US and UK English as we can see in our CTAN Quotation Packages in LaTeX blog article. To make things even more interesting, while the German language has its own set of quotation marks („ quote”) used in everyday writing, some modern printed books use a reverse order French quotation marks or « quillemets ».

While babel package does allow for the typesetting of quotation marks across different languages, see table below, and though it is possible to use either the appropriate key combination or TeX code, typing quotes can be cumbersome depending on the language.

Table of international quotation marks and their babel key combinations and LaTeX codes
Language Quotation Marks Key Combination LaTeX Code
 Primary  Secondary Primary  Secondary  Primary  Secondary
 English (UK)  ‘…’  “…” …' …''
 English (US)   “…”  ‘…’ …''  …'
 German  „…”  ‚…’ "…"'  \glqq…\grqq  \glq…\grq
 French  «…»  «…» "‹…"›  \flqq…\frqq \flqq…\frqq
 Danish  »…«  ›…‹  \frqq…\flqq  \frq…\flq
 Lithuanian  „…” "…"'  \glqq…\grqq
 Russian  «…»  „…” "‹…"›  "…"'  \flqq…\frqq  \glqq…\grqq
 Ukrainian  «…»  \flqq…\frqq

Typesetting Quotation Marks

The dirtytalk package allows easier typesetting of quotations using the command \say{something}. The appropriate quotation marks are inserted by the macro and the package also allows for nested quotations. This makes entering quotations much easier.

How quotation glyphs are used can be loaded in the package options. As we can see from the above table, an English writer from the US might enter:

For example, we can use:

Which gives us:

"What did you mean when you said 'that' computer?"

For UK English, we load the options:

Which gives us:

'What did you mean when you said "that" computer?'

Being aware and manually tracking these typographic rules for quotations can make proofreading code difficult if we are just looking at LaTeX code. In that regard the dirtytalk package can help.

The French, Danish and Russian Languages

Entering quotation marks in English is easy but what if you working in another language, say French or Danish? Both languages make use of guillemets or « angle quotes ». The babel package uses the \flqq and the \frqq commands to typeset these glyphs but entering them can be a tad bit inconvenient.

To get our French quotations, we set the options as follows:

While there are single quillemets, ‹ and ›, that do exist in the babel package, they aren't typically used and just entering single angle brackets or the "greater than'' and "less than'' sign, < and > respectively, doesn't quite achieve the intended results.

In the Danish language, the quillemets are reversed while in the Russian language, there is a mix of guillemets and the German `low 9'' („) quotation marks.

In the Russian language, we can set our dirtytalk options to look like:

Advantages and Disadvantages

The dirtytalk package makes the typesetting of quotations in any language easier but there are some limitations. For one, it only allows for one set of nested quotations and anything beyond will take some user modification of the package. The second disadvantage to the package is that it can only handle quotations in one language. For documents that contain more than one language there are other options but for what it does, the dirtytalk package works nicely.

One thought on “Quotation Marks and the LaTeX dirtytalk package

Leave a Reply

Your email address will not be published. Required fields are marked *