summaryrefslogtreecommitdiff
path: root/tex/context/base/core-var.tex
blob: d8105611f52e209772907724400440513795e53e (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%D \module
%D   [       file=core-var,
%D        version=1998.02.21,
%D          title=\CONTEXT\ Core Macros,
%D       subtitle=Variables,
%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 mreadme.pdf for 
%C details. 

\writestatus{loading}{Context Core Macros / Variables}

\unprotect

%D \macros 
%D   {every...}
%D
%D A few every's. 

\newevery \everyshipout        \relax
\newevery \everybeforeshipout  \relax
\newevery \everyaftershipout   \relax
\newevery \everylastshipout    \relax
\newevery \everybye            \relax   
\newevery \everygoodbye        \relax   
\newevery \everystarttext      \relax
\newevery \everystoptext       \relax
\newevery \everyforgetall      \relax

\newevery \everybeforepagebody \relax
\newevery \everyafterpagebody  \relax

\let \everypagebody \everybeforepagebody % backward compatible 

\newevery \everybeforeutilityread \relax 
\newevery \everyafterutilityread  \relax 

\newevery \everycleanupfeatures   \relax

\def\cleanupfeatures{\the\everycleanupfeatures}

%D \macros 
%D   {ifprocessingXML}
%D
%D We need this one even if no \XML\ is supported.  

\newif\ifprocessingXML

%D \macros
%D   {ifproductionrun}
%D
%D This boolean can be used to bypass certain 
%D initializations. 

\newif\ifproductionrun 

\appendtoks \productionruntrue \to \everydump

%D \macros 
%D   {everyboxedcontent, ifboxedcontent,
%D    startboxedcontent, stopboxedcontent}
%D
%D This one is relatively new and will be used as a more 
%D robust test for inner situations. 

\newif    \ifboxedcontent
\newevery \everyboxedcontent \relax

\appendtoks \boxedcontenttrue \to \everyboxedcontent

\def\startboxedcontent{\bgroup\the\everyboxedcontent}
\let\stopboxedcontent  \egroup

%D \macros 
%D   {fastmode}
%D
%D The command \type {\fastmode} disables some time consuming 
%D typesetting. 

\newevery \everyfastmode \relax

\newif\iffastmode 

\def\fastmode%
  {\fastmodetrue 
   \the\everyfastmode}

\def\silentmode% ook hier \everysilentmode net als \fastmode
  {\showmessagesfalse
   \showwarningsfalse
   \let\writestatus\gobbletwoarguments}

%D \macros 
%D   {pdfoutput}
%D
%D There are some fundamental differences between producing
%D \DVI\ and \PDF\ output, especially when we use \PDFTEX, like
%D object reuse, one pass graphic inclusion and the lack of a
%D postprocessing stage. Because we must make sure that
%D \CONTEXT\ knows what it's up to, we always default to \DVI\
%D mode, even when users explicitly ask for \PDF\ output in the
%D \PDFTEX\ configuration file. 

\ifx\pdfoutput\undefined \else

  \prependtoks \pdfoutput=0 \to \everyjob 

\fi

%D We store some original meanings, maybe in \type 
%D {math-ini}. 

\let\normalin             \in
\let\normalover           \over
\let\normalabove          \above
\let\normalatop           \atop
\let\normaloverwithdelims \overwithdelims
\let\normalabovewithdelims\abovewithdelims
\let\normalatopwithdelims \atopwithdelims

\protect \endinput