summaryrefslogtreecommitdiff
path: root/tex/context/base/core-new.tex
blob: 5bcf5afa4fe7202a53374db4c653af7ca89a6d59 (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
%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. Non||commercial use is 
%C granted. 

%D To be placed elsewhere.

\writestatus{loading}{Context Core Macros / New Ones}

\unprotect

% 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} 

\let\currentmode=\empty

\def\enablemode[#1]%
  {\addtocommalist{#1}\currentmode}

\def\disablemode[#1]%
  {\removefromcommalist{#1}\currentmode}

\long\def\doifmodeelse#1#2#3%
  {\expandafter\doifcommonelse\expandafter{\currentmode}{#1}{#2}{#3}}

\long\def\doifmode#1#2%
  {\expandafter\doifcommonelse\expandafter{\currentmode}{#1}{#2}{}}

\long\def\doifnotmode#1#2%
  {\expandafter\doifcommonelse\expandafter{\currentmode}{#1}{}{#2}}

\protect 

\endinput