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\writestatus{loading}{ConTeXt Publication Support Initialization}
47
48\registerctxluafile{publdat}{}
49\registerctxluafile{publini}{}
50\registerctxluafile{publsor}{}
51\registerctxluafile{publaut}{autosuffix}
52\registerctxluafile{publusr}{}
53\registerctxluafile{publoth}{autosuffix}
54\registerctxluafile{publfnd}{}
55\registerctxluafile{publjrn}{}
56\registerctxluafile{publreg}{}
57\registerctxluafile{publtra}{}
58
59\unprotect
60
61\startcontextdefinitioncode
62
63
64
65\definesystemconstant {btx}
66
67\definesystemconstant {btxset}
68\definesystemconstant {btxref}
69\definesystemconstant {btxint}
70\definesystemconstant {btxltx}
71\definesystemconstant {btxrtx}
72\definesystemconstant {btxatx}
73\definesystemconstant {btxbtx}
74\definesystemconstant {btxspc}
75\definesystemconstant {btxlst}
76\definesystemconstant {btxcom}
77
78\defineinterfacevariable {btxcite} {btxcite}
79\defineinterfacevariable {btxlist} {btxlist}
80\defineinterfacevariable {btxrendering} {btxrendering}
81
82\definelabelclass [btxlabel] [2]
83
84\clf_definelabels{btxlabel}{btx}\s!false\relax
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\mutable\lettonothing\currentbtxspecification
114\mutable\lettonothing\currentbtxspecificationfallback
115
116\installmacrostack\currentbtxspecification
117\installmacrostack\currentbtxspecificationfallback
118
119\permanent\protected\def\startbtxrenderingdefinitions[#1]
120 {\unprotect
121 \push_macro_currentbtxspecification
122 \edef\currentbtxspecification{#1}}
123
124\permanent\protected\def\stopbtxrenderingdefinitions
125 {\pop_macro_currentbtxspecification
126 \protect}
127
128\permanent\protected\def\loadfoundpublicationfile#1#2
129 {\input{#2}}
130
131\permanent\protected\def\loadbtxdefinitionfile [#1]{\clf_btxloaddefinitionfile {#1}}
132\permanent\protected\def\loadbtxreplacementfile[#1]{\clf_btxloadreplacementfile{#1}}
133
134\protected\def\publ_specification_push#1
135 {\push_macro_currentbtxspecification
136 \push_macro_currentbtxspecificationfallback
137 \edef\currentbtxspecification{#1}
138 \edef\currentbtxspecificationfallback{\namedbtxparameter\currentbtxspecification\c!default}
139 \ifx\currentbtxspecificationfallback\currentbtxspecification
140 \lettonothing\currentbtxspecificationfallback
141 \fi
142 \clf_btxsetspecification{\currentbtxspecification}}
143
144\protected\def\publ_specification_pop
145 {\pop_macro_currentbtxspecificationfallback
146 \pop_macro_currentbtxspecification
147 \clf_btxsetspecification{\currentbtxspecification}}
148
149\protected\def\publ_specification_set#1
150 {\edef\currentbtxspecification{#1}
151 \edef\currentbtxspecificationfallback{\namedbtxparameter\currentbtxspecification\c!default}
152 \ifx\currentbtxspecificationfallback\currentbtxspecification
153 \lettonothing\currentbtxspecificationfallback
154 \fi
155
156 \ifempty\currentbtxspecification
157
158 \else
159 \clf_btxsetspecification{\currentbtxspecification}
160 \fi}
161
162\installcorenamespace {btx}
163
164\installswitchcommandhandler \??btx {btx} \??btx
165
166
167
168\protected\def\btx_check_chain#1#2#3
169 {\ifempty{#3}
170 \writestatus{btx #1}{defining\space"#2"}
171 \definebtx[#2]
172 \else
173 \writestatus{btx #1}{defining\space"#2"\space as\space descendant\space of\space"#3"}
174 \definebtx[#2][#3]
175 \fi}
176
177
178
179
180\permanent\protected\def\btxcheckdefine#1{\doifelsecommandhandler\??btx{#1}\gobbleoneargument{\btx_check_chain{define}{#1}}}
181\permanent\protected\def\btxchecksetup #1{\doifelsecommandhandler\??btx{#1}\gobbleoneargument{\btx_check_chain {setup}{#1}}}
182
183
184
185\permanent\protected\def\btxenableautodefine
186 {\prependtoks
187 \clf_checkinterfacechain{\currentbtx}{btxcheckdefine}
188 \to \everydefinebtx
189 \prependtoks
190 \ifnum\btxsetupmode=\doingrootsetupnamed
191 \clf_checkinterfacechain{\currentbtx}{btxchecksetup}
192 \fi
193 \to \everysetupbtx
194 \let\btxenableautodefine\relax}
195
196\appendtoks
197 \ifnum\btxsetupmode=\doingrootsetuproot
198 \publ_specification_set{\btxparameter\c!specification}
199 \orelse\ifnum\btxsetupmode=\doingrootsetupnamed
200 \doifelsecommandhandler\??btx\currentbtx
201 {\publ_specification_set{\btxparameter\c!specification}}
202 {}
203 \fi
204\to \everysetupbtx
205
206\appendtoks
207 \ifnum\btxsetupmode=\doingrootsetuproot
208 \edef\currentbtxdataset{\clf_btxsetdataset{\btxparameter\c!dataset}{\currentbtxdataset}}
209 \fi
210\to \everysetupbtx
211
212\appendtoks
213 \publ_specification_set{\btxparameter\c!specification}
214\to \everyjob
215
216\permanent\protected\def\startusingbtxspecification[#1]
217 {\publ_specification_push{#1}}
218
219\permanent\protected\def\stopusingbtxspecification
220 {\publ_specification_pop}
221
222
223
224
225
226
227
228
229\installcorenamespace {btxdataset}
230\installcorenamespace {btxrendering}
231\installcorenamespace {btxregister}
232\installcorenamespace {btxcommand}
233\installcorenamespace {btxrenderingdefinition}
234
235\installcommandhandler \??btxdataset {btxdataset} \??btxdataset
236\installcommandhandler \??btxregister {btxregister} \??btxregister
237\installcommandhandler \??btxrendering {btxrendering} \??btxrendering
238
239\permanent\protected\def\setbtxparameterset#1#2
240 {\edef\currentbtx
241 {\ifcsname\??btx\currentbtxspecification:#1:#2:\s!parent\endcsname
242 \currentbtxspecification:
243 \orelse\ifempty\currentbtxspecificationfallback
244 \orelse\ifcsname\??btx\currentbtxspecificationfallback:#1:#2:\s!parent\endcsname
245 \currentbtxspecificationfallback:
246 \fi#1:#2}}
247
248\permanent\protected\def\setbtxparametersetroot#1
249 {\edef\currentbtx
250 {\ifcsname\??btx\currentbtxspecification:#1:\s!parent\endcsname
251 \currentbtxspecification:#1
252 \orelse\ifempty\currentbtxspecificationfallback
253 \orelse\ifcsname\??btx\currentbtxspecificationfallback:#1:\s!parent\endcsname
254 \currentbtxspecificationfallback:#1
255 \fi}}
256
257\permanent\protected\def\setbtxrendering
258 {\edef\currentbtxrendering
259 {\ifcsname\??btx\currentbtxspecification:\s!parent\endcsname
260 \currentbtxspecification
261 \orelse\ifempty\currentbtxspecificationfallback
262 \orelse\ifcsname\??btx\currentbtxspecificationfallback:\s!parent\endcsname
263 \currentbtxspecificationfallback
264 \fi}}
265
266\permanent\protected\def\setbtxlist
267 {\edef\currentbtxlist
268 {\ifcsname\??btx\currentbtxrendering:\s!parent\endcsname
269 \currentbtxrendering
270 \orelse\ifcsname\??btx\currentbtxspecification:\s!parent\endcsname
271 \currentbtxspecification
272 \orelse\ifempty\currentbtxspecificationfallback
273 \orelse\ifcsname\??btx\currentbtxspecificationfallback:\s!parent\endcsname
274 \currentbtxspecificationfallback
275 \fi}
276 \edef\currentlist{\s!btx:\currentbtxlist}}
277
278\tolerant\permanent\protected\def\usebtxdataset[#1]#*[#2]#*[#3]
279 {\begingroup
280 \getdummyparameters[\c!specification=\currentbtxspecification,#3]
281 \ifparameter#2\or
282 \clf_btxusedataset
283 specification {\dummyparameter\c!specification}
284 dataset {#1}
285 filename {#2}
286 \relax
287 \orelse\ifparameter#1\or
288 \clf_btxusedataset
289 specification {\dummyparameter\c!specification}
290 dataset {\v!default}
291 filename {#1}
292 \relax
293 \fi
294 \endgroup}
295
296\definebtxdataset
297 [\v!default]
298
299
300
301
302
303
304
305
306
307\frozen\let\stoppublication\relax
308
309\frozen\tolerant\protected\def\startpublication[#1]#*[#2]
310 {\begingroup
311 \catcode\commentasciicode\othercatcode
312 \ifparameters
313 \expandafter\publ_set_publication_default
314 \or
315 \expandafter\publ_set_publication_checked
316 \or
317 \expandafter\publ_set_publication_indeed
318 \fi{#1}{#2}}
319
320\def\publ_set_publication_default#1#2
321 {\publ_set_publication_indeed\v!default{#1}}
322
323\def\publ_set_publication_checked#1#2
324 {\doifelseassignment{#1}
325 {\publ_set_publication_indeed\v!default{#1}}
326 {\publ_set_publication_indeed{#1}{}}}
327
328\def\publ_set_publication_indeed#1#2#3\stoppublication
329 {\clf_btxaddentry{#1}{#2}{\detokenize{#3}}
330 \endgroup
331 \ignorespaces}
332
333
334
335\permanent\protected\def\btxcommand#1
336 {\ifcsname\??btxcommand#1\endcsname
337 \expandafter\publ_command_yes
338 \else
339 \expandafter\publ_command_nop
340 \fi{#1}}
341
342\newtoks\t_btx_cmd
343\newbox \b_btx_cmd
344
345\t_btx_cmd{\global\setbox\b_btx_cmd\hbox{\clf_btxcmdstring}}
346
347\aliased\let\btxcmd\btxcommand
348
349\def\publ_command_yes#1
350 {\csname\??btxcommand#1\endcsname}
351
352\def\publ_command_nop#1
353 {\ifcsname#1\endcsname
354 \showmessage\m!publications{10}{#1,#1}
355 \gletcsname\??btxcommand#1\expandafter\endcsname\csname#1\endcsname
356 \orelse\ifcsname\utfupper{#1}\endcsname
357 \showmessage\m!publications{10}{#1}{\utfupper{#1}}
358 \gletcsname\??btxcommand#1\expandafter\endcsname\csname\utfupper{#1}\endcsname
359 \else
360 \showmessage\m!publications{11}{#1}
361 \setugvalue{\??btxcommand#1}{\underbar{\tttf#1}}
362 \fi
363 \publ_command_yes{#1}}
364
365\permanent\protected\def\definebtxcommand#1
366 {\protected\defcsname\??btxcommand\csstring#1\endcsname}
367
368
369
370\lettonothing\currentbtxtag
371\let \currentbtxdataset\v!default
372
373\permanent\protected\def\setbtxentry[#1]
374 {\edef\currentbtxtag{\clf_btxsetentry{\currentbtxdataset}{#1}}}
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390\permanent\def\btxfieldname #1{\clf_btxfieldname {\currentbtxdataset}{\currentbtxtag}{#1}}
391\permanent\def\btxfieldtype #1{\clf_btxfieldtype {\currentbtxdataset}{\currentbtxtag}{#1}}
392\permanent\def\btxfoundname #1{\clf_btxfoundname {\currentbtxdataset}{\currentbtxtag}{#1}}
393\permanent\def\btxfoundtype #1{\clf_btxfoundtype {\currentbtxdataset}{\currentbtxtag}{#1}}
394\permanent\def\btxauthorfield#1{\clf_btxauthorfield \currentbtxauthorindex{#1}}
395\permanent\def\btxdoifelse #1{\clf_btxdoifelse {\currentbtxdataset}{\currentbtxtag}{#1}}
396\permanent\def\btxdoif #1{\clf_btxdoif {\currentbtxdataset}{\currentbtxtag}{#1}}
397\permanent\def\btxdoifnot #1{\clf_btxdoifnot {\currentbtxdataset}{\currentbtxtag}{#1}}
398
399\aliased\let\btxsetup\fastsetup
400
401\permanent\def\btxrawfield #1{\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}}
402
403\permanent\def\btxfield #1{\dostarttagged\t!pubfld{#1}\clf_btxfield {\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
404\permanent\def\btxdetail #1{\dostarttagged\t!pubfld{#1}\clf_btxdetail{\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
405\permanent\def\btxflush #1{\dostarttagged\t!pubfld{#1}\clf_btxflush {\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
406\permanent\def\btxdirect #1{\dostarttagged\t!pubfld{#1}\clf_btxdirect{\currentbtxdataset}{\currentbtxtag}{#1}\dostoptagged}
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423\permanent\protected\def\btxspace {\removeunwantedspaces\space}
424\permanent\protected\def\btxnobreakspace {\removeunwantedspaces\nobreakspace}
425\permanent\protected\def\btxnbsp {\removeunwantedspaces\nbsp}
426\permanent\protected\def\btxperiod {\removeunwantedspaces.\space}
427\permanent\protected\def\btxcomma {\removeunwantedspaces,\space}
428\permanent\protected\def\btxserialcomma {\removeunwantedspaces,\space}
429\permanent\protected\def\btxellipsis {\removeunwantedspaces\nobreakspace\textellipsis\space}
430\permanent\protected\def\btxcommabreak {\removeunwantedspaces,\hskip\zeropoint plus .5\emwidth\relax}
431\permanent\protected\def\btxcolon {\removeunwantedspaces:\space}
432\permanent\protected\def\btxsemicolon {\removeunwantedspaces;\space}
433\permanent\protected\def\btxhyphen {\removeunwantedspaces}
434\permanent\protected\def\btxlparent {\removeunwantedspaces\space(}
435\permanent\protected\def\btxrparent {\removeunwantedspaces)\space}
436\permanent\protected\def\btxleftparenthesis {\removeunwantedspaces\space(}
437\permanent\protected\def\btxrightparenthesis {\removeunwantedspaces)\space}
438\permanent\protected\def\btxrightparenthesisperiod{\removeunwantedspaces).\space}
439\permanent\protected\def\btxrightparenthesiscomma {\removeunwantedspaces),\space}
440\permanent\protected\def\btxleftbracket {\removeunwantedspaces\space[}
441\permanent\protected\def\btxrightbracket {\removeunwantedspaces]\space}
442\permanent\protected\def\btxrightbracketperiod {\removeunwantedspaces].\space}
443\permanent\protected\def\btxrightbracketcomma {\removeunwantedspaces],\space}
444
445
446
447\mutable\lettonothing\currentbtxbacklink \permanent\protected\def\btxsetbacklink {\def\currentbtxbacklink}
448\mutable\lettonothing\currentbtxcategory \permanent\protected\def\btxsetcategory {\def\currentbtxcategory}
449\mutable\lettonothing\currentbtxcombis \permanent\protected\def\btxsetcombis {\def\currentbtxcombis}
450\mutable\lettonothing\currentbtxdataset \permanent\protected\def\btxsetdataset {\def\currentbtxdataset}
451\mutable\lettonothing\currentbtxfirst \permanent\protected\def\btxsetfirst {\def\currentbtxfirst}
452\mutable\lettonothing\currentbtxsecond \permanent\protected\def\btxsetsecond {\def\currentbtxsecond}
453\mutable\lettonothing\currentbtxsuffix \permanent\protected\def\btxsetsuffix {\def\currentbtxsuffix}
454\mutable\lettonothing\currentbtxinternal \permanent\protected\def\btxsetinternal {\def\currentbtxinternal}
455\mutable\lettonothing\currentbtxlefttext \permanent\protected\def\btxsetlefttext {\def\currentbtxlefttext}
456\mutable\lettonothing\currentbtxrighttext \permanent\protected\def\btxsetrighttext {\def\currentbtxrighttext}
457\mutable\lettonothing\currentbtxbefore \permanent\protected\def\btxsetbefore {\def\currentbtxbefore}
458\mutable\lettonothing\currentbtxafter \permanent\protected\def\btxsetafter {\def\currentbtxafter}
459\mutable\lettonothing\currentbtxlanguage \permanent\protected\def\btxsetlanguage {\def\currentbtxlanguage}
460\mutable\lettonothing\currentbtxtag \permanent\protected\def\btxsettag {\def\currentbtxtag}
461\mutable\lettonothing\currentbtxnumber \permanent\protected\def\btxsetnumber {\def\currentbtxnumber}
462\mutable\lettonothing\currentbtxfirstinternal \permanent\protected\def\btxsetfirstinternal{\def\currentbtxfirstinternal}
463\mutable\lettonothing\currentbtxlastinternal \permanent\protected\def\btxsetlastinternal {\def\currentbtxlastinternal}
464
465\mutable\let\currentbtxauthorvariant\v!normal \permanent\protected\def\btxsetauthorvariant{\def\currentbtxauthorvariant}
466
467\mutable\lettonothing\currentbtxfirstnames \permanent\protected\def\btxsetfirstnames {\let\currentbtxfirstnames\currentbtxfirstnamesindeed}
468\mutable\lettonothing\currentbtxinitials \permanent\protected\def\btxsetinitials {\let\currentbtxinitials \currentbtxinitialsindeed }
469\mutable\lettonothing\currentbtxjuniors \permanent\protected\def\btxsetjuniors {\let\currentbtxjuniors \currentbtxjuniorsindeed }
470\mutable\lettonothing\currentbtxsurnames \permanent\protected\def\btxsetsurnames {\let\currentbtxsurnames \currentbtxsurnamesindeed }
471\mutable\lettonothing\currentbtxvons \permanent\protected\def\btxsetvons {\let\currentbtxvons \currentbtxvonsindeed }
472
473\newconstant\currentbtxoverflow \permanent\protected\def\btxsetoverflow #1{\currentbtxoverflow #1\relax}
474\newconstant\currentbtxconcat \permanent\protected\def\btxsetconcat #1{\currentbtxconcat #1\relax}
475\newconstant\currentbtxcount \permanent\protected\def\btxsetcount #1{\currentbtxcount #1\relax}
476\newconstant\currentbtxauthorindex
477\newconstant\currentbtxauthorcount
478\newconstant\currentbtxauthorstate \permanent\protected\def\btxsetauthorstate#1{\currentbtxauthorstate#1\relax}
479
480\protected\def\currentbtxfirstnamesindeed{\clf_btxcurrentfirstnames\numexpr\currentbtxauthorindex\relax}
481\protected\def\currentbtxinitialsindeed {\clf_btxcurrentinitials \numexpr\currentbtxauthorindex\relax}
482\protected\def\currentbtxjuniorsindeed {\clf_btxcurrentjuniors \numexpr\currentbtxauthorindex\relax}
483\protected\def\currentbtxsurnamesindeed {\clf_btxcurrentsurnames \numexpr\currentbtxauthorindex\relax}
484\protected\def\currentbtxvonsindeed {\clf_btxcurrentvons \numexpr\currentbtxauthorindex\relax}
485
486\mutable\lettonothing\currentbtxfirstpage \permanent\protected\def\btxsetfirstpage#1{\def\currentbtxfirstpage{\btx_page_number{#1}}}
487\mutable\lettonothing\currentbtxlastpage \permanent\protected\def\btxsetlastpage #1{\def\currentbtxlastpage {\btx_page_number{#1}}}
488
489\mutable\lettonothing\currentbtxfield
490\mutable\lettonothing\currentbtxfielddoi
491\mutable\lettonothing\currentbtxfieldmonth
492\mutable\lettonothing\currentbtxfieldyear
493\mutable\lettonothing\currentbtxfieldurl
494\mutable\lettonothing\currentbtxcriterium
495\mutable\lettonothing\currentbtxlist
496\mutable\lettonothing\currentbtxlistentry
497\mutable\lettonothing\currentbtxlistindex
498\mutable\lettonothing\currentbtxreference
499\mutable\lettonothing\currentbtxrenderingtitle
500\mutable\lettonothing\currentbtxcitetag
501
502\mutable\def\currentbtxauthorvariant{normal}
503
504\protected\def\btx_reset_list
505 {\lettonothing\currentbtxcombis
506 \lettonothing\currentbtxcategory
507 \lettonothing\currentbtxinternal
508 \lettonothing\currentbtxlefttext
509 \lettonothing\currentbtxrighttext
510 \lettonothing\currentbtxbefore
511 \lettonothing\currentbtxafter
512 \lettonothing\currentbtxbacklink
513 \lettonothing\currentbtxlanguage
514 \lettonothing\currentbtxsuffix
515
516
517 \lettonothing\currentbtxnumber}
518
519\protected\def\btx_reset_cite
520 {\lettonothing\currentbtxfirst
521 \lettonothing\currentbtxsecond
522 \lettonothing\currentbtxsuffix
523 \lettonothing\currentbtxinternal
524 \lettonothing\currentbtxlefttext
525 \lettonothing\currentbtxrighttext
526 \lettonothing\currentbtxbefore
527 \lettonothing\currentbtxafter
528 \lettonothing\currentbtxbacklink
529 \lettonothing\currentbtxlanguage
530
531
532 \lettonothing\currentbtxnumber
533 \setconstant\currentbtxoverflow\zerocount
534 \setconstant\currentbtxconcat\zerocount
535 \setconstant\currentbtxcount\zerocount}
536
537\protected\def\btx_reset_page
538 {\lettonothing\currentbtxfirstpage
539 \lettonothing\currentbtxlastpage
540 \lettonothing\currentbtxfirstinternal
541 \lettonothing\currentbtxlastinternal
542 \setconstant\currentbtxoverflow\zerocount
543 \setconstant\currentbtxconcat\zerocount
544 \setconstant\currentbtxcount\zerocount}
545
546\protected\def\btx_reset_numbering
547 {\lettonothing\currentbtxfirst
548 \lettonothing\currentbtxsecond
549 \lettonothing\currentbtxsuffix
550 \setconstant\currentbtxconcat\zerocount}
551
552
553
554\protected\def\btx_page_number#1
555 {\def\currentlistindex{#1}
556 \structurelistpagenumber}
557
558
559
560\mutable\def\mainbtxlanguage{\currentmainlanguage}
561
562\protected\def\btx_check_language
563 {\let\mainbtxlanguage\currentlanguage
564 \ifempty\currentbtxlanguage
565 \let\currentbtxlanguage\currentlanguage
566 \else
567 \btx_check_language_indeed
568 \fi}
569
570\protected\def\btx_check_language_indeed
571 {\edef\currentbtxlanguage{\reallanguagetag\currentbtxlanguage}
572 \ifempty\currentbtxlanguage
573 \let\currentbtxlanguage\currentlanguage
574 \orelse\ifx\currentbtxlanguage\currentlanguage\else
575 \setcurrentlanguage\currentmainlanguage\currentbtxlanguage
576 \fi}
577
578
579
580\newconditional\c_btx_trace
581
582\installtextracker
583 {btxrendering}
584 {\c_btx_trace\conditionaltrue}
585 {\c_btx_trace\conditionalfalse}
586
587
588
589\permanent\protected\def\btxtodo#1{[#1]}
590
591
592
593\newdimension\d_publ_number_width
594
595\ifdefined\btxblock \else \newinteger\btxblock \fi \btxblock\plusone
596\ifdefined\btxcitecounter \else \newinteger\btxcitecounter \fi
597
598\newtoks\everysetupbtxlistplacement
599\newtoks\everysetupbtxciteplacement
600
601\definelist
602 [\s!btx]
603
604\setuplist
605 [\s!btx]
606 [\c!prefixstopper=:,
607 \c!state=\v!start,
608 \c!alternative=a,
609 \c!interaction=\v!none,
610
611
612
613 \c!before=\blank,
614 \c!after=\blank]
615
616\permanent\tolerant\protected\def\setupbtxlist[#1]#*[#2]
617 {\ifarguments\or
618 \setuplist[\s!btx][#1]
619 \or
620 \setuplist[\s!btx:#1][#2]
621 \fi}
622
623\appendtoks
624 \ifempty\currentbtxrenderingparent
625 \definelist
626 [\s!btx:\currentbtxrendering]
627 [\s!btx]
628 \orelse\ifx\currentbtxrenderingparent\s!btx
629 \definelist
630 [\s!btx:\currentbtxrendering]
631 [\s!btx]
632 \else
633 \definelist
634 [\s!btx:\currentbtxrendering]
635 [\s!btx:\currentbtxrenderingparent]
636 \fi
637\to \everydefinebtxrendering
638
639\newconditional\c_btx_list_texts
640
641\appendtoks
642 \ifcstok{\btxrenderingparameter\c!textstate}\v!start
643 \c_btx_list_texts\conditionaltrue
644 \else
645 \c_btx_list_texts\conditionalfalse
646 \fi
647\to \everysetupbtxlistplacement
648
649\newconditional\c_btx_list_pages
650
651\appendtoks
652 \ifcstok{\btxrenderingparameter\c!pagestate}\v!start
653 \c_btx_list_pages\conditionaltrue
654 \else
655 \c_btx_list_pages\conditionalfalse
656 \fi
657\to \everysetupbtxlistplacement
658
659\protected\def\btx_entry_inject_pages
660 {\dontleavehmode
661 \begingroup
662 \setbtxlist
663 \btx_reset_page
664 \setbtxparameterset\s!list\s!page
665 \btxparameter\c!command
666 {\usebtxstyleandcolor\c!style\c!color
667 \btxparameter\c!left
668 \clf_btxflushpages{\currentbtxdataset}{\currentbtxtag}
669 \btxparameter\c!right}
670 \endgroup}
671
672\permanent\protected\def\btxpagesetup#1
673 {\begingroup
674 \publ_fast_setup\plusfive\s!list\s!page
675 \endgroup
676 \btx_reset_page}
677
678\permanent\protected\def\btxnumberingsetup#1
679 {\begingroup
680 \dostarttagged\t!listtag\empty
681 \setbtxparameterset{\c!list:\s!numbering}\currentbtxnumbering
682 \btxparameter\c!left
683 \publ_fast_setup\plusthree{\s!list:\s!numbering}{#1}
684 \btxparameter\c!right
685 \dostoptagged
686 \endgroup
687 \btx_reset_numbering}
688
689
690
691\permanent\protected\def\btxflushlisttext
692 {\begingroup
693 \usebtxstyleandcolor\c!style\c!color
694 \ignorespaces
695 \publ_fast_setup\plusfour\s!list\currentbtxcategory
696 \removeunwantedspaces
697 \endgroup}
698
699\permanent\protected\def\btxflushlistcombis
700 {\begingroup
701 \processcommacommand[\currentbtxcombis]\btx_entry_inject_combi
702 \endgroup}
703
704\def\btx_entry_inject_list_text
705 {\publ_fast_setup\plusfour\s!list\s!text}
706
707\ifdefined\dotagpublication \else \aliased\let\dotagpublication\gobbletwoarguments \fi
708
709\protected\def\btx_entry_inject
710 {\begingroup
711 \dostarttagged\t!publication\empty
712 \dotagpublication\currentbtxdataset\currentbtxtag
713 \redoconvertfont
714 \edef\currentbtxcategory{\btxrawfield{category}}
715 \ignorespaces
716 \ifconditional\c_btx_list_texts
717 \dostarttagged\t!listtext\s!left
718 \currentbtxbefore
719 \dostoptagged
720 \fi
721
722 \btx_entry_inject_list_text
723
724 \ifconditional\c_btx_list_pages
725 \dostarttagged\t!listpage\empty
726 \btx_entry_inject_pages
727 \dostoptagged
728 \fi
729 \ifconditional\c_btx_list_texts
730 \dostarttagged\t!listtext\s!right
731 \currentbtxafter
732 \dostoptagged
733 \fi
734 \dostoptagged
735 \endgroup}
736
737\permanent\tolerant\protected\def\btxshowentryinline[#1]#*[#2]
738 {\ifarguments
739 \ctxcommand{showbtxentry("\currentbtxdataset","\currentbtxtag")}
740 \or
741 \ctxcommand{showbtxentry("\currentbtxdataset","#1")}
742 \or
743 \ctxcommand{showbtxentry("#1","#2")}
744 \fi}
745
746\permanent\protected\def\btxstartcombientry
747 {\begingroup}
748
749\permanent\protected\def\btxstopcombientry
750 {\endgroup}
751
752\permanent\protected\def\btxhandlecombientry
753 {\btx_reference_indeed}
754
755\def\btx_entry_inject_combi#1
756 {\begingroup
757 \def\currentbtxtag{#1}
758 \ignorespaces
759 \publ_fast_setup\plusfour\s!list\currentbtxcategory
760 \removeunwantedspaces
761 \endgroup}
762
763
764
765
766
767
768
769
770
771
772
773
774
775\newtoks\everybtxlistrendering
776
777\appendtoks
778 \setbtxlist
779
780 \edef\currentbtxcriterium{\btxrenderingparameter\c!criterium}
781 \ifempty\currentbtxcriterium
782 \let\currentbtxcriterium\v!previous
783 \orelse\ifx\currentbtxcriterium\v!cite
784 \let\currentbtxcriterium\v!here
785 \fi
786
787 \iflocation
788 \resetinteractionparameter\c!style
789
790
791 \fi
792\to \everybtxlistrendering
793
794\mutable\let\nofbtxlistentries \!!zerocount
795\mutable\let\currentbtxlistentry\!!zerocount
796\mutable\let\currentbtxlistindex\!!zerocount
797
798\newconditional\c_publ_prefixed
799
800\permanent\protected\def\btxsetnoflistentries #1{\edef\nofbtxlistentries {#1}}
801\permanent\protected\def\btxsetcurrentlistentry#1{\edef\currentbtxlistentry{#1}}
802\permanent\protected\def\btxsetcurrentlistindex#1{\edef\currentbtxlistindex{#1}}
803
804\permanent\protected\def\btxdoifelsesameaspreviouschecked#1#2
805 {\clf_btxdoifelsesameasprevious
806 {\currentbtxdataset}
807 \currentbtxlistentry
808 {#2}
809 \c_btx_list_reference
810 {#1}}
811
812\permanent\protected\def\btxdoifelsesameasprevious
813 {\btxdoifelsesameaspreviouschecked\v!doublesided}
814
815\permanent\protected\def\btxdoifelsecombiinlist#1#2
816 {\clf_btxdoifelsecombiinlist{#1}{#2}}
817
818\permanent\protected\def\btxdoifelsecitedone#1#2
819 {\clf_btxdoifelsecitedone{#1}{#2}}
820
821\aliased\let\btxdoifsameaspreviouscheckedelse\btxdoifelsesameaspreviouschecked
822\aliased\let\btxdoifsameaspreviouselse \btxdoifelsesameasprevious
823\aliased\let\btxdoifcombiinlistelse \btxdoifelsecombiinlist
824\aliased\let\btxdoifcitedoneelse \btxdoifelsecitedone
825
826\tolerant\def\publ_place_list_indeed#1#2#*[#3]#*[#4]
827 {\begingroup
828 \ifparameters\or\or
829 \let\currentbtxrendering\currentbtxspecification
830 \or
831 \ifhastok={#3}
832
833 \let\currentbtxrendering\currentbtxspecification
834 \setupcurrentbtxrendering[#3]
835 \edef\p_specification{\btxrenderingparameter\c!specification}
836 \ifempty\p_specification\else
837 \let\currentbtxspecification\p_specification
838 \let\currentbtxrendering\currentbtxspecification
839 \fi
840 \else
841 \edef\currentbtxrendering{#3}
842 \edef\p_specification{\btxrenderingparameter\c!specification}
843 \ifempty\p_specification\else
844 \let\currentbtxspecification\p_specification
845 \fi
846 \fi
847 \or
848
849 \edef\currentbtxrendering{#3}
850 \setupcurrentbtxrendering[#4]
851 \edef\p_specification{\btxrenderingparameter\c!specification}
852 \ifempty\p_specification\else
853 \let\currentbtxspecification\p_specification
854 \fi
855 \fi
856 \setbtxparameterset\currentbtxspecification\s!list
857 \expand\everybtxlistrendering
858 \ifconditional#1\relax
859 \edef\currentbtxrenderingtitle{\btxrenderingparameter\c!title}
860 \ifempty\currentbtxrenderingtitle
861 \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbtxrendering,\c!title={\headtext{\currentbtxrendering}}]}
862 \else
863 \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbtxrendering,\c!title={\currentbtxrenderingtitle}]}
864 \fi
865 \fi
866 \ifempty\currentbtxrendering
867 \setbtxrendering
868 \fi
869 \edef\currentbtxdataset{\btxrenderingparameter\c!dataset}
870 \uselanguageparameter\btxdatasetparameter
871 \setbtxlist
872 \expand\everystructurelist
873 \expand\everysetupbtxlistplacement
874
875
876 \clf_btxcollectlistentries
877 names {\s!btx}
878 criterium {\currentbtxcriterium}
879 reference {\btxrenderingparameter\c!reference}
880 method {\btxrenderingparameter\c!method}
881 dataset {\currentbtxdataset}
882 keyword {\btxrenderingparameter\c!keyword}
883 sorttype {\btxrenderingparameter\c!sorttype}
884 repeated {\btxrenderingparameter\c!repeat}
885 ignored {\btxrenderingparameter\c!ignore}
886 group {\btxrenderingparameter\c!group}
887 filter {\btxrenderingparameter\c!filter}
888 filename {\btxrenderingparameter\c!file}
889 \relax
890 \ifnum\nofbtxlistentries>\zerocount
891 \clf_btxpreparelistentries{\currentbtxdataset}
892 \forgetall
893 \btxrenderingparameter\c!before
894 \ifconditional#2\relax
895 \edef\p_command{\btxrenderingparameter\c!command}
896 \ifempty\p_command
897 \edef\p_setups{\btxrenderingparameter\c!setups}
898 \ifempty\p_setups
899 \else
900 \directsetup{\p_setups}
901 \fi
902 \else
903 \expandafter\p_command\expandafter{\number\nofbtxlistentries}\relax
904 \fi
905 \else
906 \dostarttagged\t!publications\currentbtxrendering
907 \dostarttagged\t!list{btx}
908 \startpacked[\v!blank]
909
910
911 \ifempty\currentbtxnumbering \else
912 \edef\p_width{\listparameter\c!width}
913 \ifx\p_width\v!auto
914 \setbox\scratchbox\vbox \bgroup
915 \settrialtypesetting
916 \clf_btxfetchlistentries{\currentbtxdataset}
917 \egroup
918 \d_publ_number_width\wd\scratchbox
919 \letlistparameter\c!width\d_publ_number_width
920 \fi
921 \fi
922 \ifcstok{\listparameter\c!prefix}\v!yes
923 \c_publ_prefixed\conditionaltrue
924 \else
925 \c_publ_prefixed\conditionalfalse
926 \fi
927
928
929 \dorecurse\nofbtxlistentries
930 {\let\currentbtxlistentry\recurselevel
931 \clf_btxflushlistentry{\currentbtxdataset}\currentbtxlistentry\relax}
932 \stoppacked
933 \dostoptagged
934 \dostoptagged
935 \fi
936 \btxrenderingparameter\c!after
937 \fi
938 \ifconditional#1\relax
939 \stopnamedsection
940 \fi
941 \global\advanceby\btxblock\plusone
942 \endgroup}
943
944\permanent\protected\def\placebtxrendering {\publ_place_list_indeed\conditionalfalse\conditionalfalse}
945\permanent\protected\def\completebtxrendering {\publ_place_list_indeed\conditionaltrue \conditionalfalse}
946\permanent\protected\def\flushbtxrendering {\publ_place_list_indeed\conditionalfalse\conditionaltrue }
947
948\aliased\let\completelistofpublications\completebtxrendering
949\aliased\let\placelistofpublications \placebtxrendering
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\permanent\protected\def\btxsetlisttag#1
982 {\clf_btxflushlisttag{\currentbtxdataset}#1\relax}
983
984\newinteger\c_btx_list_index
985
986\lettonothing\m_btx_list_action
987
988\def\publ_flush_list_step_command
989 {\btxsetlisttag{\c_btx_list_index}
990 \expandafter\m_btx_list_action\expandafter{\currentbtxtag}
991 \ifnum\c_btx_list_index<\nofbtxlistentries
992 \advanceby\c_btx_list_index\plusone
993 \expandafter\publ_flush_list_step_command
994 \else
995 \glet\m_btx_list_action\relax
996 \fi}
997
998\def\publ_flush_list_step_setup
999 {\btxsetlisttag{\c_btx_list_index}
1000 \directsetup{\m_btx_list_action}
1001 \ifnum\c_btx_list_index<\nofbtxlistentries
1002 \advanceby\c_btx_list_index\plusone
1003 \expandafter\publ_flush_list_step_setup
1004 \else
1005 \glet\m_btx_list_action\relax
1006 \fi}
1007
1008\permanent\protected\def\flushbtxentries[#1]
1009 {\begingroup
1010 \getdummyparameters[\c!command=,\c!setups=,#1]
1011 \xdef\m_btx_list_action{\dummyparameter\c!command}
1012 \ifempty\m_btx_list_action
1013 \xdef\m_btx_list_action{\dummyparameter\c!setups}
1014 \ifempty\m_btx_list_action
1015 \endgroup
1016 \c_btx_list_index\zerocount
1017 \else
1018 \endgroup
1019 \c_btx_list_index\plusone
1020 \doubleexpandafter\publ_flush_list_step_command
1021 \fi
1022 \else
1023 \endgroup
1024 \c_btx_list_index\plusone
1025 \expandafter\publ_flush_list_step_command
1026 \fi}
1027
1028
1029
1030\permanent\def\currentbtxblock{\number\btxblock}
1031
1032
1033
1034\permanent\protected\def\btxchecklistentry
1035 {\begingroup
1036
1037 \hbox{\btx_reference_checked}
1038 \par
1039 \endgroup}
1040
1041
1042
1043
1044
1045\installstructurelistprocessor{\s!btx}
1046 {\let\currentlistentrynumber \btx_reference_indeed
1047 \let\currentlistentrytitle \btx_entry_indeed
1048 \let\currentlistentrypagenumber\btx_page_indeed
1049 \strc_lists_apply_renderingsetup}
1050
1051\def\btx_entry_indeed
1052 {\dostarttagged\t!listcontent\empty
1053 \btx_list_reference_inject
1054 \btx_entry_inject
1055 \dostoptagged}
1056
1057\def\btx_page_indeed
1058 {}
1059
1060\permanent\protected\def\btxhandlelistentry
1061 {\strc_lists_entry_process}
1062
1063\permanent\protected\def\btxstartlistentry
1064 {\begingroup
1065 \global\advanceby\c_btx_list_reference\plusone}
1066
1067\permanent\protected\def\btxstoplistentry
1068 {\iftrialtypesetting
1069 \global\advanceby\c_btx_list_reference\minusone
1070 \fi
1071 \endgroup}
1072
1073\newtoks\everybtxlistentry
1074
1075\permanent\protected\def\btxlistsetup#1
1076 {\expand\everybtxlistentry
1077 \everybtxlistentry\emptytoks
1078 \publ_fast_setup\plusfour\s!list{#1}}
1079
1080\appendtoks
1081 \btx_check_language
1082\to \everybtxlistentry
1083
1084\protected\def\btx_reference_indeed
1085 {\begingroup
1086
1087 \setbtxparameterset{\c!list:\s!numbering}\currentbtxnumbering
1088
1089 \ifempty\currentbtxnumbering
1090
1091 \orelse\ifx\currentbtxnumbering\v!no
1092
1093 \else
1094 \usebtxstyleandcolor\c!style\c!color
1095 \ifconditional\c_publ_prefixed\btxlistprefixednumber\fi
1096 \clf_btxlistvariant
1097 {\currentbtxdataset}
1098 {\currentbtxblock}
1099 {\currentbtxtag}
1100 {\currentbtxnumbering}
1101 {\currentbtxnumber}
1102 \relax
1103 \fi
1104 \endgroup}
1105
1106\permanent\protected\def\btxlistprefixednumber
1107 {\clf_listprefixednumber
1108 {\currentlist}
1109 \currentbtxlistindex
1110 {
1111 prefix {\listparameter\c!prefix}
1112 separatorset {\listparameter\c!prefixseparatorset}
1113 conversionset {\listparameter\c!prefixconversionset}
1114 starter {\listparameter\c!prefixstarter}
1115 stopper {\listparameter\c!prefixstopper}
1116 set {\listparameter\c!prefixset}
1117 segments {\listparameter\c!prefixsegments}
1118 connector {\listparameter\c!prefixconnector}
1119 }
1120 \relax}
1121
1122\protected\def\btx_reference_checked
1123 {\dontleavehmode\hbox\bgroup
1124 \btx_reference_indeed
1125 \egroup}
1126
1127\newinteger\c_btx_list_reference
1128
1129\protected\def\btx_list_reference_inject
1130 {\dontleavehmode\begingroup
1131 \iftrialtypesetting\else
1132 \btx_list_reference_inject_now
1133 \fi
1134
1135 \endgroup}
1136
1137\def\btx_list_reference_inject_now
1138 {\strc_references_direct_full_user
1139 {\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi
1140 \s!btxref=\currentbtxtag,
1141 \s!btxspc=\currentbtxspecification,
1142 \s!btxlst=\the\c_btx_list_reference,
1143
1144 \ifempty\currentbtxbefore \else\s!btxbtx={\currentbtxbefore},\fi
1145 \ifempty\currentbtxafter \else\s!btxatx={\currentbtxafter },\fi
1146 \ifempty\currentbtxbacklink\else\s!btxint=\number\currentbtxbacklink\fi
1147 }
1148 {\s!btx::\v!list::\the\c_btx_list_reference}
1149 {\currentbtxnumber}}
1150
1151\newconditional\c_btx_cite_reference_injected
1152
1153\permanent\protected\def\btx_cite_reference_inject
1154 {\ifconditional\c_btx_cite_reference_injected \else
1155 \dontleavehmode
1156 \iftrialtypesetting \else
1157 \ifempty\currentbtxbacklink
1158
1159 \orelse\ifnum\currentbtxbacklink>\zerocount
1160 \btx_cite_reference_inject_indeed
1161 \c_btx_cite_reference_injected\conditionaltrue
1162 \fi
1163 \fi
1164 \fi}
1165
1166\newtoks\t_btx_reference_inject
1167
1168\def\btx_cite_reference_inject_indeed
1169 {\the\t_btx_reference_inject
1170 \strc_lists_inject_direct
1171 [\s!btx]
1172 [\c!type=\s!btx,\c!location=\v!here]
1173 [\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi
1174 \s!btxref=\currentbtxtag,
1175
1176 \ifempty\currentbtxbefore \else\s!btxbtx={\currentbtxbefore},\fi
1177 \ifempty\currentbtxafter \else\s!btxatx={\currentbtxafter },\fi
1178 \ifempty\currentbtxbacklink\else\s!btxint=\number\currentbtxbacklink,\fi
1179 \ifempty\currentbtxciteuservariables\else,\currentbtxciteuservariables\fi]}
1180
1181\permanent\def\currentbtxuservariable #1{\clf_btxuservariable {\currentbtxdataset}{#1}}
1182\permanent\def\btxdoifelseuservariable#1{\clf_btxdoifelseuservariable{\currentbtxdataset}{#1}}
1183
1184\aliased\let\btxdoifuservariableelse\btxdoifelseuservariable
1185
1186\aliased\let\btxcitereference\btx_cite_reference_inject
1187
1188\mutable\lettonothing\currentbtxnumbering
1189\mutable\lettonothing\currentbtxcitealternative
1190
1191\appendtoks
1192 \edef\currentbtxnumbering{\btxrenderingparameter\c!numbering}
1193 \ifx\currentbtxnumbering\v!yes
1194 \def\currentbtxnumbering{num}
1195 \letbtxrenderingparameter\c!numbering\currentbtxnumbering
1196 \letlistparameter\c!headnumber\v!always
1197 \orelse\ifx\currentbtxnumbering\v!no
1198 \letlistparameter\c!headnumber\v!no
1199 \lettonothing\currentbtxnumbering
1200
1201 \letlistparameter\c!symbol \v!none
1202 \letlistparameter\c!aligntitle \v!yes
1203 \letlistparameter\c!numbercommand\firstofoneargument
1204 \else
1205 \letlistparameter\c!headnumber\v!always
1206 \fi
1207 \let\currentlistmethod\s!btx
1208\to \everysetupbtxlistplacement
1209
1210\permanent\tolerant\protected\def\btxremapauthor[#1]#*[#2]
1211 {\clf_btxremapauthor{#1}{#2}}
1212
1213\permanent\protected\def\btxshowauthorremapping
1214 {\clf_btxshowauthorremapping}
1215
1216\permanent\protected\def\btxflushauthor
1217 {\doifelsenextoptionalcs\btx_flush_author_yes\btx_flush_author_nop}
1218
1219\permanent\protected\def\btxflushsuffix
1220 {\ifempty\currentbtxsuffix
1221
1222 \else
1223 \characters{\currentbtxsuffix}
1224 \fi}
1225
1226\def\btx_flush_author_yes[#1]{\btx_flush_author{#1}}
1227\def\btx_flush_author_nop {\btx_flush_author{\btxparameter\c!authorconversion}}
1228
1229\protected\def\btx_flush_author#1#2
1230 {\begingroup
1231 \edef\currentbtxfield{#2}
1232 \setbtxparameterset\s!list\currentbtxfield
1233
1234 \clf_btxauthor
1235 {\currentbtxdataset}
1236 {\currentbtxtag}
1237 {\currentbtxfield}
1238 {
1239 combiner {#1}
1240 kind {list}
1241 etallimit {\btxparameter\c!etallimit}
1242 etaldisplay {\btxparameter\c!etaldisplay}
1243 etaloption {\btxparameter\c!etaloption}
1244 symbol {\btxparameter{\c!stopper:initials}}
1245 connector {\btxparameter{\c!connector:initials}}
1246 }
1247 \relax
1248 \endgroup}
1249
1250
1251
1252\permanent\protected\def\btxflushauthorname {\btx_flush_author{name}}
1253\permanent\protected\def\btxflushauthornormal {\btx_flush_author{normal}}
1254\permanent\protected\def\btxflushauthornormalshort {\btx_flush_author{normalshort}}
1255\permanent\protected\def\btxflushauthorinverted {\btx_flush_author{inverted}}
1256\permanent\protected\def\btxflushauthorinvertedshort{\btx_flush_author{invertedshort}}
1257
1258\mutable\let\currentbtxauthorfield\s!author
1259
1260\permanent\protected\def\btxsetauthorfield#1{\edef\currentbtxauthorfield{#1}}
1261
1262\permanent\protected\def\currentbtxciteauthorbyfield
1263 {\begingroup
1264
1265
1266
1267 \setbtxparameterset\s!cite\currentbtxcitealternative
1268 \clf_btxauthor
1269 {\currentbtxdataset}
1270 {\currentbtxtag}
1271 {\currentbtxauthorfield}
1272 {
1273 combiner {\btxparameter\c!authorconversion}
1274 kind {cite}
1275 etallimit {\btxparameter\c!etallimit}
1276 etaldisplay {\btxparameter\c!etaldisplay}
1277 etaloption {\btxparameter\c!etaloption}
1278 symbol {\btxparameter{\c!stopper:initials}}
1279 }
1280 \relax
1281 \endgroup}
1282
1283\permanent\protected\def\currentbtxciteauthor
1284 {\let\currentbtxauthorfield\s!author
1285 \currentbtxciteauthorbyfield}
1286
1287\permanent\protected\def\btxstartauthor#1#2#3
1288 {\begingroup
1289 \currentbtxauthorindex#1\relax
1290 \currentbtxauthorcount#2\relax
1291 \currentbtxauthorstate#3\relax}
1292
1293\permanent\protected\def\btxstopauthor
1294 {\endgroup}
1295
1296\permanent\protected\def\btxciteauthorsetup#1{\fastsetup{\s!btx:\s!cite:\s!author:#1}}
1297\permanent\protected\def\btxlistauthorsetup#1{\fastsetup{\s!btx:\s!list:\s!author:#1}}
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316\newconditional\btxinteractive
1317\newconditional\btxinteractivenumber
1318\newconditional\btxinteractivetext
1319\newconditional\btxinteractivepage
1320
1321\mutable\lettonothing\currentbtxinteraction
1322
1323\installcorenamespace{btxinteraction}
1324
1325\defcsname\??btxinteraction\v!number\endcsname{\btxinteractivenumber\conditionaltrue}
1326\defcsname\??btxinteraction\v!text \endcsname{\btxinteractivetext\conditionaltrue}
1327\defcsname\??btxinteraction\v!page \endcsname{\btxinteractivepage\conditionaltrue}
1328\defcsname\??btxinteraction\v!all \endcsname{\btxinteractivenumber\conditionaltrue
1329 \btxinteractivetext\conditionaltrue
1330 \btxinteractivepage\conditionaltrue}
1331
1332
1333
1334
1335\appendtoks
1336 \iflocation
1337 \edef\currentbtxinteraction{\btxparameter\c!interaction}
1338 \ifx\currentbtxinteraction\v!stop
1339 \btxinteractive\conditionalfalse
1340 \else
1341 \enforced\lettonothing\structurelistlocation
1342 \btxinteractive\conditionaltrue
1343 \begincsname\??btxinteraction\currentbtxinteraction\endcsname
1344 \fi
1345 \else
1346 \btxinteractive\conditionalfalse
1347 \fi
1348\to \everysetupbtxlistplacement
1349
1350\appendtoks
1351 \iflocation
1352 \edef\currentbtxinteraction{\btxparameter\c!interaction}
1353 \ifx\currentbtxinteraction\v!stop
1354 \btxinteractive\conditionalfalse
1355 \else
1356 \btxinteractive\conditionaltrue
1357 \fi
1358 \else
1359 \btxinteractive\conditionalfalse
1360 \fi
1361\to \everysetupbtxciteplacement
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394\lettonothing\p_publ_cite_before
1395\lettonothing\p_publ_cite_after
1396\lettonothing\p_publ_cite_lefttext
1397\lettonothing\p_publ_cite_righttext
1398
1399\mutable\lettonothing\currentbtxciteuservariables
1400\mutable\lettonothing\currentbtxcitealternative
1401
1402\permanent\protected\def\btxhybridcite
1403 {\dontleavehmode
1404 \begingroup
1405 \strictdoifelsenextoptional\publ_cite_tags_options\publ_cite_tags_indeed}
1406
1407\protected\def\publ_cite_tags_options[#1]
1408 {\strictdoifelsenextoptional{\publ_cite_tags_options_indeed{#1}}{\publ_cite_tags_indeed{#1}}}
1409
1410\protected\def\publ_cite_tags_indeed#1
1411 {\resetinteractionparameter\c!style
1412 \setbtxparametersetroot\s!cite
1413 \edef\currentbtxcitealternative{\btxparameter\c!alternative}
1414 \setbtxparameterset\s!cite\currentbtxcitealternative
1415 \edef\currentbtxcitetag{#1}
1416 \expand\everysetupbtxciteplacement
1417 \publ_cite_variant
1418 \endgroup}
1419
1420\protected\def\publ_cite_tags_options_indeed#1
1421 {\doifelseassignment{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}}
1422
1423\def\publ_cite_tags_settings_indeed#1[#2]
1424 {\resetinteractionparameter\c!style
1425
1426 \resetdummyparameter\c!reference
1427 \resetdummyparameter\c!alternative
1428 \resetdummyparameter\c!before
1429 \resetdummyparameter\c!after
1430 \resetdummyparameter\c!lefttext
1431 \resetdummyparameter\c!righttext
1432 \getdummyparameters[#1]
1433 \edef\p_reference{\dummyparameter\c!reference}
1434 \ifempty\p_reference
1435 \edef\currentbtxcitetag{#2}
1436 \else
1437 \let\currentbtxcitetag\p_reference
1438 \edef\currentbtxciteuservariables{#2}
1439 \fi
1440 \edef\p_specification{\dummyparameter\c!specification}
1441 \ifempty\p_specification
1442 \else
1443 \let\currentbtxspecification\p_specification
1444 \fi
1445 \edef\p_alternative{\dummyparameter\c!alternative}
1446 \ifempty\p_alternative
1447 \setbtxparametersetroot\s!cite
1448 \edef\currentbtxcitealternative{\btxparameter\c!alternative}
1449 \else
1450 \let\currentbtxcitealternative\p_alternative
1451 \fi
1452 \setbtxparameterset\s!cite\currentbtxcitealternative
1453 \setupcurrentbtx[#1]
1454
1455 \edef\p_publ_cite_before {\dummyparameter\c!before}
1456 \edef\p_publ_cite_after {\dummyparameter\c!after}
1457 \edef\p_publ_cite_lefttext {\dummyparameter\c!lefttext}
1458 \edef\p_publ_cite_righttext{\dummyparameter\c!righttext}
1459
1460 \expand\everysetupbtxciteplacement
1461 \publ_cite_variant
1462 \endgroup}
1463
1464\def\publ_cite_tags_variants_indeed#1[#2]
1465 {\resetinteractionparameter\c!style
1466 \edef\currentbtxcitealternative{#1}
1467 \edef\currentbtxcitetag{#2}
1468 \setbtxparameterset\s!cite\currentbtxcitealternative
1469 \expand\everysetupbtxciteplacement
1470 \publ_cite_variant
1471 \endgroup}
1472
1473\newconditional\btxcitecompress
1474
1475\mutable\let\currentbtxcitemethod\v!hidden
1476
1477\def\publ_cite_variant
1478 {\begingroup
1479 \publ_cite_handle_variant_indeed[\currentbtxcitetag]}
1480
1481\protected\def\publ_cite_handle_variant#1
1482 {\begingroup
1483 \edef\currentbtxcitealternative{#1}
1484 \setbtxparameterset\s!cite\currentbtxcitealternative
1485 \expand\everysetupbtxciteplacement
1486 \publ_cite_handle_variant_indeed}
1487
1488\permanent\protected\def\publ_cite_handle_variant_blob
1489 {\clf_btxhandlecite
1490 dataset {\currentbtxdataset}
1491 reference {\currentbtxreference}
1492 method {\currentbtxcitemethod}
1493 variant {\currentbtxcitealternative}
1494 sorttype {\btxparameter\c!sorttype}
1495 compress {\btxparameter\c!compress}
1496 author {\btxparameter\c!author}
1497 authorconversion {\c!authorconversion}
1498 lefttext {\p_publ_cite_lefttext}
1499 righttext {\p_publ_cite_righttext}
1500 before {\p_publ_cite_before}
1501 after {\p_publ_cite_after}
1502 \relax
1503 \iftrialtypesetting\else
1504
1505 \fi}
1506
1507\aliased\let\dobtxcitevariantblob\publ_cite_handle_variant_blob
1508
1509\tolerant\def\publ_cite_handle_variant_indeed[#1]
1510 {\letbtxparameter\c!alternative\currentbtxcitealternative
1511 \edef\currentbtxreference{#1}
1512 \saverunningstyleandcolor
1513 \usebtxstyleandcolor\c!style\c!color
1514 \uselanguageparameter\btxdatasetparameter
1515 \btxparameter\c!left
1516 \btxparameter\c!command{\dobtxcitevariantblob}
1517 \btxparameter\c!right
1518 \endgroup}
1519
1520\permanent\protected\def\btxlistcitation {\publ_citation\v!list}
1521\permanent\protected\def\btxtextcitation {\publ_citation\v!text}
1522\permanent\protected\def\btxalwayscitation{\publ_citation\v!always}
1523
1524\tolerant\def\publ_citation#1[#2]#,[#3]
1525 {\dontleavehmode
1526 \begingroup
1527 \let\currentbtxcitemethod#1
1528 \ifparameter#3\or
1529 \publ_cite_tags_options_indeed{#2}[#3]
1530 \else
1531 \publ_cite_tags_indeed{#2}
1532 \fi}
1533
1534\permanent\tolerant\protected\def\btxhiddencitation[#1]
1535 {\iftrialtypesetting \else
1536 \begingroup
1537 \let\currentbtxcitemethod\v!hidden
1538 \edef\currentbtxreference{#1}
1539 \clf_btxhandlenocite
1540 method {\currentbtxcitemethod}
1541 dataset {\currentbtxdataset}
1542 reference {\currentbtxreference}
1543 \relax
1544
1545 \endgroup
1546 \fi}
1547
1548
1549
1550
1551\permanent\protected\def\currentbtxmissingreference
1552 {\clf_btxmissing{\currentbtxdataset}{\currentbtxreference}}
1553
1554\permanent\protected\def\btxmissing#1
1555 {\dontleavehmode{\tttf<\clf_btxmissing{\currentbtxdataset}{#1}>}}
1556
1557
1558
1559\aliased\let\hiddencitation\btxhiddencitation \aliased\let\hiddencite\hiddencitation
1560\aliased\let\listcitation \btxlistcitation \aliased\let\listcite \listcitation
1561\aliased\let\textcitation \btxtextcitation \aliased\let\textcite \textcitation
1562\aliased\let\alwayscitation\btxalwayscitation \aliased\let\alwayscite\alwayscitation
1563
1564\permanent\protected\def\citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
1565\permanent\protected\def\nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
1566
1567\aliased\let\cite \citation
1568\aliased\let\nocite \nocitation
1569\aliased\let\usecitation\nocitation
1570
1571\protected\def\publ_entry_citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
1572\protected\def\publ_entry_nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
1573
1574\appendtoks
1575 \enforced\let\cite \publ_entry_citation
1576 \enforced\let\nocite\publ_entry_nocitation
1577\to \everybtxlistrendering
1578
1579\permanent\protected\def\btxdirectlistcite #1{\btxlistcitation [#1]\relax}
1580\permanent\protected\def\btxdirecthiddencite#1{\btxhiddencitation[#1]\relax}
1581
1582
1583
1584
1585\defcsname\??setup:\s!btx:\s!unknown\endcsname#1{\inframed{\tttf#1}}
1586
1587\def\publ_fast_setup_yes#1#2
1588 {\csname\??setup:\s!btx:
1589 \ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname
1590 \currentbtxspecification:#1:#2
1591 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname
1592 \currentbtxspecificationfallback:#1:#2
1593 \orelse\ifcsname\??setup:\s!btx:#1:#2\endcsname
1594 #1:#2
1595 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname
1596 \currentbtxspecification:#1:\s!unknown
1597 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname
1598 \currentbtxspecificationfallback:#1:\s!unknown
1599 \else
1600 #1:\s!unknown
1601 \fi
1602 \endcsname{#2}}
1603
1604\def\publ_fast_setup_nop#1#2
1605 {\csname\??setup:\s!btx:
1606 \ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname
1607 \currentbtxspecification:#1:#2
1608 \orelse\ifcsname\??setup:\s!btx:#1:#2\endcsname
1609 #1:#2
1610 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname
1611 \currentbtxspecification:#1:\s!unknown
1612 \else
1613 #1:\s!unknown
1614 \fi
1615 \endcsname{#2}}
1616
1617\newconstant\btxsetuptype
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627\protected\def\publ_fast_btx_setup_chain_inbetween{\allowbreak>\allowbreak}
1628\protected\def\publ_fast_btx_setup_colon_inbetween{\allowbreak :\allowbreak}
1629
1630\protected\def\publ_fast_btx_setup_chain_yes#1#2
1631 {\dontleavehmode\begingroup
1632 \enforced\let\:\publ_fast_btx_setup_colon_inbetween
1633 \infofont
1634 \ifcase\btxsetuptype\darkred\or\darkblue\or\darkgreen\or\darkcyan\or\darkmagenta\else\darkred\fi
1635 [\prewordbreak
1636 \currentbtxspecification \:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
1637 \publ_fast_btx_setup_chain_inbetween
1638 \currentbtxspecificationfallback\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname\else
1639 \publ_fast_btx_setup_chain_inbetween
1640 #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
1641 \publ_fast_btx_setup_chain_inbetween
1642 \currentbtxspecification \:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
1643 \publ_fast_btx_setup_chain_inbetween
1644 \currentbtxspecificationfallback\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname\else
1645 \publ_fast_btx_setup_chain_inbetween
1646 unset\fi\fi\fi\fi\fi
1647 \space @\space
1648 \currentbtx
1649 \prewordbreak]
1650 \endgroup}
1651
1652\protected\def\publ_fast_btx_setup_chain_nop#1#2
1653 {\dontleavehmode\begingroup
1654 \enforced\let\:\publ_fast_btx_setup_colon_inbetween
1655 \infofont
1656 \darkred
1657 [\prewordbreak
1658 \currentbtxspecification\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
1659 \publ_fast_btx_setup_chain_inbetween
1660 #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
1661 \publ_fast_btx_setup_chain_inbetween
1662 \currentbtxspecification\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
1663 \publ_fast_btx_setup_chain_inbetween
1664 unset\fi\fi\fi
1665 \space @\space
1666 \currentbtx
1667 \prewordbreak]
1668 \endgroup}
1669
1670\protected\def\publ_fast_btx_setup_normal#1
1671 {\btxsetuptype#1\relax
1672 \ifempty\currentbtxspecificationfallback
1673 \expandafter\publ_fast_setup_nop
1674 \else
1675 \expandafter\publ_fast_setup_yes
1676 \fi}
1677
1678\protected\def\publ_fast_btx_setup_visual#1#2#3
1679 {\btxsetuptype#1\relax
1680 \ifempty\currentbtxspecificationfallback
1681 \expandafter\publ_fast_btx_setup_chain_nop
1682 \else
1683 \expandafter\publ_fast_btx_setup_chain_yes
1684 \fi{#2}{#3}
1685 \ifempty\currentbtxspecificationfallback
1686 \expandafter\publ_fast_setup_nop
1687 \else
1688 \expandafter\publ_fast_setup_yes
1689 \fi{#2}{#3}}
1690
1691\installtextracker
1692 {publications.setups}
1693 {\let\publ_fast_setup\publ_fast_btx_setup_visual}
1694 {\let\publ_fast_setup\publ_fast_btx_setup_normal}
1695
1696\let\publ_fast_setup\publ_fast_btx_setup_normal
1697
1698
1699
1700\newtoks\everybtxciteentry
1701
1702\prependtoks
1703 \c_btx_cite_reference_injected\conditionalfalse
1704\to \everybtxciteentry
1705
1706\permanent\protected\def\btxcitesetup#1
1707 {\expand\everybtxciteentry
1708 \everybtxciteentry\emptytoks
1709 \publ_fast_setup\plusone\s!cite{#1}}
1710
1711\permanent\protected\def\btxsubcitesetup#1
1712 {\expand\everybtxciteentry
1713 \everybtxciteentry\emptytoks
1714 \publ_fast_setup\plustwo\s!cite{#1}}
1715
1716\appendtoks
1717 \btx_check_language
1718\to \everybtxciteentry
1719
1720\permanent\protected\def\btxstartsubcite#1
1721 {\begingroup
1722 \btx_reset_cite
1723
1724 \def\currentbtxcitealternative{#1}
1725 \setbtxparameterset\s!cite\currentbtxcitealternative
1726 \usebtxstyleandcolor\c!style\c!color
1727 \btxparameter\c!left
1728 \relax}
1729
1730\permanent\protected\def\btxstopsubcite
1731 {\relax
1732 \btxparameter\c!right
1733 \endgroup}
1734
1735\permanent\protected\def\btxstartciterendering[#1]
1736 {\begingroup
1737 \edef\currentbtxcitealternative{#1}
1738 \setbtxparameterset\s!cite\currentbtxcitealternative
1739 \usebtxstyleandcolor\c!style\c!color
1740 \btxparameter\c!left
1741 \relax}
1742
1743\permanent\protected\def\btxstopciterendering
1744 {\relax
1745 \btxparameter\c!right
1746 \endgroup}
1747
1748\aliased\let\btxstartciteauthor\begingroup
1749\aliased\let\btxstopciteauthor \endgroup
1750
1751\permanent\protected\def\btxstartcite{\begingroup\btx_reset_cite}
1752\aliased \let\btxstopcite \endgroup
1753
1754
1755
1756\permanent\protected\def\btxsingularplural#1{\clf_btxsingularorplural{\currentbtxdataset}{\currentbtxtag}{#1}}
1757\permanent\protected\def\btxoneorrange #1{\clf_btxoneorrange {\currentbtxdataset}{\currentbtxtag}{#1}}
1758\permanent\protected\def\btxfirstofrange #1{\clf_btxfirstofrange {\currentbtxdataset}{\currentbtxtag}{#1}}
1759
1760\aliased\let\btxsingularorplural\btxsingularplural
1761
1762\stopcontextdefinitioncode
1763
1764
1765
1766\permanent\protected\def\btxloadjournallist [#1]{\clf_btxloadjournallist{#1}}
1767\permanent\protected\def\btxsavejournallist [#1]{\clf_btxsavejournallist{#1}}
1768\permanent\protected\def\btxaddjournal [#1][#2]{\clf_btxaddjournal{#1}{#2}}
1769\permanent \def\btxexpandedjournal #1{\clf_btxexpandedjournal{#1}}
1770\permanent \def\btxabbreviatedjournal#1{\clf_btxabbreviatedjournal{#1}}
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788\tolerant\permanent\protected\def\savebtxdataset[#1]#*[#2]#*[#3]
1789 {\ifarguments
1790
1791 \or
1792 \ifhastok={#1}
1793 \publ_save_dataset_indeed[\s!default][\jobnamesaved.bib][#1]
1794 \else
1795 \publ_save_dataset_indeed[\s!default][#1][]
1796 \fi
1797 \or
1798 \ifhastok={#2}
1799 \publ_save_dataset_indeed[\s!default][#1][#2]
1800 \else
1801 \publ_save_dataset_indeed[#1][#2][]
1802 \fi
1803 \or
1804 \publ_save_dataset_indeed[#1][#2][#3]
1805 \fi}
1806
1807\protected\def\publ_save_dataset_indeed[#1][#2][#3]
1808 {\begingroup
1809 \getdummyparameters
1810 [\c!criterium=\v!all,
1811 \c!type=,
1812 \c!dataset=#1,
1813 \c!file=#2,
1814 #3]
1815 \clf_btxsavedataset
1816 dataset {\dummyparameter\c!dataset}
1817 filename {\dummyparameter\c!file}
1818 filetype {\dummyparameter\c!type}
1819 criterium {\dummyparameter\c!criterium}
1820 options {\dummyparameter\c!option}
1821 \relax
1822 \endgroup}
1823
1824
1825
1826
1827
1828
1829
1830\permanent\protected\def\placecitation{\citation[entry]}
1831
1832\permanent\protected\def\btxhandleciteentry
1833 {\dontleavehmode
1834 \begingroup
1835 \def\currentbtxcitealternative{entry}
1836 \setbtxparameterset\s!cite\currentbtxcitealternative
1837 \btxcitereference
1838 \btx_entry_inject
1839 \endgroup}
1840
1841
1842
1843
1844
1845
1846
1847
1848\protected\def\publ_registers_set
1849 {\ifempty\currentbtxregister \else
1850 \clf_btxsetregister
1851 specification {\currentbtxspecification}
1852 name {\currentbtxregister}
1853 state {\btxregisterparameter\c!state}
1854 dataset {\btxregisterparameter\c!dataset}
1855 field {\btxregisterparameter\c!field}
1856 register {\btxregisterparameter\c!register}
1857 method {\btxregisterparameter\c!method}
1858 alternative {\btxregisterparameter\c!alternative}
1859 \relax
1860 \fi}
1861
1862\appendtoks
1863 \publ_registers_set
1864\to \everydefinebtxregister
1865
1866\appendtoks
1867 \publ_registers_set
1868\to \everysetupbtxregister
1869
1870\appendtoks
1871 \normalexpanded{
1872 \defineprocessor
1873 [\s!btx:r:\currentbtxregister]
1874 [\c!style=\noexpand\namedbtxregisterparameter{\currentbtxregister}\noexpand\c!style,
1875 \c!color=\noexpand\namedbtxregisterparameter{\currentbtxregister}\noexpand\c!color]}
1876\to \everydefinebtxregister
1877
1878\appendtoks
1879 \clf_btxtoregister{\currentbtxdataset}{\currentbtxtag}
1880\to \t_btx_reference_inject
1881
1882\permanent\protected\def\btxindexedauthor#1#2#3#4#5#6
1883 {\begingroup
1884 \def\currentbtxcitealternative{#1}
1885 \ifempty\currentbtxcitealternative
1886 \edef\currentbtxcitealternative{invertedshort}
1887 \fi
1888
1889 \expand\everysetupbtxciteplacement
1890 \def\currentbtxvons {#2}
1891 \def\currentbtxsurnames {#3}
1892 \def\currentbtxinitials {#4}
1893 \def\currentbtxfirstnames {#5}
1894 \def\currentbtxjuniors {#6}
1895 \setbtxparameterset\s!cite\currentbtxcitealternative
1896 \fastsetup{\s!btx:\s!cite:\s!author:\currentbtxcitealternative}
1897 \endgroup}
1898
1899\permanent\protected\def\btxregisterauthor
1900 {\doifelsenextoptionalcs\publ_register_author_yes\publ_register_author_nop}
1901
1902\def\publ_register_author_yes[#1]#2
1903 {\clf_btxauthortoregister{#1}{#2}\relax}
1904
1905\def\publ_register_author_nop#1
1906 {\clf_btxauthortoregister{\currentbtxdataset}{#1}\relax}
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927\mutable\lettonothing\m_btx_saved_current
1928
1929\permanent\protected\def\btxstartstyle[#1]
1930 {\begingroup
1931 \let\m_btx_saved_current\currentbtx
1932 \def\currentbtx{#1}
1933 \usebtxstyleparameter\c!style
1934 \let\currentbtx\m_btx_saved_current}
1935
1936\permanent\protected\def\btxstartcolor[#1]
1937 {\begingroup
1938 \let\m_btx_saved_current\currentbtx
1939 \def\currentbtx{#1}
1940 \usebtxcolorparameter\c!color
1941 \let\currentbtx\m_btx_saved_current}
1942
1943\permanent\protected\def\btxstartstyleandcolor[#1]
1944 {\begingroup
1945 \let\m_btx_saved_current\currentbtx
1946 \def\currentbtx{#1}
1947 \usebtxstyleandcolor\c!style\c!color
1948 \let\currentbtx\m_btx_saved_current}
1949
1950\aliased\let\btxstopstyle \endgroup
1951\aliased\let\btxstopcolor \endgroup
1952\aliased\let\btxstopstyleandcolor\endgroup
1953
1954\permanent\protected\def\btxusecommand[#1]#2
1955 {\namedbtxparameter{#1}\c!command{#2}}
1956
1957\permanent\protected\def\startbtxrunningstyleandcolor
1958 {\dontleavehmode
1959 \begingroup
1960 \restorerunningstyleandcolor}
1961
1962\permanent\protected\def\stopbtxrunningstyleandcolor
1963 {\endgroup}
1964
1965
1966
1967\permanent\protected\def\btxdoifelsematches#1#2#3
1968 {\clf_btxdoifelsematches{#1}{#2}{#3}}
1969
1970
1971
1972\setupbtxrendering
1973 [\c!interaction=\v!start,
1974 \c!specification=\btxparameter\c!specification,
1975 \c!dataset=\v!default,
1976 \c!repeat=\v!no,
1977 \c!continue=\v!no,
1978 \c!method=\v!global,
1979
1980 \c!sorttype=\v!default,
1981 \c!criterium=\v!text,
1982 \c!refcommand=authoryears,
1983 \c!numbering=\v!yes,
1984
1985 \c!pagestate=\v!stop,
1986 \c!textstate=\v!start,
1987 \c!width=\v!auto,
1988 \c!separator={\removepunctuation;\space},
1989 \c!distance=1.5\emwidth]
1990
1991
1992
1993
1994
1995\setupbtx
1996 [\c!interaction=\v!start,
1997 \c!alternative=num,
1998 \c!inbetween=\btxspace,
1999
2000 \c!range=\directdiscretionary\endash,
2001 \c!compress=\v!yes,
2002 \c!authorconversion=normal,
2003 \c!sorttype=normal,
2004 \c!etallimit=3,
2005 \c!etaldisplay=\btxparameter\c!etallimit,
2006 \c!otherstext={\btxspace et al.},
2007 \c!separator:firstnames={\btxspace},
2008 \c!separator:juniors={\btxspace},
2009 \c!separator:vons={\btxnobreakspace},
2010 \c!separator:initials={\btxspace},
2011 \c!connector:initials={\btxhyphen},
2012 \c!stopper:initials={.},
2013
2014 \c!separator:invertedinitials={\btxcomma},
2015 \c!separator:invertedfirstnames={\btxcomma},
2016 \c!separator:names:2={\btxcomma},
2017 \c!separator:names:3=\btxparameter{\c!separator:2},
2018 \c!separator:names:4=\btxparameter{\c!separator:2},
2019 \c!separator:2={\btxsemicolon},
2020 \c!separator:3=\btxparameter{separator:2},
2021 \c!separator:4=\btxparameter{separator:2}]
2022
2023
2024
2025\loadbtxdefinitionfile[commands]
2026\loadbtxdefinitionfile[definitions]
2027
2028\loadbtxdefinitionfile[cite]
2029\loadbtxdefinitionfile[list]
2030\loadbtxdefinitionfile[page]
2031\loadbtxdefinitionfile[author]
2032
2033
2034
2035
2036\permanent\protected\def\usebtxdefinitions[#1]
2037 {\loadbtxdefinitionfile[#1]
2038 \setupbtx[\c!specification=#1]}
2039
2040\setupbtx
2041 [\c!specification=\s!default,
2042 \c!dataset=\v!default,
2043 \c!default=\v!default]
2044
2045\loadbtxdefinitionfile
2046 [\s!default]
2047
2048
2049
2050\fetchmodulecommand \showbtxdatasetfields \f!publ_tra
2051\fetchmodulecommand \showbtxdatasetcompleteness \f!publ_tra
2052\fetchmodulecommand \showbtxdatasetauthors \f!publ_tra
2053\fetchmodulecommand \showbtxhashedauthors \f!publ_tra
2054\fetchmodulecommand \showbtxfields \f!publ_tra
2055\fetchmodulecommand \showbtxtables \f!publ_tra
2056
2057
2058
2059
2060
2061
2062\permanent\tolerant\protected\def\btxshortcut[#1]#:#2
2063 {\clf_btxshortcut{\ifparameter#1\or#1\else\s!default\fi}{#2}}
2064
2065\protect
2066 |