blob: 2b8b9eb0e7865ed089a5c76dd1bbe45307036d26 (
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
|
%D \module
%D [ file=core-nav,
%D version=1995.1.1,
%D title=\CONTEXT\ Core Macros,
%D subtitle=New ones,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
%C details.
\writestatus{loading}{Context Core Macros / New Ones}
\unprotect
%D To be placed elsewhere.
% Some kind of new feature, for the moment a private one.
%
% \enablemode[screen,paper,bound]
%
% \doifmodeelse {paper} {this} {that}
% \doifmode {paper,screen} {this}
% \doifnotmode {paper,bound} {that}
%
% \startmode [list]
% \stopmode
%
% \startnotmode [list]
% \stopnotmode
\let\currentmode=\empty
\def\enablemode[#1]%
{\expandafter\addtocommalist\expandafter{#1}\currentmode}
\def\disablemode[#1]%
{\expandafter\removefromcommalist\expandafter{#1}\currentmode}
\def\doifmodeelse%
{\unprotect\dodoifmodeelse}
\long\def\dodoifmodeelse#1#2#3%
{\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{#2}{#3}}
\def\doifmode%
{\unprotect\dodoifmode}
\long\def\dodoifmode#1#2%
{\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{#2}{}}
\def\doifnotmode%
{\unprotect\dodoifnotmode}
\long\def\dodoifnotmode#1#2%
{\protect\ExpandBothAfter\doifcommonelse{\currentmode}{#1}{}{#2}}
\def\startmode%
{\unprotect\dostartmode}
\long\def\dostartmode[#1]#2\stopmode%
{\dodoifmode{#1}{#2}}
\def\startnotmode%
{\unprotect\dostartnotmode}
\long\def\dostartnotmode[#1]#2\stopnotmode%
{\dodoifnotmode{#1}{#2}}
\protect
\endinput
|