publ-imp-default.mkvi /size: 12 Kb    last modification: 2021-10-28 13:50
1
%D \module
2
%D [ file=publ-imp-default,
3
%D version=2014.02.06,
4
%D title=Default 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
%D This default style defines only a few categories: book and article.
14
%D If you want more, you need to load a more complete style such as \type {apa},
15
%D \type {aps}, etc. The default style is used in the manuals that ship with
16
%D \CONTEXT. This file is always loaded.
17 18
\startbtxrenderingdefinitions
[
\s!default
]
19 20
\definebtxrendering
21
[
\s!default
]
22
[
\c!specification
=
\s!default
,
23
\c!sorttype
=
\v!default
,
24
\c!numbering
=
num
]
25 26
\setupbtxlist
27
[
default
]
28
[
\c!align
=
{
normal
,
verytolerant
,
stretch
}
]
29 30
\definebtx
31
[
\s!default
]
32
[
\c!default
=
,
% we do not want to fall|-|back on ourself.
33
\c!otherstext
=
{
\btxspace
\btxlabeltext
{
default
:
others
}
}
,
34
%c!journalconversion=\v!normal,
35
\c!monthconversion
=
\v!number
,
36
\c!separator
:
names
:
2
=
{
\btxcomma
}
,
37
\c!separator
:
names
:
3
=
{
\btxspace
\btxlabeltext
{
default
:
and
}
\space
}
,
38
\c!separator
:
names
:
4
=
{
\btxspace
\btxlabeltext
{
default
:
and
}
\space
}
]
39 40
\definebtx
41
[
\s!default
:
\s!list
]
42
[
\s!default
]
43
[
\c!authorconversion
=
normalshort
]
44 45
\definebtx
46
[
\s!default
:
\s!cite
]
47
[
\s!default
]
48
[
\c!alternative
=
num
,
49
\c!compress
=
\v!yes
,
50
\c!sorttype
=
normal
,
51
\c!authorconversion
=
\v!name
]
52 53
\definebtx
54
[
\s!default
:
\s!cite
:
name
]
55
[
\s!default
:
\s!cite
]
56
[
\c!authorconversion
=
\v!name
]
57 58
\definebtx
59
[
\s!default
:
\s!cite
:
inverted
]
60
[
\s!default
:
\s!cite
]
61
[
\c!authorconversion
=
\v!invertedshort
]
62 63
\definebtx
64
[
\s!default
:
\s!cite
:
invertedshort
]
65
[
\s!default
:
\s!cite
]
66
[
\c!authorconversion
=
\v!invertedshort
]
67 68
\definebtx
69
[
\s!default
:
\s!cite
:
normalshort
]
70
[
\s!default
:
\s!cite
]
71
[
\c!authorconversion
=
\v!normalshort
]
72 73
\definebtx
74
[
\s!default
:
\s!cite
:
normal
]
75
[
\s!default
:
\s!cite
]
76
[
\c!authorconversion
=
\v!normal
]
77 78
% List variants, some having specific settings:
79 80
\definebtx
81
[
\s!default
:
\s!list
:
\s!page
]
82
[
\s!default
:
\s!list
]
83
[
\c!separator
:
2
=
{
\btxcomma
}
,
84
\c!separator
:
3
=
{
\btxcomma
\btxlabeltext
{
default
:
and
}
\space
}
,
85
\c!separator
:
4
=
{
\btxspace
\btxlabeltext
{
default
:
and
}
\space
}
,
86
\c!left
=
{
\btxleftparenthesis
}
,
87
\c!right
=
{
\btxrightparenthesis
}
]
88 89
\definebtx
90
[
\s!default
:
\s!list
:
numbering
]
91
[
\s!default
:
\s!list
]
92 93
\definebtx
94
[
\s!default
:
\s!list
:
numbering
:
default
]
95
[
\s!default
:
\s!list
:
numbering
]
96 97
\definebtx
98
[
\s!default
:
\s!list
:
numbering
:
num
]
99
[
\s!default
:
\s!list
:
numbering
]
100 101
\definebtx
102
[
\s!default
:
\s!list
:
numbering
:
short
]
103
[
\s!default
:
\s!list
:
numbering
:
num
]
104 105
\definebtx
106
[
\s!default
:
\s!list
:
numbering
:
tag
]
107
[
\s!default
:
\s!list
:
numbering
:
num
]
108 109
\definebtx
110
[
\s!default
:
\s!list
:
numbering
:
index
]
111
[
\s!default
:
\s!list
:
numbering
:
num
]
112 113
\definebtx
114
[
\s!default
:
\s!list
:
author
]
115
[
\s!default
:
\s!list
]
116 117
\definebtx
118
[
\s!default
:
\s!list
:
editor
]
119
[
\s!default
:
\s!list
:
author
]
120 121
\definebtx
122
[
\s!default
:
\s!list
:
url
]
123
[
\s!default
:
\s!list
]
124 125
\definebtx
126
[
\s!default
:
\s!list
:
doi
]
127
[
\s!default
:
\s!list
]
128 129
\definebtx
130
[
\s!default
:
\s!list
:
short
]
131
[
\s!default
:
\s!list
]
132 133
\definebtx
134
[
\s!default
:
\s!list
:
journal
]
135
[
\s!default
:
\s!list
]
136
[
\c!style
=
\v!italic
]
137 138
\definebtx
139
[
\s!default
:
\s!list
:
title
]
140
[
\s!default
:
\s!list
]
141
[
\c!style
=
\v!italic
,
142
\c!command
=
\Word
]
143 144
\definebtx
145
[
\s!default
:
\s!list
:
title
:
article
]
146
[
\s!default
:
\s!list
:
title
]
147
[
\c!style
=
,
% journal is set in italics
148
\c!command
=
\quotation
]
% alan, you can't do \quotation\Word
149 150
\definebtx
151
[
\s!default
:
\s!list
:
title
:
book
]
152
[
\s!default
:
\s!list
:
title
]
153 154
% Citation variants, some having specific settings :
155 156
\definebtx
157
[
\s!default
:
\s!cite
:
author
]
158
[
\s!default
:
\s!cite
]
159 160
\definebtx
161
[
\s!default
:
\s!cite
:
authornum
]
162
[
\s!default
:
\s!cite
:
author
]
163
[
\c!left
=
{
(
}
,
164
\c!right
=
{
)
}
]
165 166
\definebtx
167
[
\s!default
:
\s!cite
:
authoryear
]
168
[
\s!default
:
\s!cite
:
author
]
169
[
\c!left
=
{
(
}
,
170
\c!right
=
{
)
}
,
171
\c!inbetween
=
{
\btxcomma
}
]
172 173
\definebtx
174
[
\s!default
:
\s!cite
:
authoryears
]
175
[
\s!default
:
\s!cite
:
author
]
176 177
\definebtx
178
[
\s!default
:
\s!cite
:
author
:
num
]
% todo
179
[
\s!default
:
\s!cite
:
authornum
]
180
[
\c!left
=
{
\btxleftbracket
}
,
181
\c!right
=
{
]
}
]
182 183
\definebtx
184
[
\s!default
:
\s!cite
:
author
:
year
]
% todo
185
[
\s!default
:
\s!cite
:
authoryear
]
186
[
\c!left
=
,
187
\c!right
=
]
188 189
\definebtx
190
[
\s!default
:
\s!cite
:
author
:
years
]
% todo
191
[
\s!default
:
\s!cite
:
authoryears
]
192
[
\c!inbetween
=
,
193
\c!left
=
{
\btxleftparenthesis
}
,
194
\c!right
=
{
)
}
]
195 196
\definebtx
197
[
\s!default
:
\s!cite
:
year
]
198
[
\s!default
:
\s!cite
]
199 200
\definebtx
201
[
\s!default
:
\s!cite
:
title
]
202
[
\s!default
:
\s!cite
]
203
[
\c!command
=
{
\language
[
\currentbtxlanguage
]
}
,
% BAH
204
\c!style
=
\v!italic
]
205 206
\definebtx
207
[
\s!default
:
\s!cite
:
tag
]
208
[
\s!default
:
\s!cite
]
209
[
\c!left
=
{
[
}
,
210
\c!right
=
{
]
}
]
211 212
\definebtx
213
[
\s!default
:
\s!cite
:
index
]
214
[
\s!default
:
\s!cite
]
215
[
\c!left
=
{
[
}
,
216
\c!right
=
{
]
}
]
217 218
\definebtx
219
[
\s!default
:
\s!cite
:
page
]
220
[
\s!default
:
\s!cite
]
221
[
\c!left
=
,
222
\c!right
=
]
223 224
\definebtx
225
[
\s!default
:
\s!cite
:
pages
]
226
[
\s!default
:
\s!cite
:
page
]
227 228
\definebtx
229
[
\s!default
:
\s!cite
:
keywords
]
230
[
\s!default
:
\s!cite
]
231
[
\c!left
=
{
(
}
,
232
\c!right
=
{
)
}
]
233 234
\definebtx
235
[
\s!default
:
\s!cite
:
short
]
236
[
\s!default
:
\s!cite
]
237
[
\c!left
=
{
[
}
,
238
\c!right
=
{
]
}
]
239 240
\definebtx
241
[
\s!default
:
\s!cite
:
category
]
242
[
\s!default
:
\s!cite
]
243 244
\definebtx
245
[
\s!default
:
\s!cite
:
url
]
246
[
\s!default
:
\s!cite
]
247
[
\c!left
=
{
[
}
,
248
\c!right
=
{
]
}
]
249 250
\definebtx
251
[
\s!default
:
\s!cite
:
doi
]
252
[
\s!default
:
\s!cite
:
url
]
253 254
\definebtx
255
[
\s!default
:
\s!cite
:
num
]
256
[
\s!default
:
\s!cite
]
257
[
\c!left
=
{
[
}
,
258
\c!right
=
{
]
}
,
259
\c!separator
:
2
=
\btxcommabreak
,
260
\c!separator
:
3
=
\btxparameter
{
\c!separator
:
2
}
,
261
\c!separator
:
4
=
\btxparameter
{
\c!separator
:
2
}
]
262 263
\definebtx
264
[
\s!default
:
\s!cite
:
default
]
265
[
\s!default
:
\s!cite
:
num
]
266 267
\definebtx
268
[
\s!default
:
\s!cite
:
textnum
]
269
[
\s!default
:
\s!cite
:
num
]
270
[
\c!left
=
,
% in apa: {Ref.\nbsp} or so
271
\c!right
=
,
272
\c!separator
:
2
=
{
\btxcomma
}
,
273
\c!separator
:
3
=
{
\btxcomma
\btxlabeltext
{
default
:
and
}
\space
}
,
274
\c!separator
:
4
=
{
\btxspace
\btxlabeltext
{
default
:
and
}
\space
}
]
275 276
\definebtx
277
[
\s!default
:
\s!cite
:
entry
]
278
[
\s!default
:
\s!cite
]
279
[
\c!left
=
{
(
}
,
280
\c!right
=
{
)
}
]
281 282
\definebtx
283
[
\s!default
:
\s!cite
:
lefttext
]
284
[
\s!default
:
\s!cite
]
285
[
\c!left
=
,
286
\c!right
=
]
287 288
\definebtx
289
[
\s!default
:
\s!cite
:
righttext
]
290
[
\s!default
:
\s!cite
]
291
[
\c!left
=
,
292
\c!right
=
]
293 294
% Multilingual text strings
295 296
\setupbtxlabeltext
297
[
en
]
298
[
\s!default
:
and
=
and
,
299
\s!default
:
number
=
{
no
.
}
,
300
\s!default
:
edition
=
{
ed
.
}
,
301
\s!default
:
Editor
=
Editor
,
% Ed./Eds.
302
\s!default
:
Editors
=
Editors
,
303
\s!default
:
Volume
=
{
Vol
.
}
,
304
\s!default
:
Volumes
=
{
Vols
.
}
,
305
\s!default
:
others
=
{
et
al
.
}
]
306 307
\setupbtxlabeltext
308
[
nl
]
309
[
\s!default
:
and
=
en
,
310
\s!default
:
number
=
{
nr
.
}
,
311
\s!default
:
edition
=
{
ed
.
}
,
% editie
312
\s!default
:
Editor
=
Editor
,
% Ed./Eds.
313
\s!default
:
Editors
=
Editors
,
314
\s!default
:
Volume
=
{
Vol
.
}
,
315
\s!default
:
Volumes
=
{
Vols
.
}
,
316
\s!default
:
others
=
{
et
al
.
}
]
317 318
\setupbtxlabeltext
319
[
fr
]
320
[
\s!default
:
and
=
et
,
321
\s!default
:
others
=
{
et
al
.
}
,
322
\s!default
:
number
=
{
n
\high
{
o
}
}
,
323
\s!default
:
edition
=
{
édition
}
,
324
\s!default
:
Editor
=
Éditeur
,
325
\s!default
:
Editors
=
Éditeurs
,
326
\s!default
:
Volume
=
Volume
,
327
\s!default
:
Volumes
=
Volumes
,
328
\s!default
:
others
=
{
et
al
.
}
]
329 330
\setupbtxlabeltext
331
[
de
]
332
[
\s!default
:
and
=
und
,
333
\s!default
:
number
=
{
nr
.
}
,
334
\s!default
:
edition
=
Auf
\/
lage
,
335
\s!default
:
Editor
=
Herausgeber
,
% Hrsg./Hg.
336
\s!default
:
Editors
=
Herausgeber
,
337
\s!default
:
Volume
=
Band
,
% Bd.
338
\s!default
:
Volumes
=
{
Bände
}
,
339
\s!default
:
others
=
{
et
al
.
}
]
340 341
\setupbtxlabeltext
342
[
it
]
343
[
\s!default
:
and
=
e
,
344
\s!default
:
number
=
{
}
,
345
\s!default
:
edition
=
{
ed
.
}
,
% edizione
346
\s!default
:
Editor
=
{
A
cura
di
}
,
347
\s!default
:
Editors
=
{
A
cura
di
}
,
348
\s!default
:
Volume
=
{
Vol
.
}
,
% Volume
349
\s!default
:
Volumes
=
{
Vol
.
}
,
% Volumi
350
\s!default
:
others
=
{
et
al
.
}
]
351 352
\setupbtxlabeltext
353
[
es
]
354
[
\s!default
:
and
=
y
,
355
\s!default
:
number
=
{
}
,
356
\s!default
:
edition
=
{
ed
.
}
,
% edición
357
\s!default
:
Editor
=
Editor
,
% Ed./Eds.
358
\s!default
:
Editors
=
Editores
,
359
\s!default
:
Volume
=
{
Vol
.
}
,
% Volumen
360
\s!default
:
Volumes
=
{
Vols
.
}
,
% Volúmenes
361
\s!default
:
others
=
{
et
al
.
}
]
362 363
\setupbtxlabeltext
364
[
sv
]
365
[
\s!default
:
and
=
och
,
366
\s!default
:
number
=
{
nr
.
}
,
367
\s!default
:
edition
=
{
Utgåva
}
,
368
\s!default
:
Editor
=
Redaktör
,
369
\s!default
:
Editors
=
Redaktörer
,
370
\s!default
:
Volume
=
Band
,
371
\s!default
:
Volumes
=
Band
,
372
\s!default
:
others
=
{
et
al
.
}
]
373 374 375
% First some helpers:
376 377
\starttexdefinition
mutable
protected
btx
:
default
:
composed
-
title
378
\begingroup
379
\language
[
\currentbtxlanguage
]
380
\btxflush
{
title
}
381
\btxdoif
{
subtitle
}
{
382
\btxcolon
383
\btxflush
{
subtitle
}
384
}
385
\endgroup
386
\stoptexdefinition
387 388
\starttexdefinition
mutable
protected
btx
:
default
:
title
389
\btxdoif
{
title
}
{
390
\btxspace
391
\btxstartstyleandcolor
[
default
:
list
:
title
:
\currentbtxcategory
]
392
\btxusecommand
[
default
:
list
:
title
:
\currentbtxcategory
]
{
393
\texdefinition
{
btx
:
default
:
composed
-
title
}
394
}
395
\btxstopstyleandcolor
396
\btxcomma
397
}
398
\stoptexdefinition
399 400
\starttexdefinition
mutable
protected
btx
:
default
:
author
401
\btxdoif
{
author
}
{
402
\btxflush
{
author
}
403
\doif
{
\btxfoundname
{
author
}
}
{
editor
}
{
404
\btxcomma
405
\btxsingularorplural
{
editor
}
{
406
\btxlabeltext
{
default
:
Editor
}
407
}
{
408
\btxlabeltext
{
default
:
Editors
}
409
}
410
}
411
\btxcomma
412
}
413
\stoptexdefinition
414 415
\starttexdefinition
mutable
protected
btx
:
default
:
year
416
\btxflush
{
year
}
417
\btxflushsuffix
418
\stoptexdefinition
419 420
\starttexdefinition
mutable
protected
btx
:
default
:
journal
421
\btxdoif
{
journal
}
{
422
\btxspace
423
\btxstartstyleandcolor
[
default
:
list
:
journal
]
424
\btxusecommand
[
default
:
list
:
journal
]
{
425
\btxflush
{
journal
}
426
}
427
\btxstopstyleandcolor
428
\btxdoifelse
{
volume
}
{
429
\btxspace
430
\btxflush
{
volume
}
431
\btxdoif
{
number
}
{
432
\ignorespaces
% brrr
433
\btxleftparenthesis
434
\btxflush
{
number
}
435
\btxrightparenthesis
436
}
437 438
}
{
439
\btxdoif
{
number
}
{
440
\btxlabeltext
{
default
:
number
}
441
\btxspace
442
\btxflush
{
number
}
443
}
444
}
445
\btxdoif
{
pages
}
{
446
\btxcomma
447
\btxflush
{
pages
}
448
}
449
\btxcomma
450
}
451
\stoptexdefinition
452 453
\starttexdefinition
mutable
protected
btx
:
default
:
editionset
454
\btxdoif
{
editionset
}
{
455
\removeunwantedspaces
456
\removepunctuation
457
\btxleftparenthesis
458
\doif
{
\btxfoundname
{
editionset
}
}
{
edition
}
{
459
\btxflush
{
edition
}
460
\btxspace
461
\btxlabeltext
{
default
:
edition
}
462
\btxcomma
463
}
464
\btxdoif
{
volume
}
{
465
\btxoneorrange
{
volume
}
{
466
\btxlabeltext
{
default
:
Volume
}
467
}
{
468
\btxlabeltext
{
default
:
Volumes
}
469
}
470
\btxspace
471
\btxflush
{
volume
}
472
\btxcomma
473
}
474
\btxdoifelse
{
number
}
{
475
\btxlabeltext
{
default
:
number
}
476
\btxspace
477
\btxflush
{
number
}
478
}
{
479
\removeunwantedspaces
480
\removepunctuation
481
}
482
\btxrightparenthesiscomma
483
}
484
\stoptexdefinition
485 486
\starttexdefinition
mutable
protected
btx
:
default
:
publisher
487
\btxdoif
{
publisher
}
{
488
\btxflush
{
publisher
}
489
\btxcomma
490
}
491
\btxdoif
{
address
}
{
492
\btxflush
{
address
}
493
\btxcomma
494
}
495
\stoptexdefinition
496 497
% Then a minimal number of setups:
498 499
\startsetups
btx
:
default
:
list
:
article
500
\texdefinition
{
btx
:
default
:
author
}
501
\texdefinition
{
btx
:
default
:
title
}
502
\texdefinition
{
btx
:
default
:
journal
}
503
\texdefinition
{
btx
:
default
:
year
}
504
\removeunwantedspaces
505
\removepunctuation
506
\btxperiod
507
\stopsetups
508 509
\startsetups
btx
:
default
:
list
:
book
510
\texdefinition
{
btx
:
default
:
author
}
511
\texdefinition
{
btx
:
default
:
title
}
512
\texdefinition
{
btx
:
default
:
editionset
}
513
\texdefinition
{
btx
:
default
:
publisher
}
514
\texdefinition
{
btx
:
default
:
year
}
515
\removeunwantedspaces
516
\removepunctuation
517
\btxperiod
518
\stopsetups
519 520
\startsetups
btx
:
default
:
list
:
unknown
521
\currentbtxcategory
\btxcolon
522
\btxshowentryinline
523
\stopsetups
524 525
%D Experiment:
526 527
%D See publ-imp-cite.mkvi
528
%
529
%\startsetups btx:default:cite:lefttext
530
% \currentbtxlefttext
531
%\stopsetups
532 533
%\startsetups btx:default:cite:righttext
534
% \currentbtxrighttext
535
%\stopsetups
536 537
\stopbtxrenderingdefinitions
538