summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mkiv/publ-imp-list.mkvi
blob: eec63e515c6eb897ebf4075c90522e65b0af5e64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
%D \module
%D   [       file=publ-imp-list,
%D        version=2014.06.16,
%D          title=\CONTEXT\ Publication Support,
%D       subtitle=Lists,
%D         author=Alan Braslau and Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\unprotect

\starttexdefinition mutable protected btx:list:inject:text #content
    \ifconditional\btxinteractivetext
        \ifx\currentbtxinternal\empty
            #content
        \else
            \goto {
                #content
            } [
                \s!internal(\currentbtxinternal)
            ]
        \fi
    \else
        #content
    \fi
\stoptexdefinition

\startsetups \s!btx:\s!list:text
   \texdefinition {\s!btx:\s!list:inject:text} {
        \btxflushlisttext
        \ifx\currentbtxcombis\empty \else
            \btxrenderingparameter\c!separator
            \btxflushlistcombis
        \fi
   }
\stopsetups

\starttexdefinition mutable protected btx:list:inject:number #content
    \ifconditional\btxinteractivenumber
        \ifx\currentbtxinternal\empty
            #content
        \else
            \goto {
                #content
            } [
                \s!internal(\currentbtxinternal)
            ]
        \fi
    \else
        #content
    \fi
\stoptexdefinition

\starttexdefinition mutable protected btx:list:helpers:concat
    \space
\stoptexdefinition

\startsetups[\s!btx:\s!list:\s!numbering]
    \texdefinition {\s!btx:\s!list:inject:number} {
        \currentbtxfirst
        \btxparameter\c!stopper
    }
\stopsetups

\starttexdefinition mutable protected btx:list:numbering #variant
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:#variant]
        \btxusecommand[\currentbtxspecification:\s!list:\s!numbering:#variant] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stoptexdefinition

\startsetups[\s!btx:\s!list:\s!numbering:default]
    \texdefinition {\s!btx:\s!list:\s!numbering} {default}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:num]
    \texdefinition {\s!btx:\s!list:\s!numbering} {num}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:short]
    \texdefinition {\s!btx:\s!list:\s!numbering} {short}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:tag]
    \texdefinition {\s!btx:\s!list:\s!numbering} {tag}
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:index]
    \texdefinition {\s!btx:\s!list:\s!numbering} {index}
\stopsetups

\protect