-
Notifications
You must be signed in to change notification settings - Fork 18
/
csquotes.tex
2059 lines (1557 loc) · 122 KB
/
csquotes.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\documentclass{ltxdockit}[2010/09/26]
\usepackage[american]{babel}
\usepackage[strict,autostyle=once]{csquotes}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{shortvrb}
\usepackage{needspace}
\usepackage{pifont}
\MakeAutoQuote{«}{»}
\MakeAutoQuote*{<}{>}
\MakeShortVerb{\|}
\titlepage{%
title={The \sty{csquotes} Package},
subtitle={Context Sensitive Quotation Facilities},
url={http://www.ctan.org/pkg/csquotes/},
author={Philipp Lehman, Joseph Wright},
email={[email protected]},
revision={v5.2o},
date={2024-04-04}}
\hypersetup{%
pdftitle={The csquotes Package},
pdfsubject={Context Sensitive Quotation Facilities},
pdfauthor={Philipp Lehman, Joseph Wright},
pdfkeywords={tex, e-tex, latex, quote, quotation,
smart quotes, babel, polyglossia, multilingual typesetting}}
\AtBeginToc{\setcounter{tocdepth}{1}}
\AtEndToc{\setcounter{tocdepth}{5}}
% tables
\newcolumntype{H}{>{\sffamily\bfseries\spotcolor}l}
\newcolumntype{P}{>{\raggedright}p{120pt}}
\newcolumntype{Q}{>{\raggedright}p{70pt}}
\newcolumntype{V}{>{\raggedright\displayverbfont}l}
\newcommand*{\vcmd}[1]{\rotatehead{1.5em}{9.5em}{\cmd{#1}}}
\newcommand*{\venv}[1]{\rotatehead{1.5em}{9.5em}{\env{#1}}}
\newcommand*{\rotatehead}[3]{%
\makebox[#1][c]{\rotatebox{90}{\makebox[#2][l]{\scriptsize #3}}}}
\newcommand{\tickmarkyes}{\Pisymbol{psy}{183}}
\newcommand{\tickmarkno}{\textendash}
% samples
\definecolor{grid}{rgb}{0.7,0.7,0.7}
\newcommand*{\mksample}[2][25]{%
\mkmetrics[#1]{#2\,\textcolor{grid}{AaGg}\,#2}}
\newcommand*{\mkmetrics}[2][25]{%
\setlength{\unitlength}{1pt}%
\linethickness{0.25pt}%
\begin{picture}(#1,0)(0,0)
%\put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{\fontdimen9\font}}}
\put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{\fontdimen5\font}}}
\put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{0pt}}}
%\put(0,0){\parbox[b]{#1\unitlength}{\mkgrid{-\fontdimen11\font}}}
\put(0,0){\parbox[b]{#1\unitlength}{\centering #2}}
\end{picture}}
\newcommand*{\mkgrid}[1]{%
\begingroup\color{grid}%
\hrule height 0.25pt depth 0pt width \linewidth
\hrule height #1 depth 0pt width 0pt
\endgroup}
\makeatletter
\newcounter{@pseudofootnote}
\newcommand{\@pseudofootnote}[1]{%
\stepcounter{@pseudofootnote}%
\textsuperscript{\number\value{@pseudofootnote}}}
\newenvironment{quotesample}[2][]
{\setquotestyle[#1]{#2}%
\setcounter{@pseudofootnote}{0}%
\let\footnote\@pseudofootnote
\trivlist
\leftskip\parindent
\small}
{\endtrivlist}
\makeatother
% hyphenation
\hyphenation{%
star-red
New-speak
thres-hold
re-pre-sent-ing
hand-ling
}
\begin{document}
\printtitlepage
\tableofcontents
\listoftables
\section{Introduction}
\label{int}
\subsection[About]{About \sty{csquotes}}
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.
\subsection{License}
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/}
\subsection{Contributions}
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.
\section{Package Options}
\label{opt}
All package options are given in \keyval syntax.
\subsection{Main Options}
\label{opt:opt}
\begin{optionlist}
\boolitem[false]{strict}
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}.
\optitem[american]{style}{\prm{style}}
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.
\optitem[tryonce]{autostyle}{\opt{true}, \opt{false}, \opt{try}, \opt{once}, \opt{tryonce}}
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}.
\begin{table}
\tablesetup
\begin{tabularx}{\columnwidth}{@{}P@{}X@{}}
\toprule
\multicolumn{1}{@{}H}{Option key} & \multicolumn{1}{@{}H}{Possible values} \\
\cmidrule(r){1-1}\cmidrule{2-2}
austrian & quotes, guillemets \\
croatian & quotes, guillemets \\
czech & quotes, guillemets \\
danish & quotes, guillemets, topquotes \\
english & american, british \\
estonian & \\
french & quotes, quotes\*, guillemets, guillemets\* \\
galician & quotes, guillemets \\
german & quotes, guillemets, swiss \\
hungarian & \\
italian & guillemets, quotes \\
latin & \raggedright italianguillemets, germanquotes, germanguillemets,
britishquotes, americanquotes \tabularnewline
latvian & \\
lithuanian & \\
norwegian & guillemets, quotes \\
polish & guillemets, guillemets\* \\
portuguese & portuguese, brazilian \\
romanian & \\
serbian & quotes, guillemets, german \\
slovenian & guillemets, quotes \\
spanish & spanish, mexican \\
swedish & quotes, guillemets, guillemets\* \\
welsh & british \\
\bottomrule
\end{tabularx}
\caption[Language Options]{Language Options Defined by Default}
\label{tab:lng}
\end{table}
\varitem{language}{\prm{variant}}
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:
\begin{ltxcode}
\usepackage[english,ngerman]{babel}
\usepackage[autostyle,german=guillemets,norwegian=quotes]{csquotes}
\end{ltxcode}
%
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.
\intitem[2]{maxlevel}
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}.
\boolitem[true]{autopunct}
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}.
\intitem[3]{threshold}
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.
\optitem[lines]{thresholdtype}{\opt{lines}, \opt{words}}
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.
\boolitem[true]{parthreshold}
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}.
\boolitem[true]{splitcomp}
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}.
\boolitem[false]{csdisplay}
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.
\boolitem[false]{debug}
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}.
\end{optionlist}
\subsection{Compatibility Options}
\label{opt:leg}
\begin{optionlist}
\optitem{version}{\prm{version}, \opt{4.4}, \opt{3.6}, \opt{3.0}}
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.
\optitem{babel}{\opt{true}, \opt{false}, \opt{try}, \opt{once}, \opt{tryonce}}
An older name of the \opt{autostyle} option. This option is depreciated.
\end{optionlist}
\section{Basic Interface}
\label{bas}
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}.
\subsection{Quoting Regular Text}
\label{bas:reg}
The most basic command will simply enclose its argument in quotation marks:
\begin{ltxsyntax}
\cmditem{enquote}{text}
\cmditem*{enquote*}{text}
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.
\end{ltxsyntax}
\subsection{Quoting Text in a Foreign Language}
\label{bas:bbl}
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:
\begin{ltxsyntax}
\cmditem{foreignquote}{lang}{text}
\cmditem*{foreignquote*}{lang}{text}
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.
\cmditem{hyphenquote}{lang}{text}
\cmditem*{hyphenquote*}{lang}{text}
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.
\end{ltxsyntax}
\subsection{Formal Quoting of Regular Text}
\label{bas:txt:reg}
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:
\begin{ltxsyntax}
\cmditem{textquote}[cite][punct]{text}<tpunct>
\cmditem*{textquote*}[cite][punct]{text}<tpunct>
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:
\begin{ltxcode}
\textquote{...}
\textquote[][.]{...}
\textquote[Doe 1990, 67]{...}
\textquote[{\cite[67]{doe90}}]{...}
\end{ltxcode}
%
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}.
\end{ltxsyntax}
\subsection{Formal Quoting of Text in a Foreign Language}
\label{bas:txt:bbl}
There are two additional commands which combine \cmd{textquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
\begin{ltxsyntax}
\cmditem{foreigntextquote}{lang}[cite][punct]{text}<tpunct>
\cmditem*{foreigntextquote*}{lang}[cite][punct]{text}<tpunct>
This command combines \cmd{textquote} with \cmd{foreignlanguage}. Apart from the language, the arguments are handled as with \cmd{textquote}.
\cmditem{hyphentextquote}{lang}[cite][punct]{text}<tpunct>
\cmditem*{hyphentextquote*}{lang}[cite][punct]{text}<tpunct>
This command combines \cmd{textquote} with the \env{hyphenrules} environment. Apart from the language, the arguments are handled as with \cmd{textquote}.
\end{ltxsyntax}
\subsection{Block Quoting of Regular Text}
\label{bas:blk:reg}
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:
\begin{ltxsyntax}
\cmditem{blockquote}[cite][punct]{text}<tpunct>
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.
\end{ltxsyntax}
\subsection{Block Quoting of Text in a Foreign Language}
\label{bas:blk:bbl}
The following commands combine \cmd{blockquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
\begin{ltxsyntax}
\cmditem{foreignblockquote}{lang}[cite][punct]{text}<tpunct>
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}.
\cmditem{hyphenblockquote}{lang}[cite][punct]{text}<tpunct>
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}.
\cmditem{hybridblockquote}{lang}[cite][punct]{text}<tpunct>
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}.
\end{ltxsyntax}
\subsection{Selecting Quote Styles}
\label{bas:set}
Quote styles may be selected manually at any point in the document body by way of the following command:
\begin{ltxsyntax}
\cmditem{setquotestyle}[variant]{style}
\cmditem*{setquotestyle}{alias}
\cmditem*{setquotestyle}*
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.
\end{ltxsyntax}
\section{Active Quotes}
\label{act}
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.
\subsection{Quoting Regular Text}
\label{act:reg}
\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:
\begin{ltxsyntax}
\cmditem{MakeOuterQuote}{character}
\cmditem{MakeInnerQuote}{character}
\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:
\cmditem{MakeAutoQuote}{character 1}{character 2}
\cmditem*{MakeAutoQuote*}{character 1}{character 2}
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*}.
\end{ltxsyntax}
\subsection{Quoting Text in a Foreign Language}
\label{act:bbl}
These commands combine \cmd{MakeAutoQuote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
\begin{ltxsyntax}
\cmditem{MakeForeignQuote}{lang}{character 1}{character 2}
\cmditem*{MakeForeignQuote*}{lang}{character 1}{character 2}
The active quotes defined with the above commands are similar in concept and function to \cmd{foreignquote} and \cmd{foreignquote*}, respectively.
\cmditem{MakeHyphenQuote}{lang}{character 1}{character 2}
\cmditem*{MakeHyphenQuote*}{lang}{character 1}{character 2}
The active quotes defined with the above commands are similar in concept and function to \cmd{hyphenquote} and \cmd{hyphenquote*}, respectively.
\end{ltxsyntax}
\subsection{Block Quoting of Regular Text}
\label{act:blk:reg}
\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:
\begin{ltxsyntax}
\cmditem{MakeBlockQuote}{character 1}{delimiter}{character 2}
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:
\begin{ltxcode}
\MakeBlockQuote{<}{|}{>}
...
<text|citation>
\end{ltxcode}
%
If the delimiter is omitted, the entire text between the opening and the closing mark will be treated as quotation text.
\end{ltxsyntax}
\subsection{Block Quoting of Text in a Foreign Language}
\label{act:blk:bbl}
These commands combine \cmd{MakeBlockQuote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
\begin{ltxsyntax}
\cmditem{MakeForeignBlockQuote}{lang}{character 1}{delimiter}{character 2}
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}.
\cmditem{MakeHyphenBlockQuote}{lang}{character 1}{delimiter}{character 2}
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}.
\cmditem{MakeHybridBlockQuote}{lang}{character 1}{delimiter}{character 2}
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}.
\end{ltxsyntax}
\subsection{Controlling Active Quotes}
\label{act:ctl}
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.
\begin{ltxsyntax}
\csitem{EnableQuotes}
Enables all active quotes by redefining the allocated characters and making them active. It also restores them when disabled, set to verbatim, or overwritten.
\csitem{DisableQuotes}
Disables all active quotes by restoring the original category codes and definitions of all allocated characters.
\csitem{VerbatimQuotes}
Switches to verbatim active quotes. All active quotes will be printed verbatim until their default behavior is restored with \cmd{EnableQuotes}.
\csitem{DeleteQuotes}
Disables and deallocates all active quotes, i.e. performs a complete reset of all allocated characters so that they may be newly defined.
\end{ltxsyntax}
\section{Integrated Interface}
\label{cit}
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.
\subsection{Formal Quoting of Regular Text}
\label{int:txt:reg}
The basic integrated command is an extended version of \cmd{textquote}:
\begin{ltxsyntax}
\cmditem{textcquote}[prenote][postnote]{key}[punct]{text}<tpunct>
\cmditem*{textcquote*}[prenote][postnote]{key}[punct]{text}<tpunct>
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.
\end{ltxsyntax}
\subsection{Formal Quoting of Text in a Foreign Language}
\label{int:txt:bbl}
The following commands combine \cmd{textcquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
\begin{ltxsyntax}
\cmditem{foreigntextcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
\cmditem*{foreigntextcquote*}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
This command combines \cmd{textcquote} with \cmd{foreignlanguage}. The handling of the arguments is similar to \cmd{textcquote}.
\cmditem{hyphentextcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
\cmditem*{hyphentextcquote*}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
This command combines \cmd{textcquote} with the \env{hyphenrules} environment. The handling of the arguments is similar to \cmd{textcquote}.
\end{ltxsyntax}
\subsection{Block Quoting of Regular Text}
\label{int:blk:reg}
Block quotations may be combined with automated citations by using the extended version of \cmd{blockquote}:
\begin{ltxsyntax}
\cmditem{blockcquote}[prenote][postnote]{key}[punct]{text}<tpunct>
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.
\end{ltxsyntax}
\subsection{Block Quoting of Text in a Foreign Language}
\label{int:blk:bbl}
The following commands combine \cmd{blockcquote} with the language switches of the \sty{babel} or the \sty{polyglossia} package:
\begin{ltxsyntax}
\cmditem{foreignblockcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
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}.
\cmditem{hyphenblockcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
This command combines \cmd{blockcquote} with the \env{hyphenrules} environment. The handling of the citation arguments is similar to \cmd{textcquote}.
\cmditem{hybridblockcquote}{lang}[prenote][postnote]{key}[punct]{text}<tpunct>
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}.
\end{ltxsyntax}
\section{Display Environments}
\label{env}
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}.
\subsection{Basic Display Environments}
\label{env:bas}
The arguments of all display environments are generally appended to the \cmd{begin} section of the environment:
\begin{ltxsyntax}
\envitem{displayquote}[cite][punct]
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:
\envitem{foreigndisplayquote}{lang}[cite][punct]
This environment combines \env{displayquote} with \env{otherlanguage*}. Apart from the language, the arguments are handled as with \env{displayquote}.
\envitem{hyphendisplayquote}{lang}[cite][punct]
This environment combines \env{displayquote} with \env{hyphenrules}. Apart from the language, the arguments are handled as with \env{displayquote}.
\end{ltxsyntax}
\subsection{Integrated Display Environments}
\label{env:cit}
The following environment is an extended version of \env{displayquote}:
\begin{ltxsyntax}
\envitem{displaycquote}[prenote][postnote]{key}[punct]
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:
\envitem{foreigndisplaycquote}{lang}[prenote][postnote]{key}[punct]
This environment combines \env{displaycquote} with \env{otherlanguage*}. Apart from the language, the arguments are handled as with \env{displaycquote}.
\envitem{hyphendisplaycquote}{lang}[prenote][postnote]{key}[punct]
This environment combines \env{displaycquote} with \env{hyphenrules}. Apart from the language, the arguments are handled as with \env{displaycquote}.
\end{ltxsyntax}
\section{Auxiliary Commands}
\label{aux}
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:
\begin{ltxsyntax}
\cmditem{textelp}{}
\cmditem*{textelp}{text}
\cmditem*{textelp}*{text}
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:
\begin{ltxcode}[escapechar={\%},escapebegin={\rmfamily}]
\textelp{} %= \textelp{} %
\textelp{text} %= \textelp{text} %
\textelp*{text} %= \textelp*{text} %
\end{ltxcode}
%
The insertion of text or individual letters may be indicated with the following command:
\cmditem{textins}{text}
\cmditem*{textins}*{text}
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.
\begin{ltxcode}[escapechar={\%},escapebegin={\rmfamily}]
\textins{text} %= \textins{text} %
\textins*{T}ext %= \textins*{T}ext %
\end{ltxcode}
%
The deletion of individual letters may be indicated with the following command:
\cmditem{textdel}{text}
By default, \cmd{textdel} will output two square brackets. The omitted \prm{text} is not output.
\begin{ltxcode}[escapechar={\%},escapebegin={\rmfamily}]
text\textdel{s} %= text\textdel{s} %
\end{ltxcode}
%
See \secref{cfg:elp} on how to configure the appearance of ellipses and insertions.
\end{ltxsyntax}
\section{Configuration}
\label{cfg}
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.
\begin{table}
\tablesetup
\begin{tabularx}{\columnwidth}{@{}P@{}X@{}}
\toprule
\multicolumn{1}{@{}H}{Quote style} & \multicolumn{1}{@{}H}{Style variants} \\
\cmidrule(r){1-1}\cmidrule{2-2}
austrian & quotes, guillemets \\
croatian & quotes, guillemets \\
czech & quotes, guillemets \\
danish & quotes, guillemets \\
dutch & -- \\
english & american, british \\
finnish & -- \\
french & quotes, quotes\*, guillemets, guillemets\* \\
german & quotes, guillemets, swiss \\
greek & -- \\
italian & guillemets, quotes \\
latin & \raggedright italianguillemets, germanquotes, germanguillemets,
britishquotes, americanquotes \tabularnewline
norwegian & guillemets, quotes \\
portuguese & portuguese, brazilian \\
russian & -- \\
serbian & quotes, guillemets, german \\
spanish & spanish, mexican \\
swedish & quotes, guillemets, guillemets\* \\
welsh & british \\
\bottomrule
\end{tabularx}
\caption[Styles and Variants]{Quote Styles and Style Variants Defined by Default}
\label{tab:sty}
\end{table}
\subsection{Defining Quote Styles}
\label{cfg:sty}
Use the following command to define quote styles and style variants:
\begin{ltxsyntax}
\cmditem{DeclareQuoteStyle}[variant]{style}[outer init][inner init]\\
{opening outer mark}[middle outer mark]{closing outer mark}[kern]\\
{opening inner mark}[middle inner mark]{closing inner mark}
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.
\end{ltxsyntax}
\subsection{Defining Quote Aliases}
\label{cfg:als}
The following command defines quote aliases:
\begin{ltxsyntax}
\cmditem{DeclareQuoteAlias}[variant]{style}{alias}
\cmditem*{DeclareQuoteAlias}{first-level alias}{second-level alias}
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}.
\end{ltxsyntax}
\begin{table}
\tablesetup
\begin{tabularx}{\columnwidth}{@{}Q@{}X@{}Q@{}X@{}}
\toprule
\multicolumn{1}{@{}H}{Alias} & \multicolumn{1}{@{}H}{Backend style or alias} &
\multicolumn{1}{@{}H}{Alias} & \multicolumn{1}{@{}H}{Backend style or alias} \\
\cmidrule(r){1-1}\cmidrule(r){2-2}\cmidrule(r){3-3}\cmidrule{4-4}
american & english/american & newzealand & english/british \\
australian & english/british & ngerman & german \\
austrian & austrian/quotes & norsk & norwegian \\
brazil & brazilian & norwegian & norwegian/guillemets \\
brazilian & portuguese/brazilian & nswissgerman & swissgerman \\
british & english/british & nynorsk & norwegian \\
canadian & english/american & portuges & portuguese \\
croatian & croatian/quotes & portuguese & portuguese/portuguese \\
danish & danish/quotes & serbian & serbian/quotes \\
english & english/american & spanish & spanish/spanish \\
french & french/quotes & swedish & swedish/quotes \\
german & german/quotes & swiss & german/swiss \\
italian & italian/guillemets & swissgerman & german/swiss \\
latin & latin/italianguillemets & UKenglish & british \\
mexican & spanish/mexican & USenglish & american \\
naustrian & austrian & welsh & welsh/british \\
\bottomrule
\end{tabularx}
\caption[Language Aliases]{Language Aliases Defined by Default}
\label{tab:als}
\end{table}
\subsection{Defining Package Options}
\label{cfg:opt}
The following command creates a new package option based on a key\slash value syntax. It takes one mandatory argument, the quote style name:
\begin{ltxsyntax}
\cmditem{DeclareQuoteOption}{style}
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.
\end{ltxsyntax}
\subsection{Executing Package Options}
\label{cfg:exe}
Apart from passing options to this package as it is loaded, you may also execute options using the following command:
\begin{ltxsyntax}
\cmditem{ExecuteQuoteOptions}{key=value,\,\dots}
This command permits presetting package options in the configuration file. It may also be used in the document preamble.
\end{ltxsyntax}
\subsection{Defining Quotes for \pdf Strings}
\label{cfg:pdf}
The following command specifies the quotation marks for \pdf strings:
\begin{ltxsyntax}
\cmditem{DeclarePlainStyle}{opening outer mark}{closing outer mark}\\
{opening inner mark}{closing inner mark}
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.
\end{ltxsyntax}
\subsection{Configuring Quotations and Citations}
\label{cfg:blk}
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}.
\begin{table}
\tablesetup
\let\+\tickmarkyes
\let\_\tickmarkno
\begin{tabularx}{\columnwidth}{@{}X@{}*{21}{@{}c}@{}}
\toprule
\multicolumn{1}{@{}H}{Parameter} & \multicolumn{21}{@{}H}{Command or environment} \\
\cmidrule{2-22}
& \vcmd{enquote}
& \vcmd{foreignquote}
& \vcmd{hyphenquote}
& \vcmd{textquote}
& \vcmd{foreigntextquote}
& \vcmd{hyphentextquote}
& \vcmd{textcquote}
& \vcmd{foreigntextcquote}
& \vcmd{hyphentextcquote}
& \vcmd{blockquote}
& \vcmd{foreignblockquote}
& \vcmd{hyphenblockquote}
& \vcmd{blockcquote}
& \vcmd{foreignblockcquote}
& \vcmd{hyphenblockcquote}
& \venv{displayquote}
& \venv{foreigndisplayquote}
& \venv{hyphendisplayquote}
& \venv{displaycquote}
& \venv{foreigndisplaycquote}
& \venv{hyphendisplaycquote} \\
\cmidrule(r){1-1}\cmidrule{2-22}
Threshold &\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+&\_&\_&\_&\_&\_&\_\\
Environment &\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+\\
Cite command &\_&\_&\_&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+\\
\bottomrule
\end{tabularx}
\caption[Configurable Parameters]{Scope of Configurable Parameters}
\label{tab:blk}
\end{table}
\begin{ltxsyntax}
\cmditem{SetBlockThreshold}{integer}
\cmditem{SetBlockEnvironment}{environment}
\cmditem{SetCiteCommand}{command}
\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.
\end{ltxsyntax}
\subsection{Hooks for Quotations and Citations}
\label{cfg:aux}
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.
\begin{table}
\tablesetup
\let\+\tickmarkyes
\let\_\tickmarkno
\begin{tabularx}{\columnwidth}{@{}X@{}*{21}{@{}c}@{}}
\toprule
\multicolumn{1}{@{}H}{Hook} & \multicolumn{21}{@{}H}{Command or environment} \\
\cmidrule{2-22}
& \vcmd{enquote}
& \vcmd{foreignquote}
& \vcmd{hyphenquote}
& \vcmd{textquote}
& \vcmd{foreigntextquote}
& \vcmd{hyphentextquote}
& \vcmd{textcquote}
& \vcmd{foreigntextcquote}
& \vcmd{hyphentextcquote}
& \vcmd{blockquote}
& \vcmd{foreignblockquote}
& \vcmd{hyphenblockquote}
& \vcmd{blockcquote}
& \vcmd{foreignblockcquote}
& \vcmd{hyphenblockcquote}
& \venv{displayquote}
& \venv{foreigndisplayquote}
& \venv{hyphendisplayquote}
& \venv{displaycquote}
& \venv{foreigndisplaycquote}
& \venv{hyphendisplaycquote} \\
\cmidrule(r){1-1}\cmidrule{2-22}
\cmd{mktextquote} &\_&\_&\_&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\+&\_&\_&\_&\_&\_&\_\\
\cmd{mkblockquote} &\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+&\_&\_&\_&\_&\_&\_\\
\cmd{mkbegdispquote} &\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+\\
\cmd{mkenddispquote} &\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\_&\+&\+&\+&\+&\+&\+\\
\cmd{mkcitation} &\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_\\
\cmd{mkccitation} &\_&\_&\_&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+&\_&\_&\_&\+&\+&\+\\
\bottomrule
\end{tabularx}
\caption[Auxiliary Hooks]{Availability of Auxiliary Hooks}
\label{tab:aux}
\end{table}
\begin{ltxsyntax}
\cmditem{mkcitation}{cite}
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:
\begin{ltxcode}[showspaces=true]
\newcommand*{<<\mkcitation>>}[1]{ (#1)}
\end{ltxcode}
\cmditem{mkccitation}{cite code}
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:
\begin{ltxcode}[showspaces=true]
\newcommand*{<<\mkccitation>>}[1]{ #1}
\end{ltxcode}
\cmditem{mktextquote}{open}{text}{close}{punct}{tpunct}{cite}
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:
\begin{argumentlist}{00}
\item[\#1] The opening quotation mark.
\item[\#2] The \prm{text} argument of the command.
\item[\#3] The closing quotation mark.
\item[\#4] The optional \prm{punct} argument of the command. If there is no \prm{punct} argument, this parameter is empty.
\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.
\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}.
\end{argumentlist}
%
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:
\begin{ltxcode}
\newcommand{<<\mktextquote>>}[6]{#1#2#4#3#6#5}
\end{ltxcode}
%
The way in which \cmd{mktextquote} hooks into the formatting process is best seen when looking at an example. The commands
\begin{ltxcode}
\textquote[<<cite>>]{<<short quote>>}
\textcquote[<<55>>]{<<key1>>}[<<.>>]{<<short quote>>}
\blockcquote[<<87>>]{<<key2>>}{<<short quote>>}<<.>>
\end{ltxcode}
%
would execute \cmd{mktextquote} with the following arguments:
\begin{ltxcode}
\mktextquote{open}{<<short quote>>}{close}{}{}{\mkcitation{<<cite>>}}
\mktextquote{open}{<<short quote>>}{close}{<<.>>}{}{\mkccitation{\cite[<<55>>]{<<key1>>}}}
\mktextquote{open}{<<short quote>>}{close}{}{<<.>>}{\mkccitation{\cite[<<87>>]{<<key2>>}}}
\end{ltxcode}
%
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.
\cmditem{mkblockquote}{text}{punct}{tpunct}{cite}
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:
\begin{argumentlist}{00}
\item[\#1] The \prm{text} argument of the command.
\item[\#2] The optional \prm{punct} argument of the command. If there is no \prm{punct} argument, this parameter is empty.
\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.
\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}.
\end{argumentlist}
%
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:
\begin{ltxcode}
\newcommand{<<\mkblockquote>>}[4]{#1#2#4#3}
\end{ltxcode}
\cmditem{mkbegdispquote}{punct}{cite}
\cmditem{mkenddispquote}{punct}{cite}
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:
\begin{argumentlist}{00}
\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.
\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}.
\end{argumentlist}
%
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:
\begin{ltxcode}
\newcommand{<<\mkbegdispquote>>}[2]{}
\newcommand{<<\mkenddispquote>>}[2]{#1#2}
\end{ltxcode}
%
See \secref{use:hok} for practical examples.
\end{ltxsyntax}
\subsection{Additional Tests in Quotation Hooks}
\label{cfg:tst}
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.
\begin{ltxsyntax}
\cmditem{ifpunctmark}{character}{true}{false}
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}.
\cmditem{ifpunct}{true}{false}
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}.
\cmditem{ifterm}{true}{false}
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}.
\cmditem{iftextpunctmark}{text}{character}{true}{false}
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.
\cmditem{iftextpunct}{text}{true}{false}
Executes \prm{true} if the \prm{text} ends with any punctuation mark, and to \prm{false} otherwise. This command is robust.
\cmditem{iftextterm}{text}{true}{false}
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.
\cmditem{ifblockquote}{true}{false}
Expands to \prm{true} in all block and display quotations, and to \prm{false} otherwise.
\cmditem{ifblank}{string}{true}{false}