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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
%D \module
%D [ file=context,
%D version=2008.28.10, % 1995.10.10,
%D title=\CONTEXT,
%D subtitle=\CONTEXT\ Format Generation,
%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.
%D First we load the system modules. These implement a lot of
%D manipulation macros. The first one loads \PLAIN\ \TEX, as
%D minimal as possible.
\loadcorefile{syst-pln.tex}
\loadcorefile{syst-prm.tex}
\loadcorefile{syst-cat.tex}
\loadcorefile{syst-etx.tex}
\loadcorefile{syst-pdt.tex}
\loadcorefile{syst-omg.tex}
\loadcorefile{syst-xtx.tex}
\loadcorefile{syst-mtx.tex}
\loadcorefile{syst-gen.tex}
\loadcorefile{syst-ext.tex}
\loadcorefile{syst-chr.tex}
\loadcorefile{syst-fnt.tex}
\loadcorefile{syst-new.tex}
\loadcorefile{syst-con.tex}
\loadcorefile{syst-var.tex}
\loadcorefile{syst-str.tex}
\loadcorefile{syst-rtp.tex}
%D To enable selective loading, we say:
\CONTEXTtrue
%D In order to conveniently load files, we need a few
%D support modules.
\loadcorefile{supp-ini.tex}
\loadcorefile{supp-fil.tex}
\loadcorefile{supp-dir.tex}
%D After this we're ready for the multi||lingual interface
%D modules.
\loadmarkfile{mult-ini}
\loadcorefile{mult-fst.tex}
\loadcorefile{mult-sys.tex}
\loadcorefile{mult-def.tex}
%D We also use some third party macros. These are loaded by
%D saying:
\loadcorefile{thrd-ran.tex} % based on: Donald Arseneau
\loadcorefile{thrd-trg.tex} % based on: David Carlisle
%D Now we're ready for some general support modules. These
%D modules implement some basic typesetting functionality.
\loadcorefile{core-var.tex}
\loadcorefile{supp-box.tex}
\loadcorefile{supp-mrk.tex}
\loadcorefile{supp-vis.tex}
\loadcorefile{supp-fun.tex}
%loadcorefile{supp-eps.tex}
\loadcorefile{supp-spe.tex}
\loadcorefile{supp-ran.tex}
%loadcorefile{supp-mps.tex}
\loadmkiifile{supp-mps.tex}
\loadmkiifile{supp-tpi.tex}
\loadcorefile{supp-mat.tex}
\loadcorefile{supp-ali.tex}
\loadcorefile{supp-num.tex}
%D The next module deals with language specific typographic
%D extensions.
\loadcorefile{typo-ini.tex}
%D Verbatim typesetting is implemented in a separate class of
%D modules. The pretty typesetting modules are loaded at run
%D time.
\loadcorefile{verb-ini.tex}
%D The following modules are not sequentially dependent,
%D i.e. they have ugly dependencies, which will be cleaned
%D up by adding more overloading.
%D When loading the font, color and special modules, we need a
%D bit more advanced file handling as well as some general
%D variables, and features, so next we load:
\loadcorefile{core-ins.tex}
\loadcorefile{core-fil.tex}
\loadcorefile{core-con.tex}
%D We already need some synonyms (patterns). At runtime this
%D file will be reloaded.
\loadcorefile{cont-fil.tex}
%D \CONTEXT\ does not implement its own table handling. We
%D just go for the best there is and load \TABLE. Just to be
%D sure we do it here, before we redefine \type{|}.
\loadcorefile{thrd-tab.tex} % based on: Michael Wichura / will be reimplemented
%D Here comes the last support modules. They take care of
%D some language specific things.
\loadcorefile{supp-pat.tex}
%D The next few modules do what their names state. They
%D load additional definition modules when needed.
\loadcorefile{regi-ini.tex}
\loadcorefile{enco-ini.tex}
\loadcorefile{filt-ini.tex}
\loadcorefile{hand-ini.tex}
\loadcorefile{regi-syn.tex}
\loadcorefile{lang-ini.tex}
\loadcorefile{lang-ctx.tex}
\loadcorefile{lang-dis.tex}
\loadmarkfile{unic-ini}
\loadcorefile{core-gen.tex}
\loadcorefile{core-new.tex}
\loadcorefile{core-uti.tex}
\loadcorefile{core-two.tex}
\loadcorefile{core-stg.tex}
\loadcorefile{spec-mis.tex}
\loadcorefile{spec-ini.tex}
\loadcorefile{spec-def.tex}
\loadcorefile{spec-var.tex}
\loadcorefile{colo-ini.tex}
\loadcorefile{colo-ext.tex}
%D For the moment we load a lot of languages. In the future
%D we'll have to be more space conservative.
\loadcorefile{lang-mis.tex}
\loadcorefile{lang-url.tex}
\loadcorefile{lang-spe.tex}
\loadcorefile{lang-lab.tex}
\loadcorefile{lang-ger.tex}
\loadcorefile{lang-ita.tex}
\loadcorefile{lang-sla.tex}
\loadcorefile{lang-alt.tex}
\loadcorefile{lang-ana.tex}
\loadcorefile{lang-art.tex}
\loadcorefile{lang-bal.tex}
\loadcorefile{lang-cel.tex}
\loadcorefile{lang-grk.tex}
\loadcorefile{lang-ind.tex}
\loadcorefile{lang-ura.tex}
\loadcorefile{lang-vn.tex}
\loadcorefile{lang-ara.tex}
%D All kind of symbols are handled in:
\loadcorefile{symb-ini.tex}
%D Sorting:
\loadcorefile{sort-ini.tex}
%D Next we load some core macro's. These implement the
%D macros' that are seen by the users. The order of loading
%D is important, due to dependancies.
\loadcorefile{core-spa.tex}
\loadcorefile{core-grd.tex}
\loadcorefile{core-mar.tex}
\loadcorefile{core-pos.tex}
\loadcorefile{core-mak.tex}
\loadcorefile{core-dat.tex}
\loadcorefile{core-ver.tex}
\loadcorefile{core-rul.tex}
\loadcorefile{core-vis.tex}
\loadcorefile{core-num.tex}
\loadcorefile{core-tsp.tex}
\loadcorefile{core-tab.tex}
\loadcorefile{core-nav.tex}
\loadcorefile{core-ref.tex}
\loadcorefile{core-obj.tex}
\loadcorefile{core-lst.tex}
\loadcorefile{core-itm.tex}
\loadcorefile{core-des.tex}
\loadcorefile{core-mat.tex}
\loadcorefile{core-syn.tex}
\loadcorefile{core-sys.tex}
\loadcorefile{page-ini.tex}
\loadcorefile{page-bck.tex}
\loadcorefile{page-not.tex}
\loadcorefile{page-one.tex}
\loadcorefile{page-lay.tex}
\loadmkiifile{page-log.tex}
\loadcorefile{page-txt.tex}
\loadcorefile{page-sid.tex}
\loadcorefile{page-flt.tex}
\loadcorefile{page-mul.tex}
\loadcorefile{page-set.tex}
\loadcorefile{page-lyr.tex}
\loadcorefile{page-mak.tex}
\loadcorefile{page-num.tex}
\loadmarkfile{page-lin}
\loadcorefile{page-par.tex}
\loadcorefile{page-mar.tex}
\loadcorefile{core-job.tex} % why so late?
% so far
\loadmarkfile{core-sec}
\loadcorefile{core-swd.tex}
\loadcorefile{core-buf.tex}
\loadcorefile{core-blk.tex}
\loadcorefile{page-imp.tex}
\loadcorefile{core-tbl.tex}
\loadcorefile{core-int.tex}
\loadcorefile{core-ntb.tex}
\loadcorefile{core-ltb.tex}
%D A few more languages, that have specifics using core
%D functionality:
\loadcorefile{lang-chi.tex}
\loadcorefile{lang-jap.tex}
%D How about fill||in fields and related stuff?
\loadcorefile{java-ini.tex}
\loadcorefile{core-fld.tex}
\loadcorefile{core-hlp.tex}
%D Registers can depend on fields, so we load that now.
\loadcorefile{core-reg.tex}
%D Of course we do need fonts. There are no \TFM\ files
%D loaded yet, so the format file is independant of their
%D content. Here we also redefine \type{\it} as {\it italic}
%D instead of italian.
\loadmarkfile{font-ini}
\loadcorefile{font-uni.tex}
\loadcorefile{font-bfm.tex}
\loadcorefile{enco-pfr.tex}
\loadcorefile{type-ini.tex}
\loadcorefile{type-def.tex}
%D Properties. Don't ask.
\loadcorefile{prop-ini.tex}
\loadcorefile{prop-lay.tex}
\loadcorefile{prop-mis.tex}
%D Like languages, fonts, encodings and symbols, \METAPOST\
%D support is also organized in its own class of modules.
\loadmarkfile{meta-ini}
\loadmarkfile{meta-tex}
\loadcorefile{meta-pdf.tex}
\loadcorefile{meta-pag.tex}
%D Special page handling (maybe even later)
\loadcorefile{page-flw.tex}
\loadcorefile{page-spr.tex}
\loadcorefile{page-plg.tex}
\loadcorefile{page-str.tex}
%D Hm.
\loadcorefile{core-pgr.tex}
\loadcorefile{core-bar.tex}
\loadcorefile{core-snc.tex}
%D Math.
\loadcorefile{math-pln.tex}
\loadcorefile{math-ini.tex}
\loadcorefile{math-ext.tex}
%D Now we're ready for more core modules.
\loadcorefile{core-fnt.tex}
\loadcorefile{core-not.tex}
\loadcorefile{core-lnt.tex}
\loadcorefile{core-mis.tex}
\loadcorefile{core-trf.tex}
\loadcorefile{core-inc.tex}
\loadcorefile{core-fig.tex}
\loadcorefile{core-par.tex}
\loadcorefile{core-box.tex}
\loadcorefile{page-app.tex}
\loadmarkfile{meta-fig}
%D Language specific spacing.
\loadcorefile{lang-spa.tex}
%D Only the basic XML parser and remapper are part of the core.
%D These macros are loaded last since they overload and|/|or
%D extend previously defined ones.
\loadcorefile{xtag-ini.tex}
\loadcorefile{xtag-ext.tex}
\loadcorefile{xtag-prs.tex}
\loadcorefile{xtag-map.tex}
\loadcorefile{xtag-stk.tex}
\loadcorefile{xtag-exp.tex}
\loadcorefile{xtag-pre.tex}
\loadcorefile{xtag-xsd.tex}
\loadcorefile{xtag-rng.tex}
%loadcorefile{xtag-ent.tex}
%D How about this:
\loadcorefile{meta-xml.tex}
%D \TEX\ related logo's are always typeset in a special way.
%D Here they come:
\loadcorefile{cont-log.tex}
%D This one overloads af few things:
\loadcorefile{core-ctx.tex}
%D Defaults go here (more will be moved to this module
%D later):
\loadcorefile{core-lme.tex}
\loadcorefile{core-ini.tex}
\loadcorefile{core-def.tex}
%D Preloaded modules (some need xml support):
%usemodule[x][res-04] % xml resource libraries
%usemodule[x][res-08] % rlx runtime conversion
\usemodule[x][res-12] % rli external indentification
%D At run time, a few more files are loaded, like:
%D
%D \startitemize[packed]
%D \item \type{cont-sys}: local (system dependant) defaults
%D \item \type{cont-old}: substitutes for old (obsolete) macros
%D \item \type{cont-new}: new macro implementations (for testing)
%D \item \type{cont-fil}: filename and module synonyms
%D \stopitemize
\unprotect
\beginLUATEX
\prependtoks
\ctxlua{input.starttiming(ctx)}%
\to \everyjob
\appendtoks
\ctxlua{input.stoptiming(ctx)}%
\to \everyjob
\appendtoks
\writestatus\m!lua{used config path - \ctxlua{tex.print(caches.configpath())}}%
\writestatus\m!lua{used cache path - \ctxlua{tex.print(caches.path)}}%
\to \everydump
\endLUATEX
\protect
% %D Except from english, no hyphenation patterns are loaded
% %D yet. Users can specify their needs in the next module:
%
% \input cont-usr.tex
|