-
Notifications
You must be signed in to change notification settings - Fork 18
/
csquotes.cfg
247 lines (198 loc) · 6.9 KB
/
csquotes.cfg
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
\ProvidesFile{csquotes.cfg}
% Put your definitions here.
\endinput
% What follows are examples of what you will typically do in this
% file. Note that you need to move the examples above \endinput if
% you want to try them out.
% PRESETTING PACKAGE OPTIONS
% Use \ExecuteQuoteOptions to preset package options if you are not
% satisfied with the built-in defaults. Options given here will be
% processed before any options specified in the document preamble,
% so you can still override them in the preamble.
\ExecuteQuoteOptions{strict=true,autostyle=try}
% CHANGING THE DEFAULT PARAMETERS
% Even if you modify the package defaults here, all preset values
% may still be changed in the document preamble as usual. The
% following values are the built-in package defaults:
\SetBlockEnvironment{quote}
\SetBlockThreshold{3}
\SetCiteCommand{\cite}
% SETTING UP A NEW QUOTE STYLE
% Here's an example of a new quote style with several variants (look
% up \DeclareQuoteStyle in the manual for all the details):
\DeclareQuoteStyle[quotes]{example}% [variant]{style}
{\textquotedblleft}% opening outer mark
{\textquotedblright}% closing outer mark
{\textquoteleft}% opening inner mark
{\textquoteright}% closing inner mark
\DeclareQuoteStyle[quotes*]{example}
{\quotedblbase}
{\textquotedblright}
[0.1em]% kern adjoining marks
{\quotesinglbase}
{\textquoteright}
\DeclareQuoteStyle[everypar]{example}
{\guillemotleft}
[\guilsinglleft]% middle outer mark
{\guillemotright}
{\textquotedblleft}
[\textquoteleft]% middle inner mark
{\textquotedblright}
% Defining the default variant of the style:
\DeclareQuoteAlias[quotes]{example}{example}
% Defining a second-level alias:
\DeclareQuoteAlias{example}{demo}
% Adding a package option for the style:
\DeclareQuoteOption{example}
% DEFINING SHORT COMMAND NAMES
% The names of all macros which csquotes provides by default are
% rather verbose. They are meant to be self-explanatory. You may
% find names like \hyphentextquote a bit too verbose, however,
% especially if you use them frequently. It is very easy to define
% shorter command names on top of the verbose ones. The trick is to
% exclude the arguments such that the short definition is a simple
% pointer to the full name:
%
% \newcommand*{\htquote}{\hyphentextquote}
%
% Here are a few useful shorthands:
\newcommand*{\tquote}{\textquote}
\newcommand*{\tcquote}{\textcquote}
\newcommand*{\bquote}{\blockquote}
\newcommand*{\bcquote}{\blockcquote}
% You can even include language switches in the definition of the
% short command form:
%
% \newcommand*{\usquote}{\hyphentextquote{american}}
%
% That, however, will not work as expected if you try to use the
% starred version because
%
% \usquote*{quotation}
%
% will not yield
%
% \hyphentextquote*{american}{quotation}
%
% but rather
%
% \hyphentextquote{american}*{quotation}
%
% which is invalid syntax. The following little macro takes care of
% that. If you prefix a definition which consists of a macro name
% and one argument with \@checkstar, it will check if the starred
% version of the command was requested and rearrange the syntax
% accordingly:
\newrobustcmd*{\@checkstar}[2]{%
\@ifstar{#1*{#2}}{#1{#2}}}
% If we define our \usquote shorthand like that:
%
% \newcommand*{\usquote}{\@checkstar\hyphentextquote{american}}
%
% then
%
% \usquote*{quotation}
%
% will correctly yield
%
% \hyphentextquote*{american}{quotation}
%
% Here are a few useful shorthands:
\newrobustcmd*{\dequote}{%
\@checkstar\hyphenquote{german}}
\newrobustcmd*{\frquote}{%
\@checkstar\hyphenquote{french}}
\newrobustcmd*{\ukquote}{%
\@checkstar\hyphenquote{british}}
\newrobustcmd*{\usquote}{%
\@checkstar\hyphenquote{american}}
\newrobustcmd*{\detquote}{%
\@checkstar\hyphentextquote{german}}
\newrobustcmd*{\frtquote}{%
\@checkstar\hyphentextquote{french}}
\newrobustcmd*{\uktquote}{%
\@checkstar\hyphentextquote{british}}
\newrobustcmd*{\ustquote}{%
\@checkstar\hyphentextquote{american}}
\newrobustcmd*{\debquote}{%
\@checkstar\hyphenblockquote{german}}
\newrobustcmd*{\frbquote}{%
\@checkstar\hyphenblockquote{french}}
\newrobustcmd*{\ukbquote}{%
\@checkstar\hyphenblockquote{british}}
\newrobustcmd*{\usbquote}{%
\@checkstar\hyphenblockquote{american}}
\newrobustcmd*{\detcquote}{%
\@checkstar\hyphentextcquote{german}}
\newrobustcmd*{\frtcquote}{%
\@checkstar\hyphentextcquote{french}}
\newrobustcmd*{\uktcquote}{%
\@checkstar\hyphentextcquote{british}}
\newrobustcmd*{\ustcquote}{%
\@checkstar\hyphentextcquote{american}}
\newrobustcmd*{\debcquote}{%
\@checkstar\hyphenblockcquote{german}}
\newrobustcmd*{\frbcquote}{%
\@checkstar\hyphenblockcquote{french}}
\newrobustcmd*{\ukbcquote}{%
\@checkstar\hyphenblockcquote{british}}
\newrobustcmd*{\usbcquote}{%
\@checkstar\hyphenblockcquote{american}}
% It is also possible to define shorter environment names. In this
% case, the opening part of the environment definition should be the
% verbose environment name with a backslash; the closing definition
% should be the verbose name preceded by 'end' plus a backslash:
\newenvironment*{dquote}
{\displayquote}
{\enddisplayquote}
\newenvironment*{dcquote}
{\displaycquote}
{\enddisplaycquote}
% Short environment definitions may also include language switches.
% In this case, the language name is included in the opening part of
% the environment definition. Here are a few useful examples:
\newenvironment*{dedquote}
{\hyphendisplayquote{german}}
{\endhyphendisplayquote}
\newenvironment*{frdquote}
{\hyphendisplayquote{french}}
{\endhyphendisplayquote}
\newenvironment*{ukdquote}
{\hyphendisplayquote{british}}
{\endhyphendisplayquote}
\newenvironment*{usdquote}
{\hyphendisplayquote{american}}
{\endhyphendisplayquote}
\newenvironment*{dedcquote}
{\hyphendisplaycquote{german}}
{\endhyphendisplaycquote}
\newenvironment*{frdcquote}
{\hyphendisplaycquote{french}}
{\endhyphendisplaycquote}
\newenvironment*{ukdcquote}
{\hyphendisplaycquote{british}}
{\endhyphendisplaycquote}
\newenvironment*{usdcquote}
{\hyphendisplaycquote{american}}
{\endhyphendisplaycquote}
% DEFINING ENVIRONMENTS FOR PARAGRAPH QUOTATIONS
% Here are some alternative environments for paragraph quotations
% (block and display). The first one decreases the font size of
% the 'quote' environment by one step:
\RequirePackage{relsize}
\newenvironment*{smallquote}
{\quote\smaller}
{\endquote}
\SetBlockEnvironment{smallquote}
% This environment forces indentation after all paragraph quotations:
\newenvironment*{paraquote}
{\begingroup\quote}
{\endquote\endgroup}
\SetBlockEnvironment{paraquote}
% The last environment combines the previous ones:
\RequirePackage{relsize}
\newenvironment*{smallparaquote}
{\begingroup\quote\smaller}
{\endquote\endgroup}
\SetBlockEnvironment{smallparaquote}
\endinput