summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/context.mkii
blob: 8cd02fd9e9488efe4dc1dafd171d9748ad364433 (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
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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
%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 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.

\catcode`\{=1 \catcode`\}=2 \catcode`\#=6

%D From the next string (which is set by the script that assembles the
%D distribution) later on we will calculate a number that can be used
%D by use modules to identify the feature level. Starting with version
%D 2004.8.30 the low level interface is english. Watch out and adapt
%D your styles an modules.

\edef\contextformat {\jobname}
\edef\contextversion{2012.05.30 11:26}

%D For those who want to use this:

\let\fmtname   \contextformat
\let\fmtversion\contextversion

%D Loading:

\edef\mksuffix   {mkii}
\edef\contextmark{MKII}

\ifx\normalinput\undefined \let\normalinput\input \fi

\def\loadcorefile#1{\normalinput#1\relax}
\def\loadmarkfile#1{\normalinput#1.\mksuffix\relax}
\def\loadmkiifile#1{\normalinput#1\relax}
\def\loadmkivfile#1{}

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

\loadmarkfile{syst-ini}

%D Some checking (more primitives are now defined):

\ifdefined\defaultinterface   \else \def\defaultinterface  {english}         \fi
%ifdefined\messageinterface   \else \let\messageinterface  \defaultinterface \fi
\ifdefined\defaultlanguagetag \else \def\defaultlanguagetag{en}              \fi

%D More core code.

\loadmarkfile{syst-pln}

\loadmarkfile{norm-tex}
\loadmarkfile{norm-etx}
\loadmarkfile{norm-ptx}
\loadmarkfile{norm-xtx}
\loadmarkfile{norm-ctx}

\loadmarkfile{catc-ini}
\loadmarkfile{catc-act}
\loadmarkfile{catc-def}
\loadmarkfile{catc-ctx}
\loadmarkfile{catc-sym}
\loadmarkfile{catc-xml}

\loadmarkfile{syst-gen}
\loadmarkfile{syst-ext}
\loadmarkfile{syst-new}
\loadmarkfile{syst-con}
\loadmarkfile{thrd-trg}  % based on: David Carlisle

\loadmarkfile{syst-fnt}
\loadmarkfile{syst-str}
\loadmarkfile{syst-rtp}

\ifnum\texengine=\xetexengine
    \loadmarkfile{xetx-ini}
    \loadmarkfile{xetx-utf}
    \loadmarkfile{xetx-chr}
    \loadmarkfile{xetx-cls}
\fi

%D To enable selective loading, we say:

\newif\ifCONTEXT \CONTEXTtrue % will disappear

%D In order to conveniently load files, we need a few
%D support modules.

\loadmarkfile{supp-fil}
\loadmarkfile{supp-dir}

%D This is for mkii bibtex users who expect \LATEX\ commands.

\loadmarkfile{supp-lat}

%D After this we're ready for the multi||lingual interface
%D modules.

\loadmarkfile{mult-ini}
\loadmarkfile{mult-fst}
\loadmarkfile{mult-sys}
\loadmarkfile{mult-def}
\loadmarkfile{mult-chk}
\loadmarkfile{mult-aux}

%D Now we're ready for some general support modules. These
%D modules implement some basic typesetting functionality.

\loadmarkfile{core-var}
\loadmarkfile{core-env}

\loadmarkfile{supp-box}
\loadmarkfile{supp-mrk}
\loadmarkfile{supp-vis}
\loadmarkfile{supp-fun}
%loadmarkfile{supp-eps}
\loadmarkfile{supp-spe}
\loadmarkfile{supp-ran}
\loadmarkfile{supp-mps}
\loadmarkfile{supp-tpi}
\loadmarkfile{supp-mat}
\loadmarkfile{supp-ali}
\loadmarkfile{supp-num}

%D Verbatim typesetting is implemented in a separate class of
%D modules. The pretty typesetting modules are loaded at run
%D time.

\loadmarkfile{verb-ini}

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

\loadmarkfile{page-ins}
\loadmarkfile{core-fil}
\loadmarkfile{core-con}

%D We already need some synonyms (patterns).

\loadmarkfile{cont-fil}

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

\loadmarkfile{thrd-tab} % based on: Michael Wichura's TaBlE

%D Here comes the last support modules. They take care of
%D some language specific things.

\loadmarkfile{supp-pat}

%D The next few modules do what their names state. They
%D load additional definition modules when needed.

\loadmarkfile{regi-ini}
\loadmarkfile{regi-syn}
\loadmarkfile{enco-ini}
%loadmarkfile{filt-ini}
\loadmarkfile{hand-ini}

\loadmarkfile{lang-ini}
\loadmarkfile{lang-spe}
\loadmarkfile{lang-lab}

\loadmarkfile{unic-ini}

\loadmarkfile{core-gen}
\loadmarkfile{core-uti}
\loadmarkfile{core-two}
\loadmarkfile{core-stg}

\loadmarkfile{spec-ini}
\loadmarkfile{spec-mis}
\loadmarkfile{spec-def}
\loadmarkfile{spec-var}

\loadmarkfile{colo-ini}
\loadmarkfile{colo-ext}

%D For the moment we load a lot of languages. In the future
%D we'll have to be more space conservative.

\loadmarkfile{lang-mis}
\loadmarkfile{lang-url}

\loadmarkfile{lang-ger}
\loadmarkfile{lang-ita}
\loadmarkfile{lang-sla}
\loadmarkfile{lang-alt}
\loadmarkfile{lang-ana}
\loadmarkfile{lang-art}
\loadmarkfile{lang-bal}
\loadmarkfile{lang-cel}
\loadmarkfile{lang-grk}
\loadmarkfile{lang-ind}
\loadmarkfile{lang-ura}
\loadmarkfile{lang-vn}
\loadmarkfile{lang-cyr}

\loadmarkfile{typo-ini}

%D All kind of symbols are handled in:

\loadmarkfile{symb-ini}

%D Sorting:

\loadmarkfile{sort-ini}

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

\loadmarkfile{spac-gen}
\loadmarkfile{spac-grd}

\loadmarkfile{strc-mar}
\loadmarkfile{anch-pos}

\loadmarkfile{buff-ver}
\loadmarkfile{buff-ini}

\loadmarkfile{pack-rul}
\loadmarkfile{trac-vis}
\loadmarkfile{strc-num}
\loadmarkfile{tabl-com}
\loadmarkfile{tabl-pln}
\loadmarkfile{tabl-tab}
\loadmarkfile{tabl-tsp}
\loadmarkfile{scrn-nav}
\loadmarkfile{strc-ref}
\loadmarkfile{pack-obj}
\loadmarkfile{strc-lst}
\loadmarkfile{strc-itm}
\loadmarkfile{strc-des}
\loadmarkfile{strc-mat} % should come after math-pln etc
\loadmarkfile{strc-syn}
\loadmarkfile{core-sys}

\loadmarkfile{page-ini}
\loadmarkfile{page-bck}
\loadmarkfile{page-not}
\loadmarkfile{page-one}
\loadmarkfile{page-lay}
\loadmarkfile{page-log}
\loadmarkfile{page-txt}
\loadmarkfile{page-sid}
\loadmarkfile{strc-flt}
\loadmarkfile{page-mis}
\loadmarkfile{page-mul}
\loadmarkfile{page-set}
\loadmarkfile{pack-lyr}
\loadmarkfile{page-mak}
\loadmarkfile{strc-pag}
\loadmarkfile{page-lin}
\loadmarkfile{page-par}
\loadmarkfile{page-mar}

\loadmarkfile{core-job} % why so late?

% so far

\loadmarkfile{strc-sec}
\loadmarkfile{strc-swd}
\loadmarkfile{strc-blk}

\loadmarkfile{page-imp}
\loadmarkfile{tabl-tbl}
\loadmarkfile{scrn-int}
\loadmarkfile{tabl-ntb}
\loadmarkfile{tabl-nte}
\loadmarkfile{tabl-ltb}

%D A few more languages, that have specifics using core
%D functionality:

%loadmarkfile{lang-ara} % undefined
\loadmarkfile{lang-chi}
\loadmarkfile{lang-jap}

%D How about fill||in fields and related stuff?

\loadmarkfile{java-ini}
\loadmarkfile{scrn-fld}
\loadmarkfile{scrn-hlp}

%D Registers can depend on fields, so we load that now.

\loadmarkfile{strc-reg}

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

\ifnum\texengine=\xetexengine
    \loadmarkfile{font-xtx}
\fi

\loadmarkfile{font-unk}
\loadmarkfile{font-uni}
\loadmarkfile{font-bfm}

\loadmarkfile{enco-pfr}

\loadmarkfile{type-ini}
\loadmarkfile{type-set}
\loadmarkfile{type-def}

%D Properties. Don't ask.

\loadmarkfile{prop-ini}
\loadmarkfile{prop-lay}
\loadmarkfile{prop-mis}

%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}
\loadmarkfile{meta-pdf}

\loadmarkfile{meta-pag}

%D Special page handling (maybe even later)

\loadmarkfile{page-flw}
\loadmarkfile{page-spr}
\loadmarkfile{page-plg}
\loadmarkfile{page-str}

%D Anchoring graphics:

\loadmarkfile{anch-pgr}
\loadmarkfile{anch-bar}
\loadmarkfile{anch-snc}

%D Math.

\loadmarkfile{math-pln}
\loadmarkfile{math-ini}
\loadmarkfile{math-arr}
\loadmarkfile{math-frc}

%D Now we're ready for more core modules.

\loadmarkfile{core-fnt}
\loadmarkfile{strc-not}
\loadmarkfile{strc-lnt}

\loadmarkfile{core-mis}

\loadmarkfile{grph-trf}
\loadmarkfile{grph-inc}
\loadmarkfile{grph-fig}

\loadmarkfile{core-par}

\loadmarkfile{pack-box}
\loadmarkfile{page-app}
\loadmarkfile{meta-fig}

%D Language specific spacing.

\loadmarkfile{lang-spa}

%D Bibliographies:

\loadmarkfile{bibl-tra}

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

\loadmarkfile{xtag-ini}
\loadmarkfile{xtag-ext}
\loadmarkfile{xtag-exp}
\loadmarkfile{xtag-pre}
\loadmarkfile{xtag-xsd}
\loadmarkfile{xtag-rng}

%D How about this:

\loadmarkfile{meta-xml}

%D \TEX\ related logo's are always typeset in a special way.
%D Here they come:

\loadmarkfile{cont-log}

%D This one overloads af few things:

\loadmarkfile{core-ctx}

%D Defaults go here (more will be moved to this module
%D later):

\loadmarkfile{core-ini}
\loadmarkfile{core-def}

%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

\setupcurrentlanguage[\defaultlanguagetag]

\setupencoding[default=ec]

\usetypescript[fallback][\defaultencoding]

\setupbodyfont[rm,12pt]

\errorstopmode \dump \endinput