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.
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:
1 2 3 4 5 6 7 8 |
\usepackage[ left = ``,% right = '',% leftsub = `,% rightsub = '% ]{dirtytalk} |
For example, we can use:
1 2 3 |
\say{What did you mean when you said \say{that} computer?} |
Which gives us:
"What did you mean when you said 'that' computer?"
For UK English, we load the options:
1 2 3 4 5 6 7 8 |
\usepackage[ left = `,% right = ',% leftsub = ``,% rightsub = ''% ]{dirtytalk} |
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:
1 2 3 4 5 6 7 8 |
\usepackage[ left = \flqq,% right = \frqq,% leftsub = \flqq,% rightsub = \frqq% ]{dirtytalk} |
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.
1 2 3 4 5 6 7 8 |
\usepackage[ left = \frqq,% right = \flqq,% leftsub = \frq,% rightsub = \flq% ]{dirtytalk} |
In the Russian language, we can set our dirtytalk options to look like:
1 2 3 4 5 6 7 8 |
\usepackage[ left = \frqq,% right = \flqq,% leftsub = \glqq,% rightsub = \grqq% ]{dirtytalk} |
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.