mk-iitoiv.tex /size: 4512 b    last modification: 2023-12-21 09:43
1% language=us
2
3\startcomponent mk-iitoiv
4
5\environment mk-environment
6
7\chapter{From \MKII\ to \MKIV}
8
9Sometime in 2005 the development of \LUATEX\ started, a further
10development of \PDFTEX\ and a precursor to \PDFTEX\ version~2. This
11\TEX\ variant will provide:
12
13\startitemize[packed]
14\item 21--32 bit internals plus a code cleanup
15\item flexible support for \OPENTYPE\ fonts
16\item an internal \UTF\ data flow
17\item the bidirectional typesetting of \ALEPH
18\item \LUA\ callbacks to the most relevant \TEX\ internals
19\item some extensions to \TEX\ (for instance math)
20\item an efficient way to communicate with \METAPOST
21\stopitemize
22
23In the tradition of \TEX\ this successor will be downward
24compatible in most essential parts and in the end, there is
25still \PDFTEX\ version~1 as fall back.
26
27In the mean time we have seen another unicode variant show up,
28\XETEX\ which is under active development, uses external
29libraries, provides access to the fonts on the operating system,
30etc.
31
32From the beginning, \CONTEXT\ always worked with all engines. This
33was achieved by conditional code blocks: depending on what engine
34was used, different code was put in the format and|/|or used at
35runtime. Users normally were unaware of this. Examples of engines
36are \ETEX, \ALEPH, and \XETEX. Because nowadays all engines
37provide the \ETEX\ features, in August 2006 we decided to consider
38those features to be present and drop providing the standard \TEX\
39compatible variants. This is a small effort because all code that
40is sensitive for optimization already has \ETEX\ code branches for
41many years.
42
43However, with the arrival of \LUATEX, we need a more drastic approach.
44Quite some existing code can go away and will be replaced by different
45solutions. Where \TEX\ code ends up in the format file, along with
46its state, \LUA\ code will be initiated at run time, after a \LUA\
47instance is started. \CONTEXT\ reserves its own instance of \LUA.
48
49Most of this will go unnoticed for the users because the user
50interface will not change. For developers however, we need to
51provide a mechanism to deal with these issues. This is why, for the
52first time in \CONTEXT's history we will officially use a kind of
53version tag. When we changed the low level interface from Dutch to
54English we jokingly talked of version~2. So, it makes sense to
55follow this lead.
56
57\startitemize[packed]
58
59\item \notabene {\CONTEXT\ \MKI}\quad At that moment we still had a
60low level Dutch interface, invisible for users but not for developers.
61
62\item \notabene {\CONTEXT\ \MKII}\quad We now have a low level English
63interface, which (as we indeed saw happen) triggers more development by
64users.
65
66\item \notabene {\CONTEXT\ \MKIV}\quad This is the next generation of
67\CONTEXT, with parts re||implemented. It's an at some points drastic
68system overhaul.
69
70\stopitemize
71
72Keep in mind that the functionality does not change, although in
73some places, for instance fonts, \MKIV\ may provide additional
74functionality. The reason why most users will not notice the
75difference (maybe apart from performance and convenience) is that at
76the user interface level nothing changes (most of it deals with
77typesetting, not with low level details).
78
79The hole in the numbering permits us to provide a \MKIII\ version
80as well. Once \XETEX\ is stable, we may use that slot for \XETEX\
81specific implementations.
82
83As per August 2006 the banner is adapted to this distinction:
84
85\starttyping
86...  ver: 2006.09.06 22:46 MK II  fmt: 2006.9.6  ...
87...  ver: 2006.09.06 22:47 MK IV  fmt: 2006.9.6  ...
88\stoptyping
89
90This numbering system is reflected at the file level in such a way
91that we can keep developing the way we do, i.e.\ no files all over
92the place, in subdirectories, etc.
93
94Most of the system's core files are not affected, but some may be, like
95those dealing with fonts, input- and output encodings, file handling,
96etc. Those files may come with different suffixes:
97
98\startitemize
99
100\item \type {somefile.tex}: the main file, implementing the interface
101and common code
102
103\item \type {somefile.mkii}: mostly existing code, suitable for good
104old \TEX\ (\ETEX, \PDFTEX, \ALEPH).
105
106\item \type {somefile.mkiv}: code optimized for use with \LUATEX, which
107could follow completely different approaches
108
109\item \type {somefile.lua}: \LUA\ code, loaded at format generation time
110and|/|or runtime
111
112\stopitemize
113
114As said, some day \type {somefile.mkiii} code may show up. Which
115variant is loaded is determined automatically at format generation
116time as well as at run time.
117
118\stopcomponent
119