publ-imp-chicago.mkvi /size: 46 Kb    last modification: 2021-10-28 13:50
1
%D \module
2
%D [ file=publ-imp-chicago,
3
%D version=2019.05.20,
4
%D title=Chicago bibliography style,
5
%D subtitle=Publications,
6
%D author=Alan Braslau and Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is therefore copyrighted
11
%D by \PRAGMA. See mreadme.pdf for details.
12 13
\startbtxrenderingdefinitions
[
chicago
]
14 15
\ifdefined
\c!translate
\else
\def
\c!translate
{
translate
}
\fi
16 17
%D Reference:
18
%D \startTEX
19
%D @Book{Chicago2010,
20
%D title ={The Chicago Manual of Style},
21
%D subtitle ={The Essential Guide for Writers, Editors, and Publishers},
22
%D year ={2010},
23
%D edition ={Sixteenth},
24
%D address ={Chicago and London},
25
%D publisher={The University of Chicago Press},
26
%D Xpages ={1026},
27
%D url ={https://www.chicagomanualofstyle.org/},
28
%D }
29
%D \stopTEX
30 31
% set ALL specific Chicago compliant values
32 33
\definebtx
34
[
chicago
]
35
[
\c!default
=
default
,
36
\c!specification
=
chicago
,
37
\c!otherstext
=
{
\btxspace
\btxlabeltext
{
others
}
}
,
38
%\c!journalconversion=\v!normal,
39
\c!monthconversion
=
\v!month
,
40
\c!stopper
:
initials
=
{
.
}
,
% with a (breakable) space
41
\c!separator
:
names
:
2
=
{
\btxcomma
}
,
% aka namesep - in this namespace
42
\c!separator
:
names
:
3
=
{
\btxcomma
\btxlabeltext
{
and
}
\space
}
,
% comma separated list
43
\c!separator
:
names
:
4
=
{
\btxspace
\btxlabeltext
{
and
}
\space
}
]
% last of two, no comma!
44 45
% First, define list and rendering parameters
46 47
% The Chicago style sorts the unnumbered rendered list by authoryear
48 49
\definebtxrendering
50
[
chicago
]
51
[
\c!specification
=
chicago
,
52
\c!sorttype
=
authoryear
,
53
\c!numbering
=
\v!no
]
54 55
\setupbtxlist
56
[
chicago
]
57
[
\c!alternative
=
\v!paragraph
,
58
\c!align
=
{
normal
,
verytolerant
,
stretch
}
,
59
%\c!width=\v!fit,
60
%\c!distance=.5\emwidth,
61
\c!margin
=
3
.
5
\emwidth
]
62 63
\definebtx
64
[
chicago
:
\s!list
]
65
[
chicago
]
66
%[\c!otherstext={\btxcomma\btxnobreakspace\textellipsis\space},
67
% \c!etallimit=7,
68
% \c!etaldisplay=6,
69
% \c!etaloption=last,
70
[
\c!authorconversion
=
inverted
]
71 72
% First, we define a namespace for a few special fields
73 74
\definebtx
75
[
chicago
:
\s!list
:
author
]
76
[
chicago
:
\s!list
]
77 78
\definebtx
79
[
chicago
:
\s!list
:
withauthor
]
80
[
chicago
:
\s!list
:
author
]
81 82
\definebtx
83
[
chicago
:
\s!list
:
editor
]
84
[
chicago
:
\s!list
:
author
]
85 86
\definebtx
87
[
chicago
:
\s!list
:
ineditor
]
88
[
chicago
:
\s!list
:
editor
]
89
[
\c!authorconversion
=
normalshort
]
90 91
\definebtx
92
[
chicago
:
\s!list
:
translator
]
93
[
chicago
:
\s!list
:
author
]
94
[
\c!authorconversion
=
normalshort
]
95 96
\definebtx
97
[
chicago
:
\s!list
:
director
]
98
[
chicago
:
\s!list
:
author
]
99 100
\definebtx
101
[
chicago
:
\s!list
:
producer
]
102
[
chicago
:
\s!list
:
author
]
103 104
\definebtx
105
[
chicago
:
\s!list
:
suffix
]
106
[
chicago
:
\s!list
]
107 108
\definebtx
109
[
chicago
:
\s!list
:
url
]
110
[
chicago
:
\s!list
]
111 112
\definebtx
113
[
chicago
:
\s!list
:
doi
]
114
[
chicago
:
\s!list
]
115 116
\definebtx
117
[
chicago
:
\s!list
:
\s!page
]
118
[
chicago
:
\s!list
]
119
%[\c!separator:2={\btxcomma},
120
% \c!separator:3={\btxcomma\btxlabeltext{and}\space},
121
% \c!separator:4={\btxspace\btxlabeltext{and}\space},
122
[
\c!left
=
{
\btxleftparenthesis
}
,
123
\c!right
=
{
\btxrightparenthesis
}
,
124
\c!command
=
{
\wordright
}
]
125 126
\definebtx
127
[
chicago
:
\s!list
:
numbering
]
128
[
chicago
:
\s!list
]
129
[
\c!right
=
{
\btxspace
}
]
130 131
\definebtx
132
[
chicago
:
\s!list
:
numbering
:
default
]
133
[
chicago
:
\s!list
:
numbering
]
134 135
\definebtx
136
[
chicago
:
\s!list
:
numbering
:
num
]
137
[
chicago
:
\s!list
:
numbering
]
138
[
\c!stopper
=
{
.
}
]
139 140
\definebtx
141
[
chicago
:
\s!list
:
numbering
:
short
]
142
[
chicago
:
\s!list
:
numbering
]
143 144
\definebtx
145
[
chicago
:
\s!list
:
numbering
:
tag
]
146
[
chicago
:
\s!list
:
numbering
]
147 148
\definebtx
149
[
chicago
:
\s!list
:
numbering
:
index
]
150
[
chicago
:
\s!list
:
numbering
]
151 152
% Next, we define a namespace for each category
153 154
%D In order to be able to get journals expanded (or normalized or abbreviated) you need
155
%D to load a list:
156
%D
157
%D \starttyping
158
%D \btxloadjournallist[journals.txt] % the jabref list
159
%D \stoptyping
160 161
\definebtx
162
[
chicago
:
\s!list
:
journal
]
163
[
chicago
:
\s!list
]
164
[
\c!style
=
\v!italic
]
165
%command=\btxexpandedjournal] % btxabbreviatedjournal
166 167
\definebtx
168
[
chicago
:
\s!list
:
volume
]
169
[
chicago
:
\s!list
]
170
[
\c!style
=
\v!italic
]
171 172
\definebtx
173
[
chicago
:
\s!list
:
title
]
174
[
chicago
:
\s!list
]
175
[
\c!style
=
\v!italic
,
176
\c!command
=
\Word
,
177
\c!translate
=
\v!yes
]
178 179
\definebtx
180
[
chicago
:
\s!list
:
title
:
article
]
181
[
chicago
:
\s!list
:
title
]
182
[
\c!style
=
]
% journal is set in italics
183 184
\definebtx
185
[
chicago
:
\s!list
:
title
:
magazine
]
186
[
chicago
:
\s!list
:
title
]
187 188
\definebtx
189
[
chicago
:
\s!list
:
title
:
newspaper
]
190
[
chicago
:
\s!list
:
title
]
191 192
\definebtx
193
[
chicago
:
\s!list
:
title
:
periodical
]
194
[
chicago
:
\s!list
:
title
]
195 196
\definebtx
197
[
chicago
:
\s!list
:
title
:
standard
]
198
[
chicago
:
\s!list
:
title
]
199 200
\definebtx
201
[
chicago
:
\s!list
:
title
:
book
]
202
[
chicago
:
\s!list
:
title
]
203 204
\definebtx
205
[
chicago
:
\s!list
:
booktitle
:
inbook
]
206
[
chicago
:
\s!list
:
title
]
207 208
\definebtx
209
[
chicago
:
\s!list
:
title
:
inbook
]
210
[
chicago
:
\s!list
:
title
]
211
[
\c!style
=
]
% booktitle is set in italics
212 213
\definebtx
214
[
chicago
:
\s!list
:
booktitle
:
incollection
]
215
[
chicago
:
\s!list
:
title
]
216 217
\definebtx
218
[
chicago
:
\s!list
:
title
:
incollection
]
219
[
chicago
:
\s!list
:
title
]
220
[
\c!style
=
]
% booktitle is set in italics
221 222
\definebtx
223
[
chicago
:
\s!list
:
title
:
proceedings
]
224
[
chicago
:
\s!list
:
title
]
225 226
\definebtx
227
[
chicago
:
\s!list
:
booktitle
:
inproceedings
]
228
[
chicago
:
\s!list
:
title
]
229 230
\definebtx
231
[
chicago
:
\s!list
:
title
:
inproceedings
]
232
[
chicago
:
\s!list
:
title
]
233
[
\c!style
=
]
% booktitle is set in italics
234 235
\definebtx
236
[
chicago
:
\s!list
:
booktitle
:
conference
]
237
[
chicago
:
\s!list
:
title
]
238 239
\definebtx
240
[
chicago
:
\s!list
:
title
:
conference
]
241
[
chicago
:
\s!list
:
title
]
242
[
\c!style
=
]
% booktitle is set in italics
243 244
\definebtx
245
[
chicago
:
\s!list
:
title
:
thesis
]
246
[
chicago
:
\s!list
:
title
]
247 248
\definebtx
249
[
chicago
:
\s!list
:
title
:
phdthesis
]
250
[
chicago
:
\s!list
:
title
]
251 252
\definebtx
253
[
chicago
:
\s!list
:
title
:
mastersthesis
]
254
[
chicago
:
\s!list
:
title
]
255 256
\definebtx
257
[
chicago
:
\s!list
:
title
:
booklet
]
258
[
chicago
:
\s!list
:
title
]
259 260
\definebtx
261
[
chicago
:
\s!list
:
title
:
manual
]
262
[
chicago
:
\s!list
:
title
]
263 264
\definebtx
265
[
chicago
:
\s!list
:
title
:
techreport
]
266
[
chicago
:
\s!list
:
title
]
267 268
\definebtx
269
[
chicago
:
\s!list
:
title
:
unpublished
]
270
[
chicago
:
\s!list
:
title
]
271 272
\definebtx
273
[
chicago
:
\s!list
:
title
:
patent
]
274
[
chicago
:
\s!list
:
title
]
275 276
\definebtx
277
[
chicago
:
\s!list
:
title
:
electronic
]
278
[
chicago
:
\s!list
:
title
]
279 280
\definebtx
281
[
chicago
:
\s!list
:
title
:
music
]
282
[
chicago
:
\s!list
:
title
]
283 284
\definebtx
285
[
chicago
:
\s!list
:
title
:
film
]
286
[
chicago
:
\s!list
:
title
]
287 288
\definebtx
289
[
chicago
:
\s!list
:
title
:
other
]
290
[
chicago
:
\s!list
:
title
]
291 292
\definebtx
293
[
chicago
:
\s!list
:
title
:
misc
]
294
[
chicago
:
\s!list
:
title
]
295 296
\definebtx
297
[
chicago
:
\s!list
:
title
:
literal
]
298
[
chicago
:
\s!list
:
title
]
299 300
\definebtx
301
[
chicago
:
\s!list
:
type
]
302
[
\c!command
=
\Word
]
303 304
% Then define and set cite parameters.
305 306
\definebtx
307
[
chicago
:
\s!cite
]
308
[
chicago
]
309
[
\c!alternative
=
authoryear
,
310
\c!otherstext
=
{
\btxcomma
\btxlabeltext
{
others
}
}
,
311
\c!etallimit
=
1
,
312
\c!etaldisplay
=
1
,
313
\c!authorconversion
=
\v!name
,
314
\c!sorttype
=
normal
,
% \v!normal ?
315
\c!style
=
,
316
\c!compress
=
\v!yes
]
% note that cite sorts only work with compress=yes.
317 318
\definebtx
319
[
chicago
:
\s!cite
:
name
]
320
[
chicago
:
\s!cite
]
321
[
\c!authorconversion
=
\v!name
]
322 323
\definebtx
324
[
chicago
:
\s!cite
:
inverted
]
325
[
chicago
:
\s!cite
]
326
[
\c!authorconversion
=
\v!invertedshort
]
327 328
\definebtx
329
[
chicago
:
\s!cite
:
invertedshort
]
330
[
chicago
:
\s!cite
]
331
[
\c!authorconversion
=
\v!invertedshort
]
332 333
\definebtx
334
[
chicago
:
\s!cite
:
normalshort
]
335
[
chicago
:
\s!cite
]
336
[
\c!authorconversion
=
\v!normalshort
]
337 338
\definebtx
339
[
chicago
:
\s!cite
:
normal
]
340
[
chicago
:
\s!cite
]
341
[
\c!authorconversion
=
\v!normal
]
342 343
\definebtx
344
[
chicago
:
\s!cite
:
author
]
345
[
chicago
:
\s!cite
]
346 347
\definebtx
348
[
chicago
:
\s!cite
:
editor
]
349
[
chicago
:
\s!cite
:
author
]
350 351
\definebtx
352
[
chicago
:
\s!cite
:
translator
]
353
[
chicago
:
\s!cite
:
author
]
354 355
\definebtx
356
[
chicago
:
\s!cite
:
organization
]
357
[
chicago
:
\s!cite
]
358 359
\definebtx
360
[
chicago
:
\s!cite
:
authoryear
]
361
[
chicago
:
\s!cite
:
author
]
362
[
\c!left
=
{
(
}
,
363
\c!right
=
{
)
}
,
364
\c!inbetween
=
{
\btxspace
}
]
365 366
\definebtx
367
[
chicago
:
\s!cite
:
default
]
368
[
chicago
:
\s!cite
:
authoryear
]
369 370
\definebtx
371
[
chicago
:
\s!cite
:
authoryears
]
372
[
chicago
:
\s!cite
:
author
]
373
[
\c!left
=
,
% these two settings are perhaps redundant?
374
\c!right
=
,
375
\c!inbetween
=
{
\btxspace
}
]
376 377
\definebtx
378
[
chicago
:
\s!cite
:
authornum
]
379
[
chicago
:
\s!cite
:
author
]
380
[
\c!left
=
{
(
}
,
381
\c!right
=
{
)
}
]
382 383
\definebtx
384
[
chicago
:
\s!cite
:
author
:
num
]
% todo
385
[
chicago
:
\s!cite
:
authornum
]
386
[
\c!left
=
{
\btxspace
[
}
,
387
\c!right
=
{
]
}
]
388 389
\definebtx
390
[
chicago
:
\s!cite
:
author
:
year
]
% todo
391
[
chicago
:
\s!cite
]
392 393
\definebtx
394
[
chicago
:
\s!cite
:
author
:
years
]
% todo
395
[
chicago
:
\s!cite
:
authoryears
]
396
[
\c!inbetween
=
,
397
\c!left
=
{
\btxspace
(
}
,
398
\c!right
=
{
)
}
]
399 400
\definebtx
401
[
chicago
:
\s!cite
:
lefttext
]
402
[
chicago
:
\s!cite
]
403
[
\c!left
=
,
404
\c!right
=
{
\btxspace
}
]
405 406
\definebtx
407
[
chicago
:
\s!cite
:
righttext
]
408
[
chicago
:
\s!cite
]
409
[
\c!left
=
{
\btxcomma
}
,
410
\c!right
=
]
411 412
\definebtx
413
[
chicago
:
\s!cite
:
year
]
414
[
chicago
:
\s!cite
]
415
[
\c!separator
:
2
=
{
\btxcomma
}
,
% :0 and :1 - between items of a list
416
\c!separator
:
3
=
{
\btxcomma
\btxlabeltext
{
and
}
\space
}
,
417
\c!separator
:
4
=
{
\btxspace
\btxlabeltext
{
and
}
\space
}
]
418 419
\definebtx
420
[
chicago
:
\s!cite
:
title
]
421
[
chicago
:
\s!cite
]
422
[
\c!separator
:
2
=
{
\btxcomma
}
,
% :0 and :1 - between items of a list
423
\c!separator
:
3
=
{
\btxcomma
\btxlabeltext
{
and
}
\space
}
,
424
\c!separator
:
4
=
{
\btxspace
\btxlabeltext
{
and
}
\space
}
,
425
\c!command
=
{
\language
[
\currentbtxlanguage
]
}
,
% BAH
426
\c!sorttype
=
none
,
427
\c!style
=
\v!italic
]
428 429
\definebtx
430
[
chicago
:
\s!cite
:
subtitle
]
431
[
chicago
:
\s!cite
:
title
]
432 433
\definebtx
434
[
chicago
:
\s!cite
:
booktitle
]
435
[
chicago
:
\s!cite
:
title
]
436 437
\definebtx
438
[
chicago
:
\s!cite
:
subbooktitle
]
439
[
chicago
:
\s!cite
:
booktitle
]
440 441
% Will these get used?
442 443
\definebtx
444
[
chicago
:
\s!cite
:
title
:
inbook
]
445
[
chicago
:
\s!cite
:
title
]
446
[
\c!style
=
]
% not italic
447 448
\definebtx
449
[
chicago
:
\s!cite
:
title
:
incollection
]
450
[
chicago
:
\s!cite
:
title
:
inbook
]
451 452
\definebtx
453
[
chicago
:
\s!cite
:
title
:
inproceedings
]
454
[
chicago
:
\s!cite
:
title
:
inbook
]
455 456
\definebtx
457
[
chicago
:
\s!cite
:
subtitle
:
inbook
]
458
[
chicago
:
\s!cite
:
title
:
inbook
]
459 460
\definebtx
461
[
chicago
:
\s!cite
:
subtitle
:
incollection
]
462
[
chicago
:
\s!cite
:
title
:
incollection
]
463 464
\definebtx
465
[
chicago
:
\s!cite
:
subtitle
:
inproceedings
]
466
[
chicago
:
\s!cite
:
title
:
inproceedings
]
467 468 469
\definebtx
470
[
chicago
:
\s!cite
:
tag
]
471
[
chicago
:
\s!cite
]
472
[
\c!left
=
{
[
}
,
473
\c!right
=
{
]
}
]
474 475
\definebtx
476
[
chicago
:
\s!cite
:
index
]
477
[
chicago
:
\s!cite
]
478
[
\c!left
=
{
[
}
,
479
\c!right
=
{
]
}
]
480 481
\definebtx
482
[
chicago
:
\s!cite
:
page
]
483
[
chicago
:
\s!cite
]
484
[
\c!left
=
,
485
\c!right
=
,
486
\c!separator
:
2
=
{
\btxcomma
}
,
% :0 and :1 - between items of a list
487
\c!separator
:
3
=
{
\btxcomma
\btxlabeltext
{
and
}
\space
}
,
488
\c!separator
:
4
=
{
\btxspace
\btxlabeltext
{
and
}
\space
}
]
489 490
\definebtx
491
[
chicago
:
\s!cite
:
pages
]
492
[
chicago
:
\s!cite
:
page
]
493 494
\definebtx
495
[
chicago
:
\s!cite
:
keywords
]
496
[
chicago
:
\s!cite
]
497 498
\definebtx
499
[
chicago
:
\s!cite
:
short
]
500
[
chicago
:
\s!cite
]
501
[
\c!left
=
{
[
}
,
502
\c!right
=
{
]
}
]
503 504
\definebtx
505
[
chicago
:
\s!cite
:
category
]
506
[
chicago
:
\s!cite
]
507 508
\definebtx
509
[
chicago
:
\s!cite
:
url
]
510
[
chicago
:
\s!cite
]
511
[
\c!left
=
{
(
}
,
512
\c!right
=
{
)
}
]
513 514
\definebtx
515
[
chicago
:
\s!cite
:
doi
]
516
[
chicago
:
\s!cite
:
url
]
517 518
\definebtx
519
[
chicago
:
\s!cite
:
num
]
520
[
chicago
:
\s!cite
]
521
[
\c!left
=
{
[
}
,
522
\c!right
=
{
]
}
,
523
\c!separator
:
2
=
{
,
}
,
% no space
524
\c!separator
:
3
=
\btxparameter
{
\c!separator
:
2
}
,
525
\c!separator
:
4
=
\btxparameter
{
\c!separator
:
2
}
]
526 527
\definebtx
528
[
chicago
:
\s!cite
:
textnum
]
529
[
chicago
:
\s!cite
:
num
]
530
[
\c!left
=
{
Ref
.
\nbsp
}
,
531
\c!right
=
,
532
\c!separator
:
2
=
{
\btxcomma
}
,
533
\c!separator
:
3
=
{
\btxspace
\btxlabeltext
{
and
}
\space
}
,
534
\c!separator
:
4
=
{
\btxspace
\btxlabeltext
{
and
}
\space
}
]
535 536
\definebtx
537
[
chicago
:
\s!cite
:
entry
]
538
[
chicago
:
\s!cite
]
539
[
\c!left
=
,
540
\c!right
=
,
541
\c!inbetween
=
{
\btxspace
}
,
542
\c!separator
:
2
=
{
\btxsemicolon
}
,
543
\c!separator
:
3
=
\btxparameter
{
\c!separator
:
2
}
,
544
\c!separator
:
4
=
\btxparameter
{
\c!separator
:
2
}
]
545 546
\definebtx
547
[
chicago
:
\s!cite
:
footnote
]
548
[
chicago
:
\s!cite
:
entry
]
549 550
% Now we setup for the details of the renderings
551 552
%D Sometimes we have verbose injections in an entry and these can be language
553
%D dependent, so we use labels.
554
%D
555
%D Because we want to mix rendering (in the manual) we need a namespace in label
556
%D texts:
557 558
\setupbtxlabeltext
559
[
en
]
560
[
chicago
:
number
=
{
No
.
}
,
561
chicago
:
edition
=
{
ed
.
}
,
562
chicago
:
Editor
=
{
Ed
.
}
,
563
chicago
:
Editors
=
{
Eds
.
}
,
564
chicago
:
Volume
=
{
Vol
.
}
,
565
chicago
:
Volumes
=
{
Vols
.
}
,
566
chicago
:
nd
=
{
n
.
d
.
}
,
% no date
567
chicago
:
supplement
=
{
Suppl
.
}
,
% Supplement (not used?)
568
chicago
:
MotionPicture
=
{
Motion
picture
}
,
569
chicago
:
Writer
=
Writer
,
570
chicago
:
Writers
=
Writers
,
571
chicago
:
Producer
=
Producer
,
572
chicago
:
Producers
=
Producers
,
573
chicago
:
Director
=
Director
,
574
chicago
:
Directors
=
Directors
,
575
chicago
:
Recordedby
=
{
Recorded
by
}
,
576
chicago
:
Author
=
Author
,
577
chicago
:
Translator
=
{
Trans
.
}
,
% Translator(s)
578
chicago
:
Advanced
=
{
Advanced
online
publication
}
,
579
chicago
:
Retrieved
=
{
Retrieved
from
}
]
% {Available from}]
580 581
\setupbtxlabeltext
582
[
nl
]
583
[
chicago
:
number
=
{
Nr
.
}
,
584
chicago
:
edition
=
{
ed
.
}
,
% editie
585
chicago
:
Editor
=
Editor
,
% Ed./Eds.
586
chicago
:
Editors
=
Editors
,
587
chicago
:
Volume
=
{
Vol
.
}
,
588
chicago
:
Volumes
=
{
Vols
.
}
,
589
chicago
:
nd
=
{
g
.
d
.
}
% geen datum
590
chicago
:
supplement
=
Supplement
,
591
chicago
:
MotionPicture
=
Film
,
% ?
592
chicago
:
Writer
=
Scenarioschrijver
,
% ?
593
chicago
:
Writers
=
Schrijvers
,
% ?
594
chicago
:
Producer
=
Producent
,
% ?
595
chicago
:
Producers
=
Producents
,
% ?
596
chicago
:
Director
=
Directeur
,
597
chicago
:
Directors
=
Directeurs
,
598
chicago
:
Recordedby
=
{
Opgenomen
door
}
,
% ?
599
chicago
:
Author
=
Auteur
,
600
chicago
:
Translator
=
Vertaler
,
601
chicago
:
Advanced
=
{
Geavanceerde
online
publicatie
}
,
602
chicago
:
Retrieved
=
{
Ontvangen
van
}
]
% {Beschikbaar vanaf}]
603 604
\setupbtxlabeltext
605
[
fr
]
606
[
chicago
:
number
=
{
N
\high
{
o
}
}
,
607
chicago
:
edition
=
{
édition
}
,
608
chicago
:
Editor
=
Éditeur
,
609
chicago
:
Editors
=
Éditeurs
,
610
chicago
:
Volume
=
Volume
,
611
chicago
:
Volumes
=
Volumes
,
612
chicago
:
nd
=
{
s
.
d
.
}
,
% sans date
613
chicago
:
supplement
=
Supplément
,
614
chicago
:
MotionPicture
=
{
Film
cinématographique
}
,
615
chicago
:
Writer
=
Scénariste
,
616
chicago
:
Writers
=
Scénaristes
,
617
chicago
:
Producer
=
Producteur
,
618
chicago
:
Producers
=
Producteurs
,
619
chicago
:
Director
=
Réalisateur
,
620
chicago
:
Directors
=
Réalisateurs
,
621
chicago
:
Recordedby
=
{
Enregistré
par
}
,
622
chicago
:
Author
=
Auteur
,
623
chicago
:
Translator
=
Traducteur
,
624
chicago
:
Advanced
=
{
Publication
en
ligne
anticipée
}
,
625
chicago
:
Retrieved
=
{
Téléchargé
de
}
]
% {Disponible à}]
626 627
\setupbtxlabeltext
628
[
de
]
629
[
chicago
:
number
=
{
Nr
.
}
,
630
chicago
:
edition
=
Auf
\/
lage
,
631
chicago
:
Editor
=
Herausgeber
,
% Hrsg./Hg.
632
chicago
:
Editors
=
Herausgeber
,
633
chicago
:
Volume
=
Band
,
% Bd.
634
chicago
:
Volumes
=
{
Bände
}
,
635
chicago
:
nd
=
{
o
.
D
.
}
,
% ohne Datum (mostly: o.J. / ohne Jahr)
636
chicago
:
supplement
=
{
Beilage
}
,
% Supplement
637
chicago
:
MotionPicture
=
Kinofilm
,
% ?
638
chicago
:
Writer
=
Drehbuchautor
,
% ?
639
chicago
:
Writers
=
Schriftsteller
,
% ?
640
chicago
:
Producer
=
Producer
,
% ?
641
chicago
:
Producers
=
Produzenten
,
% ?
642
chicago
:
Director
=
Director
,
% ?
643
chicago
:
Directors
=
Directors
,
% ?
644
chicago
:
Recordedby
=
{
per
Einschreiben
}
,
% ?
645
chicago
:
Author
=
Autor
,
646
chicago
:
Translator
=
{
Übersetzer
}
,
% Übers.
647
chicago
:
Advanced
=
{
Erweiterte
Online
-
Publikation
}
,
648
chicago
:
Retrieved
=
{
heruntergeladen
von
}
]
649 650
% thanks: Andrea Valle
651 652
\setupbtxlabeltext
653
[
it
]
654
[
chicago
:
number
=
{
}
,
655
chicago
:
edition
=
{
ed
.
}
,
% edizione
656
chicago
:
Editor
=
{
A
cura
di
}
,
657
chicago
:
Editors
=
{
A
cura
di
}
,
658
chicago
:
Volume
=
{
Vol
.
}
,
% Volume
659
chicago
:
Volumes
=
{
Vol
.
}
,
% Volumi
660
chicago
:
nd
=
{
s
.
d
.
}
,
% senza data
661
chicago
:
supplement
=
{
Supplemento
}
,
662
chicago
:
MotionPicture
=
Film
,
% ?
663
chicago
:
Writer
=
Sceneggiatore
,
% ?
664
chicago
:
Writers
=
Scrittori
,
% ?
665
chicago
:
Producer
=
Produttore
,
666
chicago
:
Producers
=
Produttori
,
667
chicago
:
Director
=
Direttore
,
668
chicago
:
Directors
=
Direttori
,
669
chicago
:
Recordedby
=
{
Registrato
da
}
,
670
chicago
:
Author
=
Autore
,
671
chicago
:
Translator
=
{
Trad
.
}
,
% Translator(s)
672
chicago
:
Advanced
=
{
Pre
-
pubblicazione
on
line
}
,
673
chicago
:
Retrieved
=
{
Accessible
online
}
]
674 675
\setupbtxlabeltext
676
[
es
]
677
[
chicago
:
number
=
{
}
,
678
chicago
:
edition
=
{
ed
.
}
,
% edición
679
chicago
:
Editor
=
Editor
,
% Ed./Eds.
680
chicago
:
Editors
=
Editores
,
681
chicago
:
Volume
=
{
Vol
.
}
,
% Volumen
682
chicago
:
Volumes
=
{
Vols
.
}
,
% Volúmenes
683
chicago
:
nd
=
{
s
.
f
.
}
,
% sin fecha
684
chicago
:
supplement
=
Suplemento
,
685
chicago
:
MotionPicture
=
Cinematográfica
,
686
chicago
:
Writer
=
Guionista
,
% ?
687
chicago
:
Writers
=
Escritores
,
% ?
688
chicago
:
Producer
=
Productor
,
689
chicago
:
Producers
=
Productores
,
690
chicago
:
Director
=
Director
,
691
chicago
:
Directors
=
Directores
,
692
chicago
:
Recordedby
=
{
Grabada
por
}
,
693
chicago
:
Author
=
Autor
,
694
chicago
:
Translator
=
Traductor
,
695
chicago
:
Advanced
=
{
Publicación
en
línea
avanzada
}
,
696
chicago
:
Retrieved
=
{
Obtenido
de
}
]
% {Disponible desde}]
697 698 699
\setupbtxlabeltext
700
[
sv
]
701
[
chicago
:
number
=
{
nr
.
}
,
702
chicago
:
edition
=
{
Utgåva
}
,
703
chicago
:
Editor
=
Redaktör
,
704
chicago
:
Editors
=
Redaktörer
,
705
chicago
:
Volume
=
Band
,
706
chicago
:
Volumes
=
Band
,
707
chicago
:
nd
=
{
u
.
å
.
}
,
% utan årtal
708
chicago
:
supplement
=
Bilaga
,
% Supplement
709
chicago
:
MotionPicture
=
Spelfilm
,
% ?
710
chicago
:
Writer
=
{
Manusförfattare
}
,
% Assuming for a movie
711
chicago
:
Writers
=
{
Manusförfattare
}
,
%
712
chicago
:
Producer
=
Producent
,
% Assuming for a movie
713
chicago
:
Producers
=
Producenter
,
%
714
chicago
:
Director
=
{
Regissör
}
,
% Assuming for a movie
715
chicago
:
Directors
=
{
Regissörer
}
,
%
716
chicago
:
Recordedby
=
{
Inspelad
av
}
,
% Assuming for a movie
717
chicago
:
Author
=
{
Författare
}
,
718
chicago
:
Translator
=
{
Översättare
}
,
719
chicago
:
Advanced
=
{
Avancerad
onlinepublikation
}
,
% ?
720
chicago
:
Retrieved
=
{
Hämtad
från
}
]
721 722
% cite setups
723 724
% The following differs from the default returning n.d. if year is empty
725 726
\startsetups
btx
:
chicago
:
cite
:
author
:
year
727
\ifx
\currentbtxfirst
\empty
728
\def
\currentbtxfirst
{
\fastsetup
{
\s!btx
:
chicago
:
nd
}
}
729
\fi
730
\fastsetup
{
\s!btx
:
\s!cite
:
author
:
year
}
731
\stopsetups
732 733
\startsetups
btx
:
chicago
:
cite
:
author
:
years
734
\ifx
\currentbtxfirst
\empty
735
\def
\currentbtxfirst
{
\fastsetup
{
\s!btx
:
chicago
:
nd
}
}
736
\fi
737
\fastsetup
{
\s!btx
:
\s!cite
:
author
:
years
}
738
\stopsetups
739 740
% these setups need to be explicitly defined in order to get cite rendering
741 742
\startsetups
\s!btx
:
chicago
:
\s!cite
:
organization
743
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
744
\stopsetups
745 746
\startsetups
\s!btx
:
chicago
:
\s!cite
:
subtitle
747
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
748
\stopsetups
749 750
\startsetups
\s!btx
:
chicago
:
\s!cite
:
booktitle
751
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
752
\stopsetups
753 754
\startsetups
\s!btx
:
chicago
:
\s!cite
:
subbooktitle
755
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
756
\stopsetups
757 758
% are these needed?
759 760
\startsetups
\s!btx
:
chicago
:
\s!cite
:
title
:
inbook
761
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
762
\stopsetups
763 764
\startsetups
\s!btx
:
chicago
:
\s!cite
:
title
:
incollection
765
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
766
\stopsetups
767 768
\startsetups
\s!btx
:
chicago
:
\s!cite
:
title
:
inproceedings
769
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
770
\stopsetups
771 772
\startsetups
\s!btx
:
chicago
:
\s!cite
:
subtitle
:
inbook
773
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
774
\stopsetups
775 776
\startsetups
\s!btx
:
chicago
:
\s!cite
:
subtitle
:
incollection
777
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
778
\stopsetups
779 780
\startsetups
\s!btx
:
chicago
:
\s!cite
:
subtitle
:
inproceedings
781
\fastsetup
{
\s!btx
:
\s!cite
:
normal
}
782
\stopsetups
783 784
% used in publ-imp-page.mkvi
785 786
\startsetups
btx
:
chicago
:
list
:
page
-
or
-
pages
787
\ifx
\currentbtxlastpage
\empty
788
\btxlabeltext
{
p
}
789
\else
790
\btxlabeltext
{
pp
}
791
\fi
792
\btxnbsp
793
\stopsetups
794 795
% The sameauthor feature may not be Chicago compliant
796
% (there is nothing in the manual cited above).
797
% It can be removed using the command:
798
% \resetsetups [chicago:list:sameauthor]
799 800
% :rule, :empty or :ditto ...
801 802
\startsetups
chicago
:
list
:
sameauthor
803
\fastsetup
{
chicago
:
list
:
sameauthor
:
rule
}
804
\stopsetups
805 806
\startsetups
chicago
:
list
:
sameauthor
:
rule
807
\blackrule
808
[
\c!width
=
3
em
,
809
\c!height
=
1
.
5
\linewidth
]
% \linewidth is just too thin with respect to font strokes...
810
\stopsetups
811 812
\startsetups
[
chicago
:
list
:
sameauthor
:
\v!empty
]
813
\kern
\dimexpr
\listparameter
\c!margin
-
\interwordspace
\relax
814
\stopsetups
815 816
% horrible !
817 818
\startsetups
chicago
:
list
:
sameauthor
:
ditto
819
\inframed
820
[
\c!width
=
\dimexpr
\listparameter
\c!margin
-
\interwordspace
\relax
,
821
\c!frame
=
\v!off
,
822
\c!align
=
\v!middle
]
823
{
\doubleprime
}
824
\stopsetups
825 826
%D Instead of texdefinitions without arguments, we could have used setups but in my
827
%D editor (hh, scite) the commands stand out better. It also saves an additional
828
%D component in the name (e.g. common:) because commands and setups have a different
829
%D namespace, so similar calls don't clash. Performance of definitions is somewhat
830
%D better.
831 832
%D We use "texdefinitions" (with eventual arguments) for helpers that are used
833
%D in the rendering "setups" defined for each category below.
834 835
%D Note that \btxdoif... and \btxflush rely on the definitions in
836
%D publ-imp-chicago.lua: fields that are not listed as required nor optional are
837
%D IGNORED. We also make heavy use of the notion of sets - comma-separated lists
838
%D of alternative fields to be used in hierarchal order. For example:
839
%D author = { "author", "editor", "publisher", "title" }, will return the
840
%D author field if it exists; if not, the editor field will be returned, if it
841
%D exists; if not, the publisher field will be returned, if it exists; if not,
842
%D the title field will be returned, it it exists; if not, nothing will be
843
%D returned. In lua syntax, it can be understood as
844
%D author or editor or publisher or title or ""
845 846
% #title can be title or booktitle
847 848
\starttexdefinition
mutable
protected
btx
:
chicago
:
translated
-
title
#
title
849
\ifx
\currentbtxlanguage
\empty
850
% no need for an extra
851
\else
\ifx
\mainbtxlanguage
\currentbtxlanguage
852
% no need for an extra
853
\else
854
\btxdoif
{
#
title
:
\mainbtxlanguage
}
{
855
\begingroup
856
\language
[
\mainbtxlanguage
]
857
\btxleftbracket
858
\btxusecommand
[
chicago
:
\s!list
:
#
title
:
\currentbtxcategory
]
{
859
\btxflush
{
#
title
:
\mainbtxlanguage
}
860
}
861
\btxrightbracket
862
\endgroup
863
}
864
\fi
\fi
865
\stoptexdefinition
866 867
\starttexdefinition
mutable
protected
btx
:
chicago
:
composed
-
title
#
title
868
\btxstartstyleandcolor
[
chicago
:
\s!list
:
#
title
:
\currentbtxcategory
]
869
\begingroup
870
\language
[
\currentbtxlanguage
]
871
\btxusecommand
[
chicago
:
\s!list
:
#
title
:
\currentbtxcategory
]
{
872
\btxflush
{
#
title
}
873
\btxdoif
{
sub
#
title
}
{
874
\btxcolon
875
\btxflush
{
sub
#
title
}
876
}
877
}
878
\endgroup
879
% which namespace?
880
%\doif{\btxparameter{translate}}\v!yes {
881
\texdefinition
{
btx
:
chicago
:
translated
-
title
}
{
#
title
}
882
%}
883
\btxstopstyleandcolor
884
\stoptexdefinition
885 886
\starttexdefinition
mutable
protected
btx
:
chicago
:
title
887
\setmode
{
btx
:
chicago
:
title
-
placed
}
888
% we make the title active, opening "file"
889
\btxdoifelse
{
file
}
{
890
\texdefinition
{
btx
:
format
:
inject
}
891
{
url
(
file
:
\btxflush
{
file
}
)
}
892
{
893
\texdefinition
{
btx
:
chicago
:
composed
-
title
}
{
title
}
894
}
895
}
{
896
\texdefinition
{
btx
:
chicago
:
composed
-
title
}
{
title
}
897
}
898
\btxdoif
{
title
}
{
899
% A book might have an editor AND an author
900
\doif
{
\currentbtxcategory
}
{
book
}
{
901
\doifnot
{
\btxfoundname
{
author
}
}
{
editor
}
{
902
\btxdoif
{
ineditor
}
{
% ineditor specific authorconversion
903
\btxleftparenthesis
904
\btxflush
{
ineditor
}
905
\btxcomma
906
\btxsingularorplural
{
ineditor
}
{
907
\btxlabeltext
{
chicago
:
Editor
}
908
}
{
909
\btxlabeltext
{
chicago
:
Editors
}
910
}
911
\btxrightparenthesis
912
}
913
}
914
}
915
\btxdoif
{
translator
}
{
916
\btxleftparenthesis
917
\btxflush
{
translator
}
918
\btxcomma
919
\btxlabeltext
{
chicago
:
Translator
}
920
\btxrightparenthesis
921
}
922
\btxperiod
923
% TODO: this period may NOT be wanted, as in: Title (2nd ed.).
924
}
925
\stoptexdefinition
926 927
\starttexdefinition
mutable
protected
btx
:
chicago
:
title
-
if
-
not
-
placed
928
\doifelsemode
{
btx
:
chicago
:
title
-
placed
}
{
929
\resetmode
{
btx
:
chicago
:
title
-
placed
}
930
}
{
931
\btxdoif
{
title
}
{
932
\btxspace
933
\texdefinition
{
btx
:
chicago
:
title
}
934
}
935
}
936
\stoptexdefinition
937 938
\startsetups
btx
:
chicago
:
nd
939
\btxlabeltext
{
chicago
:
nd
}
940
\stopsetups
941 942
\starttexdefinition
mutable
protected
btx
:
chicago
:
suffixedyear
943
\btxdoifelse
{
year
}
{
944
\btxflush
{
year
}
945
\btxflushsuffix
946
\btxdoif
{
month
}
{
% month and day optional in publ-imp-chicago.lua
947
\btxcomma
948
\btxflush
{
month
}
949
\btxdoif
{
day
}
{
950
\btxspace
951
\btxflush
{
day
}
952
}
953
}
954
}
{
955
\fastsetup
{
btx
:
chicago
:
nd
}
956
% Hans: the following won't work but should.
957
\btxdoif
{
suffix
}
{
958
\btxspace
959
\btxflushsuffix
960
% Hans: similarly, why can't \btxflush{suffix} be made to work?
961
}
962
}
963
\stoptexdefinition
964 965
% #author may be author(set) or editor
966 967
\starttexdefinition
mutable
protected
btx
:
chicago
:
author
-
or
-
editor
#
author
968
\btxdoifelse
{
#
author
}
{
969
\btxstartstyleandcolor
[
chicago
:
\s!list
:
#
author
]
970
\btxusecommand
[
chicago
:
\s!list
:
#
author
]
{
971
\btxflush
{
#
author
}
972
}
973
\btxstopstyleandcolor
974
% use \processaction [] [] here?
975
\doifelse
{
\btxfoundname
{
#
author
}
}
{
editor
}
{
976
\btxleftparenthesis
977
\btxsingularorplural
{
editor
}
{
978
\btxlabeltext
{
chicago
:
Editor
}
979
}
{
980
\btxlabeltext
{
chicago
:
Editors
}
981
}
982
\btxrightparenthesis
983
}
{
\doif
{
\btxfoundname
{
#
author
}
}
{
ineditor
}
{
984
\btxleftparenthesis
985
\btxsingularorplural
{
ineditor
}
{
986
\btxlabeltext
{
chicago
:
Editor
}
987
}
{
988
\btxlabeltext
{
chicago
:
Editors
}
989
}
990
\btxrightparenthesis
991
}
}
992
\doif
{
\currentbtxcategory
}
{
film
}
{
993
\btxleftparenthesis
994
\doifelse
{
\btxfoundname
{
#
author
}
}
{
director
}
{
995
\btxsingularorplural
{
director
}
{
996
\btxlabeltext
{
chicago
:
Director
}
997
}
{
998
\btxlabeltext
{
chicago
:
Directors
}
999
}
1000
}
{
1001
\doif
{
\btxfoundname
{
#
author
}
}
{
author
}
{
1002
\btxsingularorplural
{
author
}
{
1003
\btxlabeltext
{
chicago
:
Writer
}
1004
}
{
1005
\btxlabeltext
{
chicago
:
Writers
}
1006
}
1007
}
1008
\doif
{
\btxfoundname
{
#
author
}
}
{
producer
}
{
1009
\btxsingularorplural
{
producer
}
{
1010
\btxlabeltext
{
chicago
:
Producer
}
1011
}
{
1012
\btxlabeltext
{
chicago
:
Producers
}
1013
}
1014
}
1015
\btxdoif
{
director
}
{
1016
\btxrightparenthesis
1017
\removeunwantedspaces
1018
\btxparameter
{
\c!separator
:
names
:
3
}
1019
\btxstartstyleandcolor
[
chicago
:
\s!list
:
director
]
1020
\btxusecommand
[
chicago
:
\s!list
:
director
]
{
1021
\btxflush
{
director
}
1022
}
1023
\btxstopstyleandcolor
1024
\btxleftparenthesis
1025
\btxsingularorplural
{
director
}
{
1026
\btxlabeltext
{
chicago
:
Director
}
1027
}
{
1028
\btxlabeltext
{
chicago
:
Directors
}
1029
}
1030
}
1031
}
1032
\btxrightparenthesis
1033
}
1034
\btxdoif
{
withauthor
}
{
1035
\btxleftparenthesis
1036
\btxlabeltext
{
with
}
1037
\btxspace
1038
\btxstartstyleandcolor
[
chicago
:
\s!list
:
withauthor
]
1039
\btxusecommand
[
chicago
:
\s!list
:
withauthor
]
{
1040
\btxflush
{
withauthor
}
1041
}
1042
\btxstopstyleandcolor
1043
\btxrightparenthesis
1044
}
1045
}
{
1046
\texdefinition
{
btx
:
chicago
:
title
}
1047
}
1048
\stoptexdefinition
1049 1050
\starttexdefinition
mutable
protected
btx
:
chicago
:
authoryear
1051
% we make the authoryear active, pointing to the citation
1052
\texdefinition
{
btx
:
format
:
inject
}
1053
{
internal
(
\currentbtxinternal
)
}
1054
{
1055
\doifelsesetups
{
chicago
:
list
:
sameauthor
}
{
1056
\btxdoifelsesameasprevious
{
author
}
{
1057
\fastsetup
{
chicago
:
list
:
sameauthor
}
1058
}
{
1059
\texdefinition
{
btx
:
chicago
:
author
-
or
-
editor
}
{
author
}
1060
}
1061
}
{
1062
\texdefinition
{
btx
:
chicago
:
author
-
or
-
editor
}
{
author
}
1063
}
1064
\texdefinition
{
btx
:
chicago
:
suffixedyear
}
1065
}
1066
% outside of interaction
1067
\btxperiod
1068
\doif
{
\btxfoundname
{
author
}
}
{
title
}
{
1069
\setmode
{
btx
:
chicago
:
title
-
placed
}
1070
}
1071
\stoptexdefinition
1072 1073
\starttexdefinition
mutable
protected
btx
:
chicago
:
editor
-
in
1074
\btxdoif
{
booktitle
}
{
1075
\btxlabeltext
{
In
}
1076
\btxspace
1077
\doifnot
{
\btxfoundname
{
author
}
}
{
editor
}
{
1078
\texdefinition
{
btx
:
chicago
:
author
-
or
-
editor
}
{
ineditor
}
1079
\btxcomma
1080
}
1081
\texdefinition
{
btx
:
chicago
:
composed
-
title
}
{
booktitle
}
1082
\btxperiod
1083
}
1084
\stoptexdefinition
1085 1086
\starttexdefinition
mutable
protected
btx
:
chicago
:
organization
-
if
-
not
-
author
1087
\btxdoif
{
organization
}
{
1088
\doifnot
{
\btxfoundname
{
author
}
}
{
organization
}
{
1089
\btxspace
1090
\btxflush
{
organization
}
1091
\btxcomma
1092
}
1093
}
1094
\stoptexdefinition
1095 1096
% TODO: The title is terminated with period. However,
1097
% we probably don't want this before the parenthesis.
1098 1099
\starttexdefinition
mutable
protected
btx
:
chicago
:
leftparenthesis
-
or
-
comma
1100
\doifelsemode
{
btx
:
chicago
:
editionset
-
is
-
empty
}
{
1101
\btxleftparenthesis
1102
\resetmode
{
btx
:
chicago
:
editionset
-
is
-
empty
}
1103
}
{
1104
\btxcomma
1105
}
1106
\stoptexdefinition
1107 1108
\starttexdefinition
mutable
protected
btx
:
chicago
:
editionset
1109
\setmode
{
btx
:
chicago
:
editionset
-
is
-
empty
}
1110
\doif
{
\currentbtxcategory
}
{
techreport
}
{
1111
\texdefinition
{
btx
:
chicago
:
leftparenthesis
-
or
-
comma
}
1112
\btxdoifelse
{
type
}
{
1113
\btxusecommand
[
chicago
:
\s!list
:
type
]
{
1114
\btxflush
{
type
}
1115
}
1116
}
{
1117
\btxlabeltext
{
technicalreport
}
1118
}
1119
}
1120
\btxdoif
{
volume
}
{
1121
\texdefinition
{
btx
:
chicago
:
leftparenthesis
-
or
-
comma
}
1122
\btxoneorrange
{
volume
}
{
1123
\btxlabeltext
{
chicago
:
Volume
}
1124
}
{
1125
\btxlabeltext
{
chicago
:
Volumes
}
1126
}
1127
\btxspace
1128
\btxflush
{
volume
}
1129
}
1130
\btxdoif
{
number
}
{
1131
\texdefinition
{
btx
:
chicago
:
leftparenthesis
-
or
-
comma
}
1132
\btxlabeltext
{
chicago
:
number
}
1133
\btxspace
1134
\btxflush
{
number
}
1135
}
1136
\btxdoif
{
edition
}
{
1137
\texdefinition
{
btx
:
chicago
:
leftparenthesis
-
or
-
comma
}
1138
\btxflush
{
edition
}
1139
\btxspace
1140
\btxlabeltext
{
chicago
:
edition
}
1141
}
1142
\btxdoif
{
pages
}
{
1143
\texdefinition
{
btx
:
chicago
:
leftparenthesis
-
or
-
comma
}
1144
\btxoneorrange
{
pages
}
{
1145
\btxlabeltext
{
p
}
1146
}
{
1147
\btxlabeltext
{
pp
}
1148
}
1149
\btxnbsp
1150
\btxflush
{
pages
}
1151
}
1152
\doifnotmode
{
btx
:
chicago
:
editionset
-
is
-
empty
}
{
1153
\btxrightparenthesisperiod
1154
}
1155
\stoptexdefinition
1156 1157
\starttexdefinition
mutable
protected
btx
:
chicago
:
journal
1158
\btxstartstyleandcolor
[
chicago
:
\s!list
:
journal
]
1159
\btxusecommand
[
chicago
:
\s!list
:
journal
]
{
1160
\btxflush
{
journal
}
1161
}
1162
\btxstopstyleandcolor
1163
\stoptexdefinition
1164 1165
\starttexdefinition
mutable
protected
btx
:
chicago
:
volume
1166
\btxstartstyleandcolor
[
chicago
:
\s!list
:
volume
]
1167
\btxflush
{
volume
}
1168
\btxstopstyleandcolor
1169
\stoptexdefinition
1170 1171
% this could be simplified!
1172 1173
\starttexdefinition
mutable
protected
btx
:
chicago
:
journal
-
volume
-
number
-
pages
1174
\btxdoif
{
journal
}
{
1175
\btxspace
1176
\texdefinition
{
btx
:
chicago
:
journal
}
1177
\btxdoifelse
{
volume
}
{
1178
\btxcomma
1179
\texdefinition
{
btx
:
chicago
:
volume
}
1180
\btxdoif
{
number
}
{
1181
%\btxleftparenthesis
1182
(
\btxflush
{
number
}
1183
\btxrightparenthesis
1184
}
1185
}
{
1186
\btxdoif
{
number
}
{
1187
\btxcomma
1188
\btxleftparenthesis
1189
\btxflush
{
number
}
1190
\btxrightparenthesis
1191
}
1192
}
1193
\btxdoif
{
pages
}
{
1194
\btxcomma
1195
\doif
{
\currentbtxcategory
}
{
newspaper
}
{
1196
\btxoneorrange
{
pages
}
{
1197
\btxlabeltext
{
p
}
1198
}
{
1199
\btxlabeltext
{
pp
}
1200
}
1201
\btxnbsp
1202
}
1203
\btxflush
{
pages
}
1204
}
1205
\btxperiod
1206
\doifnot
{
\currentbtxcategory
}
{
newspaper
}
{
1207
\btxdoifnot
{
volume
}
{
1208
\btxdoifnot
{
number
}
{
1209
\btxdoifnot
{
pages
}
{
1210
\btxdoif
{
doi
}
{
%set: doi or url
1211
\btxspace
1212
\btxlabeltext
{
chicago
:
Advanced
}
1213
\btxperiod
1214
}
1215
}
1216
}
1217
}
1218
}
1219
}
1220
\stoptexdefinition
1221 1222
\starttexdefinition
mutable
protected
btx
:
chicago
:
wherefrom
-
publisher
1223
\btxdoifelse
{
address
}
{
1224
\btxflush
{
address
}
1225
\btxdoif
{
country
}
{
1226
\btxcomma
1227
\btxflush
{
country
}
1228
}
1229
\btxcolon
1230
}
{
1231
\btxdoif
{
country
}
{
1232
\btxflush
{
country
}
1233
\btxcolon
1234
}
1235
}
1236
\doifelse
{
\btxfoundname
{
author
}
}
{
\btxfoundname
{
publisher
}
}
{
1237
\btxlabeltext
{
chicago
:
Author
}
1238
}
{
1239
\btxdoifelse
{
publisher
}
{
1240
\btxflush
{
publisher
}
1241
}
{
1242
\btxlabeltext
{
chicago
:
Author
}
1243
}
1244
}
1245
\btxperiod
1246
\stoptexdefinition
1247 1248
\definebreakpoints
[
doi
]
1249
\definebreakpoint
[
doi
]
[
:
]
[
nleft
=
3
,
type
=
1
]
1250
\definebreakpoint
[
doi
]
[
/
]
[
nleft
=
3
,
type
=
1
]
1251
\definebreakpoint
[
doi
]
[
-
]
[
nleft
=
3
,
type
=
1
]
1252
\definebreakpoint
[
doi
]
[
.
]
[
nleft
=
3
,
type
=
1
]
1253 1254
% use \btxentry here?
1255 1256
\starttexdefinition
mutable
protected
btx
:
chicago
:
url
1257
\begingroup
1258
\setbreakpoints
[
doi
]
1259
\ifconditional
\btxinteractive
1260
\goto
{
1261
\hyphenatedurl
{
\btxflush
{
url
}
}
1262
}
[
1263
url
(
\btxflush
{
url
}
)
1264
]
1265
\else
1266
\hyphenatedurl
{
\btxflush
{
url
}
}
1267
\fi
1268
\endgroup
1269
\stoptexdefinition
1270 1271
% use \btxentry here?
1272 1273
\starttexdefinition
mutable
protected
btx
:
chicago
:
doi
1274
\begingroup
1275
\setbreakpoints
[
doi
]
1276
\ifconditional
\btxinteractive
1277
\goto
{
1278
\hyphenatedurl
{
doi
:
\btxflush
{
doi
}
}
1279
}
[
1280
url
(
http
:
/
/
dx
.
doi
.
org
/
\btxflush
{
doi
}
)
1281
]
1282
\else
1283
\hyphenatedurl
{
doi
:
\btxflush
{
doi
}
}
1284
\fi
1285
\endgroup
1286
\stoptexdefinition
1287 1288
\starttexdefinition
mutable
protected
btx
:
chicago
:
note
1289
\btxdoif
{
note
}
{
1290
\btxleftparenthesis
1291
\btxflush
{
note
}
1292
\btxrightparenthesis
1293
}
1294
\stoptexdefinition
1295 1296
\starttexdefinition
mutable
protected
btx
:
chicago
:
url
-
doi
-
note
1297
\doif
{
\btxfoundname
{
doi
}
}
{
url
}
{
1298
\btxspace
1299
\btxlabeltext
{
chicago
:
Retrieved
}
1300
\btxspace
1301
\texdefinition
{
btx
:
chicago
:
url
}
1302
}
1303
\doif
{
\btxfoundname
{
doi
}
}
{
doi
}
{
1304
\btxspace
1305
\texdefinition
{
btx
:
chicago
:
doi
}
1306
}
1307
\texdefinition
{
btx
:
chicago
:
note
}
1308
\removeunwantedspaces
1309
\stoptexdefinition
1310 1311
\starttexdefinition
mutable
protected
btx
:
chicago
:
type
1312
\btxdoif
{
type
}
{
1313
\btxleftbracket
1314
\btxflush
{
type
}
1315
\btxrightbracketperiod
1316
}
1317
\stoptexdefinition
1318 1319
% Then setups, by category
1320 1321
% An article from a journal
1322
% Required fields: author or organization or editor or title, journal, (year).
1323
% Optional fields: volume, number, pages, type, doi, url, note.
1324
% Note that bibtex (and tools) do not include editor (e.g. special issue or section)
1325 1326
\startsetups
btx
:
chicago
:
list
:
article
1327
\texdefinition
{
btx
:
chicago
:
authoryear
}
1328
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1329
\texdefinition
{
btx
:
chicago
:
type
}
1330
\texdefinition
{
btx
:
chicago
:
journal
-
volume
-
number
-
pages
}
1331
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1332
\stopsetups
1333 1334
% An article from a magazine.
1335
% Required fields: author or title, journal, (year).
1336
% Optional fields: number, pages, type, month, day, doi, url, note.
1337 1338
\startsetups
btx
:
chicago
:
list
:
magazine
1339
\fastsetup
{
btx
:
chicago
:
list
:
article
}
1340
\stopsetups
1341 1342
% An article from a newspaper.
1343
% Required fields: author or title, journal, (year).
1344
% Optional fields: volume, number, pages, type, month, day, doi, url, note.
1345 1346
\startsetups
btx
:
chicago
:
list
:
newspaper
1347
\fastsetup
{
btx
:
chicago
:
list
:
article
}
1348
\stopsetups
1349 1350
% A complete issue of a periodical, such as a special issue of a journal.
1351
% Required fields: title, year
1352
% Optional fields: editor, publisher, subtitle, series, volume, number, month, organization, doi, url, issn, note
1353 1354
% needs to be tuned...
1355 1356
\startsetups
btx
:
chicago
:
list
:
periodical
1357
\fastsetup
{
btx
:
chicago
:
list
:
article
}
1358
\stopsetups
1359 1360
% National and international standards issued by a standards body
1361
% Required fields: author, institution, or organization, year, title
1362
% Optional fields: subtitle, doi, url, note
1363 1364
\startsetups
btx
:
chicago
:
list
:
standard
1365
\texdefinition
{
btx
:
chicago
:
authoryear
}
1366
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1367
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1368
\stopsetups
1369 1370
% A book with an explicit publisher.
1371
% Required fields: author or editor or publisher, title, (year).
1372
% Optional fields: volume or number, series, address, edition, month, day, note.
1373
% Chicago ignores: month, day
1374 1375
% todo: series?
1376 1377
\startsetups
btx
:
chicago
:
list
:
book
1378
\texdefinition
{
btx
:
chicago
:
authoryear
}
1379
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1380
\texdefinition
{
btx
:
chicago
:
type
}
1381
\texdefinition
{
btx
:
chicago
:
editionset
}
1382
\texdefinition
{
btx
:
chicago
:
wherefrom
-
publisher
}
1383
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1384
\stopsetups
1385 1386
% There is some debate about how inbook should differ from incollection
1387 1388
% A part of a book, which may be a chapter (or section or whatever) and/or a range of pages.
1389
% (note that inbook is handled differently by bibtex and biblatex)
1390
% Required fields: author or editor, title, chapter and/or pages, publisher, year.
1391
% Optional fields: volume or number, series, type, address, edition, month, note.
1392
% We add optional: booktitle.
1393
% Chicago ignores: chapter, month
1394 1395
\startsetups
btx
:
chicago
:
list
:
inbook
1396
\texdefinition
{
btx
:
chicago
:
authoryear
}
1397
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1398
\texdefinition
{
btx
:
chicago
:
type
}
1399
\texdefinition
{
btx
:
chicago
:
editor
-
in
}
1400
\texdefinition
{
btx
:
chicago
:
editionset
}
1401
\texdefinition
{
btx
:
chicago
:
wherefrom
-
publisher
}
1402
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1403
\stopsetups
1404 1405
% A part of a book having its own title.
1406
% Required fields: author, title, booktitle, publisher, year.
1407
% Optional fields: editor, volume or number, series, type, chapter, pages, address, edition, month, note.
1408
% Chicago ignores: chapter, month
1409 1410
\startsetups
btx
:
chicago
:
list
:
incollection
1411
\fastsetup
{
btx
:
chicago
:
list
:
inbook
}
1412
\stopsetups
1413 1414
% The proceedings of a conference.
1415
% Required fields: title, year.
1416
% Optional fields: editor, volume or number, series, address, month, organization, publisher, note.
1417
% todo: series?
1418 1419
\startsetups
btx
:
chicago
:
list
:
proceedings
1420
\fastsetup
{
btx
:
chicago
:
list
:
book
}
1421
\stopsetups
1422 1423
% An article in a conference proceedings.
1424
% Required fields: author, title, booktitle, year.
1425
% Optional fields: editor, volume or number, series, pages, address, month, organization, publisher, note.
1426 1427
\startsetups
btx
:
chicago
:
list
:
inproceedings
1428
\texdefinition
{
btx
:
chicago
:
authoryear
}
1429
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1430
\texdefinition
{
btx
:
chicago
:
editor
-
in
}
1431
\texdefinition
{
btx
:
chicago
:
editionset
}
1432
\texdefinition
{
btx
:
chicago
:
organization
-
if
-
not
-
author
}
1433
\texdefinition
{
btx
:
chicago
:
wherefrom
-
publisher
}
1434
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1435
\stopsetups
1436 1437
\startsetups
btx
:
chicago
:
list
:
conference
1438
\fastsetup
{
btx
:
chicago
:
list
:
inproceedings
}
1439
\stopsetups
1440 1441
% A thesis.
1442
% Required fields: author, title, school, year.
1443
% Optional fields: type, address, month, note.
1444 1445
\startsetups
btx
:
chicago
:
list
:
thesis
1446
\texdefinition
{
btx
:
chicago
:
authoryear
}
1447
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1448
\btxleftparenthesis
1449
\btxdoifelse
{
type
}
{
1450
\btxusecommand
[
chicago
:
\s!list
:
type
]
{
1451
\btxflush
{
type
}
1452
}
1453
}
{
1454
\btxlabeltext
{
\currentbtxcategory
}
1455
}
1456
\btxrightparenthesis
1457
\btxdoif
{
school
}
{
1458
\btxperiod
1459
\btxflush
{
school
}
1460
}
1461
\btxdoif
{
address
}
{
1462
\btxdoifelse
{
school
}
{
1463
\btxcomma
1464
}
{
1465
\btxperiod
1466
}
1467
\btxflush
{
address
}
1468
\btxdoif
{
country
}
{
1469
\btxcomma
1470
\btxflush
{
country
}
1471
}
1472
}
1473
\btxperiod
1474
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1475
\stopsetups
1476 1477
\startsetups
btx
:
chicago
:
list
:
phdthesis
1478
\fastsetup
{
btx
:
chicago
:
list
:
thesis
}
1479
\stopsetups
1480 1481
\startsetups
btx
:
chicago
:
list
:
mastersthesis
1482
\fastsetup
{
btx
:
chicago
:
list
:
thesis
}
1483
\stopsetups
1484 1485
% A work that is printed and bound, but without a named publisher or sponsoring institution.
1486
% Required field: title.
1487
% Optional fields: author, howpublished, address, month, year, note.
1488 1489
\startsetups
btx
:
chicago
:
list
:
booklet
1490
\fastsetup
{
btx
:
chicago
:
list
:
book
}
1491
\stopsetups
1492 1493
% Technical documentation.
1494
% Required field: title.
1495
% Optional fields: author, organization, address, edition, month, year, note.
1496 1497
\startsetups
btx
:
chicago
:
list
:
manual
1498
\fastsetup
{
btx
:
chicago
:
list
:
book
}
1499
\stopsetups
1500 1501
% A report published by a school or other institution, usually numbered within a series.
1502
% Required fields: author, title, institution, year.
1503
% Optional fields: type, number, address, month, note.
1504 1505
\startsetups
btx
:
chicago
:
list
:
techreport
1506
\fastsetup
{
btx
:
chicago
:
list
:
book
}
1507
\stopsetups
1508 1509
% A document having an author and title, but not formally published.
1510
% Required fields: author, title, note.
1511
% Optional fields: month, year.
1512 1513
\startsetups
btx
:
chicago
:
list
:
unpublished
1514
\fastsetup
{
btx
:
chicago
:
list
:
book
}
1515
\stopsetups
1516 1517
% A patent. Note that this category was not defined with BIBTEX. Below from JabRef:
1518
% Required fields: nationality, number, year, yearfiled
1519
% Optional fields: author, title, assignee, address, type, number, day, dayfiled, month, monthfiled, note, url
1520
% Also optional: publisher
1521 1522
% todo: yearfiled, monthfiled, dayfiled
1523 1524
\startsetups
btx
:
chicago
:
list
:
patent
1525
\texdefinition
{
btx
:
chicago
:
authoryear
}
1526
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1527
\begingroup
1528
\it
1529
\btxdoif
{
nationality
}
{
1530
\btxspace
1531
\btxflush
{
nationality
}
1532
}
1533
\btxspace
1534
\btxdoifelse
{
type
}
{
1535
\btxflush
{
type
}
1536
}
{
1537
\btxlabeltext
{
patent
}
1538
}
1539
\btxdoif
{
number
}
{
1540
\btxspace
1541
\btxlabeltext
{
chicago
:
number
}
1542
\btxspace
1543
\btxflush
{
number
}
1544
}
1545
\btxperiod
1546
\italiccorrection
1547
\endgroup
1548
\texdefinition
{
btx
:
chicago
:
wherefrom
-
publisher
}
1549
\texdefinition
{
btx
:
chicago
:
url
}
1550
\texdefinition
{
btx
:
chicago
:
note
}
1551
\stopsetups
1552 1553
% Electronic. Note that this category was not defined with BIBTEX. Below from JabRef:
1554
% Required fields: title
1555
% Optional fields: address, author, howpublished, month, note, organization, url, year, doi
1556
% Also optional: type
1557 1558
% Like Misc below but includes organization.
1559 1560
\startsetups
btx
:
chicago
:
list
:
electronic
1561
\texdefinition
{
btx
:
chicago
:
authoryear
}
1562
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1563
\texdefinition
{
btx
:
chicago
:
type
}
1564
\texdefinition
{
btx
:
chicago
:
organization
-
if
-
not
-
author
}
1565
\btxdoif
{
howpublished
}
{
1566
\btxspace
1567
\btxflush
{
howpublished
}
1568
\btxperiod
1569
}
1570
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1571
\stopsetups
1572 1573
% Film. Note that this category was not defined with BIBTEX.
1574
% Required fields: producer, director, title, year, address, publisher
1575
% Optional fields: subtitle, type, note, url, doi
1576 1577
\startsetups
btx
:
chicago
:
list
:
film
1578
\texdefinition
{
btx
:
chicago
:
authoryear
}
1579
\texdefinition
{
btx
:
chicago
:
title
}
1580
\btxleftbracket
1581
\btxdoifelse
{
type
}
{
1582
\btxflush
{
type
}
1583
}
{
1584
\btxlabeltext
{
chicago
:
MotionPicture
}
1585
}
1586
\btxrightbracketperiod
1587
\texdefinition
{
btx
:
chicago
:
wherefrom
-
publisher
}
1588
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1589
\stopsetups
1590 1591
% Music. Note that this category was not defined with BIBTEX.
1592
% Required fields: composer, artist, title, album, year, address, publisher
1593
% Optional fields: subtitle, type, note, url, doi
1594 1595
\startsetups
btx
:
chicago
:
list
:
music
1596
\texdefinition
{
btx
:
chicago
:
authoryear
}
1597
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1598
\doifnot
{
\btxfoundname
{
author
}
}
{
artist
}
{
1599
\btxdoif
{
artist
}
{
1600
\btxleftbracket
1601
\btxlabeltext
{
chicago
:
Recordedby
}
1602
\btxspace
1603
\btxflush
{
artist
}
1604
\btxrightbracketperiod
1605
}
1606
}
1607
\doifnot
{
\btxfoundname
{
title
}
}
{
album
}
{
1608
\btxdoif
{
album
}
{
1609
\btxlabeltext
{
In
}
1610
\btxspace
1611
\btxflush
{
album
}
1612
\btxperiod
1613
}
1614
}
1615
\texdefinition
{
btx
:
chicago
:
type
}
1616
\texdefinition
{
btx
:
chicago
:
wherefrom
-
publisher
}
1617
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1618
\stopsetups
1619 1620
% Other. Note that this category was not defined with BIBTEX. Below from JabRef:
1621
% Required fields: author or title, year
1622
% Optional fields: note, doi, url
1623 1624
\startsetups
btx
:
chicago
:
list
:
other
1625
\fastsetup
{
btx
:
chicago
:
list
:
book
}
1626
\stopsetups
1627 1628
% Use this category when nothing else fits.
1629
% Required fields: none.
1630
% Optional fields: author, title, howpublished, month, year, note.
1631 1632
\startsetups
btx
:
chicago
:
list
:
misc
1633
\texdefinition
{
btx
:
chicago
:
authoryear
}
1634
\texdefinition
{
btx
:
chicago
:
title
-
if
-
not
-
placed
}
1635
\btxdoif
{
howpublished
}
{
1636
\btxspace
1637
\btxflush
{
howpublished
}
1638
\btxperiod
1639
}
1640
\texdefinition
{
btx
:
chicago
:
url
-
doi
-
note
}
1641
\stopsetups
1642 1643
% If all else fails to match:
1644 1645
\startsetups
btx
:
chicago
:
list
:
literal
1646
%\btxleftparenthesis
1647
\removeunwantedspaces
(
1648
\btxflush
{
tag
}
1649
\btxrightparenthesis
1650
\btxdoif
{
text
}
{
1651
\btxflush
{
text
}
1652
}
1653
\stopsetups
1654 1655
% HH: an example of setting up translations using a sub rendering. Keep it here
1656
% till we find another spot as otherwise I forget about it and I don't want to
1657
% waste hours reinventing a wheel when something like this is needed.
1658
%
1659
% \definebtx
1660
% [chicago:cite:title:translated]
1661
% [chicago:cite:title]
1662
% [left=\btxleftbracket,
1663
% right=\btxrightbracket,
1664
% style=\v!bolditalic]
1665
%
1666
% \startsetups btx:chicago:cite:title
1667
% % need to add concat, etc.
1668
% \btxcitereference
1669
% \currentbtxfirst
1670
% \doifmode {btx:chicago:translatedtitles} {
1671
% \ifx\currentbtxlanguage\empty
1672
% % no need for an extra
1673
% \else\ifx\mainbtxlanguage\currentbtxlanguage
1674
% % no need for an extra
1675
% \else
1676
% \btxdoif {title:\mainbtxlanguage} {
1677
% \btxstartciterendering[title:translated]
1678
% \language[\mainbtxlanguage]
1679
% \btxflush{title:\mainbtxlanguage}
1680
% \btxstopciterendering
1681
% }
1682
% \fi\fi
1683
% }
1684
% \stopsetups
1685 1686
\stopbtxrenderingdefinitions
1687