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{\currentbtxauthorindex}}
481\protected\def\currentbtxinitialsindeed {\clf_btxcurrentinitials {\currentbtxauthorindex}}
482\protected\def\currentbtxjuniorsindeed {\clf_btxcurrentjuniors {\currentbtxauthorindex}}
483\protected\def\currentbtxsurnamesindeed {\clf_btxcurrentsurnames {\currentbtxauthorindex}}
484\protected\def\currentbtxvonsindeed {\clf_btxcurrentvons {\currentbtxauthorindex}}
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 \dostarttaggednodetail\t!listtag
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 \dostarttaggednodetail\t!publication
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 \dostarttaggednodetail\t!listpage
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 \resetinteractionstyle
789
790 \fi
791\to \everybtxlistrendering
792
793\mutable\let\nofbtxlistentries \!!zerocount
794\mutable\let\currentbtxlistentry\!!zerocount
795\mutable\let\currentbtxlistindex\!!zerocount
796
797\newconditional\c_publ_prefixed
798
799\permanent\protected\def\btxsetnoflistentries #1{\edef\nofbtxlistentries {#1}}
800\permanent\protected\def\btxsetcurrentlistentry#1{\edef\currentbtxlistentry{#1}}
801\permanent\protected\def\btxsetcurrentlistindex#1{\edef\currentbtxlistindex{#1}}
802
803\permanent\protected\def\btxdoifelsesameaspreviouschecked#1#2
804 {\clf_btxdoifelsesameasprevious
805 {\currentbtxdataset}
806 \currentbtxlistentry
807 {#2}
808 \c_btx_list_reference
809 {#1}}
810
811\permanent\protected\def\btxdoifelsesameasprevious
812 {\btxdoifelsesameaspreviouschecked\v!doublesided}
813
814\permanent\protected\def\btxdoifelsecombiinlist#1#2
815 {\clf_btxdoifelsecombiinlist{#1}{#2}}
816
817\permanent\protected\def\btxdoifelsecitedone#1#2
818 {\clf_btxdoifelsecitedone{#1}{#2}}
819
820\aliased\let\btxdoifsameaspreviouscheckedelse\btxdoifelsesameaspreviouschecked
821\aliased\let\btxdoifsameaspreviouselse \btxdoifelsesameasprevious
822\aliased\let\btxdoifcombiinlistelse \btxdoifelsecombiinlist
823\aliased\let\btxdoifcitedoneelse \btxdoifelsecitedone
824
825\tolerant\def\publ_place_list_indeed#1#2#*[#3]#*[#4]
826 {\begingroup
827 \ifparameters\or\or
828 \let\currentbtxrendering\currentbtxspecification
829 \or
830 \ifhastok={#3}
831
832 \let\currentbtxrendering\currentbtxspecification
833 \setupcurrentbtxrendering[#3]
834 \edef\p_specification{\btxrenderingparameter\c!specification}
835 \ifempty\p_specification\else
836 \let\currentbtxspecification\p_specification
837 \let\currentbtxrendering\currentbtxspecification
838 \fi
839 \else
840 \edef\currentbtxrendering{#3}
841 \edef\p_specification{\btxrenderingparameter\c!specification}
842 \ifempty\p_specification\else
843 \let\currentbtxspecification\p_specification
844 \fi
845 \fi
846 \or
847
848 \edef\currentbtxrendering{#3}
849 \setupcurrentbtxrendering[#4]
850 \edef\p_specification{\btxrenderingparameter\c!specification}
851 \ifempty\p_specification\else
852 \let\currentbtxspecification\p_specification
853 \fi
854 \fi
855 \setbtxparameterset\currentbtxspecification\s!list
856 \expand\everybtxlistrendering
857 \ifconditional#1\relax
858 \edef\currentbtxrenderingtitle{\btxrenderingparameter\c!title}
859 \ifempty\currentbtxrenderingtitle
860 \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbtxrendering,\c!title={\headtext{\currentbtxrendering}}]}
861 \else
862 \normalexpanded{\startnamedsection[\v!chapter][\c!reference=\currentbtxrendering,\c!title={\currentbtxrenderingtitle}]}
863 \fi
864 \fi
865 \ifempty\currentbtxrendering
866 \setbtxrendering
867 \fi
868 \edef\currentbtxdataset{\btxrenderingparameter\c!dataset}
869 \uselanguageparameter\btxdatasetparameter
870 \setbtxlist
871 \expand\everystructurelist
872 \expand\everysetupbtxlistplacement
873
874
875 \clf_btxcollectlistentries
876 names {\s!btx}
877 criterium {\currentbtxcriterium}
878 reference {\btxrenderingparameter\c!reference}
879 method {\btxrenderingparameter\c!method}
880 dataset {\currentbtxdataset}
881 keyword {\btxrenderingparameter\c!keyword}
882 sorttype {\btxrenderingparameter\c!sorttype}
883 repeated {\btxrenderingparameter\c!repeat}
884 ignored {\btxrenderingparameter\c!ignore}
885 group {\btxrenderingparameter\c!group}
886 filter {\btxrenderingparameter\c!filter}
887 filename {\btxrenderingparameter\c!file}
888 \relax
889 \ifnum\nofbtxlistentries>\zerocount
890 \clf_btxpreparelistentries{\currentbtxdataset}
891 \forgetall
892 \btxrenderingparameter\c!before
893 \ifconditional#2\relax
894 \edef\p_command{\btxrenderingparameter\c!command}
895 \ifempty\p_command
896 \edef\p_setups{\btxrenderingparameter\c!setups}
897 \ifempty\p_setups
898 \else
899 \directsetup{\p_setups}
900 \fi
901 \else
902 \expandafter\p_command\expandafter{\number\nofbtxlistentries}\relax
903 \fi
904 \else
905 \dostarttagged\t!publications\currentbtxrendering
906 \dostarttagged\t!list{btx}
907 \startpacked[\v!blank]
908
909
910 \ifempty\currentbtxnumbering \else
911 \edef\p_width{\listparameter\c!width}
912 \ifx\p_width\v!auto
913 \setbox\scratchbox\vbox \bgroup
914 \settrialtypesetting
915 \clf_btxfetchlistentries{\currentbtxdataset}
916 \egroup
917 \d_publ_number_width\wd\scratchbox
918 \letlistparameter\c!width\d_publ_number_width
919 \fi
920 \fi
921 \ifcstok{\listparameter\c!prefix}\v!yes
922 \c_publ_prefixed\conditionaltrue
923 \else
924 \c_publ_prefixed\conditionalfalse
925 \fi
926
927
928 \dorecurse\nofbtxlistentries
929 {\let\currentbtxlistentry\recurselevel
930 \clf_btxflushlistentry{\currentbtxdataset}\currentbtxlistentry\relax}
931 \stoppacked
932 \dostoptagged
933 \dostoptagged
934 \fi
935 \btxrenderingparameter\c!after
936 \fi
937 \ifconditional#1\relax
938 \stopnamedsection
939 \fi
940 \global\advanceby\btxblock\plusone
941 \endgroup}
942
943\permanent\protected\def\placebtxrendering {\publ_place_list_indeed\conditionalfalse\conditionalfalse}
944\permanent\protected\def\completebtxrendering {\publ_place_list_indeed\conditionaltrue \conditionalfalse}
945\permanent\protected\def\flushbtxrendering {\publ_place_list_indeed\conditionalfalse\conditionaltrue }
946
947\aliased\let\completelistofpublications\completebtxrendering
948\aliased\let\placelistofpublications \placebtxrendering
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980\permanent\protected\def\btxsetlisttag#1
981 {\clf_btxflushlisttag{\currentbtxdataset}#1\relax}
982
983\newinteger\c_btx_list_index
984
985\lettonothing\m_btx_list_action
986
987\def\publ_flush_list_step_command
988 {\btxsetlisttag{\c_btx_list_index}
989 \expandafter\m_btx_list_action\expandafter{\currentbtxtag}
990 \ifnum\c_btx_list_index<\nofbtxlistentries
991 \advanceby\c_btx_list_index\plusone
992 \expandafter\publ_flush_list_step_command
993 \else
994 \glet\m_btx_list_action\relax
995 \fi}
996
997\def\publ_flush_list_step_setup
998 {\btxsetlisttag{\c_btx_list_index}
999 \directsetup{\m_btx_list_action}
1000 \ifnum\c_btx_list_index<\nofbtxlistentries
1001 \advanceby\c_btx_list_index\plusone
1002 \expandafter\publ_flush_list_step_setup
1003 \else
1004 \glet\m_btx_list_action\relax
1005 \fi}
1006
1007\permanent\protected\def\flushbtxentries[#1]
1008 {\begingroup
1009 \getdummyparameters[\c!command=,\c!setups=,#1]
1010 \xdef\m_btx_list_action{\dummyparameter\c!command}
1011 \ifempty\m_btx_list_action
1012 \xdef\m_btx_list_action{\dummyparameter\c!setups}
1013 \ifempty\m_btx_list_action
1014 \endgroup
1015 \c_btx_list_index\zerocount
1016 \else
1017 \endgroup
1018 \c_btx_list_index\plusone
1019 \doubleexpandafter\publ_flush_list_step_command
1020 \fi
1021 \else
1022 \endgroup
1023 \c_btx_list_index\plusone
1024 \expandafter\publ_flush_list_step_command
1025 \fi}
1026
1027
1028
1029\permanent\def\currentbtxblock{\number\btxblock}
1030
1031
1032
1033\permanent\protected\def\btxchecklistentry
1034 {\begingroup
1035
1036 \hbox{\btx_reference_checked}
1037 \par
1038 \endgroup}
1039
1040
1041
1042
1043
1044\installstructurelistprocessor{\s!btx}
1045 {\let\currentlistentrynumber \btx_reference_indeed
1046 \let\currentlistentrytitle \btx_entry_indeed
1047 \let\currentlistentrypagenumber\btx_page_indeed
1048 \strc_lists_apply_renderingsetup}
1049
1050\def\btx_entry_indeed
1051 {\dostarttaggednodetail\t!listcontent
1052 \btx_list_reference_inject
1053 \btx_entry_inject
1054 \dostoptagged}
1055
1056\def\btx_page_indeed
1057 {}
1058
1059\permanent\protected\def\btxhandlelistentry
1060 {\strc_lists_entry_process}
1061
1062\permanent\protected\def\btxstartlistentry
1063 {\begingroup
1064 \global\advanceby\c_btx_list_reference\plusone}
1065
1066\permanent\protected\def\btxstoplistentry
1067 {\iftrialtypesetting
1068 \global\advanceby\c_btx_list_reference\minusone
1069 \fi
1070 \endgroup}
1071
1072\newtoks\everybtxlistentry
1073
1074\permanent\protected\def\btxlistsetup#1
1075 {\expand\everybtxlistentry
1076 \everybtxlistentry\emptytoks
1077 \publ_fast_setup\plusfour\s!list{#1}}
1078
1079\appendtoks
1080 \btx_check_language
1081\to \everybtxlistentry
1082
1083\protected\def\btx_reference_indeed
1084 {\begingroup
1085
1086 \setbtxparameterset{\c!list:\s!numbering}\currentbtxnumbering
1087
1088 \ifempty\currentbtxnumbering
1089
1090 \orelse\ifx\currentbtxnumbering\v!no
1091
1092 \else
1093 \usebtxstyleandcolor\c!style\c!color
1094 \ifconditional\c_publ_prefixed\btxlistprefixednumber\fi
1095 \clf_btxlistvariant
1096 {\currentbtxdataset}
1097 {\currentbtxblock}
1098 {\currentbtxtag}
1099 {\currentbtxnumbering}
1100 {\currentbtxnumber}
1101 \relax
1102 \fi
1103 \endgroup}
1104
1105\permanent\protected\def\btxlistprefixednumber
1106 {\clf_listprefixednumber
1107 {\currentlist}
1108 \currentbtxlistindex
1109 {
1110 prefix {\listparameter\c!prefix}
1111 separatorset {\listparameter\c!prefixseparatorset}
1112 conversionset {\listparameter\c!prefixconversionset}
1113 starter {\listparameter\c!prefixstarter}
1114 stopper {\listparameter\c!prefixstopper}
1115 set {\listparameter\c!prefixset}
1116 segments {\listparameter\c!prefixsegments}
1117 connector {\listparameter\c!prefixconnector}
1118 }
1119 \relax}
1120
1121\protected\def\btx_reference_checked
1122 {\dontleavehmode\hbox\bgroup
1123 \btx_reference_indeed
1124 \egroup}
1125
1126\newinteger\c_btx_list_reference
1127
1128\protected\def\btx_list_reference_inject
1129 {\dontleavehmode\begingroup
1130 \iftrialtypesetting\else
1131 \btx_list_reference_inject_now
1132 \fi
1133
1134 \endgroup}
1135
1136\def\btx_list_reference_inject_now
1137 {\strc_references_direct_full_user
1138 {\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi
1139 \s!btxref=\currentbtxtag,
1140 \s!btxspc=\currentbtxspecification,
1141 \s!btxlst=\the\c_btx_list_reference,
1142
1143 \ifempty\currentbtxbefore \else\s!btxbtx={\currentbtxbefore},\fi
1144 \ifempty\currentbtxafter \else\s!btxatx={\currentbtxafter },\fi
1145 \ifempty\currentbtxbacklink\else\s!btxint=\number\currentbtxbacklink\fi
1146 }
1147 {\s!btx::\v!list::\the\c_btx_list_reference}
1148 {\currentbtxnumber}}
1149
1150\newconditional\c_btx_cite_reference_injected
1151
1152\permanent\protected\def\btx_cite_reference_inject
1153 {\ifconditional\c_btx_cite_reference_injected \else
1154 \dontleavehmode
1155 \iftrialtypesetting \else
1156 \ifempty\currentbtxbacklink
1157
1158 \orelse\ifnum\currentbtxbacklink>\zerocount
1159 \btx_cite_reference_inject_indeed
1160 \c_btx_cite_reference_injected\conditionaltrue
1161 \fi
1162 \fi
1163 \fi}
1164
1165\newtoks\t_btx_reference_inject
1166
1167\def\btx_cite_reference_inject_indeed
1168 {\the\t_btx_reference_inject
1169 \strc_lists_inject_direct
1170 [\s!btx]
1171 [\c!type=\s!btx,\c!location=\v!here]
1172 [\ifx\currentbtxdataset\v!default\else\s!btxset=\currentbtxdataset,\fi
1173 \s!btxref=\currentbtxtag,
1174
1175 \ifempty\currentbtxbefore \else\s!btxbtx={\currentbtxbefore},\fi
1176 \ifempty\currentbtxafter \else\s!btxatx={\currentbtxafter },\fi
1177 \ifempty\currentbtxbacklink\else\s!btxint=\number\currentbtxbacklink,\fi
1178 \ifempty\currentbtxciteuservariables\else,\currentbtxciteuservariables\fi]}
1179
1180\permanent\def\currentbtxuservariable #1{\clf_btxuservariable {\currentbtxdataset}{#1}}
1181\permanent\def\btxdoifelseuservariable#1{\clf_btxdoifelseuservariable{\currentbtxdataset}{#1}}
1182
1183\aliased\let\btxdoifuservariableelse\btxdoifelseuservariable
1184
1185\aliased\let\btxcitereference\btx_cite_reference_inject
1186
1187\mutable\lettonothing\currentbtxnumbering
1188\mutable\lettonothing\currentbtxcitealternative
1189
1190\appendtoks
1191 \edef\currentbtxnumbering{\btxrenderingparameter\c!numbering}
1192 \ifx\currentbtxnumbering\v!yes
1193 \def\currentbtxnumbering{num}
1194 \letbtxrenderingparameter\c!numbering\currentbtxnumbering
1195 \letlistparameter\c!headnumber\v!always
1196 \orelse\ifx\currentbtxnumbering\v!no
1197 \letlistparameter\c!headnumber\v!no
1198 \lettonothing\currentbtxnumbering
1199
1200 \letlistparameter\c!symbol \v!none
1201 \letlistparameter\c!aligntitle \v!yes
1202 \letlistparameter\c!numbercommand\firstofoneargument
1203 \else
1204 \letlistparameter\c!headnumber\v!always
1205 \fi
1206 \let\currentlistmethod\s!btx
1207\to \everysetupbtxlistplacement
1208
1209\permanent\tolerant\protected\def\btxremapauthor[#1]#*[#2]
1210 {\clf_btxremapauthor{#1}{#2}}
1211
1212\permanent\protected\def\btxshowauthorremapping
1213 {\clf_btxshowauthorremapping}
1214
1215\permanent\protected\def\btxflushauthor
1216 {\doifelsenextoptionalcs\btx_flush_author_yes\btx_flush_author_nop}
1217
1218\permanent\protected\def\btxflushsuffix
1219 {\ifempty\currentbtxsuffix
1220
1221 \else
1222 \characters{\currentbtxsuffix}
1223 \fi}
1224
1225\def\btx_flush_author_yes[#1]{\btx_flush_author{#1}}
1226\def\btx_flush_author_nop {\btx_flush_author{\btxparameter\c!authorconversion}}
1227
1228\protected\def\btx_flush_author#1#2
1229 {\begingroup
1230 \edef\currentbtxfield{#2}
1231 \setbtxparameterset\s!list\currentbtxfield
1232
1233 \clf_btxauthor
1234 {\currentbtxdataset}
1235 {\currentbtxtag}
1236 {\currentbtxfield}
1237 {
1238 combiner {#1}
1239 kind {list}
1240 etallimit {\btxparameter\c!etallimit}
1241 etaldisplay {\btxparameter\c!etaldisplay}
1242 etaloption {\btxparameter\c!etaloption}
1243 symbol {\btxparameter{\c!stopper:initials}}
1244 connector {\btxparameter{\c!connector:initials}}
1245 }
1246 \relax
1247 \endgroup}
1248
1249
1250
1251\permanent\protected\def\btxflushauthorname {\btx_flush_author{name}}
1252\permanent\protected\def\btxflushauthornormal {\btx_flush_author{normal}}
1253\permanent\protected\def\btxflushauthornormalshort {\btx_flush_author{normalshort}}
1254\permanent\protected\def\btxflushauthorinverted {\btx_flush_author{inverted}}
1255\permanent\protected\def\btxflushauthorinvertedshort{\btx_flush_author{invertedshort}}
1256
1257\mutable\let\currentbtxauthorfield\s!author
1258
1259\permanent\protected\def\btxsetauthorfield#1{\edef\currentbtxauthorfield{#1}}
1260
1261\permanent\protected\def\currentbtxciteauthorbyfield
1262 {\begingroup
1263
1264
1265
1266 \setbtxparameterset\s!cite\currentbtxcitealternative
1267 \clf_btxauthor
1268 {\currentbtxdataset}
1269 {\currentbtxtag}
1270 {\currentbtxauthorfield}
1271 {
1272 combiner {\btxparameter\c!authorconversion}
1273 kind {cite}
1274 etallimit {\btxparameter\c!etallimit}
1275 etaldisplay {\btxparameter\c!etaldisplay}
1276 etaloption {\btxparameter\c!etaloption}
1277 symbol {\btxparameter{\c!stopper:initials}}
1278 }
1279 \relax
1280 \endgroup}
1281
1282\permanent\protected\def\currentbtxciteauthor
1283 {\let\currentbtxauthorfield\s!author
1284 \currentbtxciteauthorbyfield}
1285
1286\permanent\protected\def\btxstartauthor#1#2#3
1287 {\begingroup
1288 \currentbtxauthorindex#1\relax
1289 \currentbtxauthorcount#2\relax
1290 \currentbtxauthorstate#3\relax}
1291
1292\permanent\protected\def\btxstopauthor
1293 {\endgroup}
1294
1295\permanent\protected\def\btxciteauthorsetup#1{\fastsetup{\s!btx:\s!cite:\s!author:#1}}
1296\permanent\protected\def\btxlistauthorsetup#1{\fastsetup{\s!btx:\s!list:\s!author:#1}}
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315\newconditional\btxinteractive
1316\newconditional\btxinteractivenumber
1317\newconditional\btxinteractivetext
1318\newconditional\btxinteractivepage
1319
1320\mutable\lettonothing\currentbtxinteraction
1321
1322\installcorenamespace{btxinteraction}
1323
1324\defcsname\??btxinteraction\v!number\endcsname{\btxinteractivenumber\conditionaltrue}
1325\defcsname\??btxinteraction\v!text \endcsname{\btxinteractivetext\conditionaltrue}
1326\defcsname\??btxinteraction\v!page \endcsname{\btxinteractivepage\conditionaltrue}
1327\defcsname\??btxinteraction\v!all \endcsname{\btxinteractivenumber\conditionaltrue
1328 \btxinteractivetext\conditionaltrue
1329 \btxinteractivepage\conditionaltrue}
1330
1331
1332
1333
1334\appendtoks
1335 \iflocation
1336 \edef\currentbtxinteraction{\btxparameter\c!interaction}
1337 \ifx\currentbtxinteraction\v!stop
1338 \btxinteractive\conditionalfalse
1339 \else
1340 \enforced\lettonothing\structurelistlocation
1341 \btxinteractive\conditionaltrue
1342 \begincsname\??btxinteraction\currentbtxinteraction\endcsname
1343 \fi
1344 \else
1345 \btxinteractive\conditionalfalse
1346 \fi
1347\to \everysetupbtxlistplacement
1348
1349\appendtoks
1350 \iflocation
1351 \edef\currentbtxinteraction{\btxparameter\c!interaction}
1352 \ifx\currentbtxinteraction\v!stop
1353 \btxinteractive\conditionalfalse
1354 \else
1355 \btxinteractive\conditionaltrue
1356 \fi
1357 \else
1358 \btxinteractive\conditionalfalse
1359 \fi
1360\to \everysetupbtxciteplacement
1361
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\lettonothing\p_publ_cite_before
1394\lettonothing\p_publ_cite_after
1395\lettonothing\p_publ_cite_lefttext
1396\lettonothing\p_publ_cite_righttext
1397
1398\mutable\lettonothing\currentbtxciteuservariables
1399\mutable\lettonothing\currentbtxcitealternative
1400
1401\permanent\protected\def\btxhybridcite
1402 {\dontleavehmode
1403 \begingroup
1404 \strictdoifelsenextoptional\publ_cite_tags_options\publ_cite_tags_indeed}
1405
1406\protected\def\publ_cite_tags_options[#1]
1407 {\strictdoifelsenextoptional{\publ_cite_tags_options_indeed{#1}}{\publ_cite_tags_indeed{#1}}}
1408
1409\protected\def\publ_cite_tags_indeed#1
1410 {\resetinteractionstyle
1411 \setbtxparametersetroot\s!cite
1412 \edef\currentbtxcitealternative{\btxparameter\c!alternative}
1413 \setbtxparameterset\s!cite\currentbtxcitealternative
1414 \edef\currentbtxcitetag{#1}
1415 \expand\everysetupbtxciteplacement
1416 \publ_cite_variant
1417 \endgroup}
1418
1419\protected\def\publ_cite_tags_options_indeed#1
1420 {\doifelseassignment{#1}\publ_cite_tags_settings_indeed\publ_cite_tags_variants_indeed{#1}}
1421
1422\def\publ_cite_tags_settings_indeed#1[#2]
1423 {\resetinteractionstyle
1424
1425 \resetdummyparameter\c!reference
1426 \resetdummyparameter\c!alternative
1427 \resetdummyparameter\c!before
1428 \resetdummyparameter\c!after
1429 \resetdummyparameter\c!lefttext
1430 \resetdummyparameter\c!righttext
1431 \getdummyparameters[#1]
1432 \edef\p_reference{\dummyparameter\c!reference}
1433 \ifempty\p_reference
1434 \edef\currentbtxcitetag{#2}
1435 \else
1436 \let\currentbtxcitetag\p_reference
1437 \edef\currentbtxciteuservariables{#2}
1438 \fi
1439 \edef\p_specification{\dummyparameter\c!specification}
1440 \ifempty\p_specification
1441 \else
1442 \let\currentbtxspecification\p_specification
1443 \fi
1444 \edef\p_alternative{\dummyparameter\c!alternative}
1445 \ifempty\p_alternative
1446 \setbtxparametersetroot\s!cite
1447 \edef\currentbtxcitealternative{\btxparameter\c!alternative}
1448 \else
1449 \let\currentbtxcitealternative\p_alternative
1450 \fi
1451 \setbtxparameterset\s!cite\currentbtxcitealternative
1452 \setupcurrentbtx[#1]
1453
1454 \edef\p_publ_cite_before {\dummyparameter\c!before}
1455 \edef\p_publ_cite_after {\dummyparameter\c!after}
1456 \edef\p_publ_cite_lefttext {\dummyparameter\c!lefttext}
1457 \edef\p_publ_cite_righttext{\dummyparameter\c!righttext}
1458
1459 \expand\everysetupbtxciteplacement
1460 \publ_cite_variant
1461 \endgroup}
1462
1463\def\publ_cite_tags_variants_indeed#1[#2]
1464 {\resetinteractionstyle
1465 \edef\currentbtxcitealternative{#1}
1466 \edef\currentbtxcitetag{#2}
1467 \setbtxparameterset\s!cite\currentbtxcitealternative
1468 \expand\everysetupbtxciteplacement
1469 \publ_cite_variant
1470 \endgroup}
1471
1472\newconditional\btxcitecompress
1473
1474\mutable\let\currentbtxcitemethod\v!hidden
1475
1476\def\publ_cite_variant
1477 {\begingroup
1478 \publ_cite_handle_variant_indeed[\currentbtxcitetag]}
1479
1480\protected\def\publ_cite_handle_variant#1
1481 {\begingroup
1482 \edef\currentbtxcitealternative{#1}
1483 \setbtxparameterset\s!cite\currentbtxcitealternative
1484 \expand\everysetupbtxciteplacement
1485 \publ_cite_handle_variant_indeed}
1486
1487\permanent\protected\def\publ_cite_handle_variant_blob
1488 {\clf_btxhandlecite
1489 dataset {\currentbtxdataset}
1490 reference {\currentbtxreference}
1491 method {\currentbtxcitemethod}
1492 variant {\currentbtxcitealternative}
1493 sorttype {\btxparameter\c!sorttype}
1494 compress {\btxparameter\c!compress}
1495 author {\btxparameter\c!author}
1496 authorconversion {\c!authorconversion}
1497 lefttext {\p_publ_cite_lefttext}
1498 righttext {\p_publ_cite_righttext}
1499 before {\p_publ_cite_before}
1500 after {\p_publ_cite_after}
1501 \relax
1502 \iftrialtypesetting\else
1503
1504 \fi}
1505
1506\aliased\let\dobtxcitevariantblob\publ_cite_handle_variant_blob
1507
1508\let\publ_cite_trace_blob\relax
1509
1510\tolerant\def\publ_cite_handle_variant_indeed[#1]
1511 {\letbtxparameter\c!alternative\currentbtxcitealternative
1512 \edef\currentbtxreference{#1}
1513 \saverunningstyleandcolor
1514 \usebtxstyleandcolor\c!style\c!color
1515 \uselanguageparameter\btxdatasetparameter
1516 \dostarttaggednodetail\t!citation
1517 \btxparameter\c!left
1518 \btxparameter\c!command{\dobtxcitevariantblob}
1519 \btxparameter\c!right
1520 \dostoptagged
1521 \publ_cite_trace_blob
1522 \endgroup}
1523
1524\permanent\protected\def\btxstarttaggedcite
1525 {\dostarttagged\t!cite{\currentbtxdataset::\currentbtxtag}}
1526
1527\permanent\protected\def\btxstoptaggedcite
1528 {\dostoptagged}
1529
1530\permanent\protected\def\btxlistcitation {\publ_citation\v!list}
1531\permanent\protected\def\btxtextcitation {\publ_citation\v!text}
1532\permanent\protected\def\btxalwayscitation{\publ_citation\v!always}
1533
1534\tolerant\def\publ_citation#1[#2]#,[#3]
1535 {\dontleavehmode
1536 \begingroup
1537 \let\currentbtxcitemethod#1
1538 \ifparameter#3\or
1539 \publ_cite_tags_options_indeed{#2}[#3]
1540 \else
1541 \publ_cite_tags_indeed{#2}
1542 \fi}
1543
1544\permanent\tolerant\protected\def\btxhiddencitation[#1]
1545 {\iftrialtypesetting \else
1546 \begingroup
1547 \let\currentbtxcitemethod\v!hidden
1548 \edef\currentbtxreference{#1}
1549 \clf_btxhandlenocite
1550 method {\currentbtxcitemethod}
1551 dataset {\currentbtxdataset}
1552 reference {\currentbtxreference}
1553 \relax
1554
1555 \endgroup
1556 \fi}
1557
1558
1559
1560
1561\permanent\protected\def\currentbtxmissingreference
1562 {\clf_btxmissing{\currentbtxdataset}{\currentbtxreference}}
1563
1564\permanent\protected\def\btxmissing#1
1565 {\dontleavehmode{\tttf<\clf_btxmissing{\currentbtxdataset}{#1}>}}
1566
1567
1568
1569\aliased\let\hiddencitation\btxhiddencitation \aliased\let\hiddencite\hiddencitation
1570\aliased\let\listcitation \btxlistcitation \aliased\let\listcite \listcitation
1571\aliased\let\textcitation \btxtextcitation \aliased\let\textcite \textcitation
1572\aliased\let\alwayscitation\btxalwayscitation \aliased\let\alwayscite\alwayscitation
1573
1574\permanent\protected\def\citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
1575\permanent\protected\def\nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
1576
1577\aliased\let\cite \citation
1578\aliased\let\nocite \nocitation
1579\aliased\let\usecitation\nocitation
1580
1581\protected\def\publ_entry_citation {\doifelsenextoptionalcs\btxlistcitation \btxdirectlistcite}
1582\protected\def\publ_entry_nocitation{\doifelsenextoptionalcs\btxhiddencitation\btxdirecthiddencite}
1583
1584\appendtoks
1585 \enforced\let\cite \publ_entry_citation
1586 \enforced\let\nocite\publ_entry_nocitation
1587\to \everybtxlistrendering
1588
1589\permanent\protected\def\btxdirectlistcite #1{\btxlistcitation [#1]\relax}
1590\permanent\protected\def\btxdirecthiddencite#1{\btxhiddencitation[#1]\relax}
1591
1592
1593
1594
1595\defcsname\??setup:\s!btx:\s!unknown\endcsname#1{\inframed{\tttf#1}}
1596
1597\def\publ_fast_setup_yes#1#2
1598 {\csname\??setup:\s!btx:
1599 \ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname
1600 \currentbtxspecification:#1:#2
1601 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname
1602 \currentbtxspecificationfallback:#1:#2
1603 \orelse\ifcsname\??setup:\s!btx:#1:#2\endcsname
1604 #1:#2
1605 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname
1606 \currentbtxspecification:#1:\s!unknown
1607 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname
1608 \currentbtxspecificationfallback:#1:\s!unknown
1609 \else
1610 #1:\s!unknown
1611 \fi
1612 \endcsname{#2}}
1613
1614\def\publ_fast_setup_nop#1#2
1615 {\csname\??setup:\s!btx:
1616 \ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname
1617 \currentbtxspecification:#1:#2
1618 \orelse\ifcsname\??setup:\s!btx:#1:#2\endcsname
1619 #1:#2
1620 \orelse\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname
1621 \currentbtxspecification:#1:\s!unknown
1622 \else
1623 #1:\s!unknown
1624 \fi
1625 \endcsname{#2}}
1626
1627\newconstant\btxsetuptype
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637\protected\def\publ_fast_btx_setup_chain_inbetween{\allowbreak>\allowbreak}
1638\protected\def\publ_fast_btx_setup_colon_inbetween{\allowbreak :\allowbreak}
1639
1640\protected\def\publ_fast_btx_setup_chain_yes#1#2
1641 {\dontleavehmode\begingroup
1642 \enforced\let\:\publ_fast_btx_setup_colon_inbetween
1643 \infofont
1644 \ifcase\btxsetuptype\darkred\or\darkblue\or\darkgreen\or\darkcyan\or\darkmagenta\else\darkred\fi
1645 [\prewordbreak
1646 \currentbtxspecification \:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
1647 \publ_fast_btx_setup_chain_inbetween
1648 \currentbtxspecificationfallback\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:#2\endcsname\else
1649 \publ_fast_btx_setup_chain_inbetween
1650 #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
1651 \publ_fast_btx_setup_chain_inbetween
1652 \currentbtxspecification \:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
1653 \publ_fast_btx_setup_chain_inbetween
1654 \currentbtxspecificationfallback\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecificationfallback:#1:\s!unknown\endcsname\else
1655 \publ_fast_btx_setup_chain_inbetween
1656 unset\fi\fi\fi\fi\fi
1657 \space @\space
1658 \currentbtx
1659 \prewordbreak]
1660 \endgroup}
1661
1662\protected\def\publ_fast_btx_setup_chain_nop#1#2
1663 {\dontleavehmode\begingroup
1664 \enforced\let\:\publ_fast_btx_setup_colon_inbetween
1665 \infofont
1666 \darkred
1667 [\prewordbreak
1668 \currentbtxspecification\:#1\:#2\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:#2\endcsname\else
1669 \publ_fast_btx_setup_chain_inbetween
1670 #1\:#2\ifcsname\??setup:\s!btx:#1:#2\endcsname\else
1671 \publ_fast_btx_setup_chain_inbetween
1672 \currentbtxspecification\:#1\:\s!unknown\ifcsname\??setup:\s!btx:\currentbtxspecification:#1:\s!unknown\endcsname\else
1673 \publ_fast_btx_setup_chain_inbetween
1674 unset\fi\fi\fi
1675 \space @\space
1676 \currentbtx
1677 \prewordbreak]
1678 \endgroup}
1679
1680\protected\def\publ_fast_btx_setup_normal#1
1681 {\btxsetuptype#1\relax
1682 \ifempty\currentbtxspecificationfallback
1683 \expandafter\publ_fast_setup_nop
1684 \else
1685 \expandafter\publ_fast_setup_yes
1686 \fi}
1687
1688\protected\def\publ_fast_btx_setup_visual#1#2#3
1689 {\btxsetuptype#1\relax
1690 \ifempty\currentbtxspecificationfallback
1691 \expandafter\publ_fast_btx_setup_chain_nop
1692 \else
1693 \expandafter\publ_fast_btx_setup_chain_yes
1694 \fi{#2}{#3}
1695 \ifempty\currentbtxspecificationfallback
1696 \expandafter\publ_fast_setup_nop
1697 \else
1698 \expandafter\publ_fast_setup_yes
1699 \fi{#2}{#3}}
1700
1701\installtextracker
1702 {publications.setups}
1703 {\let\publ_fast_setup\publ_fast_btx_setup_visual}
1704 {\let\publ_fast_setup\publ_fast_btx_setup_normal}
1705
1706\let\publ_fast_setup\publ_fast_btx_setup_normal
1707
1708
1709
1710\newtoks\everybtxciteentry
1711
1712\prependtoks
1713 \c_btx_cite_reference_injected\conditionalfalse
1714\to \everybtxciteentry
1715
1716\permanent\protected\def\btxcitesetup#1
1717 {\expand\everybtxciteentry
1718 \everybtxciteentry\emptytoks
1719 \publ_fast_setup\plusone\s!cite{#1}}
1720
1721\permanent\protected\def\btxsubcitesetup#1
1722 {\expand\everybtxciteentry
1723 \everybtxciteentry\emptytoks
1724 \publ_fast_setup\plustwo\s!cite{#1}}
1725
1726\appendtoks
1727 \btx_check_language
1728\to \everybtxciteentry
1729
1730\permanent\protected\def\btxstartsubcite#1
1731 {\begingroup
1732 \btx_reset_cite
1733
1734 \def\currentbtxcitealternative{#1}
1735 \setbtxparameterset\s!cite\currentbtxcitealternative
1736 \usebtxstyleandcolor\c!style\c!color
1737 \btxparameter\c!left
1738 \relax}
1739
1740\permanent\protected\def\btxstopsubcite
1741 {\relax
1742 \btxparameter\c!right
1743 \endgroup}
1744
1745\permanent\protected\def\btxstartciterendering[#1]
1746 {\begingroup
1747 \edef\currentbtxcitealternative{#1}
1748 \setbtxparameterset\s!cite\currentbtxcitealternative
1749 \usebtxstyleandcolor\c!style\c!color
1750 \btxparameter\c!left
1751 \relax}
1752
1753\permanent\protected\def\btxstopciterendering
1754 {\relax
1755 \btxparameter\c!right
1756 \endgroup}
1757
1758\aliased\let\btxstartciteauthor\begingroup
1759\aliased\let\btxstopciteauthor \endgroup
1760
1761\permanent\protected\def\btxstartcite{\begingroup\btx_reset_cite}
1762\aliased \let\btxstopcite \endgroup
1763
1764
1765
1766\permanent\protected\def\btxsingularplural#1{\clf_btxsingularorplural{\currentbtxdataset}{\currentbtxtag}{#1}}
1767\permanent\protected\def\btxoneorrange #1{\clf_btxoneorrange {\currentbtxdataset}{\currentbtxtag}{#1}}
1768\permanent\protected\def\btxfirstofrange #1{\clf_btxfirstofrange {\currentbtxdataset}{\currentbtxtag}{#1}}
1769
1770\aliased\let\btxsingularorplural\btxsingularplural
1771
1772\stopcontextdefinitioncode
1773
1774
1775
1776\permanent\protected\def\btxloadjournallist [#1]{\clf_btxloadjournallist{#1}}
1777\permanent\protected\def\btxsavejournallist [#1]{\clf_btxsavejournallist{#1}}
1778\permanent\protected\def\btxaddjournal [#1][#2]{\clf_btxaddjournal{#1}{#2}}
1779\permanent \def\btxexpandedjournal #1{\clf_btxexpandedjournal{#1}}
1780\permanent \def\btxabbreviatedjournal#1{\clf_btxabbreviatedjournal{#1}}
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798\tolerant\permanent\protected\def\savebtxdataset[#1]#*[#2]#*[#3]
1799 {\ifarguments
1800
1801 \or
1802 \ifhastok={#1}
1803 \publ_save_dataset_indeed[\s!default][\jobnamesaved.bib][#1]
1804 \else
1805 \publ_save_dataset_indeed[\s!default][#1][]
1806 \fi
1807 \or
1808 \ifhastok={#2}
1809 \publ_save_dataset_indeed[\s!default][#1][#2]
1810 \else
1811 \publ_save_dataset_indeed[#1][#2][]
1812 \fi
1813 \or
1814 \publ_save_dataset_indeed[#1][#2][#3]
1815 \fi}
1816
1817\protected\def\publ_save_dataset_indeed[#1][#2][#3]
1818 {\begingroup
1819 \getdummyparameters
1820 [\c!criterium=\v!all,
1821 \c!type=,
1822 \c!dataset=#1,
1823 \c!file=#2,
1824 #3]
1825 \clf_btxsavedataset
1826 dataset {\dummyparameter\c!dataset}
1827 filename {\dummyparameter\c!file}
1828 filetype {\dummyparameter\c!type}
1829 criterium {\dummyparameter\c!criterium}
1830 options {\dummyparameter\c!option}
1831 \relax
1832 \endgroup}
1833
1834
1835
1836
1837
1838
1839
1840\permanent\protected\def\placecitation{\citation[entry]}
1841
1842\permanent\protected\def\btxhandleciteentry
1843 {\dontleavehmode
1844 \begingroup
1845 \def\currentbtxcitealternative{entry}
1846 \setbtxparameterset\s!cite\currentbtxcitealternative
1847 \btxcitereference
1848 \btx_entry_inject
1849 \endgroup}
1850
1851
1852
1853
1854
1855
1856
1857
1858\protected\def\publ_registers_set
1859 {\ifempty\currentbtxregister \else
1860 \clf_btxsetregister
1861 specification {\currentbtxspecification}
1862 name {\currentbtxregister}
1863 state {\btxregisterparameter\c!state}
1864 dataset {\btxregisterparameter\c!dataset}
1865 field {\btxregisterparameter\c!field}
1866 register {\btxregisterparameter\c!register}
1867 method {\btxregisterparameter\c!method}
1868 alternative {\btxregisterparameter\c!alternative}
1869 \relax
1870 \fi}
1871
1872\appendtoks
1873 \publ_registers_set
1874\to \everydefinebtxregister
1875
1876\appendtoks
1877 \publ_registers_set
1878\to \everysetupbtxregister
1879
1880\appendtoks
1881 \normalexpanded{
1882 \defineprocessor
1883 [\s!btx:r:\currentbtxregister]
1884 [\c!style=\noexpand\namedbtxregisterparameter{\currentbtxregister}\noexpand\c!style,
1885 \c!color=\noexpand\namedbtxregisterparameter{\currentbtxregister}\noexpand\c!color]}
1886\to \everydefinebtxregister
1887
1888\appendtoks
1889 \clf_btxtoregister{\currentbtxdataset}{\currentbtxtag}
1890\to \t_btx_reference_inject
1891
1892\permanent\protected\def\btxindexedauthor#1#2#3#4#5#6
1893 {\begingroup
1894 \def\currentbtxcitealternative{#1}
1895 \ifempty\currentbtxcitealternative
1896 \edef\currentbtxcitealternative{invertedshort}
1897 \fi
1898
1899 \expand\everysetupbtxciteplacement
1900 \def\currentbtxvons {#2}
1901 \def\currentbtxsurnames {#3}
1902 \def\currentbtxinitials {#4}
1903 \def\currentbtxfirstnames {#5}
1904 \def\currentbtxjuniors {#6}
1905 \setbtxparameterset\s!cite\currentbtxcitealternative
1906 \fastsetup{\s!btx:\s!cite:\s!author:\currentbtxcitealternative}
1907 \endgroup}
1908
1909\permanent\protected\def\btxregisterauthor
1910 {\doifelsenextoptionalcs\publ_register_author_yes\publ_register_author_nop}
1911
1912\def\publ_register_author_yes[#1]#2
1913 {\clf_btxauthortoregister{#1}{#2}\relax}
1914
1915\def\publ_register_author_nop#1
1916 {\clf_btxauthortoregister{\currentbtxdataset}{#1}\relax}
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937\mutable\lettonothing\m_btx_saved_current
1938
1939\permanent\protected\def\btxstartstyle[#1]
1940 {\begingroup
1941 \let\m_btx_saved_current\currentbtx
1942 \def\currentbtx{#1}
1943 \usebtxstyleparameter\c!style
1944 \let\currentbtx\m_btx_saved_current}
1945
1946\permanent\protected\def\btxstartcolor[#1]
1947 {\begingroup
1948 \let\m_btx_saved_current\currentbtx
1949 \def\currentbtx{#1}
1950 \usebtxcolorparameter\c!color
1951 \let\currentbtx\m_btx_saved_current}
1952
1953\permanent\protected\def\btxstartstyleandcolor[#1]
1954 {\begingroup
1955 \let\m_btx_saved_current\currentbtx
1956 \def\currentbtx{#1}
1957 \usebtxstyleandcolor\c!style\c!color
1958 \let\currentbtx\m_btx_saved_current}
1959
1960\aliased\let\btxstopstyle \endgroup
1961\aliased\let\btxstopcolor \endgroup
1962\aliased\let\btxstopstyleandcolor\endgroup
1963
1964\permanent\protected\def\btxusecommand[#1]#2
1965 {\namedbtxparameter{#1}\c!command{#2}}
1966
1967\permanent\protected\def\startbtxrunningstyleandcolor
1968 {\dontleavehmode
1969 \begingroup
1970 \restorerunningstyleandcolor}
1971
1972\permanent\protected\def\stopbtxrunningstyleandcolor
1973 {\endgroup}
1974
1975
1976
1977\permanent\protected\def\btxdoifelsematches#1#2#3
1978 {\clf_btxdoifelsematches{#1}{#2}{#3}}
1979
1980
1981
1982\setupbtxrendering
1983 [\c!interaction=\v!start,
1984 \c!specification=\btxparameter\c!specification,
1985 \c!dataset=\v!default,
1986 \c!repeat=\v!no,
1987 \c!continue=\v!no,
1988 \c!method=\v!global,
1989
1990 \c!sorttype=\v!default,
1991 \c!criterium=\v!text,
1992 \c!refcommand=authoryears,
1993 \c!numbering=\v!yes,
1994
1995 \c!pagestate=\v!stop,
1996 \c!textstate=\v!start,
1997 \c!width=\v!auto,
1998 \c!separator={\removepunctuation;\space},
1999 \c!distance=1.5\emwidth]
2000
2001
2002
2003
2004
2005\setupbtx
2006 [\c!interaction=\v!start,
2007 \c!alternative=num,
2008 \c!inbetween=\btxspace,
2009
2010 \c!range=\directdiscretionary\endash,
2011 \c!compress=\v!yes,
2012 \c!authorconversion=normal,
2013 \c!sorttype=normal,
2014 \c!etallimit=3,
2015 \c!etaldisplay=\btxparameter\c!etallimit,
2016 \c!otherstext={\btxspace et al.},
2017 \c!separator:firstnames={\btxspace},
2018 \c!separator:juniors={\btxspace},
2019 \c!separator:vons={\btxnobreakspace},
2020 \c!separator:initials={\btxspace},
2021 \c!connector:initials={\btxhyphen},
2022 \c!stopper:initials={.},
2023
2024 \c!separator:invertedinitials={\btxcomma},
2025 \c!separator:invertedfirstnames={\btxcomma},
2026 \c!separator:names:2={\btxcomma},
2027 \c!separator:names:3=\btxparameter{\c!separator:2},
2028 \c!separator:names:4=\btxparameter{\c!separator:2},
2029 \c!separator:2={\btxsemicolon},
2030 \c!separator:3=\btxparameter{separator:2},
2031 \c!separator:4=\btxparameter{separator:2}]
2032
2033
2034
2035\loadbtxdefinitionfile[commands]
2036\loadbtxdefinitionfile[definitions]
2037
2038\loadbtxdefinitionfile[cite]
2039\loadbtxdefinitionfile[list]
2040\loadbtxdefinitionfile[page]
2041\loadbtxdefinitionfile[author]
2042
2043
2044
2045
2046\permanent\protected\def\usebtxdefinitions[#1]
2047 {\loadbtxdefinitionfile[#1]
2048 \setupbtx[\c!specification=#1]}
2049
2050\setupbtx
2051 [\c!specification=\s!default,
2052 \c!dataset=\v!default,
2053 \c!default=\v!default]
2054
2055\loadbtxdefinitionfile
2056 [\s!default]
2057
2058
2059
2060\fetchmodulecommand \showbtxdatasetfields \f!publ_tra
2061\fetchmodulecommand \showbtxdatasetcompleteness \f!publ_tra
2062\fetchmodulecommand \showbtxdatasetauthors \f!publ_tra
2063\fetchmodulecommand \showbtxhashedauthors \f!publ_tra
2064\fetchmodulecommand \showbtxfields \f!publ_tra
2065\fetchmodulecommand \showbtxtables \f!publ_tra
2066
2067
2068
2069
2070
2071
2072\permanent\tolerant\protected\def\btxshortcut[#1]#:#2
2073 {\clf_btxshortcut{\ifparameter#1\or#1\else\s!default\fi}{#2}}
2074
2075\protect
2076 |