summaryrefslogtreecommitdiff
path: root/tex/context/base/publ-imp-list.mkvi
blob: 23256de333c7d83ec531a1ef0ef997c1738bf706 (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
%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 btx:list:inject #content
    \ifconditional\btxinteractive
        \ifx\currentbtxinternal\empty
            #content
        \else
            \goto {
                #content
            } [
                \s!internal(\currentbtxinternal)
            ]
        \fi
    \else
        #content
    \fi
\stoptexdefinition

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

\startsetups[\s!btx:\s!list:\s!page]
    \texdefinition{\s!btx:\s!list:concat}
    \texdefinition{\s!btx:\s!list:inject} {
        % real pagenumber: todo, userpage
        \currentbtxfirst
        % order
        \high{\currentbtxsecond}
    }
\stopsetups

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

% Hans: can the following setups be condensed to one using some variable?

\startsetups[\s!btx:\s!list:\s!numbering:default]
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:default]
        \btxusecommand[\currentbtxspecification:\s!list:\s!numbering:default] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:num]
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:num]
        \btxusecommand[\currentbtxspecification:\s!list:\s!numbering:num] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:short]
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:short]
        \btxusecommand [\currentbtxspecification:\s!list:\s!numbering:short] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
            \btxflushsuffix
        }
    \btxstopstyleandcolor
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:tag]
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:tag]
        \btxusecommand [\currentbtxspecification:\s!list:\s!numbering:tag] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stopsetups

\startsetups[\s!btx:\s!list:\s!numbering:index]
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:index]
        \btxusecommand [\currentbtxspecification:\s!list:\s!numbering:index] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stopsetups

\protect