Debian Codegraph @

texmf-dist/doc/latex/csquotes/csquotes.tex

raw
1 \documentclass{ltxdockit}[2010/09/26]
2 \usepackage[american]{babel}
3 \usepackage[strict,autostyle=once]{csquotes}
4 \usepackage{tabularx}
5 \usepackage{booktabs}
6 \usepackage{graphicx}
7 \usepackage{shortvrb}
8 \usepackage{needspace}
9 \usepackage{pifont}
10 \MakeAutoQuote{«}{»}
11 \MakeAutoQuote*{<}{>}
12 \MakeShortVerb{\|}
13
14 \titlepage{%
15 title={The \sty{csquotes} Package},
16 subtitle={Context Sensitive Quotation Facilities},
17 url={http://www.ctan.org/pkg/csquotes/},
18 author={Philipp Lehman, Joseph Wright},
19 email={[email protected]},
20 revision={v5.2p},
21 date={2026-05-19}}
22
23 \hypersetup{%
24 pdftitle={The csquotes Package},
25 pdfsubject={Context Sensitive Quotation Facilities},
26 pdfauthor={Philipp Lehman, Joseph Wright},
27 pdfkeywords={tex, e-tex, latex, quote, quotation,
28 smart quotes, babel, polyglossia, multilingual typesetting}}
29
30 \AtBeginToc{\setcounter{tocdepth}{1}}
31 \AtEndToc{\setcounter{tocdepth}{5}}
32
33 % tables
34
35 \newcolumntype{H}{>{\sffamily\bfseries\spotcolor}l}
36 \newcolumntype{P}{>{\raggedright}p{120pt}}
37 \newcolumntype{Q}{>{\raggedright}p{70pt}}
38 \newcolumntype{V}{>{\raggedright\displayverbfont}l}
39
40 \newcommand*{\vcmd}[1]{\rotatehead{1.5em}{9.5em}{\cmd{#1}}}
41 \newcommand*{\venv}[1]{\rotatehead{1.5em}{9.5em}{\env{#1}}}
42 \newcommand*{\rotatehead}[3]{%
43 \makebox[#1][c]{\rotatebox{90}{\makebox[#2][l]{\scriptsize #3}}}}
44 \newcommand{\tickmarkyes}{\Pisymbol{psy}{183}}
45 \newcommand{\tickmarkno}{\textendash}
46
47 % samples
48
49 \definecolor{grid}{rgb}{0.7,0.7,0.7}
50
51 \newcommand*{\mksample}[2][25]{%
52 \mkmetrics[#1]{#2\,\textcolor{grid}{AaGg}\,#2}}
53 \newcommand*{\mkmetrics}[2][25]{%
54 \setlength{\unitlength}{1pt}%
55 \linethickness{0.25pt}%
56 \begin{picture}(#1,0)(0,0)
57 %\put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{\fontdimen9\font}}}
58 \put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{\fontdimen5\font}}}
59 \put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{0pt}}}
60 %\put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{-\fontdimen11\font}}}
61 \put(0,0){\parbox[b]{#1\unitlength}{\centering #2}}
62 \end{picture}}
63 \newcommand*{\mkgrid}[1]{%
64 \begingroup\color{grid}%
65 \hrule height 0.25pt depth 0pt width \linewidth
66 \hrule height #1 depth 0pt width 0pt
67 \endgroup}
68
69 \makeatletter
70
71 \newcounter{@pseudofootnote}
72 \newcommand{\@pseudofootnote}[1]{%
73 \stepcounter{@pseudofootnote}%
74 \textsuperscript{\number\value{@pseudofootnote}}}
75
76 \newenvironment{quotesample}[2][]
77 {\setquotestyle[#1]{#2}%
78 \setcounter{@pseudofootnote}{0}%
79 \let\footnote\@pseudofootnote
80 \trivlist
81 \leftskip\parindent
82 \small}
83 {\endtrivlist}
84
85 \makeatother
86
87 % hyphenation
88
89 \hyphenation{%
90 star-red
91 New-speak
92 thres-hold
93 re-pre-sent-ing
94 hand-ling
95 }
96
97 \begin{document}
98
99 \printtitlepage
100 \tableofcontents
101 \listoftables
102
103 \section{Introduction}
104 \label{int}
105
106 \subsection[About]{About \sty{csquotes}}
107
108 This package provides advanced facilities for inline and display quotations. It is designed for a wide range of tasks ranging from the most simple applications to the more complex demands of formal quotations. The facilities include commands, environments, and user"=definable <smart quotes> which dynamically adjust to their context. Quotation marks are switched automatically if quotations are nested and can adjust to the current language. There are additional features designed to cope with the more specific demands of academic writing. All quote styles as well as the optional active quotes are freely configurable.
109
110 \subsection{License}
111
112 Copyright © 2003--2011 Philipp Lehman, 2015--2019,2021 Joseph Wright. Permission is granted to copy, distribute and\slash or modify this software under the terms of the \lppl, version 1.3c or any later version.\fnurl{http://www.latex-project.org/lppl/}
113
114 \subsection{Contributions}
115
116 The multilingual support of this package depends on user contributions. If you want to contribute a quote style, please refer to \secref{cfg:sty} for an overview of the components a quote style is composed of and to \tabref{tab:out} for a list of commands which should be used in the definition of quote styles.
117
118 \section{Package Options}
119 \label{opt}
120
121 All package options are given in \keyval syntax.
122
123 \subsection{Main Options}
124 \label{opt:opt}
125
126 \begin{optionlist}
127
128 \boolitem[false]{strict}
129
130 This option turns all package warnings into error messages. This is useful to ensure that no problem will go unnoticed when finalizing a document. The short form \opt{strict} is equivalent to \kvopt{strict}{true}.
131
132 \optitem[american]{style}{\prm{style}}
133
134 This option selects a fixed quotation style. The style is used throughout the document unless it is changed manually, see \secref{bas:set} for details. This option implicitly sets \kvopt{autostyle}{false}. Please refer to \tabref{tab:sty,tab:als} for a list of available quote styles and aliases. See \secref{cfg:sty,cfg:als,use:spl} for instructions on adding or modifying quote styles.
135
136 \optitem[tryonce]{autostyle}{\opt{true}, \opt{false}, \opt{try}, \opt{once}, \opt{tryonce}}
137
138 This option controls multilingual support. It requires either the \sty{babel} package or the \sty{polyglossia} package.\footnote{Note that \sty{polyglossia} support requires \sty{polyglossia}~v1.45 (2019/10/27) or above. With older \sty{polyglossia} versions language variants will not be detected as expected.} \kvopt{autostyle}{true} continuously adapts the quote style to the current document language; \opt{once} will only adapt the style once so that it matches the main language of the document. \kvopt{autostyle}{try} and \opt{tryonce} are similar to \opt{true} and \opt{once} if multilingual support is available but will not issue any warnings if not (\ie if neither \sty{babel} nor \sty{polyglossia} have been loaded). The short form \opt{autostyle} is equivalent to \kvopt{autostyle}{true}. See also \secref{bas:set}.
139
140 \begin{table}
141 \tablesetup
142 \begin{tabularx}{\columnwidth}{@{}P@{}X@{}}
143 \toprule
144 \multicolumn{1}{@{}H}{Option key} & \multicolumn{1}{@{}H}{Possible values} \\
145 \cmidrule(r){1-1}\cmidrule{2-2}
146 austrian & quotes, guillemets \\
147 croatian & quotes, guillemets \\
148 czech & quotes, guillemets \\
149 danish & quotes, guillemets, topquotes \\
150 english & american, british \\
151 estonian & \\
152 french & quotes, quotes\*, guillemets, guillemets\* \\
153 galician & quotes, guillemets \\
154 german & quotes, guillemets, swiss \\
155 hungarian & \\
156 italian & guillemets, quotes \\
157 latin & \raggedright italianguillemets, germanquotes, germanguillemets,
158 britishquotes, americanquotes \tabularnewline
159 latvian & \\
160 lithuanian & \\
161 norwegian & guillemets, quotes \\
162 polish & guillemets, guillemets\* \\
163 portuguese & portuguese, brazilian \\
164 romanian & \\
165 serbian & quotes, guillemets, german \\
166 slovenian & guillemets, quotes \\
167 spanish & spanish, mexican \\
168 swedish & quotes, guillemets, guillemets\* \\
169 welsh & british \\
170 \bottomrule
171 \end{tabularx}
172 \caption[Language Options]{Language Options Defined by Default}
173 \label{tab:lng}
174 \end{table}
175
176 \varitem{language}{\prm{variant}}
177
178 Use the language options listed in \tabref{tab:lng} to choose a style variant if there is more than one for a certain language. The first variant in the list is the default for the respective style. In the following example, the \opt{autostyle} option causes \sty{csquotes} to continuously adapt the quote style to the current language using the default style for that language. The defaults for German and Norwegian are changed:
179
180 \begin{ltxcode}
181 \usepackage[english,ngerman]{babel}
182 \usepackage[autostyle,german=guillemets,norwegian=quotes]{csquotes}
183 \end{ltxcode}
184 %
185 Note that \sty{babel}'s language name is \opt{ngerman} here whereas \sty{csquotes} uses \opt{german}. When selecting a quote style automatically, this package will essentially normalize the language names first, using a list of aliases which map languages to quote styles. See \tabref{tab:als} for details. \Tabref{tab:lng} indicates the language options defined by default. Additional options may be defined in the configuration file. See \secref{cfg:opt,use:spl} for details. Also see \secref{hnt:pre} for some additional notes concerning the predefined styles.
186
187 \intitem[2]{maxlevel}
188
189 This option controls the maximum nesting level of quotations. By default, this package supports two levels of quotations, outer and inner ones, and issues an error if quotations are nested more deeply. Alternatively, it can reuse the outer and inner quotes on further quotation levels. This alternative behavior is enabled implicitly when increasing the value of the \opt{maxlevel} option. The minimum is~\texttt{2}.
190
191 \boolitem[true]{autopunct}
192
193 This option controls whether the quotation commands scan ahead for trailing punctuation marks. See \secref{bas:txt:reg,bas:blk:reg,int:txt:reg,int:blk:reg} for details. Also see \cmd{DeclareAutoPunct} in \secref{cfg:dap} and \secref{cfg:aux} on how to configure and use the punctuation look-ahead feature. The short form \opt{autopunct} is equivalent to \kvopt{autopunct}{true}.
194
195 \intitem[3]{threshold}
196
197 This option defines the number of lines or words the block quotation facilities use as a threshold when determining whether a quotation should be typeset in inline or in display mode. It corresponds to the \cmd{SetBlockThreshold} command. See \secref{bas:blk:reg, cfg:blk} for further details.
198
199 \optitem[lines]{thresholdtype}{\opt{lines}, \opt{words}}
200
201 This option selects the block threshold type. With \kvopt{thresholdtype}{lines}, the block quotation facilities will determine the number of lines required to typeset the quotation; with \kvopt{thresholdtype}{words}, they count the number of words in the quotation.\footnote{The word counting code is based on an idea by Donald Arseneau.} The default threshold setup is 3~lines. If you prefer something like 50~words, set \kvopt{threshold}{50} and \kvopt{thresholdtype}{words}. See \secref{bas:blk:reg} for further details.
202
203 \boolitem[true]{parthreshold}
204
205 This option fine-tunes the block threshold detection. If enabled, any explicit paragraph or line break in the quotation will trigger the threshold, \ie the quotation will be typeset in display mode regardless of its length. If disabled, explicit paragraph or line breaks are applied normally if \kvopt{thresholdtype}{lines}, and treated as a regular word boundary if \kvopt{thresholdtype}{words}. The short form \opt{parthreshold} is equivalent to \kvopt{parthreshold}{true}.
206
207 \boolitem[true]{splitcomp}
208
209 This option is applicable with \kvopt{thresholdtype}{words} only. It fine-tunes the handling of compounds with explicit hyphens. If enabled, compounds are split up at all hyphens and the components are counted as separate words. If disabled, compounds are treated as a single word. The short form \opt{splitcomp} is equivalent to \kvopt{splitcomp}{true}.
210
211 \boolitem[false]{csdisplay}
212
213 By default, the block quotation facilities will automatically force inline quotations in footnotes, parboxes, minipages, and floats. Setting this option to \texttt{true} will permit context-sensitive switching to display quotations in these contexts, as in the text body. The short form \opt{csdisplay} is equivalent to \kvopt{csdisplay}{true}. This option may also be set locally with \cmd{csdisplaytrue} and \cmd{csdisplayfalse}, respectively.
214
215 \boolitem[false]{debug}
216
217 This option controls the debugging feature of the block quotation facilities. If enabled, all block quotation commands will output diagnostic messages to the transcript file. These messages indicate the calculated line\slash word count, explicit paragaph or line breaks detected in the quotation text, and the final inline\slash display determination. The short form \opt{debug} is equivalent to \kvopt{debug}{true}.
218
219 \end{optionlist}
220
221 \subsection{Compatibility Options}
222 \label{opt:leg}
223
224 \begin{optionlist}
225
226 \optitem{version}{\prm{version}, \opt{4.4}, \opt{3.6}, \opt{3.0}}
227
228 This option is an attempt at making \sty{csquotes} backwards compatible with earlier versions, at least to some extent. Currently, it supports backwards compatibility with version 4.4, which covers 3.7--4.4, version 3.6, which covers 3.1--3.6, and version 3.0. Older versions are not supported. It is possible to specify any arbitrary \prm{version}, even if it is not explicitly listed above. In this case, the package will keep increasing the \prm{version} number until it either finds a suitable compatibility mode or hits the current version number. For example, when specifying \kvopt{version}{4.0}, \sty{csquotes} will increase the version number until it hits 4.4, and activate the v4.4 compatibility mode because this is the highest version still compatible with the requested 4.0 release. This implies that \sty{csquotes} may be invoked in a, to some extent, <future proof> way by making the version which is current at the time of writing sticky. If future versions break backwards compatibility, they will automatically activate the best compatibility mode. If not, the \opt{version} option will simply have no effect.
229
230 \optitem{babel}{\opt{true}, \opt{false}, \opt{try}, \opt{once}, \opt{tryonce}}
231
232 An older name of the \opt{autostyle} option. This option is depreciated.
233
234 \end{optionlist}
235
236 \section{Basic Interface}
237 \label{bas}
238
239 This package supports two ways to tag quotations: built-in commands and active quotes defined in the document preamble or the configuration file. This section will introduce the basic commands, active quotes are discussed in \secref{act}. When working with automated citations, you might also want to learn about the integrated quotation facilities presented in \secref{cit}.
240
241 \subsection{Quoting Regular Text}
242 \label{bas:reg}
243
244 The most basic command will simply enclose its argument in quotation marks:
245
246 \begin{ltxsyntax}
247
248 \cmditem{enquote}{text}
249 \cmditem*{enquote*}{text}
250
251 Like all quotation facilities, this command is context sensitive. Depending on the nesting level, it will toggle between outer and inner quotation marks with plain and nested quotations. The starred version of this command skips directly to the inner level. If multilingual support is enabled, the style of all quotation marks will be adapted to the current language.
252
253 \end{ltxsyntax}
254
255 \subsection{Quoting Text in a Foreign Language}
256 \label{bas:bbl}
257
258 To facilitate typesetting quotations in a foreign language, \sty{csquotes} provides two commands which combine \cmd{enquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
259
260 \begin{ltxsyntax}
261
262 \cmditem{foreignquote}{lang}{text}
263 \cmditem*{foreignquote*}{lang}{text}
264
265 This command combines \cmd{enquote} with \cmd{foreignlanguage}. It switches hyphenation patterns and enables the extra definitions provided by \sty{babel}\slash\sty{polyglossia} for \prm{lang}, which must be a language name known to the respective package. The quotation marks will match the language of the quoted piece of text.
266
267 \cmditem{hyphenquote}{lang}{text}
268 \cmditem*{hyphenquote*}{lang}{text}
269
270 This command combines \cmd{enquote} with the \env{hyphenrules} environment, that is, it merely switches hyphenation patterns. The quotation marks will match the language of the text surrounding the quotation.
271
272 \end{ltxsyntax}
273
274 \subsection{Formal Quoting of Regular Text}
275 \label{bas:txt:reg}
276
277 Formal quotations are typically accompanied by a citation indicating the source of the quoted text. The following command is an extended version of \cmd{enquote} which encloses the quoted piece of text in quotation marks and adds a citation after the quotation:
278
279 \begin{ltxsyntax}
280
281 \cmditem{textquote}[cite][punct]{text}<tpunct>
282 \cmditem*{textquote*}[cite][punct]{text}<tpunct>
283
284 The \prm{text} may be any arbitrary piece of text to be enclosed in quotation marks. The optional arguments \prm{cite} and \prm{punct} specify the citation and any terminal punctuation of \prm{text}. \prm{tpunct} denotes trailing punctuation after the command. If the \opt{autopunct} option is enabled, the quotation commands will scan ahead for punctuation marks immediately following their last argument and can move them around if required. See \secref{cfg:aux} on how to change the way these arguments are handled and \secref{use:hok} for reasons why you may want to specify the punctuation as a separate argument. The starred version of this command skips directly to the inner quotation level. Here are some usage examples:
285
286 \begin{ltxcode}
287 \textquote{...}
288 \textquote[][.]{...}
289 \textquote[Doe 1990, 67]{...}
290 \textquote[{\cite[67]{doe90}}]{...}
291 \end{ltxcode}
292 %
293 Note the use of the optional arguments in the examples above. As seen in the second example, \prm{cite} is required whenever \prm{punct} is used, even if it is empty. Also keep in mind that an optional argument containing square brackets must be wrapped in an additional pair of curly braces as shown in the last example. When working with automated citations, you might also want to learn about the integrated quotation facilities presented in \secref{cit}.
294
295 \end{ltxsyntax}
296
297 \subsection{Formal Quoting of Text in a Foreign Language}
298 \label{bas:txt:bbl}
299
300 There are two additional commands which combine \cmd{textquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
301
302 \begin{ltxsyntax}
303
304 \cmditem{foreigntextquote}{lang}[cite][punct]{text}<tpunct>
305 \cmditem*{foreigntextquote*}{lang}[cite][punct]{text}<tpunct>
306
307 This command combines \cmd{textquote} with \cmd{foreignlanguage}. Apart from the language, the arguments are handled as with \cmd{textquote}.
308
309 \cmditem{hyphentextquote}{lang}[cite][punct]{text}<tpunct>
310 \cmditem*{hyphentextquote*}{lang}[cite][punct]{text}<tpunct>
311
312 This command combines \cmd{textquote} with the \env{hyphenrules} environment. Apart from the language, the arguments are handled as with \cmd{textquote}.
313
314 \end{ltxsyntax}
315
316 \subsection{Block Quoting of Regular Text}
317 \label{bas:blk:reg}
318
319 Formal requirements in academic writing frequently demand that quotations be embedded in the text if they are short but set off as a distinct and typically indented paragraph, a so-called block quotation, if they are longer than a certain number of lines or words. In the latter case no quotation marks are inserted. The following command deals with this requirement automatically:
320
321 \begin{ltxsyntax}
322
323 \cmditem{blockquote}[cite][punct]{text}<tpunct>
324
325 This command determines the length of the \prm{text}. If the length exceeds a certain threshold, the \prm{text} will be typeset in display mode, \ie as a block quotation. If not, \cmd{blockquote} will behave like \cmd{textquote}. Depending on the \opt{thresholdtype} option, the threshold may be based on the number of lines required to typeset the \prm{text} or on the number of words in the \prm{text}. If the \opt{parthreshold} option has been enabled, any explicit paragraph or line break in the \prm{text} will trigger the threshold, \ie it will be typeset in display mode regardless of its length. The default threshold setup is three lines with \opt{parthreshold} enabled. The default environment used for display quotations is the \env{quote} environment. See \secref{opt:opt, cfg:blk} on how to change these parameters. Note that \sty{csquotes} will force inline quotations in footnotes, parboxes, minipages, and floats by default. Use the \opt{csdisplay} option from \secref{opt:opt} to change this behavior. The optional arguments \prm{cite} and \prm{punct} specify the citation and any terminal punctuation of the \prm{text}. \prm{tpunct} denotes trailing punctuation after the command. If the \opt{autopunct} option is enabled, the quotation commands will scan ahead for punctuation marks immediately following their last argument and can move them around if required. See \secref{cfg:aux} on how to change the way these arguments are handled and \secref{use:hok} for reasons why you may want to specify the punctuation as a separate argument.
326
327 \end{ltxsyntax}
328
329 \subsection{Block Quoting of Text in a Foreign Language}
330 \label{bas:blk:bbl}
331
332 The following commands combine \cmd{blockquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
333
334 \begin{ltxsyntax}
335
336 \cmditem{foreignblockquote}{lang}[cite][punct]{text}<tpunct>
337
338 This command behaves like \cmd{foreignquote} if the quotation is short. If it exceeds the threshold, it will be wrapped in an \env{otherlanguage*} environment which is in turn wrapped in a block quotation environment. The arguments are handled as with \cmd{blockquote}.
339
340 \cmditem{hyphenblockquote}{lang}[cite][punct]{text}<tpunct>
341
342 This command behaves like \cmd{hyphenquote} if the quotation is short. If it exceeds the threshold, it will be wrapped in a \env{hyphenrules} environment which is in turn wrapped in a block quotation environment. The arguments are handled as with \cmd{blockquote}.
343
344 \cmditem{hybridblockquote}{lang}[cite][punct]{text}<tpunct>
345
346 This command behaves like \cmd{hyphenquote} if the quotation is short. If it exceeds the threshold, the command behaves like \cmd{foreignblockquote}. In other words, it combines features of \cmd{foreignblockquote} and \cmd{hyphenblockquote}. The arguments are handled as with \cmd{blockquote}.
347
348 \end{ltxsyntax}
349
350 \subsection{Selecting Quote Styles}
351 \label{bas:set}
352
353 Quote styles may be selected manually at any point in the document body by way of the following command:
354
355 \begin{ltxsyntax}
356
357 \cmditem{setquotestyle}[variant]{style}
358 \cmditem*{setquotestyle}{alias}
359 \cmditem*{setquotestyle}*
360
361 The regular form of this command selects a quote style and disables multilingual support. Its mandatory argument may be a quote style or an alias. If it is a quote style, the optional argument indicates the style variant. The starred version, which takes no arguments, enables multilingual support. Please refer to \tabref{tab:sty,tab:als} for a list of available styles, style variants, and language aliases.
362
363 \end{ltxsyntax}
364
365 \section{Active Quotes}
366 \label{act}
367
368 This package also supports active characters corresponding to the commands presented in \secref{bas}. Roughly speaking, an active character is a single character which functions as a command. Like the corresponding control sequences, active quotes are fully"=fledged markup elements which verify the nesting level and issue an error if quotations are nested in an invalid way. If multilingual support is enabled, the style of all quotation marks will be adapted to the current language. The commands presented in the following allocate such active quotes. They may be used in the configuration file, the preamble, or the document body. Note that all characters are automatically checked for validity as they are allocated. This package will reject characters which are unsuitable as active quotes. See \secref{hnt:val} for details on the characters which may be used as active quotes.
369
370 \subsection{Quoting Regular Text}
371 \label{act:reg}
372
373 \cmd{MakeOuterQuote} and \cmd{MakeInnerQuote} define active quotes which print outer and inner quotation marks. Both take one mandatory argument, the character serving as both opening and closing mark:
374
375 \begin{ltxsyntax}
376
377 \cmditem{MakeOuterQuote}{character}
378 \cmditem{MakeInnerQuote}{character}
379
380 \cmd{MakeAutoQuote} defines active quotes which toggle between outer and inner quotations automatically. The two mandatory arguments serve as opening and closing mark and must be distinct:
381
382 \cmditem{MakeAutoQuote}{character 1}{character 2}
383 \cmditem*{MakeAutoQuote*}{character 1}{character 2}
384
385 All active quotes defined with \cmd{MakeAutoQuote} work like \cmd{enquote}. Those defined with \cmd{MakeOuterQuote} and \cmd{MakeInnerQuote} cover only a part of this functionality. The former correspond to the outer level of \cmd{enquote} whereas the latter correspond to the starred version. \cmd{MakeAutoQuote*} is similar to \cmd{MakeInnerQuote}, i.e. it corresponds to \cmd{enquote*}.
386
387 \end{ltxsyntax}
388
389 \subsection{Quoting Text in a Foreign Language}
390 \label{act:bbl}
391
392 These commands combine \cmd{MakeAutoQuote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
393
394 \begin{ltxsyntax}
395
396 \cmditem{MakeForeignQuote}{lang}{character 1}{character 2}
397 \cmditem*{MakeForeignQuote*}{lang}{character 1}{character 2}
398
399 The active quotes defined with the above commands are similar in concept and function to \cmd{foreignquote} and \cmd{foreignquote*}, respectively.
400
401 \cmditem{MakeHyphenQuote}{lang}{character 1}{character 2}
402 \cmditem*{MakeHyphenQuote*}{lang}{character 1}{character 2}
403
404 The active quotes defined with the above commands are similar in concept and function to \cmd{hyphenquote} and \cmd{hyphenquote*}, respectively.
405
406 \end{ltxsyntax}
407
408 \subsection{Block Quoting of Regular Text}
409 \label{act:blk:reg}
410
411 \cmd{MakeBlockQuote} defines active quotes which will set quotations inline or as a separate paragraph, depending on their length. This command takes three mandatory arguments which must be distinct:
412
413 \begin{ltxsyntax}
414
415 \cmditem{MakeBlockQuote}{character 1}{delimiter}{character 2}
416
417 The arguments are checked for validity, see \secref{hnt:val} for details. All active quotes defined with \cmd{MakeBlockQuote} behave essentially the same as \cmd{blockquote}, but the handling of the citation is slightly different. \prm{character 1} will serve as the opening mark in the source file, \prm{character 2} as the closing one. The character indicated by the middle argument \prm{delimiter} will serve as a delimiter separating the quoted text from the citation which is given last as the active quotes are used:
418
419 \begin{ltxcode}
420 \MakeBlockQuote{<}{|}{>}
421 ...
422 <text|citation>
423 \end{ltxcode}
424 %
425 If the delimiter is omitted, the entire text between the opening and the closing mark will be treated as quotation text.
426
427 \end{ltxsyntax}
428
429 \subsection{Block Quoting of Text in a Foreign Language}
430 \label{act:blk:bbl}
431
432 These commands combine \cmd{MakeBlockQuote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
433
434 \begin{ltxsyntax}
435
436 \cmditem{MakeForeignBlockQuote}{lang}{character 1}{delimiter}{character 2}
437
438 The active quotes defined with this command are similar in concept and function to \cmd{foreignblockquote}. The behavior of the delimiter character is similar to \cmd{MakeBlockQuote}.
439
440 \cmditem{MakeHyphenBlockQuote}{lang}{character 1}{delimiter}{character 2}
441
442 The active quotes defined with this command are similar in concept and function to \cmd{hyphenblockquote}. The behavior of the delimiter character is similar to \cmd{MakeBlockQuote}.
443
444 \cmditem{MakeHybridBlockQuote}{lang}{character 1}{delimiter}{character 2}
445
446 The active quotes defined with this command are similar in concept and function to \cmd{hybridblockquote}. The behavior of the delimiter character is similar to \cmd{MakeBlockQuote}.
447
448 \end{ltxsyntax}
449
450 \subsection{Controlling Active Quotes}
451 \label{act:ctl}
452
453 The commands introduced above merely allocate active quotes, but these characters are not immediately made active. All allocated quotes are automatically enabled at the beginning of the document body. If any active quotes are allocated in the document body, they need to be enabled with \cmd{EnableQuotes}. The following commands control the state of the active quotes within a local scope.
454
455 \begin{ltxsyntax}
456
457 \csitem{EnableQuotes}
458 Enables all active quotes by redefining the allocated characters and making them active. It also restores them when disabled, set to verbatim, or overwritten.
459
460 \csitem{DisableQuotes}
461 Disables all active quotes by restoring the original category codes and definitions of all allocated characters.
462
463 \csitem{VerbatimQuotes}
464 Switches to verbatim active quotes. All active quotes will be printed verbatim until their default behavior is restored with \cmd{EnableQuotes}.
465
466 \csitem{DeleteQuotes}
467 Disables and deallocates all active quotes, i.e. performs a complete reset of all allocated characters so that they may be newly defined.
468
469 \end{ltxsyntax}
470
471 \section{Integrated Interface}
472 \label{cit}
473
474 The commands presented in this section are extended versions of some of those discussed in \secref{bas}. They differ from their counterparts in that they integrate automated citations into their syntax. Instead of adding \cmd{cite} manually, you pass the citation arguments to the respective quotation command. See \secref{cfg:blk} on how to use a command other than \cmd{cite} to handle the citations.
475
476 \subsection{Formal Quoting of Regular Text}
477 \label{int:txt:reg}
478
479 The basic integrated command is an extended version of \cmd{textquote}:
480
481 \begin{ltxsyntax}
482
483 \cmditem{textcquote}[prenote][postnote]{key}[punct]{text}<tpunct>
484 \cmditem*{textcquote*}[prenote][postnote]{key}[punct]{text}<tpunct>
485
486 The \prm{text} may be any arbitrary piece of text to be enclosed in quotation marks. The optional arguments \prm{cite} and \prm{punct} specify the citation and any terminal punctuation of \prm{text}. \prm{tpunct} denotes trailing punctuation after the command. If the \opt{autopunct} option is enabled, the quotation commands will scan ahead for punctuation marks immediately following their last argument and can move them around if required. See \secref{cfg:aux} on how to change the way these arguments are handled and \secref{use:hok} for reasons why you may want to specify the punctuation as a separate argument. The starred version of this command skips directly to the inner quotation level. The remaining arguments are handed over to \cmd{cite}. Note that \cmd{cite} normally supports one optional argument only. \prm{prenote} is only available in conjunction with the \sty{natbib}, \sty{jurabib}, and \sty{biblatex} packages. How these arguments are handled depends on the citation command. With \sty{natbib} and \sty{biblatex}, \prm{prenote} is in fact a notice such as <see>. With jurabib, this argument has a different function by default. The argument \prm{postnote}, which is always available, indicates the citation postnote. This is usually a page number. \prm{key} is the citation key. See \secref{cfg:blk,cfg:aux} on how to customize the citation.
487
488 \end{ltxsyntax}
489
490 \subsection{Formal Quoting of Text in a Foreign Language}
491 \label{int:txt:bbl}
492
493 The following commands combine \cmd{textcquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
494
495 \begin{ltxsyntax}
496
497 \cmditem{foreigntextcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
498 \cmditem*{foreigntextcquote*}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
499
500 This command combines \cmd{textcquote} with \cmd{foreignlanguage}. The handling of the arguments is similar to \cmd{textcquote}.
501
502 \cmditem{hyphentextcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
503 \cmditem*{hyphentextcquote*}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
504
505 This command combines \cmd{textcquote} with the \env{hyphenrules} environment. The handling of the arguments is similar to \cmd{textcquote}.
506
507 \end{ltxsyntax}
508
509 \subsection{Block Quoting of Regular Text}
510 \label{int:blk:reg}
511
512 Block quotations may be combined with automated citations by using the extended version of \cmd{blockquote}:
513
514 \begin{ltxsyntax}
515
516 \cmditem{blockcquote}[prenote][postnote]{key}[punct]{text}<tpunct>
517
518 The difference between \cmd{blockcquote} and \cmd{blockquote} is that there are three citation arguments instead of one. The handling of these citation arguments is similar to \cmd{textcquote}; see \secref{int:txt:reg} for details. Also see \secref{cfg:blk,cfg:aux,use:hok} on how to customize block quotations.
519
520 \end{ltxsyntax}
521
522 \subsection{Block Quoting of Text in a Foreign Language}
523 \label{int:blk:bbl}
524
525 The following commands combine \cmd{blockcquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
526
527 \begin{ltxsyntax}
528
529 \cmditem{foreignblockcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
530
531 This command combines \cmd{blockcquote} with \cmd{foreignlanguage}. Long quotations will be wrapped in an \env{otherlanguage*} environment. The handling of the citation arguments is similar to \cmd{textcquote}.
532
533 \cmditem{hyphenblockcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
534
535 This command combines \cmd{blockcquote} with the \env{hyphenrules} environment. The handling of the citation arguments is similar to \cmd{textcquote}.
536
537 \cmditem{hybridblockcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
538
539 This command behaves like \cmd{hyphenblockcquote} if the quotation is short, and like \cmd{foreignblockquote} if it is long. The handling of the citation arguments is similar to \cmd{textcquote}.
540
541 \end{ltxsyntax}
542
543 \section{Display Environments}
544 \label{env}
545
546 The environments introduced in this section will typeset quotations as a separate paragraph which looks exactly like a long quotation set by means of the block quotation facilities. Use them for quotations which are to be presented as a separate paragraph regardless of their length. Note that these environments are not replacements for the standard \env{quote} environment in the strict sense. They function as an additional layer on top of the latter, just like the block quotation facilities. The advantage of using these environments instead of resorting to the standard \env{quote} environment is that they are configurable, support citations, and will always be in sync with the block quotation facilities with respect to the configuration options discussed in \secref{cfg:blk,cfg:aux}.
547
548 \subsection{Basic Display Environments}
549 \label{env:bas}
550
551 The arguments of all display environments are generally appended to the \cmd{begin} section of the environment:
552
553 \begin{ltxsyntax}
554
555 \envitem{displayquote}[cite][punct]
556
557 The optional arguments \prm{cite} and \prm{punct} specify the citation and any terminal punctuation of the quotation. See \secref{cfg:blk,cfg:aux} on how to customize this environment. Also see \secref{cfg:aux} on how to change the way the optional arguments are handled and \secref{use:hok} for reasons why you may want to specify the punctuation as a separate argument. Trailing white space at the end of the environment is removed automatically. There are two additional environments which combine \env{displayquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
558
559 \envitem{foreigndisplayquote}{lang}[cite][punct]
560
561 This environment combines \env{displayquote} with \env{otherlanguage*}. Apart from the language, the arguments are handled as with \env{displayquote}.
562
563 \envitem{hyphendisplayquote}{lang}[cite][punct]
564
565 This environment combines \env{displayquote} with \env{hyphenrules}. Apart from the language, the arguments are handled as with \env{displayquote}.
566
567 \end{ltxsyntax}
568
569 \subsection{Integrated Display Environments}
570 \label{env:cit}
571
572 The following environment is an extended version of \env{displayquote}:
573
574 \begin{ltxsyntax}
575
576 \envitem{displaycquote}[prenote][postnote]{key}[punct]
577
578 The difference between \env{displaycquote} and its more basic counterpart is that there are three citation arguments instead of one. The placement of the citation is similar to \env{displayquote}. The handling of the citation arguments is similar to \cmd{textcquote}, see \secref{int:txt:reg} for details. See \secref{cfg:blk,cfg:aux} on how to customize this environment. Also see \secref{cfg:aux} on how to change the way the optional arguments are handled and \secref{use:hok} for reasons why you may want to specify the punctuation as a separate argument. There are two environments which combine \env{displaycquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
579
580 \envitem{foreigndisplaycquote}{lang}[prenote][postnote]{key}[punct]
581
582 This environment combines \env{displaycquote} with \env{otherlanguage*}. Apart from the language, the arguments are handled as with \env{displaycquote}.
583
584 \envitem{hyphendisplaycquote}{lang}[prenote][postnote]{key}[punct]
585
586 This environment combines \env{displaycquote} with \env{hyphenrules}. Apart from the language, the arguments are handled as with \env{displaycquote}.
587
588 \end{ltxsyntax}
589
590 \section{Auxiliary Commands}
591 \label{aux}
592
593 When quoting text in a formal way, any changes applied to the quoted material, such as omissions, insertions, or alterations, are typically marked as such by using square brackets or parentheses and, where appropriate, ellipses. Use the following commands to indicate such changes in formal quotations:
594
595 \begin{ltxsyntax}
596
597 \cmditem{textelp}{}
598 \cmditem*{textelp}{text}
599 \cmditem*{textelp}*{text}
600
601 When used with an empty \prm{text} argument, this command prints an ellipsis symbol to indicate the omission of material from the quoted material. When used with a non-empty argument, the ellipsis symbol is followed by the \prm{text} enclosed in square brackets to indicate that the \prm{text} has been added after the omitted material. The starred version reverts the order, \ie it prints the \prm{text} followed by an ellipsis symbol to indicate that the \prm{text} has been added before the omitted material. In sum, there are three ways to use this command:
602
603 \begin{ltxcode}[escapechar={\%},escapebegin={\rmfamily}]
604 \textelp{} %= \textelp{} %
605 \textelp{text} %= \textelp{text} %
606 \textelp*{text} %= \textelp*{text} %
607 \end{ltxcode}
608 %
609 The insertion of text or individual letters may be indicated with the following command:
610
611 \cmditem{textins}{text}
612 \cmditem*{textins}*{text}
613
614 By default, \cmd{textins} will enclose the \prm{text} added to the quoted material in square brackets. The starred version is intended for minor changes, such as the capitalization of a word, which are required to adapt the quoted material to the new context in which it is quoted.
615
616 \begin{ltxcode}[escapechar={\%},escapebegin={\rmfamily}]
617 \textins{text} %= \textins{text} %
618 \textins*{T}ext %= \textins*{T}ext %
619 \end{ltxcode}
620 %
621 The deletion of individual letters may be indicated with the following command:
622
623 \cmditem{textdel}{text}
624
625 By default, \cmd{textdel} will output two square brackets. The omitted \prm{text} is not output.
626
627 \begin{ltxcode}[escapechar={\%},escapebegin={\rmfamily}]
628 text\textdel{s} %= text\textdel{s} %
629 \end{ltxcode}
630 %
631 See \secref{cfg:elp} on how to configure the appearance of ellipses and insertions.
632
633 \end{ltxsyntax}
634
635 \section{Configuration}
636 \label{cfg}
637
638 If available, this package will load the configuration file \path{csquotes.cfg}. You may use this file to define new quote styles and aliases or redefine existing ones.
639
640 \begin{table}
641 \tablesetup
642 \begin{tabularx}{\columnwidth}{@{}P@{}X@{}}
643 \toprule
644 \multicolumn{1}{@{}H}{Quote style} & \multicolumn{1}{@{}H}{Style variants} \\
645 \cmidrule(r){1-1}\cmidrule{2-2}
646 austrian & quotes, guillemets \\
647 croatian & quotes, guillemets \\
648 czech & quotes, guillemets \\
649 danish & quotes, guillemets \\
650 dutch & -- \\
651 english & american, british \\
652 finnish & -- \\
653 french & quotes, quotes\*, guillemets, guillemets\* \\
654 german & quotes, guillemets, swiss \\
655 greek & -- \\
656 italian & guillemets, quotes \\
657 latin & \raggedright italianguillemets, germanquotes, germanguillemets,
658 britishquotes, americanquotes \tabularnewline
659 norwegian & guillemets, quotes \\
660 portuguese & portuguese, brazilian \\
661 russian & -- \\
662 serbian & quotes, guillemets, german \\
663 spanish & spanish, mexican \\
664 swedish & quotes, guillemets, guillemets\* \\
665 welsh & british \\
666 \bottomrule
667 \end{tabularx}
668 \caption[Styles and Variants]{Quote Styles and Style Variants Defined by Default}
669 \label{tab:sty}
670 \end{table}
671
672 \subsection{Defining Quote Styles}
673 \label{cfg:sty}
674
675 Use the following command to define quote styles and style variants:
676
677 \begin{ltxsyntax}
678
679 \cmditem{DeclareQuoteStyle}[variant]{style}[outer init][inner init]\\
680 {opening outer mark}[middle outer mark]{closing outer mark}[kern]\\
681 {opening inner mark}[middle inner mark]{closing inner mark}
682
683 This command may be used in the configuration file or in the document preamble. The term <outer> refers to the first quotation level, <inner> means quotations within another quotation. A <middle mark> is a quotation mark inserted at the beginning of every paragraph within a quotation spanning multiple paragraphs. In most cases, the arguments defining the quotation marks will simply contain one of the commands listed in \tabref{tab:out}. If both an outer and an inner quotation begin or end simultaneously, the kerning specified by the value \prm{kern} will be inserted between the adjoining quotation marks. While this value can be given in any unit known to \tex, it is advisable to use the relative, font"=dependent unit <em> instead of absolute units such as points, inches, or millimeters. Note that \prm{kern} is used as a fallback value only. If the font provides kerning data for the respective pair of quotation marks the font's kerning takes precedence. \prm{outer init} and \prm{inner init} are all"=purpose hooks initializing the quote style. Selecting a quote style will make these hooks available to all quotation commands without expanding them. The execution of \prm{outer init} will take place immediately before the opening outer quote is inserted, but inside the group formed by the quotation. \prm{inner init} is executed before the opening inner quote is inserted. It is advisable to avoid any global assignments in this context to prevent interference with other styles. Whenever \prm{inner init} is used \prm{outer init} has to be given as well, even if the argument is empty. Refer to \tabref{tab:sty} for a list of all predefined quote styles and their variants. These are the backend styles only, see also \tabref{tab:als} for a list of language aliases. See \secref{use:spl} for some examples as well as an illustration of how quote styles, aliases, and package options interact.
684
685 \end{ltxsyntax}
686
687 \subsection{Defining Quote Aliases}
688 \label{cfg:als}
689
690 The following command defines quote aliases:
691
692 \begin{ltxsyntax}
693
694 \cmditem{DeclareQuoteAlias}[variant]{style}{alias}
695 \cmditem*{DeclareQuoteAlias}{first-level alias}{second-level alias}
696
697 This command may be used in the configuration file or in the document preamble. The alias may point to a backend style or to another alias. Most language aliases refer to a backend style, but some point to an intermediate alias instead. If the alias is defined for the sake of the \sty{babel} or the \sty{polyglossia} package, its name must be identical to the language name used by \sty{babel}\slash\sty{polyglossia}, \ie the expansion of \cmd{languagename}. See \secref{use:spl} for an illustration of how quote styles, aliases, and package options interact. A list of all aliases defined by default is given in \tabref{tab:als}.
698
699 \end{ltxsyntax}
700
701 \begin{table}
702 \tablesetup
703 \begin{tabularx}{\columnwidth}{@{}Q@{}X@{}Q@{}X@{}}
704 \toprule
705 \multicolumn{1}{@{}H}{Alias} & \multicolumn{1}{@{}H}{Backend style or alias} &
706 \multicolumn{1}{@{}H}{Alias} & \multicolumn{1}{@{}H}{Backend style or alias} \\
707 \cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule{4-4}
708 american & english/american & newzealand & english/british \\
709 australian & english/british & ngerman & german \\
710 austrian & austrian/quotes & norsk & norwegian \\
711 brazil & brazilian & norwegian & norwegian/guillemets \\
712 brazilian & portuguese/brazilian & nswissgerman & swissgerman \\
713 british & english/british & nynorsk & norwegian \\
714 canadian & english/american & portuges & portuguese \\
715 croatian & croatian/quotes & portuguese & portuguese/portuguese \\
716 danish & danish/quotes & serbian & serbian/quotes \\
717 english & english/american & spanish & spanish/spanish \\
718 french & french/quotes & swedish & swedish/quotes \\
719 german & german/quotes & swiss & german/swiss \\
720 italian & italian/guillemets & swissgerman & german/swiss \\
721 latin & latin/italianguillemets & UKenglish & british \\
722 mexican & spanish/mexican & USenglish & american \\
723 naustrian & austrian & welsh & welsh/british \\
724 \bottomrule
725 \end{tabularx}
726 \caption[Language Aliases]{Language Aliases Defined by Default}
727 \label{tab:als}
728 \end{table}
729
730 \subsection{Defining Package Options}
731 \label{cfg:opt}
732
733 The following command creates a new package option based on a key\slash value syntax. It takes one mandatory argument, the quote style name:
734
735 \begin{ltxsyntax}
736
737 \cmditem{DeclareQuoteOption}{style}
738
739 When using the new option, the name of the quote style will serve as the key. The value may be any style variant defined for the respective style. The package option will select a variant by defining an alias pointing to the desired backend style. This command is available in the configuration file only. See \secref{use:spl} for an illustration of how quote styles, aliases, and package options interact.
740
741 \end{ltxsyntax}
742
743 \subsection{Executing Package Options}
744 \label{cfg:exe}
745
746 Apart from passing options to this package as it is loaded, you may also execute options using the following command:
747
748 \begin{ltxsyntax}
749
750 \cmditem{ExecuteQuoteOptions}{key=value,\,\dots}
751
752 This command permits presetting package options in the configuration file. It may also be used in the document preamble.
753
754 \end{ltxsyntax}
755
756 \subsection{Defining Quotes for \pdf Strings}
757 \label{cfg:pdf}
758
759 The following command specifies the quotation marks for \pdf strings:
760
761 \begin{ltxsyntax}
762
763 \cmditem{DeclarePlainStyle}{opening outer mark}{closing outer mark}\\
764 {opening inner mark}{closing inner mark}
765
766 This command may be used in the configuration file or in the document preamble. By default, outer quotations get straight double quotes and inner quotations straight single quotes. See \secref{hnt:pdf} for additional hints concerning \pdf strings.
767
768 \end{ltxsyntax}
769
770 \subsection{Configuring Quotations and Citations}
771 \label{cfg:blk}
772
773 The following commands change the default values used by various quotation facilities of this package. The commands affected by these parameters are indicated in \tabref{tab:blk}.
774
775 \begin{table}
776 \tablesetup
777 \let\+\tickmarkyes
778 \let\_\tickmarkno
779 \begin{tabularx}{\columnwidth}{@{}X@{}*{21}{@{}c}@{}}
780 \toprule
781 \multicolumn{1}{@{}H}{Parameter} & \multicolumn{21}{@{}H}{Command or environment} \\
782 \cmidrule{2-22}
783 & \vcmd{enquote}
784 & \vcmd{foreignquote}
785 & \vcmd{hyphenquote}
786 & \vcmd{textquote}
787 & \vcmd{foreigntextquote}
788 & \vcmd{hyphentextquote}
789 & \vcmd{textcquote}
790 & \vcmd{foreigntextcquote}
791 & \vcmd{hyphentextcquote}
792 & \vcmd{blockquote}
793 & \vcmd{foreignblockquote}
794 & \vcmd{hyphenblockquote}
795 & \vcmd{blockcquote}
796 & \vcmd{foreignblockcquote}
797 & \vcmd{hyphenblockcquote}
798 & \venv{displayquote}
799 & \venv{foreigndisplayquote}
800 & \venv{hyphendisplayquote}
801 & \venv{displaycquote}
802 & \venv{foreigndisplaycquote}
803 & \venv{hyphendisplaycquote} \\
804 \cmidrule(r){1-1}\cmidrule{2-22}
805 Threshold &\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+&\_&\_&\_&\_&\_&\_\\
806 Environment &\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+\\
807 Cite command &\_&\_&\_&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+\\
808 \bottomrule
809 \end{tabularx}
810 \caption[Configurable Parameters]{Scope of Configurable Parameters}
811 \label{tab:blk}
812 \end{table}
813
814 \begin{ltxsyntax}
815
816 \cmditem{SetBlockThreshold}{integer}
817 \cmditem{SetBlockEnvironment}{environment}
818 \cmditem{SetCiteCommand}{command}
819
820 \cmd{SetBlockThreshold} defines the number of lines or words the block quotation facilities use as a threshold when determining whether a quotation should be typeset in inline or in display mode. The default is three. \cmd{SetBlockEnvironment} specifies the environment used for block and display quotations. It takes the name of an existing environment as its argument. The default is the \env{quote} environment provided by most document classes. The argument to \cmd{SetCiteCommand} specifies a replacement for \cmd{cite} which will be used by all integrated quotation facilities to handle citations. It must be a single command which takes one or two optional arguments followed by a mandatory one, the citation key. The default is \cmd{cite}. The citation commands of the \sty{natbib}, \sty{jurabib}, and \sty{biblatex} packages, which take two optional arguments, are supported.
821
822 \end{ltxsyntax}
823
824 \subsection{Hooks for Quotations and Citations}
825 \label{cfg:aux}
826
827 The appearance of quotes may be configured at a low level by redefining the hooks introduced below. This section will give an overview of their syntax. See \secref{use:hok} for practical examples. The quotation facilities which are responsive to these hooks are indicated in \tabref{tab:aux}. Also see \secref{cfg:tst} for tests which may be useful when redefining the hooks.
828
829 \begin{table}
830 \tablesetup
831 \let\+\tickmarkyes
832 \let\_\tickmarkno
833 \begin{tabularx}{\columnwidth}{@{}X@{}*{21}{@{}c}@{}}
834 \toprule
835 \multicolumn{1}{@{}H}{Hook} & \multicolumn{21}{@{}H}{Command or environment} \\
836 \cmidrule{2-22}
837 & \vcmd{enquote}
838 & \vcmd{foreignquote}
839 & \vcmd{hyphenquote}
840 & \vcmd{textquote}
841 & \vcmd{foreigntextquote}
842 & \vcmd{hyphentextquote}
843 & \vcmd{textcquote}
844 & \vcmd{foreigntextcquote}
845 & \vcmd{hyphentextcquote}
846 & \vcmd{blockquote}
847 & \vcmd{foreignblockquote}
848 & \vcmd{hyphenblockquote}
849 & \vcmd{blockcquote}
850 & \vcmd{foreignblockcquote}
851 & \vcmd{hyphenblockcquote}
852 & \venv{displayquote}
853 & \venv{foreigndisplayquote}
854 & \venv{hyphendisplayquote}
855 & \venv{displaycquote}
856 & \venv{foreigndisplaycquote}
857 & \venv{hyphendisplaycquote} \\
858 \cmidrule(r){1-1}\cmidrule{2-22}
859 \cmd{mktextquote} &\_&\_&\_&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\_&\_&\_&\_&\_&\_\\
860 \cmd{mkblockquote} &\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+&\_&\_&\_&\_&\_&\_\\
861 \cmd{mkbegdispquote} &\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+\\
862 \cmd{mkenddispquote} &\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+\\
863 \cmd{mkcitation} &\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_\\
864 \cmd{mkccitation} &\_&\_&\_&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+\\
865 \bottomrule
866 \end{tabularx}
867 \caption[Auxiliary Hooks]{Availability of Auxiliary Hooks}
868 \label{tab:aux}
869 \end{table}
870
871 \begin{ltxsyntax}
872
873 \cmditem{mkcitation}{cite}
874
875 All facilities which take a \prm{cite} argument will pass it to the \cmd{mkcitation} hook, which may be redefined to format the citation. \cmd{mkcitation} will only be executed if there is a citation. The default behavior is to separate the citation from the preceding text by an interword space and enclose it in parentheses. This is equivalent to the following definition:
876
877 \begin{ltxcode}[showspaces=true]
878 \newcommand*{<<\mkcitation>>}[1]{ (#1)}
879 \end{ltxcode}
880
881 \cmditem{mkccitation}{cite code}
882
883 The integrated quotation facilities use \cmd{mkccitation} instead of \cmd{mkcitation}. The default behavior of this command is to separate the citation from the preceding text by an interword space. This is equivalent to the following definition:
884
885 \begin{ltxcode}[showspaces=true]
886 \newcommand*{<<\mkccitation>>}[1]{ #1}
887 \end{ltxcode}
888
889 \cmditem{mktextquote}{open}{text}{close}{punct}{tpunct}{cite}
890
891 The \cmd{mktextquote} hook controls the layout of all text quotations. This hook is used by \cmd{textquote} and related commands from \secref{bas:txt:reg,bas:txt:bbl,int:txt:reg,int:txt:bbl}. \cmd{blockquote} and related commands from \secref{bas:blk:reg,bas:blk:bbl,int:blk:reg,int:blk:bbl} use this hook for short quotations. It takes six arguments which may be arranged according to the desired output:
892
893 \begin{argumentlist}{00}
894 \item[\#1] The opening quotation mark.
895 \item[\#2] The \prm{text} argument of the command.
896 \item[\#3] The closing quotation mark.
897 \item[\#4] The optional \prm{punct} argument of the command. If there is no \prm{punct} argument, this parameter is empty.
898 \item[\#5] Trailing \prm{tpunct} punctuation immediately after the command. If there is no such punctuation or if the \opt{autopunct} feature is disabled, this parameter is empty.
899 \item[\#6] The optional \prm{cite} argument of the command, wrapped in \cmd{mkcitation}. If there is no \prm{cite} argument, this parameter is empty. With integrated quotation commands, this parameter is the citation code, wrapped in \cmd{mkccitation}.
900 \end{argumentlist}
901 %
902 By default, \cmd{mktextquote} encloses the \prm{punct} argument in the quotation marks along with the \prm{text} and inserts the \prm{cite} argument or the citation code before any trailing \prm{tpunct} punctuation. This is equivalent to the following definition:
903
904 \begin{ltxcode}
905 \newcommand{<<\mktextquote>>}[6]{#1#2#4#3#6#5}
906 \end{ltxcode}
907 %
908 The way in which \cmd{mktextquote} hooks into the formatting process is best seen when looking at an example. The commands
909
910 \begin{ltxcode}
911 \textquote[<<cite>>]{<<short quote>>}
912 \textcquote[<<55>>]{<<key1>>}[<<.>>]{<<short quote>>}
913 \blockcquote[<<87>>]{<<key2>>}{<<short quote>>}<<.>>
914 \end{ltxcode}
915 %
916 would execute \cmd{mktextquote} with the following arguments:
917
918 \begin{ltxcode}
919 \mktextquote{open}{<<short quote>>}{close}{}{}{\mkcitation{<<cite>>}}
920 \mktextquote{open}{<<short quote>>}{close}{<<.>>}{}{\mkccitation{\cite[<<55>>]{<<key1>>}}}
921 \mktextquote{open}{<<short quote>>}{close}{}{<<.>>}{\mkccitation{\cite[<<87>>]{<<key2>>}}}
922 \end{ltxcode}
923 %
924 where \cmd{cite} is the command selected with \cmd{SetCiteCommand} and \texttt{open}\slash\texttt{close} are internal macros which print the opening and closing quotation marks. Note that these internal macros are fully"=fledged markup elements with grouping and nesting control. They must be placed in the correct order, otherwise \sty{csquotes} will report errors about unbalanced groups or invalidly nested quotations. Since the \prm{text} should obviously be enclosed in the quotation marks, the parameter order |#1#2#3| is effectively fixed. The parameters |#4|, |#5|, |#6| may be placed freely.
925
926 \cmditem{mkblockquote}{text}{punct}{tpunct}{cite}
927
928 The \cmd{mkblockquote} hook controls the layout of all block quotations. This hook is used by \cmd{blockquote} and related commands from \secref{bas:blk:reg,bas:blk:bbl,int:blk:reg,int:blk:bbl} for long quotations. It takes four arguments which may be arranged according to the desired output:
929
930 \begin{argumentlist}{00}
931 \item[\#1] The \prm{text} argument of the command.
932 \item[\#2] The optional \prm{punct} argument of the command. If there is no \prm{punct} argument, this parameter is empty.
933 \item[\#3] Trailing \prm{tpunct} punctuation immediately after the command. If there is no such punctuation or if the \opt{autopunct} feature is disabled, this parameter is empty.
934 \item[\#4] The optional \prm{cite} argument of the command, wrapped in \cmd{mkcitation}. If there is no \prm{cite} argument, this parameter is empty. With integrated quotation commands, this parameter is the citation code, wrapped in \cmd{mkccitation}.
935 \end{argumentlist}
936 %
937 By default, \cmd{mkblockquote} inserts the \prm{cite} argument or the citation code immediately after the \prm{text} and adds any trailing \prm{tpunct} punctuation at the very end. This is equivalent to the following definition:
938
939 \begin{ltxcode}
940 \newcommand{<<\mkblockquote>>}[4]{#1#2#4#3}
941 \end{ltxcode}
942
943 \cmditem{mkbegdispquote}{punct}{cite}
944 \cmditem{mkenddispquote}{punct}{cite}
945
946 The \cmd{mkbegdispquote} and \cmd{mkenddispquote} hooks are used by \env{displayquote} and related environments from \secref{env:bas,env:cit}. These hooks take two arguments:
947
948 \begin{argumentlist}{00}
949 \item[\#1] The \prm{punct} argument passed to the \cmd{begin} line of the environment. If there is no \prm{punct} argument, this parameter is empty.
950 \item[\#2] The \prm{cite} argument passed to the environment, wrapped in \cmd{mkcitation}. If there is no \prm{cite} argument, this parameter is empty. With integrated quotation environments, this parameter is the citation code, wrapped in \cmd{mkccitation}.
951 \end{argumentlist}
952 %
953 By default, \cmd{mkenddispquote} adds the \prm{punct} argument as well as the \prm{cite} argument or the citation code at the very end of the quotation. \cmd{mkbegdispquote} does not insert anything be default. This is equivalent to the following definition:
954
955 \begin{ltxcode}
956 \newcommand{<<\mkbegdispquote>>}[2]{}
957 \newcommand{<<\mkenddispquote>>}[2]{#1#2}
958 \end{ltxcode}
959 %
960 See \secref{use:hok} for practical examples.
961
962 \end{ltxsyntax}
963
964 \subsection{Additional Tests in Quotation Hooks}
965 \label{cfg:tst}
966
967 The commands in this section increase the flexibility of the hooks discussed in \secref{cfg:aux}. For example, it may be desirable to adjust the format of a citation depending on the way the corresponding quotation is typeset. It may also be useful to known if the quotation ends with a punctuation mark.
968
969 \begin{ltxsyntax}
970
971 \cmditem{ifpunctmark}{character}{true}{false}
972
973 Expands to \prm{true} if preceeded by the punctuation mark \prm{character}, and to \prm{false} otherwise. The \prm{character} may be a period, a comma, a semicolon, a colon, an exclamation mark, or a question mark. Note that this test is only available in the definition of the hooks from \secref{cfg:aux}.
974
975 \cmditem{ifpunct}{true}{false}
976
977 Expands to \prm{true} if preceeded by any punctuation mark, and to \prm{false} otherwise. Note that this test is only available in the definition of the hooks from \secref{cfg:aux}.
978
979 \cmditem{ifterm}{true}{false}
980
981 Expands to \prm{true} if preceeded by a terminal punctuation mark (period, exclamation mark, or question mark), and to \prm{false} otherwise. Note that this test is only available in the definition of the hooks from \secref{cfg:aux}.
982
983 \cmditem{iftextpunctmark}{text}{character}{true}{false}
984
985 Executes \prm{true} if the \prm{text} ends with the punctuation mark \prm{character}, and to \prm{false} otherwise. The \prm{character} may be a period, a comma, a semicolon, a colon, an exclamation mark, or a question mark. This command is robust.
986
987 \cmditem{iftextpunct}{text}{true}{false}
988
989 Executes \prm{true} if the \prm{text} ends with any punctuation mark, and to \prm{false} otherwise. This command is robust.
990
991 \cmditem{iftextterm}{text}{true}{false}
992
993 Executes \prm{true} if the \prm{text} ends with a terminal punctuation mark (period, exclamation mark, or question mark), and to \prm{false} otherwise. This command is robust.
994
995 \cmditem{ifblockquote}{true}{false}
996
997 Expands to \prm{true} in all block and display quotations, and to \prm{false} otherwise.
998
999 \cmditem{ifblank}{string}{true}{false}
1000
1001 This generic command, which is provided by the \sty{etoolbox} package, expands to \prm{true} if the \prm{string} is blank (empty or spaces), and to \prm{false} otherwise. This is useful to test for an empty argument in the definition of the \cmd{mk...quote} commands. Note that this test is redundant in the definition of the citation hooks because they are only executed if there is a citation.
1002
1003 \csitem{unspace}
1004
1005 Removes preceding whitespace, \ie removes all skips and penalties from the end of the current horizontal list.
1006
1007 \end{ltxsyntax}
1008
1009 \subsection{Configuring Punctuation Look-Ahead}
1010 \label{cfg:dap}
1011
1012 \begin{ltxsyntax}
1013
1014 \cmditem{DeclareAutoPunct}{characters}
1015
1016 This command defines the punctuation marks to be considered by the quotation commands as they scan ahead for punctuation. Note that \prm{characters} is an undelimited list of characters. Valid \prm{characters} are period, comma, semicolon, colon, exclamation and question mark. The default setting is:
1017
1018 \begin{lstlisting}[style=latex]{}
1019 \DeclareAutoPunct{.,;:!?}
1020 \end{lstlisting}
1021 %
1022 This definition is restored automatically whenever the \opt{autopunct} package option is set to \texttt{true}. Executing |\DeclareAutoPunctuation{}| is equivalent to setting \kvopt{autopunct}{false}, \ie it disables this feature.
1023
1024 \end{ltxsyntax}
1025
1026 \subsection{Configuring Auxiliary Commands}
1027 \label{cfg:elp}
1028
1029 The appearance of ellipses and insertions formatted with the auxiliary commands from \secref{aux} is controlled by six hooks. When \cmd{textelp} is used with an empty argument (ellipsis only), it will execute \cmd{mktextelp}. When used with a non-empty \prm{text} argument (ellipsis and insertion), the \prm{text} will be passed as an argument to \cmd{mktextelpins}. The starred form will pass the \prm{text} to \cmd{mktextinselp} instead. These are the default definitions:
1030
1031 \begin{ltxcode}[showspaces=true]
1032 \newcommand{<<\mktextelp>>}{[\textellipsis\unkern]}
1033 \newcommand{<<\mktextelpins>>}[1]{[\textellipsis\unkern] [#1]}
1034 \newcommand{<<\mktextinselp>>}[1]{[#1] [\textellipsis\unkern]}
1035 \end{ltxcode}
1036 %
1037 The \cmd{textins} command passes its \prm{text} argument to \cmd{mktextins} for further processing. The starred variant of \cmd{textins} uses \cmd{mktextmod} instead. These are the default definitions:
1038
1039 \begin{ltxcode}[showspaces=true]
1040 \newcommand{<<\mktextins>>}[1]{[#1]}
1041 \newcommand{<<\mktextmod>>}[1]{[#1]}
1042 \end{ltxcode}
1043 %
1044 The \cmd{textdel} command passes its \prm{text} argument to \cmd{mktextdel} for further processing. This is the default definition (note that the argument is not output):
1045
1046 \begin{ltxcode}[showspaces=true]
1047 \newcommand{<<\mktextdel>>}[1]{[]}
1048 \end{ltxcode}
1049 %
1050 You may redefine the above hooks to change the format of the printed output. For example, if you prefer replacements to be indicated by «[\textellipsis text]» rather than «[\textellipsis\unkern] [text]», redefine \cmd{mktextelpins} accordingly:
1051
1052 \begin{ltxcode}
1053 \renewcommand{<<\mktextelpins>>}[1]{[\textellipsis #1]}
1054 \end{ltxcode}
1055 %
1056 The \cmd{unkern} in the default definitions is required because \cmd{textellipsis} adds asymmetric kerning by default. The kerning after the final dot is similar to the spacing between the dots, which is fine if \cmd{textellipsis} is followed by any text, but undesirable if it is enclosed in brackets.
1057
1058 \section{Usage Notes}
1059 \label{use}
1060
1061 \subsection{Adding a New Quote Style}
1062 \label{use:spl}
1063
1064 This section will give some comprehensive examples of how to define new quote styles. The examples presented here will only make use of the most basic components a quote style can be composed of. The main point is to illustrate the interaction of quote styles, variants, aliases, and package options. To get started, consider a simple house style which may be selected by way of the package option \opt{style} or the command \cmd{setquotestyle}:
1065
1066 \begin{ltxcode}
1067 \DeclareQuoteStyle{house}
1068 {\textquotedblleft}{\textquotedblright}
1069 {\textquoteleft}{\textquoteright}
1070 \end{ltxcode}
1071 %
1072 Now suppose that we wanted to add a quote style for an imaginary language called Newspeak and that there were two quote styles commonly used in Newspeak, an official one and an unofficial one. In this case, we need two backend styles implemented as variants of the \opt{newspeak} style, \opt{newspeak/official} and \opt{newspeak/unofficial}:
1073
1074 \needspace{3\baselineskip}
1075 \begin{ltxcode}
1076 \DeclareQuoteStyle[official]{newspeak}
1077 {\textquotedblleft}{\textquotedblright}
1078 {\textquoteleft}{\textquoteright}
1079 \DeclareQuoteStyle[unofficial]{newspeak}
1080 {\textquotedblright}{\textquotedblleft}
1081 {\textquoteright}{\textquoteleft}
1082 \end{ltxcode}
1083 %
1084 The official variant should be the default for this style. There is no need to copy the definition of the \opt{official} variant to accomplish that. We simply define an alias labeled \opt{newspeak} which points to the desired variant:
1085
1086 \begin{ltxcode}
1087 \DeclareQuoteAlias[official]{newspeak}{newspeak}
1088 \end{ltxcode}
1089 %
1090 The reason why we are using variants and aliases instead of two independent styles will become clear in a moment. Suppose that the \sty{babel} package offered support for Newspeak, but this language was known to \sty{babel} as \opt{otherspeak}:
1091
1092 \begin{ltxcode}
1093 \DeclareQuoteAlias{newspeak}{otherspeak}
1094 \end{ltxcode}
1095 %
1096 This is an example of a second"=level alias pointing to a first"=level alias. If the current language is \opt{otherspeak}, the above aliases will be expanded as follows:
1097
1098 \begin{lstlisting}[style=plain]{}
1099 otherspeak = newspeak = newspeak/official
1100 \end{lstlisting}
1101 %
1102 We also define a new package option to choose a style variant:
1103
1104 \begin{ltxcode}
1105 \DeclareQuoteOption{newspeak}
1106 \end{ltxcode}
1107 %
1108 This will add a new package option with a key called \opt{newspeak}. The value of this option may be any variant of the \opt{newspeak} style defined in the configuration file. In this example, there are two possible values: \opt{official} and \opt{unofficial}. To select the default or the alternative style for the entire document we use:
1109
1110 \begin{ltxcode}
1111 \usepackage[style=newspeak]{csquotes}
1112 \usepackage[style=newspeak,newspeak=unofficial]{csquotes}
1113 \end{ltxcode}
1114 %
1115 To select the default or the alternative style with multilingual support we use:
1116
1117 \begin{ltxcode}
1118 \usepackage[babel]{csquotes}
1119 \usepackage[babel,newspeak=unofficial]{csquotes}
1120 \end{ltxcode}
1121 %
1122 The base style must be implemented as an alias in this case since the \opt{newspeak} option will select a variant by redefining and thus overwriting the \opt{newspeak} alias. Since the \opt{otherspeak} alias points to \opt{newspeak} and not directly to any backend style, using the \opt{newspeak} option will also have the desired effect if multilingual support is enabled. Note that there are some style names which have a special meaning. See \secref{hnt:pre} for details.
1123
1124 \subsection{Using Quotation and Citation Hooks}
1125 \label{use:hok}
1126
1127 Style guides for writers usually make detailed provisions concerning the formatting of quotations and citations, including rules dealing with punctuation placement. This section will discuss some typical usage scenarios, using hooks and other facilities introduced in \secref{cfg:aux,cfg:tst,cfg:dap}. In the examples below, we assume the following input:
1128
1129 \begin{ltxcode}
1130 \textquote[citation][.]{This is a complete sentence}
1131 \textquote[citation][]{This is an incomplete sentence}.
1132 \end{ltxcode}
1133 %
1134 We start off with semantically strict punctuation placement, \ie terminal punctuation is enclosed in the quotation marks if it in fact is part of the quotation, and printed after the closing mark if it is not. Our first sample cases will use German quotation marks, but the formatting convention, as far as punctuation placement is concerned, is very common. We assume citations in footnotes in the first example, hence the desired output is as follows:
1135
1136 \begin{quotesample}{german}
1137 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1138 \renewcommand{\mktextquote}[6]{#1#2#4#3#5#6}
1139
1140 \item \textquote[citation][.]{This is a complete sentence}
1141 \item \textquote[citation][]{This is an incomplete sentence}.
1142 \end{quotesample}
1143 %
1144 This is accomplished by the following definitions:
1145
1146 \begin{ltxcode}
1147 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1148 \renewcommand{\mktextquote}[6]{#1#2#4#3#5#6}
1149 \end{ltxcode}
1150 %
1151 In some cases, slightly different placement of the punctuation in the second line is requested:
1152
1153 \begin{quotesample}{german}
1154 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1155 \renewcommand{\mktextquote}[6]{#1#2#4#3#6#5}
1156
1157 \item \textquote[citation][.]{This is a complete sentence}
1158 \item \textquote[citation][]{This is an incomplete sentence}.
1159 \end{quotesample}
1160 %
1161 This is accomplished by the following definitions:
1162
1163 \begin{ltxcode}
1164 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1165 \renewcommand{\mktextquote}[6]{#1#2#4#3#6#5}
1166 \end{ltxcode}
1167 %
1168 Let's switch to American quotation marks in the next examples. When using parenthetical citations, the terminal punctuation mark is typically placed at the very end of the entire sentence, after the closing quotation mark and the citation, even if it is part of the original quotation:
1169
1170 \begin{quotesample}{american}
1171 \renewcommand{\mkcitation}[1]{ (#1)}
1172 \renewcommand{\mktextquote}[6]{#1#2#3#6#4#5}
1173
1174 \item \textquote[citation][.]{This is a complete sentence}
1175 \item \textquote[citation][]{This is an incomplete sentence}.
1176 \end{quotesample}
1177 %
1178 This is accomplished by the following definitions:
1179
1180 \begin{ltxcode}
1181 \renewcommand{\mkcitation}[1]{ (#1)}
1182 \renewcommand{\mktextquote}[6]{#1#2#3#6#4#5}
1183 \end{ltxcode}
1184 %
1185 The American quotation style is special in that it requires that a period or a comma immediately after a closing quotation mark be moved inside the quotes, even if it is not part of the original quotation. Given the above input (and assuming citations in footnotes in the next example), we need the same output in both cases:
1186
1187 \begin{quotesample}{american}
1188 \DeclareAutoPunct{.,}
1189 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1190 \renewcommand{\mktextquote}[6]{#1#2#4#5#3#6}
1191
1192 \item \textquote[citation][.]{This is a complete sentence}
1193 \item \textquote[citation][]{This is an incomplete sentence}.
1194 \end{quotesample}
1195 %
1196 This is accomplished by the following definitions:
1197
1198 \begin{ltxcode}
1199 \DeclareAutoPunct{.,}
1200 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1201 \renewcommand{\mktextquote}[6]{#1#2#4#5#3#6}
1202 \end{ltxcode}
1203 %
1204 The style usually seen in French books uses semantically strict punctuation placement. The unusual aspect of this style is the footnote mark, which is placed inside the quotes, before the terminal punctuation mark. Given the above input, we need the following output:
1205
1206 \begin{quotesample}{french}
1207 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1208 \renewcommand{\mktextquote}[6]{#1#2#6#4#3#5}
1209
1210 \item \textquote[citation][.]{This is a complete sentence}
1211 \item \textquote[citation][]{This is an incomplete sentence}.
1212 \end{quotesample}
1213 %
1214 This is accomplished by the following definitions:
1215
1216 \begin{ltxcode}
1217 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1218 \renewcommand{\mktextquote}[6]{#1#2#6#4#3#5}
1219 \end{ltxcode}
1220 %
1221 Note that the spacing of the quotation marks, as is common in French typography, is handled by the quote style, as defined with \cmd{DeclareQuoteStyle}. There is no need to deal with these details when redefining \cmd{mktextquote} and similar hooks. \cmd{mktextquote} will get the quotation marks plus spacing as parameters |#1| and |#3|.
1222
1223 In addition to language and style specific adaptions, the formatting hooks discussed in this section may be used to further automate the quoting process. For example, they can be configured to automatically insert an ellipsis mark when quoting a sentence truncated at the end. In the following examples, we assume these lines of input:
1224
1225 \begin{ltxcode}
1226 \textquote[citation]{This is an incomplete sentence}.
1227 \textquote[citation][.]{This is a complete sentence}
1228 \textquote[citation]{This is a complete sentence.}
1229 \end{ltxcode}
1230 %
1231 Let's assume American-style quotes combined with citations in footnotes. Our previous definition for that was:
1232
1233 \begin{ltxcode}
1234 \renewcommand{\mktextquote}[6]{#1#2#4#5#3#6}
1235 \end{ltxcode}
1236 %
1237 We need to insert an ellipsis mark if the \prm{punct} argument of the citation command is empty, or if it was omitted. Parameter |#4| will be blank in both cases:
1238
1239 \begin{ltxcode}
1240 \renewcommand{\mktextquote}[6]{%
1241 #1#2<<\ifblank{#4}{ \textelp{}}{#4}>>#5#3#6}
1242 \end{ltxcode}
1243 %
1244 Given the above input, this definition will yield the following output:
1245
1246 \begin{quotesample}{american}
1247 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1248 \renewcommand{\mktextquote}[6]{#1#2\ifblank{#4}{ \textelp{}}{#4}#5#3#6}
1249
1250 \item \textquote[citation]{This is an incomplete sentence}.
1251 \item \textquote[citation][.]{This is a complete sentence}
1252 \item \textquote[citation]{This is a complete sentence.}
1253 \end{quotesample}
1254 %
1255 The first two cases are handled correctly but the third one needs more tuning: there is a spurious
1256 ellipsis because the final period is not passed to \cmd{textquote} as a separate \prm{punct} argument, but included in the quotation. To fix that, we add an additional \cmd{ifpunct} test to check if the quoted text ends with a punctuation mark, and omit the ellipsis if this is the case:
1257
1258 \begin{ltxcode}
1259 \renewcommand{\mktextquote}[6]{%
1260 #1#2<<\ifblank{#4}{\ifpunct{}{ \textelp{}}}{#4}>>#5#3#6}
1261 \end{ltxcode}
1262 %
1263 The \cmd{ifpunct} test will check the last character in |#2| and omit the ellipsis when detecting a punctuation mark. This yields the desired output:
1264
1265 \begin{quotesample}{american}
1266 \renewcommand{\mkcitation}[1]{\footnote{#1}}
1267 \renewcommand{\mktextquote}[6]{#1#2\ifpunct{}{\ifblank{#4}{ \textelp{}}}{#4}#5#3#6}
1268
1269 \item \textquote[citation]{This is an incomplete sentence}.
1270 \item \textquote[citation][.]{This is a complete sentence}
1271 \item \textquote[citation]{This is a complete sentence.}
1272 \end{quotesample}
1273 %
1274 When using automated citations, it is convenient to employ the integrated quotations commands from \secref{cit}. For example, instead of this:
1275
1276 \begin{ltxcode}
1277 \textquote[{\cite[55]{key}}][.]{This is a complete sentence}
1278 \textquote[{\cite[55]{key}}][]{This is an incomplete sentence}.
1279 \end{ltxcode}
1280 %
1281 you might use \cmd{textcquote} instead of \cmd{textquote}:
1282
1283 \begin{ltxcode}
1284 \textcquote[55]{key}[.]{This is a complete sentence}
1285 \textcquote[55]{key}{This is an incomplete sentence}.
1286 \end{ltxcode}
1287 %
1288 The definition of the punctuation hooks is the same in both cases, but citations are set up in a slightly different way in the second case, using \cmd{mkccitation} instead of \cmd{mkcitation}. The first line in the example below is intended for parenthetical citations, the second one for citations in footnotes:
1289
1290 \begin{ltxcode}
1291 \renewcommand{\mkccitation}[1]{ (#1)}
1292 \renewcommand{\mkccitation}[1]{\footnote{#1}}
1293 \end{ltxcode}
1294 %
1295 Advanced citation packages such as \sty{natbib} and \sty{biblatex} provide dedicated commands for various types of citations. In this case, it is advisable to hand control of citations to the respective citation command, \ie \cmd{mkccitation} is used to add spacing where required but will leave the rest to the citation command. In the case of \sty{biblatex}, this boils down to:
1296
1297 \begin{ltxcode}
1298 \SetCiteCommand{\parencite}
1299 \renewcommand{\mkccitation}[1]{ #1}
1300 \end{ltxcode}
1301 %
1302 for parenthetical citations and
1303
1304 \begin{ltxcode}
1305 \SetCiteCommand{\footcite}
1306 \renewcommand{\mkccitation}[1]{#1}
1307 \end{ltxcode}
1308 %
1309 for citations in footnotes.
1310
1311 \section{Hints and Caveats}
1312 \label{hnt}
1313
1314 \subsection{Input Encodings}
1315 \label{hnt:inc}
1316
1317 The active quotes provided by this package may depend on or benefit from the \sty{inputenc}\slash \sty{inputenx} packages under certain circumstances. As long as the active quotes are in the range 0--127, there is no benefit in loading \sty{inputenc}. If you are using an 8-bit input encoding such as \opt{latin1}, \sty{inputenc} is required for the quotes to function properly in a \emph{verbatim} context. It should therefore be loaded before any active quotes are allocated (not necessarily before \sty{csquotes} is loaded). The macro-level \utf support of this package builds on the \path{utf8} module of the inputenc package. When using this encoding, make sure that inputenc is loaded with the \opt{utf8} option. Do not use the \opt{utf8x} option as this would implicitly load the \sty{ucs} package which is not supported by \sty{csquotes}. \utf encoding will be detected automatically. All commands discussed in \secref{act} work as usual with this encoding. \xetex and \luatex in native \utf mode will also work as expected and do not require any additional packages. See also \secref{hnt:mod}.
1318
1319 \subsection{Output Encodings}
1320 \label{hnt:onc}
1321
1322 The \acr{OT1} font encoding, which is the default output encoding of \latex, merely includes the quotation marks used in English. You will need an encoding like \acr{T1}, \acr{LY1}, or, with \xetex or \luatex, \acr{TU}, in order to get guillemets or baseline quotation marks. This package deliberately refrains from providing any workarounds for the \acr{OT1} legacy encoding. If you need \acr{T1} or some other extended encoding for some of the quotation marks, you will most likely need it anyway to get proper hyphenation for the respective language. See \tabref{tab:out} for a list of common quotation marks included in \acr{T1}, \acr{LY1}, and \acr{TU}.
1323
1324 \begin{table}
1325 \tablesetup
1326 \begin{tabularx}{\columnwidth}{@{}X@{}p{60pt}X@{}p{60pt}@{}}
1327 \toprule
1328 \multicolumn{2}{@{}H}{Double quotation marks} & \multicolumn{2}{H}{Single quotation marks} \\
1329 \cmidrule(r){1-2}\cmidrule(l){3-4}
1330 \multicolumn{1}{@{}H}{Command} & \multicolumn{1}{@{}H}{Example} &
1331 \multicolumn{1}{H}{Command} & \multicolumn{1}{@{}H}{Example} \\
1332 \cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(lr){3-3}\cmidrule{4-4}
1333 \cmd{textquotedblleft} & \mksample[60]{\textquotedblleft} &
1334 \cmd{textquoteleft} & \mksample[60]{\textquoteleft} \\
1335 \cmd{textquotedblright} & \mksample[60]{\textquotedblright} &
1336 \cmd{textquoteright} & \mksample[60]{\textquoteright} \\
1337 \cmd{quotedblbase} & \mksample[60]{\quotedblbase} &
1338 \cmd{quotesinglbase} & \mksample[60]{\quotesinglbase} \\
1339 \cmd{guillemotleft} & \mksample[60]{\guillemotleft} &
1340 \cmd{guilsinglleft} & \mksample[60]{\guilsinglleft} \\
1341 \cmd{guillemotright} & \mksample[60]{\guillemotright} &
1342 \cmd{guilsinglright} & \mksample[60]{\guilsinglright} \\
1343 \bottomrule
1344 \end{tabularx}
1345 \caption[Quotation Marks]{Quotation Marks Provided by Encodings \acr{T1}, \acr{LY1}, \acr{ETU}}
1346 \label{tab:out}
1347 \end{table}
1348
1349 \subsection{Valid Active Quotes}
1350 \label{hnt:val}
1351
1352 In general, an active quote may be any single character with category code 12 or 13, or any multibyte \utf sequence representing a single character. However, there are a few exceptions: numbers, punctuation marks, the apostrophe, the hyphen, and all characters which are part of the \latex syntax are rejected. In sum, the following characters will be considered as reserved by this package: \texttt{A--Z a--z 0--9 . , ; : ! ? \textquotesingle\ - \# \$ \% \& \textasciicircum\ \textunderscore\ \textasciigrave\, \textasciitilde\ \textbackslash\ @ \textasteriskcentered\ \{ \} [ ]}
1353
1354 \subsection{Invalid Nesting and Unbalanced Active Quotes}
1355 \label{hnt:grp}
1356
1357 Every quotation forms a group which includes both the quoted piece of text and the quotation marks. This package tracks the nesting level of all quotations and thus allows for basic validation. If quotations are nested in an invalid way, it will issue an error message. Keep in mind that the active quotes are more than a convenient way to enter quotation marks. They are fully"=fledged markup elements which imply grouping as well, hence they must always be balanced and must not interfere with other group boundaries. This package ensures that an error is triggered if quotes are unbalanced or nested in an invalid way. However, note that packages generally can not catch low-level errors caused by grouping mistakes, nor do they have any control over the wording of generic error messages.
1358
1359 \subsection{Active Quotes in Special Contexts}
1360 \label{hnt:mod}
1361
1362 All quotation commands are designed for use in text mode and will issue an error message in math mode. Note that all active quotes retain their original function in math mode. It is perfectly possible to use a character like the greater-than symbol as an active quote without interfering with math mode. In a verbatim context, the active quotes will normally be disabled. If a character is in the range 128--255, its original function is restored so that the \sty{inputenc}\slash \sty{inputenx} package may handle it in verbatim environments. This feature is available with the standard verbatim environments and with those provided by (or defined via) the packages \sty{verbatim}, \sty{fancyvrb}, \sty{moreverb}, and \sty{alltt}. This also applies to the \cmd{verb} command and the \sty{shortvrb} package. The \sty{listings} package provides dedicated support for extended input encodings. When using this package, activate its <extended characters> option and specify the input encoding. Note that \sty{listings} does not support macro-level \utf decoding. \xetex and \luatex in native \utf mode will work as expected and do not require the \sty{inputenc} package.
1363
1364 Some care is still required when choosing active quotes. Note that you normally cannot use active characters in the argument to commands expecting a string of characters, such as \cmd{input}, \cmd{label}, or \cmd{cite}. There are two packages which try to remedy this situation: the \sty{babel} package and the \sty{underscore} package (when loaded with the \opt{strings} option). Both packages redefine several standard commands affected by this general problem. If any one of these packages is loaded, \sty{csquotes} will take advantage of all improvements automatically. Unfortunately, both packages patch a different set of commands and neither one covers all possibly vulnerable commands.
1365
1366 \subsection{\pdf Strings and \sty{hyperref} Support}
1367 \label{hnt:pdf}
1368
1369 This package interfaces with the \sty{hyperref} package as \pdf strings such as bookmarks are generated. See \secref{cfg:pdf} on how to configure the quotation marks used in \pdf strings. Support for \pdf strings is only available with the basic facilities presented in \secref{bas:reg,bas:bbl} as well as \secref{act:reg,act:bbl}. Be advised that the way \sty{hyperref} builds \pdf strings imposes severe limitations on the capabilities of all commands. Most notably, the nesting level of quotations cannot be tracked in this context. Nested quotations will generally get outer marks, but you may use starred commands or active inner quotes to request inner marks explicitly. If quotation marks are to be included in the document properties of a \pdf file, you must use \cmd{hypersetup} to specify the strings. The replacement mechanism will not function within the optional argument to \cmd{usepackage}. See the \sty{hyperref} manual for further details.
1370
1371 \subsection{Footnotes Inside Quotations}
1372 \label{hnt:ftn}
1373
1374 This package will automatically reset the nesting level within any footnote included in a quotation. If the \sty{babel} or the \sty{polyglossia} package has been loaded, it will also reset the language. The language of the footnote text including the hyphenation patterns will match the language of the text surrounding the quotation. This applies to parboxes, minipages, and floats as well.
1375
1376 \subsection{Using \sty{csquotes} with \sty{babel}'s Shorthands}
1377 \label{hnt:bbl}
1378
1379 The commands discussed in \secref{aut:amk} may be combined with the shorthands of the \sty{babel} package such that \sty{babel} provides the user interface and \sty{csquotes} the backend.\footnote{This also applies to the \sty{polyglossia} package if the \opt{babelshorthands} option of \sty{polyglossia} has been enabled.} For example, the German module of the \sty{babel} package defines, amongst other things, the shorthands |"`| and |"'|. Such shorthands are input aids, \ie physical markup elements with a fixed definition. Typing |"`| is a short way of saying |\quotedblbase| but it is not different in concept. These shorthands can be transformed into <smart quotes> which behave like \cmd{enquote}. Here is a simple ad~hoc solution suitable for documents with only one language:
1380
1381 \begin{ltxexample}[upquote]
1382 \documentclass{...}
1383 \usepackage[german]{babel}
1384 \usepackage[babel=once]{csquotes}
1385 \defineshorthand{"`}{\openautoquote}
1386 \defineshorthand{"'}{\closeautoquote}
1387 \end{ltxexample}
1388 %
1389 It is possible to move such definitions to \path{csquotes.cfg}. In this case, the code is slightly more complex because it needs to be more general:
1390
1391 \begin{ltxcode}[upquote]
1392 \AtEndPreamble{%
1393 \@ifpackageloaded{babel}
1394 {\iflanguage{german}
1395 {\declare@shorthand{german}{"`}{\openautoquote}%
1396 \declare@shorthand{german}{"'}{\closeautoquote}}
1397 {}}
1398 {}}
1399 \end{ltxcode}
1400 %
1401 This code redefines the shorthands only if the \sty{babel} package has been loaded and the main language is \texttt{german}. Note that \sty{babel}'s shorthands are language"=specific. The way they are configured and handled is technically and conceptually different from the active quotes discussed in \secref{act}. Active quotes are defined globally and automatically adapt to the current language. With \sty{babel}, each language has its own set of shorthands. Also note that \sty{babel} uses \cmd{AtBeginDocument} to initialize the main document language, including the corresponding shorthands. We use \cmd{AtEndPreamble} to defer the code until the end of the preamble. This way, we can be sure that \sty{babel} has been loaded but that the main document language has not been initialized yet. See the \sty{babel} manual for further details. The \cmd{AtEndPreamble} command is provided by the \sty{etoolbox} package.
1402
1403 \subsection{Miscellaneous Notes about the Predefined Styles}
1404 \label{hnt:pre}
1405
1406 There are three styles which serve a special purpose: \opt{default}, \opt{fallback}, and \opt{debug}. The \opt{default} style is a dynamic alias pointing to the default quote style used if the multilingual interface is not enabled. The package option \opt{style} and the command \cmd{setquotestyle} will redefine this alias. The \opt{fallback} style is a backend style used as a fallback whenever the multilingual interface is enabled but there is no matching quote style for the current language. It will print bold question marks by default. The \opt{debug} style will not print quotation marks but the current quote level as a bold number. This style may be selected using the \opt{style} option or the \cmd{setquotestyle} command. It is intended for debugging only.
1407
1408 All variants of the \opt{french} style use spaced out guillemets as outer marks. The style variant \opt{quotes} uses double quotes as inner marks. The starred variant \opt{quotes*} is similar to its regular counterpart except that it will also space out the inner marks. The \opt{guillemets} variant employs spaced out guillemets on all levels. It will also insert guillemets at the beginning of every paragraph inside a quotation spanning multiple paragraphs. In addition to that, two adjoining marks at the end of a quotation are replaced by a single one; if two nested quotations end simultaneously, the second closing mark is omitted automatically. The starred variant \opt{guillemets*} is similar to its regular counterpart, differing only in the middle mark inserted at the beginning of every paragraph. The regular variant uses a left"=pointing guillemet whereas the starred one uses a right"=pointing one.
1409
1410 \section{Author Interface}
1411 \label{aut}
1412
1413 The following sections discuss the programmer interface to the \sty{csquotes} package as well as some details of the implementation. They are intended for class and package authors who want to interface with this package.
1414
1415 \subsection{Controlling Active Quotes}
1416 \label{aut:ctl}
1417
1418 The author commands in this section behave essentially like the corresponding user commands discussed in \secref{act:ctl}. The only difference is that they work quietly behind the scenes without writing any notices to the transcript file. The scope of these commands is local so that all changes may be confined to a group. Note that the active quotes are enabled at the beginning of the document body. Under no circumstances will this package make any characters active in the document preamble. You will only need the following commands when dealing with active quotes at the beginning of or in the document body.
1419
1420 \begin{ltxsyntax}
1421
1422 \csitem{@enablequotes}
1423
1424 This command enables all characters allocated as active quotes. It also restores their definitions if they were disabled or accidentally overwritten. With single-byte encodings, this command (re)defines all allocated characters and makes them active. With \utf encoding, it redefines the internal macro used by the \sty{inputenc} package to typeset the respective \utf sequence (\cmd{u8:}\prm{character}). \utf characters in the range 0--127 are handled as with single-byte encodings. When using a \tex engine with native \utf support, such as \xetex, all characters are handled as with single-byte encodings.
1425
1426 \csitem{@disablequotes}
1427
1428 This command restores the \emph{status quo ante} of all active quotes. With single-byte encodings, there are two possible cases. (1) If a character had already been active when it was allocated as active quote, its former definition is restored. (2) If a character had not been active when it was allocated, its former category code is restored. With \utf encoding, this command restores the former definition of the internal macro used by the \sty{inputenc} package to typeset the respective \utf sequence. \utf characters in the range 0--127 are handled as with single-byte encodings. When using a \tex engine with native \utf support, such as \xetex, all characters are handled as with single-byte encodings.
1429
1430 \csitem{@verbatimquotes}
1431
1432 For verbatim environments and similar applications, use this command rather than \cmd{@disablequotes}. It redefines the active quotes in a way that is better suited for verbatim typesetting. With single-byte encodings, it will do one of the following things. (1) If a character is in the range 0--127, it is redefined such that it expands to itself with category code 12. (2) If a character is in the range 128--255, there are two possibilities. (a) If it had already been active when it was allocated, its former definition is restored. (b) If it had not been active before, it is redefined such that it expands to itself with its former category code.
1433
1434 Characters in the range 0--127 are added to the \cmd{dospecials} list. Characters in the range 128--255 remain active, permitting the \sty{inputenc} package to typeset them verbatim (due to case 2a, which implies that you must load \sty{inputenc} before allocating active quotes). Case 2b is usually undesirable in verbatim environments. If \sty{inputenc} is loaded, however, this should not happen. With \utf encoding, this command restores the former definition of the internal macro used by the \sty{inputenc} package to typeset the respective \utf sequence. \utf characters in the range 0--127 are handled as with single-byte encodings. When using a \tex engine with native \utf support, such as \xetex, all characters are handled as with single-byte encodings.
1435
1436 Due to case 1, \cmd{@verbatimquotes} itself is independent of any \cmd{dospecials} processing. You may typeset all active quotes verbatim by using this command exclusively. The advantage of this approach is that it does not require any category code changes, hence this command may also be used to modify an argument after it has been read. Also note that the standard \latex verbatim environments as well as all environments provided by or defined via the packages \sty{verbatim}, \sty{fancyvrb}, \sty{moreverb}, and \sty{alltt} are catered for automatically. This also applies to the \cmd{verb} command and the \sty{shortvrb} package.
1437
1438 \csitem{@deletequotes}
1439
1440 This command implicitly executes \cmd{@disablequotes} and deallocates all active quotes, which results in a complete reset of all active quotes so that they may be newly defined. This command should be used with care because the reset is not visible to the user. Using \cmd{DeleteQuotes} may be preferable.
1441
1442 \end{ltxsyntax}
1443
1444 \subsection{Active Quotes in a Strings-Only Context}
1445 \label{aut:str}
1446
1447 A possible problem with active characters are strings-only contexts, i.\,e. cases in which an active character is used in the formation of a control sequence name. A typical example is the \cmd{label} command which expects a string of characters. Any active character may break \cmd{label} when used in its argument. There are two packages which try to remedy this situation, albeit in different ways: \sty{babel} and \sty{underscore}.
1448
1449 The \sty{babel} package defines the switch \cmd{if@safe@actives} and patches several standard commands such that the switch is set to \opt{true} while they process their arguments. The approach taken by the \sty{underscore} package is slightly different. If \sty{underscore} is loaded with the \opt{strings} option, it patches several commands such that \cmd{protect} is equivalent to \cmd{string} while the arguments are processed. If any one of these packages is loaded, \sty{csquotes} will take advantage of that automatically. Unfortunately, both packages patch a different set of commands and neither one covers all possibly vulnerable commands. If \sty{babel} is loaded, for example, you may use active quotes in the argument of \cmd{label}, but not in the argument of \cmd{input}. If you load \sty{underscore} with its \opt{strings} option, active quotes may also be used in the argument of \cmd{input}.
1450
1451 When writing a package which may have to process user"=supplied arguments in a strings-only context, there are two ways to deal with active quotes. Taking the approach of the \sty{babel} package, you may do the following:
1452
1453 \begin{ltxcode}
1454 \let\if@safe@actives\iftrue
1455 \end{ltxcode}
1456 %
1457 This is best done in a group. If grouping is not feasible, you must ensure that the switch is properly restored. In contrast to using \cmd{@safe@activestrue}, this approach works even if \sty{babel} is not loaded. However, note that you must take three states into account when restoring the switch in this case: true, false, and undefined. Taking the approach of the \sty{underscore} package, you may also do the following:
1458
1459 \begin{ltxcode}
1460 \let\@@protect\protect \let\protect\string
1461 \end{ltxcode}
1462 %
1463 This could either be done in a group or without any grouping, but followed by \cmd{restore@protect}. The first approach works with the active characters of the \sty{babel} and the \sty{underscore} packages. The second one works with the \sty{underscore} and the \sty{at} packages. Unfortunately, the active characters of the \sty{inputenc} package support neither of the above"=mentioned techniques. As far as \sty{csquotes} is concerned, it does not matter which approach you take. In both cases all active quotes expand to themselves with category code 12. With macro-level \utf support, \utf encoded active quotes expand to a string of characters with category code 12. This string will be valid \utf. In a verbatim \cmd{write} operation, you should employ one of the techniques discussed in this section rather than \cmd{@verbatimquotes}, which is geared to verbatim typesetting.
1464
1465 \subsection{Block Quotations}
1466 \label{aut:blk}
1467
1468 The block quotation facilities need to typeset all quotations twice. The first pass is required to measure the length of the quotation. The actual typesetting takes place on the second pass, in a format depending on the result of the first one. In order to prevent any side"=effects of the first (trial) pass, the \sty{csquotes} package (1) performs the first pass inside a group, (2) employs checkpointing to freeze all LaTeX counters, and (3) sets \cmd{if@filesw} to \texttt{false}. However, it can not prevent side"=effects caused by commands that (1) make any global assignments which are not overwritten on the second pass (for example, by way of \cmd{g@addto@macro}), (2) increment counters globally in a way that circumvents \latex's counter commands, or (3) do not check \cmd{if@filesw} every time they are about to write to an auxiliary file. If you observe any malfunctions related to the trial pass (for example, if counters are incremented twice or if an item appears twice in a list), use \cmd{BlockquoteDisable} to redefine or disable the affected command temporarily.
1469
1470 \begin{ltxsyntax}
1471
1472 \cmditem{BlockquoteDisable}{code}
1473
1474 The \prm{code} may be arbitrary \latex code which redefines vulnerable commands locally such that they work differently during the trial pass. The \prm{code} itself should obviously not include any global assignments. This solution should be considered as a last ressort but may be the quickest way to fix a vulnerable package. Note that there is no need to escape parameter characters by doubling them in the \prm{code} argument. Simply use this command like \cmd{AtBeginDocument} and similar hooks.
1475
1476 \end{ltxsyntax}
1477
1478 \subsection{Registering Quotation Marks}
1479 \label{aut:sfc}
1480
1481 In order to track punctuation marks inside quotations, this package requires that all quotation marks be transparent to the space factor, \ie that they have a space factor code of zero. This setting is specific to the output encoding. Settings for the encodings \acr{OT1}, \acr{OT2}, \acr{OT4}, \acr{T1}, \acr{LY1}, \acr{LGR}, \acr{T2A}, \acr{T2B}, \acr{T2C}, \acr{LCY}, \acr{X2}, and \acr{ETU} are provided by default. Other encodings may be set up in the configuration file using the following command:
1482
1483 \begin{ltxsyntax}
1484 \cmditem{DeclareQuoteGlyph}{encoding}{position}
1485 \end{ltxsyntax}
1486
1487 The \prm{encoding} is the name of the output encoding, for example \texttt{OT1}. This string corresponds to the identifiers used when loading the \sty{fontenc} package. The \prm{position} argument is an integer indicating the position of a glyph in this encoding. You need to reqister all quotation marks in the output encoding, using one declaration for each glyph. As an example, these are the settings for the \acr{OT1} encoding:
1488
1489 \begin{ltxcode}
1490 \DeclareQuoteGlyph{OT1}{34}% = \textquotedblright
1491 \DeclareQuoteGlyph{OT1}{39}% = \textquoteright
1492 \DeclareQuoteGlyph{OT1}{92}% = \textquotedblleft
1493 \DeclareQuoteGlyph{OT1}{96}% = \textquoteleft
1494 \end{ltxcode}
1495 %
1496 The \prm{position} argument may use any notation accepted by \tex in integer assignments, \eg \texttt{171} in decimal or \verb+"00AB+ in hexadecimal notation. See the settings in \path{csquotes.def} for further examples. The advantage of registering quotes with the above command (rather than adjusting the space factor codes globally) is that the declarations are only used locally inside quotations and will not affect any other part of the document.
1497
1498 \subsection{Automatic Quotation Marks}
1499 \label{aut:amk}
1500
1501 The commands in this section provide access to the automatic quotation facilities at a slightly lower level than the user commands in \secref{bas:reg,act:reg}. In contrast to the commands discussed in \secref{aut:imk}, the facilities in this section are fully"=fledged markup elements which verify the nesting level and issue an error if quotations are nested in an invalid way. They form groups and must always be balanced, see \secref{hnt:grp} for details. In other words, the facilities in this section are semantic markup elements, the ones in \secref{aut:imk} are physical markup elements.
1502
1503 \begin{ltxsyntax}
1504
1505 \csitem{openautoquote} Opens a nestable quotation.
1506 \csitem{closeautoquote} Closes a nestable quotation.
1507
1508 \end{ltxsyntax}
1509
1510 In terms of their function, the above commands correspond to the regular versions of \cmd{enquote} and \cmd{MakeAutoQuote}. The following commands correspond to the starred variants \cmd{enquote*} and \cmd{MakeAutoQuote*}:
1511
1512 \begin{ltxsyntax}
1513
1514 \csitem{openinnerquote} Opens an inner quotation.
1515 \csitem{closeinnerquote} Closes an inner quotation.
1516
1517 \end{ltxsyntax}
1518
1519 The above commands may be used to implement an alternative user interface. For example, you can combine them with the shorthands of the \sty{babel} package such that \sty{babel} provides the user interface and \sty{csquotes} the backend. See \secref{hnt:bbl} and the \sty{babel} manual for details.
1520
1521 \subsection{Internal Quotation Marks}
1522 \label{aut:imk}
1523
1524 The commands in this section print the quotation marks of the current style, as defined with \cmd{DeclareQuoteStyle}, without any grouping or nesting control. The quotation marks reflect all changes to the quotation style. If the multilingual interface is enabled, they are also synced with the current language.
1525
1526 \begin{ltxsyntax}
1527
1528 \csitem{textooquote} Prints the opening outer quotation mark of the currently active quote style.
1529 \csitem{textcoquote} Prints the closing outer quotation mark.
1530 \csitem{textmoquote} Prints the middle outer quotation mark.
1531
1532 \csitem{textoiquote} Prints the opening inner quotation mark.
1533 \csitem{textciquote} Prints the closing inner quotation mark.
1534 \csitem{textmiquote} Prints the middle inner quotation mark.
1535
1536 \end{ltxsyntax}
1537
1538 Note that the initialization hooks for the respective quotation style are not executed automatically. They may be accessed separately:
1539
1540 \begin{ltxsyntax}
1541
1542 \csitem{initoquote} Executes the outer initialization hook.
1543 \csitem{initiquote} Executes the inner initialization hook.
1544
1545 \end{ltxsyntax}
1546
1547 The scope of these hooks must always be confined to a group.
1548
1549 \section{Bug reports}
1550
1551 Bugs may be reported at \url{https://github.com/josephwright/csquotes/issues}.
1552
1553 \section{Revision History}
1554
1555 This revision history is a list of changes relevant to users of this package. Changes of a more technical nature which do not affect the user interface or the behavior of the package are not included in the list. If an entry in the revision history states that a feature has been \emph{extended}, this indicates a syntactically backwards compatible modification, such as the addition of an optional argument to an existing command. Entries stating that a feature has been \emph{modified}, \emph{renamed}, or \emph{removed} demand attention. They indicate a modification which may require changes to existing documents in some, hopefully rare, cases. The \opt{version} option from \secref{opt:opt} may be helpful in this case. The numbers on the right indicate the relevant section of this manual.
1556
1557 \begin{changelog}
1558
1559 % \begin{release}{??}{????-??-??}
1560 % \item Add support for Welsh
1561 % \end{release}
1562
1563 \begin{release}{5.2p}{2026-05-19}
1564 \item Add \cmd{measuring@true} to \cmd{blockquote@parsehook} for better tagging support, see issue \#81.
1565 \end{release}
1566
1567 \begin{release}{5.2o}{2024-04-04}
1568 \item Correct detection of \texttt{*} at start of quotes in bookmarks
1569 \item Added Lithuanian style
1570 \item Fixed quoting in Dutch
1571 \end{release}
1572
1573 \begin{release}{5.2n}{2022-09-14}
1574 \item Further work to localise font changes inside quotes
1575 \end{release}
1576
1577 \begin{release}{5.2m}{2022-09-09}
1578 \item Localise font changes inside quotes
1579 \item Added Turkish and Slovenian styles
1580 \end{release}
1581
1582
1583 \begin{release}{5.2l}{2021-02-13}
1584 \item Fix spacing with \cmd{mktextelp}
1585 \end{release}
1586
1587 \begin{release}{5.2j}{2019-12-04}
1588 \item Fix issue with some combinations of language and document class
1589 \item Added support for Latin quotations
1590 \end{release}
1591
1592
1593 \begin{release}{5.2i}{2019-12-02}
1594 \item Fix issue with \cmd{csq@mainlang}
1595 \end{release}
1596
1597 \begin{release}{5.2h}{2019-11-15}
1598 \item Fix issue with \cmd{langname}
1599 \end{release}
1600
1601 \begin{release}{5.2g}{2019-11-14}
1602 \item Fix issue with \cmd{languagename}
1603 \end{release}
1604
1605 \begin{release}{5.2f}{2019-11-11}
1606 \item Added language option \opt{serbian}\see{opt:opt}
1607 \item Improved \sty{polyglossia} support\see{opt:opt}
1608 \end{release}
1609
1610 \begin{release}{5.2d}{2018-04-13}
1611 \item Update for \LaTeX{} kernel changes in 2018
1612 \item Added language option \opt{estonian}\see{opt:opt}
1613 \item Added language option \opt{polish}\see{opt:opt}
1614 \end{release}
1615
1616 \begin{release}{5.2c}{2018-02-11}
1617 \item Added language option \opt{galician}\see{opt:opt}
1618 \item Added language option \opt{latvian}\see{opt:opt}
1619 \item Improve language support for \opt{czech}
1620 \end{release}
1621
1622 \begin{release}{5.2b}{2017-03-11}
1623 \item Added language option \opt{portuguese}\see{opt:opt}
1624 \end{release}
1625
1626 \begin{release}{5.2a}{2017-02-03}
1627 \item Fix behaviour of \cmd{blockquote} inside \cmd{parbox} and
1628 related constructs
1629 \end{release}
1630
1631 \begin{release}{5.2}{2016-12-28}
1632 \item Add \cmd{textdel} auxiliary command.\see{aux}
1633 \end{release}
1634
1635 \begin{release}{5.1h}{2016-07-14}
1636 \item Adapt \cmd{fixligatures} to work correctly with \luatex
1637 \end{release}
1638
1639 \begin{release}{5.1g}{2016-01-31}
1640 \item Update for new \acr{TU} Unicode encoding
1641 \end{release}
1642
1643 \begin{release}{5.1f}{2015-07-18}
1644 \item Update \opt{(n)swissgerman} and \opt{(n)austrian} quote styles
1645 \end{release}
1646
1647 \begin{release}{5.1e}{2015-04-15}
1648 \item New maintainer: Joseph Wright
1649 \item Update \opt{danish} quote style
1650 \end{release}
1651
1652 \begin{release}{5.1d}{2011-10-22}
1653 \item Slightly modified quote style \opt{italian/guillemets}
1654 \item Made variant \opt{guillemets} the default for \opt{italian}
1655 \item Fixed \xetex kerning issue
1656 \end{release}
1657
1658 \begin{release}{5.1c}{2011-03-25}
1659 \item Fixed spurious language reset
1660 \end{release}
1661
1662 \begin{release}{5.1b}{2011-01-20}
1663 \item Fixed conflict with \sty{polyglossia} and French
1664 \end{release}
1665
1666 \begin{release}{5.1a}{2011-01-11}
1667 \item Fix for paragraph environments inside \cmd{blockquote}
1668 \end{release}
1669
1670 \begin{release}{5.1}{2010-11-19}
1671 \item Added package option \opt{debug}\see{opt:opt}
1672 \item Added package option \opt{threshold}\see{opt:opt}
1673 \item Added package option \opt{thresholdtype}\see{opt:opt}
1674 \item Added package option \opt{parthreshold}\see{opt:opt}
1675 \item Added package option \opt{splitcomp}\see{opt:opt}
1676 \item Improved block quotation facilities\see{bas:blk:reg}
1677 \item Improved integrated block quotation facilities\see{int:blk:reg}
1678 \end{release}
1679
1680 \begin{release}{5.0c}{2010-09-21}
1681 \item Added package option \opt{csdisplay}\see{opt:opt}
1682 \item Added \cmd{csdisplaytrue} and \cmd{csdisplayfalse}\see{opt:opt}
1683 \item Fixed conflict with \sty{polyglossia}
1684 \end{release}
1685
1686 \begin{release}{5.0b}{2010-08-06}
1687 \item Fixed issue with \sty{babel}'s active punctuation marks
1688 \end{release}
1689
1690 \begin{release}{5.0a}{2010-06-09}
1691 \item Fixed bug related to middle quote marks
1692 \item Minor internal update for biblatex
1693 \end{release}
1694
1695 \begin{release}{5.0}{2010-06-02}
1696 \item Renamed package option \opt{babel} to \opt{autostyle}\see{opt:opt}
1697 \item Added compatibility option \opt{babel}\see{opt:leg}
1698 \item Added preliminary \sty{polyglossia} interface\see{opt:opt}
1699 \item Added package option \opt{autopunct}\see{opt:opt}
1700 \item Added package option \opt{version}\see{opt:leg}
1701 \item Added \cmd{hybridblockquote}\see{bas:blk:bbl}
1702 \item Added \cmd{hybridblockcquote}\see{int:blk:bbl}
1703 \item Added \cmd{MakeHybridBlockQuote}\see{act:blk:bbl}
1704 \item Added \cmd{DeclareAutoPunct}\see{cfg:dap}
1705 \item Extended \cmd{textquote}\see{bas:txt:reg}
1706 \item Extended \cmd{foreigntextquote}\see{bas:txt:bbl}
1707 \item Extended \cmd{hyphentextquote}\see{bas:txt:bbl}
1708 \item Extended \cmd{blockquote}\see{bas:blk:reg}
1709 \item Extended \cmd{foreignblockquote}\see{bas:blk:bbl}
1710 \item Extended \cmd{hyphenblockquote}\see{bas:blk:bbl}
1711 \item Extended \cmd{textcquote}\see{int:txt:reg}
1712 \item Extended \cmd{foreigntextcquote}\see{int:txt:bbl}
1713 \item Extended \cmd{hyphentextcquote}\see{int:txt:bbl}
1714 \item Extended \cmd{blockcquote}\see{int:blk:reg}
1715 \item Extended \cmd{foreignblockcquote}\see{int:blk:bbl}
1716 \item Extended \cmd{hyphenblockcquote}\see{int:blk:bbl}
1717 \item Added \cmd{mktextquote}\see{cfg:aux}
1718 \item Added \cmd{mkblockquote}\see{cfg:aux}
1719 \item Added \cmd{mkbegdispquote}\see{cfg:aux}
1720 \item Added \cmd{mkenddispquote}\see{cfg:aux}
1721 \item Removed \cmd{mkpretextpunct}\see{cfg:aux}
1722 \item Removed \cmd{mkmidtextpunct}\see{cfg:aux}
1723 \item Removed \cmd{mkfintextpunct}\see{cfg:aux}
1724 \item Removed \cmd{mkpreblockpunct}\see{cfg:aux}
1725 \item Removed \cmd{mkmidblockpunct}\see{cfg:aux}
1726 \item Removed \cmd{mkfinblockpunct}\see{cfg:aux}
1727 \item Removed \cmd{mkpredisppunct}\see{cfg:aux}
1728 \item Removed \cmd{mkmiddisppunct}\see{cfg:aux}
1729 \item Removed \cmd{mkfindisppunct}\see{cfg:aux}
1730 \item Removed \cmd{quotetext}\see{cfg:aux}
1731 \item Removed \cmd{quoteblock}\see{cfg:aux}
1732 \item Renamed \cmd{ifquotepunct} to \cmd{ifpunct}\see{cfg:tst}
1733 \item Renamed \cmd{ifquoteterm} to \cmd{ifterm}\see{cfg:tst}
1734 \item Added \cmd{ifpunctmark}\see{cfg:tst}
1735 \item Removed \cmd{ifquotecolon}\see{cfg:tst}
1736 \item Removed \cmd{ifquotecomma}\see{cfg:tst}
1737 \item Removed \cmd{ifquoteexclam}\see{cfg:tst}
1738 \item Removed \cmd{ifquoteperiod}\see{cfg:tst}
1739 \item Removed \cmd{ifquotequestion}\see{cfg:tst}
1740 \item Removed \cmd{ifquotesemicolon}\see{cfg:tst}
1741 \item Renamed \cmd{ifstringblank} to \cmd{ifblank}\see{cfg:tst}
1742 \item Added \cmd{unspace}\see{cfg:tst}
1743 \item Added \cmd{textelp}\see{aux}
1744 \item Added \cmd{textins}\see{aux}
1745 \item Added \cmd{mktextelp}\see{cfg:elp}
1746 \item Added \cmd{mktextelpins}\see{cfg:elp}
1747 \item Added \cmd{mktextinselp}\see{cfg:elp}
1748 \item Added \cmd{mktextins}\see{cfg:elp}
1749 \item Added \cmd{mktextmod}\see{cfg:elp}
1750 \item Expanded documentation\see{use:hok}
1751 \item Removed \cmd{cquote} legacy alias (use \cmd{textcquote} instead)\see{int:txt:reg}
1752 \item Removed \cmd{foreigncquote} legacy alias (use \cmd{foreigntextcquote})\see{int:txt:bbl}
1753 \item Removed \cmd{hyphencquote} legacy alias (use \cmd{hyphentextcquote})\see{int:txt:bbl}
1754 \item Removed \cmd{RestoreQuotes} legacy alias (use \cmd{EnableQuotes})\see{act:ctl}
1755 \item Removed \cmd{@restorequotes} legacy alias (use \cmd{@enablequotes})\see{aut:ctl}
1756 \item Added support for \acr{EU2} encoding\see{aut:sfc}
1757 \item Added quote style for Croatian
1758 \end{release}
1759
1760 \begin{release}{4.4d}{2010-02-06}
1761 \item Added quote style for Dutch
1762 \item Added quote style for Finnish
1763 \item Added quote style for Greek
1764 \item Added support for \acr{LGR} encoding\see{aut:sfc}
1765 \end{release}
1766
1767 \begin{release}{4.4c}{2009-09-23}
1768 \item Fixed incompatibility with \sty{inputenx} package
1769 \end{release}
1770
1771 \begin{release}{4.4b}{2009-07-24}
1772 \item Fixed bug in glyph declarations for \acr{EU1} encoding\see{aut:sfc}
1773 \end{release}
1774
1775 \begin{release}{4.4a}{2009-07-04}
1776 \item Added support for \acr{EU1} encoding\see{aut:sfc}
1777 \item Added quote style for Brazilian
1778 \item Added preliminary quote style for Portuguese
1779 \end{release}
1780
1781 \begin{release}{4.4}{2009-05-30}
1782 \item Added package option \opt{maxlevel}\see{opt:opt}
1783 \item Added special quote style \opt{debug}\see{hnt:pre}
1784 \item Added \cmd{DeclareQuoteGlyph}\see{aut:sfc}
1785 \item Added support for \acr{OT2} and \acr{OT4} encodings\see{aut:sfc}
1786 \item Added support for \acr{T2A}, \acr{T2B}, \acr{T2C}, \acr{X2} encodings\see{aut:sfc}
1787 \item Added support for \acr{LCY} encoding\see{aut:sfc}
1788 \item Added quote style for Russian
1789 \end{release}
1790
1791 \begin{release}{4.3}{2008-11-23}
1792 \item Made package option \kvopt{babel}{tryonce} the default setting\see{opt:opt}
1793 \item Internal updates for \path{biblatex} package
1794 \end{release}
1795
1796 \begin{release}{4.2}{2008-06-24}
1797 \item Upgrade to \sty{etoolbox} 1.6
1798 \end{release}
1799
1800 \begin{release}{4.1}{2008-04-11}
1801 \item Fixed timing issue with active quotes introduced in 4.0
1802 \end{release}
1803
1804 \begin{release}{4.0}{2008-03-02}
1805 \item \etex now mandatory requirement
1806 \item New dependency on \sty{etoolbox} package
1807 \item Added package option \opt{spanish}\see{opt:opt}
1808 \item Added variant \opt{mexican} to style \opt{spanish}\see{opt:opt}
1809 \item Removed variant \opt{oldstyle} from \opt{english} style\see{opt:opt}
1810 \item Removed variant \opt{oldstyle} from \opt{french} style\see{opt:opt}
1811 \item Removed variant \opt{imprimerie} from \opt{french} style\see{opt:opt}
1812 \item Expanded documentation\see{hnt:bbl}
1813 \item Added \cmd{openautoquote} and \cmd{closeautoquote}\see{aut:amk}
1814 \item Added \cmd{openinnerquote} and \cmd{closeinnerquote}\see{aut:amk}
1815 \item Moved predefined styles, variants, options to \path{csquotes.def}
1816 \item Added more hints and examples to \path{csquotes.cfg}
1817 \item Added extended \pdf bookmarks to this manual
1818 \end{release}
1819
1820 \begin{release}{3.8}{2008-01-05}
1821 \item Added variant \opt{guillemets*} to style \opt{swedish}\see{opt:opt}
1822 \item Added language alias \opt{australian}\see{cfg:als}
1823 \item Added language alias \opt{newzealand}\see{cfg:als}
1824 \item Internal improvements
1825 \end{release}
1826
1827 \begin{release}{3.7}{2007-03-25}
1828 \item Added package option \kvopt{babel}{try}\see{opt:opt}
1829 \item Added package option \kvopt{babel}{tryonce}\see{opt:opt}
1830 \item Added \cmd{MakeAutoQuote*}\see{act:reg}
1831 \item Added \cmd{MakeForeignQuote*}\see{act:bbl}
1832 \item Added \cmd{MakeHyphenQuote*}\see{act:bbl}
1833 \item Added \cmd{mkpretextpunct}\see{cfg:aux}
1834 \item Added \cmd{mkpreblockpunct}\see{cfg:aux}
1835 \item Added \cmd{mkpredisppunct}\see{cfg:aux}
1836 \item Removed compatibility code for \cmd{blockcite} legacy command
1837 \item Internal updates for \path{biblatex} package
1838 \end{release}
1839
1840 \begin{release}{3.6}{2006-11-09}
1841 \item Added \cmd{BlockquoteDisable}\see{aut:blk}
1842 \item Fix for \sty{amsmath} package (active quotes in \env{split} and other environments)
1843 \item Fix for \sty{endnotes} package (endnotes in block quotations)
1844 \item Revised Spanish quote style
1845 \end{release}
1846
1847 \begin{release}{3.5}{2006-08-24}
1848 \item Exchanged definitions of French \opt{quotes} and \opt{quotes*} variants\see{hnt:pre}
1849 \item Internal updates for \path{inputenc} 1.1\,b (2006-05-05)
1850 \end{release}
1851
1852 \begin{release}{3.4}{2006-04-02}
1853 \item Stricter validation of user"=defined active characters\see{hnt:val}
1854 \item Author interface now documented in this manual\see{aut}
1855 \item Added documentation of \cmd{@enablequotes}\see{aut:ctl}
1856 \item Added documentation of \cmd{@disablequotes}\see{aut:ctl}
1857 \item Added documentation of \cmd{@verbatimquotes}\see{aut:ctl}
1858 \item Added documentation of \cmd{@deletequotes}\see{aut:ctl}
1859 \item Added documentation concerning string handling \see{aut:str}
1860 \item Added documentation of interface to internal marks\see{aut:imk}
1861 \end{release}
1862
1863 \begin{release}{3.3}{2006-02-27}
1864 \item Added support for \utf encoded active quotes\see{hnt:inc}
1865 \item Modified active quotes, category codes 7, 8 no longer valid\see{hnt:val}
1866 \item Modified delimiters, category codes 3, 4, 7, 8 no longer valid\see{hnt:val}
1867 \item Active quotes may now be defined in the document body\see{act:ctl}
1868 \item Renamed \cmd{RestoreQuotes} to \cmd{EnableQuotes}\see{act:ctl}
1869 \item Added \cmd{DeleteQuotes}\see{act:ctl}
1870 \item Added \cmd{VerbatimQuotes}\see{act:ctl}
1871 \item Added \cmd{ExecuteQuoteOptions}\see{cfg:exe}
1872 \item Added package option \kvopt{babel}{once}\see{opt:opt}
1873 \item Added new style variant for French\see{hnt:pre}
1874 \item Improved nesting control of active block quotes
1875 \item Made active block quotes robust
1876 \end{release}
1877
1878 \begin{release}{3.2}{2005-12-05}
1879 \item Added quote style for Spanish
1880 \item Fixed bug in \sty{hyperref} interface
1881 \end{release}
1882
1883 \begin{release}{3.1}{2005-08-29}
1884 \item Added \cmd{textquote}\see{bas:txt:reg}
1885 \item Added \cmd{foreigntextquote}\see{bas:txt:bbl}
1886 \item Added \cmd{hyphentextquote}\see{bas:txt:bbl}
1887 \item Renamed \cmd{cquote} to \cmd{textcquote}\see{int:txt:reg}
1888 \item Renamed \cmd{foreigncquote} to \cmd{foreigntextcquote}\see{int:txt:bbl}
1889 \item Renamed \cmd{hyphencquote} to \cmd{hyphentextcquote}\see{int:txt:bbl}
1890 \item Extended \cmd{textcquote}\see{int:txt:reg}
1891 \item Extended \cmd{foreigntextcquote}\see{int:txt:bbl}
1892 \item Extended \cmd{hyphentextcquote}\see{int:txt:bbl}
1893 \item Modified environment \env{displayquote}\see{env:bas}
1894 \item Modified environment \env{foreigndisplayquote}\see{env:bas}
1895 \item Modified environment \env{hyphendisplayquote}\see{env:bas}
1896 \item Extended environment \env{displaycquote}\see{env:cit}
1897 \item Extended environment \env{foreigndisplaycquote}\see{env:cit}
1898 \item Extended environment \env{hyphendisplaycquote}\see{env:cit}
1899 \item Added \cmd{mkmidtextpunct}\see{cfg:aux}
1900 \item Added \cmd{mkfintextpunct}\see{cfg:aux}
1901 \item Added \cmd{mkmiddisppunct}\see{cfg:aux}
1902 \item Added \cmd{mkfindisppunct}\see{cfg:aux}
1903 \item Added auxiliary environment \env{quotetext}\see{cfg:aux}
1904 \item Added detection of paragraphs to all block quotation facilities\see{bas:blk:reg}
1905 \item \cmd{ifquote...} now usable in \cmd{mkcitation} and \cmd{mkccitation}\see{cfg:tst}
1906 \item Terminal punctuation now evaluated by all quotation facilities
1907 \item Prevent undesirable |?`| and |!`| ligatures in \acr{T1} encoding
1908 \item Always adjust space factor codes of backend quotes
1909 \end{release}
1910
1911 \begin{release}{3.0}{2005-07-14}
1912 \item Extended \cmd{blockquote}\see{bas:blk:reg}
1913 \item Extended \cmd{foreignblockquote}\see{bas:blk:bbl}
1914 \item Extended \cmd{hyphenblockquote}\see{bas:blk:bbl}
1915 \item Extended \cmd{setquotestyle}\see{bas:set}
1916 \item Added \cmd{cquote}\see{int:txt:reg}
1917 \item Added \cmd{foreigncquote}\see{int:txt:bbl}
1918 \item Added \cmd{hyphencquote}\see{int:txt:bbl}
1919 \item Added \cmd{blockcquote}\see{int:blk:reg}
1920 \item Added \cmd{foreignblockcquote}\see{int:blk:bbl}
1921 \item Added \cmd{hyphenblockcquote}\see{int:blk:bbl}
1922 \item Added environment \env{displayquote}\see{env:bas}
1923 \item Added environment \env{foreigndisplayquote}\see{env:bas}
1924 \item Added environment \env{hyphendisplayquote}\see{env:bas}
1925 \item Added environment \env{displaycquote}\see{env:cit}
1926 \item Added environment \env{foreigndisplaycquote}\see{env:cit}
1927 \item Added environment \env{hyphendisplaycquote}\see{env:cit}
1928 \item Modified \cmd{DeclarePlainStyle}\see{cfg:pdf}
1929 \item Added \cmd{SetCiteCommand}\see{cfg:blk}
1930 \item Renamed \cmd{blockcite} to \cmd{mkcitation}\see{cfg:aux}
1931 \item Added \cmd{mkccitation}\see{cfg:aux}
1932 \item Added \cmd{mkmidblockpunct}\see{cfg:aux}
1933 \item Added \cmd{mkfinblockpunct}\see{cfg:aux}
1934 \item Added \cmd{ifquotepunct}\see{cfg:tst}
1935 \item Added \cmd{ifquoteterm}\see{cfg:tst}
1936 \item Added \cmd{ifquoteperiod}\see{cfg:tst}
1937 \item Added \cmd{ifquotecomma}\see{cfg:tst}
1938 \item Added \cmd{ifquotesemicolon}\see{cfg:tst}
1939 \item Added \cmd{ifquotecolon}\see{cfg:tst}
1940 \item Added \cmd{ifquoteexclam}\see{cfg:tst}
1941 \item Added \cmd{ifquotequestion}\see{cfg:tst}
1942 \item Added \cmd{ifstringblank}\see{cfg:tst}
1943 \item Added evaluation of terminal punctuation within block quotations
1944 \item With \cmd{nonfrenchspacing}, adjust space factor codes of backend quotes
1945 \item Improved nesting control when running under \etex
1946 \end{release}
1947
1948 %\begin{release}{2.8}{2005-05-11}
1949 %\item Added \cmd{DisableQuotes}\see{act:ctl}
1950 %\item Fixed bug causing kerning restoration to fail in some rare cases
1951 %\end{release}
1952 %
1953 %\begin{release}{2.7}{2005-04-13}
1954 %\item Use the font's kerning pairs for adjoining quotes, if available\see{cfg:sty}
1955 %\item Renamed \cmd{setblockthreshold} to \cmd{SetBlockThreshold}\see{cfg:blk}
1956 %\item Renamed \cmd{setblockenvironment} to \cmd{SetBlockEnvironment}\see{cfg:blk}
1957 %\item Provided more useful default definition of \cmd{blockcite}\see{cfg:aux}
1958 %\item Improved handling of adjoining quotes with respect to line breaking
1959 %\item When restoring active quotes, restore catcodes of delimiters as well
1960 %\item Improved workaround for \cmd{uppercase} and some \sty{babel} languages
1961 %\item Issue error message on quote mismatch regardless of \opt{strict} option
1962 %\item Issue \sty{hyperref} warning with block quotation commands in \pdf strings
1963 %\item Fixed bug in \cmd{DeclareQuoteStyle} and \cmd{DeclareQuoteAlias}
1964 %\end{release}
1965 %
1966 %\begin{release}{2.6}{2005-02-24}
1967 %\item Always reset quote style, even for inner quotations
1968 %\item Fixed bug preventing hyphenation in certain places
1969 %\end{release}
1970 %
1971 %\begin{release}{2.5}{2004-12-04}
1972 %\item Added \cmd{MakeBlockQuote}\see{act:blk:reg}
1973 %\item Added \cmd{MakeForeignBlockQuote}\see{act:blk:bbl}
1974 %\item Added \cmd{MakeHyphenBlockQuote}\see{act:blk:bbl}
1975 %\item Added \cmd{ifblockquote}\see{cfg:tst}
1976 %\item Modified \cmd{blockquote}\see{bas:blk:reg}
1977 %\item Modified \cmd{foreignblockquote}\see{bas:blk:bbl}
1978 %\item Modified \cmd{hyphenblockquote}\see{bas:blk:bbl}
1979 %\item Changed default threshold for block quotations\see{cfg:blk}
1980 %\item Improved math mode compatibility\see{hnt:mod}
1981 %\item Improved verbatim compatibility\see{hnt:mod}
1982 %\item Improved backend and active character handling
1983 %\item Improved validation of user"=defined active characters
1984 %\item Fixed bug suppressing kerning after block quotations
1985 %\item Issue error message with nested block quotations
1986 %\end{release}
1987 %
1988 %\begin{release}{2.4}{2004-11-01}
1989 %\item Prevent use of \cmd{RestoreQuotes} in preamble\see{act:ctl}
1990 %\item Fixed bug causing premature expansion of backend quote macros
1991 %\item Fixed bug suppressing kerning before closing quotes
1992 %\end{release}
1993 %
1994 %\begin{release}{2.3}{2004-09-18}
1995 %\item Reduced default kerning between adjoining curved quotes
1996 %\item Fixed bug with \cmd{DeclareQuoteStyle} in preamble
1997 %\end{release}
1998 %
1999 %\begin{release}{2.2}{2004-07-13}
2000 %\item Extended \cmd{DeclareQuoteStyle}\see{cfg:sty}
2001 %\item Added initialization hook for inner quotations\see{cfg:sty}
2002 %\item Added support for middle inner quotes\see{cfg:sty}
2003 %\item Rearranged French quote styles, removing two variants\see{hnt:pre}
2004 %\item Added new style variant for French\see{hnt:pre}
2005 %\item Fixed bug causing stacking of reset hook for footnotes
2006 %\item Fixed bug preventing hyphenation in certain places
2007 %\item Fixed kerning issue specific to \textsc{ec} fonts
2008 %\end{release}
2009 %
2010 %\begin{release}{2.1}{2004-06-15}
2011 %\item Added auxiliary environment \env{quoteblock}\see{cfg:aux}
2012 %\item Added support for language reset in footnotes\see{hnt:ftn}
2013 %\item Disable active characters in \cmd{verb} and \env{verbatim}\see{hnt:mod}
2014 %\item Disable active characters in \cmd{index} and \cmd{glossary}\see{hnt:mod}
2015 %\item Added package option and style variants for Norwegian
2016 %\item Removed some uncertain quote styles and aliases
2017 %\item Rearranged quote styles and aliases
2018 %\end{release}
2019 %
2020 %\begin{release}{2.0}{2004-06-04}
2021 %\item Added \cmd{blockquote}\see{bas:blk:reg}
2022 %\item Added \cmd{foreignblockquote}\see{bas:blk:bbl}
2023 %\item Added \cmd{hyphenblockquote}\see{bas:blk:bbl}
2024 %\item Added \cmd{setblockthreshold}\see{cfg:blk}
2025 %\item Added \cmd{setblockenvironment}\see{cfg:blk}
2026 %\item Added auxiliary command \cmd{blockcite}\see{cfg:aux}
2027 %\item Extended \cmd{DeclareQuoteStyle}\see{cfg:sty}
2028 %\item Added initialization hook for outer quotations\see{cfg:sty}
2029 %\item Added support for middle outer quotes\see{cfg:sty}
2030 %\item Added support for kerning between adjoining quotes\see{cfg:sty}
2031 %\item Disable active characters in math and display math mode\see{hnt:mod}
2032 %\item Revised and improved error recovery\see{opt:opt}
2033 %\item Added package option \opt{strict}\see{opt:opt}
2034 %\item Added package option and new style variants for French
2035 %\item Added package option and new style variant for Italian
2036 %\item Added new style variant for English
2037 %\end{release}
2038 %
2039 %\begin{release}{1.7}{2004-05-14}
2040 %\item Added \cmd{setquotestyle}\see{bas:set}
2041 %\item Modified \cmd{DeclarePlainStyle}\see{cfg:pdf}
2042 %\item Improved quote handling in \pdf strings\see{hnt:pdf}
2043 %\item Amended default French quote style\see{hnt:pre}
2044 %\end{release}
2045 %
2046 %\begin{release}{1.5}{2004-02-27}
2047 %\item Reset quote nesting level in footnotes within quotations\see{hnt:ftn}
2048 %\end{release}
2049 %
2050 %\begin{release}{1.4}{2003-12-13}
2051 %\item Added \cmd{MakeForeignQuote}\see{act:bbl}
2052 %\item Added \cmd{MakeHyphenQuote}\see{act:bbl}
2053 %\item Added \cmd{RestoreQuotes}\see{act:ctl}
2054 %\item Improved \sty{hyperref} interface\see{hnt:pdf}
2055 %\end{release}
2056 %
2057 %\begin{release}{1.0}{2003-09-14}
2058 %\item Initial public release
2059 %\end{release}
2060
2061 \end{changelog}
2062
2063 \end{document}