summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/publ-imp-list.mkvi
blob: 61432486b9b46ed7005542dbe9a4eb4c053d17aa (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
%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

\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:\v!yes]
    \fastsetup{\s!btx:\s!list:\s!numbering:num}
\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:bib]
    \btxstartstyleandcolor [\currentbtxspecification:\s!list:\s!numbering:bib]
        \btxusecommand [\currentbtxspecification:\s!list:\s!numbering:bib] {
            \fastsetup{\s!btx:\s!list:\s!numbering}
        }
    \btxstopstyleandcolor
\stopsetups

\protect