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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
|
%D \module
%D [ file=context,
%D version=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.
% dec 07 2001 : cont-en.efmt : 4,035,912
% aug 07 2004 : cont-en.efmt : 4,928,967 (5 more patterns)
% todo 1: each module english commands
% todo 2: replace lowlevel *!* by english variants
% todo 3: make files more independent
% todo 4: cleanup specials + adapt interface
% todo 5: remove/replace old stuff (by new stuff, like couplepaper)
% todo 6: create even more hooks (so that users can overload)
% todo 7: conditionals
% todo 8: redesign tui/tuo
\catcode`\{=1 \catcode`\}=2
%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.
\def\contextversion{2006.02.01 22:22}
%D For those who want to use this:
\def\fmtname{context}
%D Welcome to the main module. When this module is ran through
%D \type{initex} or \type {tex -i} or \type {whatevertex} using
%D \type{whatever switch}, the \CONTEXT\ format file is
%D generated. During this process the user is asked for an
%D interface language. Supplying \type{dutch} will generate a
%D dutch version of \CONTEXT, supplying \type {english} will of
%D course end op in a english version.
%D
%D Another option is to use \TEXEXEC:
%D
%D \starttyping
%D texexec --make [--alone] [--engine] [--all]
%D texexec --make [--alone] [--engine] en nl ... metafun mptopdf
%D \stoptyping
%D
%D More information can be found in the \TEXEXEC\ manual.
%D When you write modules (or extensions) you should avoid
%D conflicts with existing macro names and mechanisms. If you are
%D coming from another macro package, don't assume that macros
%D with the same name are doing the same! \CONTEXT\ was written
%D from scratch and therefore similarities are often a coincidence
%D (to some extent one always ends up with the same names for
%D similar concepts). The underlying models for elementary subsystems
%D that deal with encodings, languages and fonts probably differ.
%D
%D Time has learned that users coming from \LATEX\ should not fall
%D into thinking that macros like \type {\protect} represent the
%D same functionality in both systems; actually, due to the way
%D \CONTEXT\ is set up, some of those macros do complete different
%D things. Macro packages evolve independent of each other, which
%D means that code written for one system will not work in another
%D system, unless it's real generic code.
%D
%D An API will become available soon (keep an eye on the ConTeXt
%D Wiki www.contextgarden.org) and or listen in to the context
%D mailing list (ntg-context@ntg.nl). Much additional information
%D can be found at the PRAGMA website (www.pragma-ade.com).
%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.
\input syst-pln.tex % stripped plain
\input syst-prm.tex % saved primitives (will be extended)
\input syst-etx.tex % etex
\input syst-omg.tex % omega-aleph
\input syst-xtx.tex % xetex
\input syst-gen.tex
\input syst-ext.tex
\input syst-new.tex
\input syst-con.tex
\input syst-var.tex
\input math-pln.tex % basic plain math
%D To enable selective loading, we say:
\CONTEXTtrue
%D In order to conveniently load files, we need a few
%D support modules.
\input supp-ini.tex
\input supp-fil.tex
\input supp-dir.tex
%D After this we're ready for the multi||lingual interface
%D modules.
\input mult-ini.tex
\input mult-sys.tex
\input mult-con.tex
\input mult-com.tex
%D We also use some third party macros. These are loaded by
%D saying:
\input thrd-ran.tex % based on: Donald Arseneau
\input 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.
\input supp-box.tex
\input supp-mrk.tex
\input supp-vis.tex
\input supp-fun.tex
\input supp-eps.tex
\input supp-pdf.tex
\input supp-spe.tex
\input supp-mps.tex
\input supp-mpe.tex
\input supp-tpi.tex
\input supp-mat.tex
\input supp-ran.tex
\input supp-ali.tex
%D The next module deals with language specific typographic
%D extensions.
\input typo-ini.tex % I must not forget about this module
%D Verbatim typesetting is implemented in a separate class of
%D modules. The pretty typesetting modules are loaded at run
%D time.
\input verb-ini.tex % replaces supp-ver
%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:
\input core-var.tex
\input core-ins.tex
\input core-fil.tex
\input core-con.tex
%D We already need some synonyms (patterns). At runtime this
%D file will be reloaded.
\input 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{|}.
\input 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.
\input supp-lan.tex
\input supp-num.tex
\input supp-pat.tex % generic pattern loading
%D The next few modules do what their names state. They
%D load additional definition modules when needed.
\input enco-ini.tex
\input filt-ini.tex
\input hand-ini.tex
\input regi-ini.tex
\input lang-ini.tex
\input lang-ctx.tex
\input lang-dis.tex % after lang-ctx !
\input unic-ini.tex
%input unic-ext.tex % obsolete
\input colo-ini.tex
\input colo-ext.tex
\input spec-mis.tex
\input spec-ini.tex
\input spec-def.tex
\input spec-var.tex
%D For the moment we load a lot of languages. In the future
%D we'll have to be more space conservative.
\input lang-spe.tex
\input lang-lab.tex
\input lang-ger.tex
\input lang-ita.tex
\input lang-sla.tex
\input lang-alt.tex
\input lang-ana.tex
\input lang-art.tex
\input lang-bal.tex
\input lang-cel.tex
\input lang-grk.tex
\input lang-ind.tex
\input lang-ura.tex
\input lang-vn.tex % vietnamese, maybe this belongs in lang-ita
%D All kind of symbols are handled in:
\input symb-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.
\input core-gen.tex
\input core-new.tex
\input core-uti.tex
\input core-mar.tex
\input core-mak.tex
\input core-dat.tex
\input core-grd.tex
\input core-ver.tex
\input core-vis.tex
%input core-con.tex
\input core-rul.tex
\input core-tab.tex
\input core-nav.tex
\input core-ref.tex
\input core-obj.tex
\input core-buf.tex
\input core-lst.tex
\input core-num.tex
\input core-itm.tex
\input core-des.tex
\input core-mat.tex
\input core-syn.tex
\input core-spa.tex
\input core-sys.tex
\input page-ini.tex
\input page-not.tex
\input page-one.tex
\input page-lay.tex
\input page-log.tex
\input page-txt.tex
\input page-sid.tex
\input page-flt.tex
\input page-mul.tex
\input page-set.tex
\input page-lyr.tex
\input page-mak.tex
\input page-num.tex
\input page-lin.tex
\input page-mar.tex
\input page-bck.tex
\input page-app.tex % unfinished
\input page-flw.tex % experimental: flows
\input page-spr.tex % experimental: spreads
\input core-job.tex
% so far
\input core-sec.tex
\input page-imp.tex
\input core-tbl.tex
\input core-int.tex
\input core-ntb.tex
\input core-ltb.tex
%D Like languages, fonts, encodings and symbols, \METAPOST\
%D support is also organized in its own class of modules.
\input meta-ini.tex
\input meta-pag.tex
\input meta-fig.tex
%D On which the next one depends:
\input core-pos.tex
\input core-snc.tex
%D A few more languages, that have specifics using core
%D functionality:
\input lang-chi.tex
\input lang-jap.tex
%D How about fill||in fields and related stuff?
\input java-ini.tex % needs a cleanup
\input core-fld.tex % needs a cleanup
\input core-hlp.tex % will become a m-module
%D Registers can depend on fields, so we load that now.
\input 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.
\input font-ini.tex
\input font-uni.tex
\input font-bfm.tex
\input enco-pfr.tex % uses \everyfont
\input type-ini.tex
\input type-def.tex
\input prop-ini.tex
\input prop-lay.tex % needs core-ref.tex
\input prop-mis.tex
\input math-ini.tex % needs enco-ini.tex
%D Now we're ready for more core modules.
\input core-fnt.tex % todo: document setupinitial !
\input core-not.tex
\input core-lnt.tex % to be documented (with idris)
\input core-mis.tex
\input core-fig.tex % after page body
\input core-par.tex % maybe this should become a m-module
\input core-box.tex
%D Language specific spacing.
\input lang-spa.tex
%D Sorting:
% not yet: \input sort-ini.tex
%D Only the basic XML parser and remapper are part of the core.
%D These macrosa re loaded last since they overload and|/|or
%D extend previously defined ones.
\input xtag-ini.tex
\input xtag-ext.tex
\input xtag-prs.tex
\input xtag-map.tex % may become obsolete
\input xtag-stk.tex
\input xtag-exp.tex
\input xtag-pre.tex
\input xtag-xsd.tex
\input xtag-rng.tex
%input xtag-ent.tex
%D How about this:
\input meta-xml.tex % to be documented
% %D The next two modules implement some additional
% %D functionality concerning classes of documents and output.
% %D These modules probably will be replaced some day.
%
% \input docs-ini.tex % obsolete
% \input list-ini.tex % obsolete
%D \TEX\ related logo's are always typeset in a special way.
%D Here they come:
\input cont-log.tex
%D Defaults go here (more will be moved to this module
%D later):
\input core-ini.tex
\input core-def.tex
%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
%D Just to keep the user busy for a while, we say:
\startinterface english
\writestring{This package is based on Plain TeX. It uses an adapted version of the}
\writestring{extended mark mechanism of J. Fox (1987) and a few parts of the sidefloat}
\writestring{mechanism of D. Comenetz (1993). Most of D.E. Knuth's Plain TeX}
\writestring{(\fmtversion) is available and can be used without problems. This package}
\writestring{uses TaBlE, a package designed and copyrighted by M.J. Wichura (1988).}
\writestring{Only a few auxiliary files are generated, of which some must be processed}
\writestring{by TeXUtil (\utilityversion). The current blockversion is \blockversion.}
\stopinterface
\startinterface dutch
\writestring{Dit pakket is gebaseerd op Plain TeX. Er wordt gebruik gemaakt van een}
\writestring{aangepaste versie van het mark mechanisme van J. Fox (1987) en onderdelen}
\writestring{van het sidefloat mechanisme van D. Comenetz (1993). De functionaliteit}
\writestring{van D.E. Knuth's Plain TeX (\fmtversion) is grotendeels beschikbaar en}
\writestring{kan zonder problemen worden gebruikt. Dit pakket gebruikt TaBlE, ontworpen door}
\writestring{M.J. Wichura (1988), die ook het auteursrecht bezit. Er worden slechts een}
\writestring{paar hulpfiles gegenereerd, waarvan er enkele moeten worden bewerkt door}
\writestring{TeXUtil (\utilityversion). Het blokmechanisme heeft versienummer \blockversion.}
\stopinterface
\startinterface german
\writestring{Dieses Paket basiert auf Plain-TeX und benutzt eine angepasste Version}
\writestring{des erweiterten mark-Mechanismus von J. Fox (1987) und einige Teile des}
\writestring{sidefloat-Mechanismus von D. Comenetz (1993). Ein Grossteil D.E. Knuths}
\writestring{Plain-TeX (\fmtversion) ist verfuegbar und kann ohne Probleme benutzt werden.}
\writestring{Dieses Paket benutzt TaBlE, ein von M.J. Wichura (1988) erstelltes und}
\writestring{geschuetztes Paket. Nur einige Hilfsdateien werden erstellt; einige davon}
\writestring{muessen von TeXUtil (\utilityversion) bearbeitet werden. Die aktuelle Block-}
\writestring{version ist \blockversion.}
\stopinterface
\startinterface czech
\writestring{Tento balik je zalozen na Plain TeXu. Pouziva prizpusobenou verzi}
\writestring{rozsireneho znackovaciho mechanismu J. Foxe (1987) a nekolik casti}
\writestring{sidefloat mechanismu D. Comenetze (1993). Vetsina prikazu Plain TeXu}
\writestring{D. E. Knutha (\fmtversion) je dostupna a muze byt bez problemu pouzita.}
\writestring{Tento balik pouziva balik TaBlE, ktery vytvoril M. J. Wichura (1988).}
\writestring{Je generovano jen nekolik pomocnych souboru, z nichz nektere musi byt}
\writestring{zpracovany programem TeXUtil (\utilityversion). Aktualni verze}
\writestring{}
\writestring{THE CZECH USER INTERFACE IS STILL UNDER DEVELOPMENT!}
\stopinterface
\startinterface italian
\writestring{Questo pacchetto è basato sul Plain TeX. Usa una versione adattata del}
\writestring{meccanismo di marcatura esteso di J. Fox (1987) ad alcune parti del}
\writestring{meccanismo per gli oggetti mobili laterali di D. Comenetz (1993).}
\writestring{La maggior parte del Plain TeX (\fmtversion) di D.E. Knuth è disponibile}
\writestring{e può essere usata senza problemi. Questo pacchetto usa TaBlE,}
\writestring{un pacchetto progettato da e con diritti di copia di M.J. Wichura (1988).}
\writestring{Vengono generati pochi file ausiliari, alcuni dei quali devono essere}
\writestring{elaborati da TeXUtil (\utilityversion). La versione attuale del blocco}
\writestring{è \blockversion.}
\writestring{}
\writestring{L'INTERFACCIA UTENTE ITALIANA E' ANCORA IN VIA DI SVILUPPO!}
\writestring{THE ITALIAN USER INTERFACE IS STILL UNDER DEVELOPMENT!}
\stopinterface
\startinterface romanian
\writestring{Acest pachet este bazat pe Plain TeX. Foloseste o versiune adaptata a}
\writestring{mecanismului extins de marcare a lui J. Fox (1987) si cateva parti a mecanismului }
\writestring{blocurilor marginale a lui D. Comenetz (1993). Cea mai mare parte a Plain Tex}
\writestring{(\fmtversion) a lui D.E. Knuth este disponibila si poate fi folosita fara probleme.}
\writestring{Acest pachet foloseste TaBlE, un pachet proiectat si creat de M.J. Wichura (1988).}
\writestring{Numai un numar de fisiere auxiliare sunt generate, din care unele trebuie procesate}
\writestring{de catre TeXUtil (\utilityversion). Versiunea curenta de blocuri este \blockversion.}
\stopinterface
\edef\copyrightversion
{Copyright 1990-\the\normalyear\normalspace /
PRAGMA ADE / J. Hagen - A.F. Otten}
\writeline\writestring{\copyrightversion}\writeline
% %D Except from english, no hyphenation patterns are loaded
% %D yet. Users can specify their needs in the next module:
%
% \input cont-usr.tex
%D Let's quit this file when doing a \type {cont-..} generation.
\doifparentfileelse{context}{\donothing}{\endinput}
%D Unless we're generating a \type {cont-..} format, we also
%D do the following.
%D Except from english, no hyphenation patterns are loaded
%D yet. Users can specify their needs in the next module:
\loaduserspecifications
%D Next we default to the same language as the interface.
\unprotect
\installlanguage [\s!en] [\c!state=\v!start]
\startinterface english
\installlanguage [\s!uk] [\c!state=\v!start]
\stopinterface
\appendtoks \language [\s!en] \to \everyjob
\appendtoks \mainlanguage [\s!en] \to \everyjob
\startinterface german
\installlanguage [\s!de] [\c!state=\v!start]
\appendtoks \language [\s!de] \to \everyjob
\appendtoks \mainlanguage [\s!de] \to \everyjob
\stopinterface
\startinterface dutch
\installlanguage [\s!nl] [\c!state=\v!start]
\appendtoks \language [\s!nl] \to \everyjob
\appendtoks \mainlanguage [\s!nl] \to \everyjob
\stopinterface
\startinterface czech
\installlanguage [\s!cz] [\c!state=\v!start]
\appendtoks \language [\s!cz] \to \everyjob
\appendtoks \mainlanguage [\s!cz] \to \everyjob
\stopinterface
\startinterface italian
\installlanguage [\s!it] [\c!state=\v!start]
\appendtoks \language [\s!it] \to \everyjob
\appendtoks \mainlanguage [\s!it] \to \everyjob
\stopinterface
\startinterface romanian
\installlanguage [\s!ro] [\c!state=\v!start]
\appendtoks \language [\s!ro] \to \everyjob
\appendtoks \mainlanguage [\s!ro] \to \everyjob
\stopinterface
\protect
%D Finally we (pre)load some fonts.
\setupbodyfont [cmr,rm,12pt]
%D The next hook can be used to generate a local (extended)
%D format. This file is only searched for at the current
%D path.
% \readlocfile{cont-def.tex}
% {\writestatus{loading}{adding extensions from cont-def}}
% {}
%D Now dumping the format is all that's left to be done.
\errorstopmode \dump
\endinput
|