bachotex-2011-cld-and-mkvi.tex /size: 3300 b    last modification: 2020-07-01 14:35
1% \enablemode[print]
2
3\usemodule[present-stepwise,present-four,abr-02]
4
5\abbreviation [METAPOST] {MetaPost} {}
6
7\startdocument
8  [title=Finding\par the\par balance]
9
10%D This style is mostly for myself \unknown\ to get an idea of what I need to
11%D talk about, in this case the rather drastic transformation of the \CONTEXT\
12%D code base to \MKIV\ and \LUA.
13
14\startsubject[title={No way back}]
15
16\StartSteps
17
18\startitemize
19\startitem We have passed the point of no return already years ago. \stopitem \FlushStep
20\startitem Most users now use \MKIV, with an occasional fall-back on \MKII. \stopitem \FlushStep
21\startitem The code base is now completely split, with the exception of some modules. \stopitem \FlushStep
22\startitem Some solutions are implemented in \LUA\ with only a small wrapper at the \TEX\ end. \stopitem \FlushStep
23\stopitemize
24
25\StopSteps
26
27\stopsubject
28
29\startsubject[title={To get an idea}]
30
31\StartSteps
32
33\startitemize
34\startitem structure: sectioning, notes, descriptions, registers, synonyms \stopitem \FlushStep
35\startitem typesetting: sectioning, notes, descriptions, \stopitem \FlushStep
36\stopitemize
37
38\StopSteps
39
40\stopsubject
41
42\startsubject[title={Hybrid coding}]
43
44\StartSteps
45
46\startitemize
47\startitem The complete \CONTEXT\ user interface is available at the \LUA\ end (context namespace). \stopitem \FlushStep
48\startitem Eventually all \LUA\ solutions will have a dual interface: \LUA\ (all kind of namespaces) and
49towards \TEX\ (the command namespace). \stopitem \FlushStep
50\startitem Some of the support \LUA\ modules can also be used independent from \CONTEXT. \stopitem \FlushStep
51\stopitemize
52
53\StopSteps \StopPage
54
55\startsubject[title={Coding in \TEX}]
56
57\StartSteps
58
59\starttyping
60\starttabulate[|l|c|r|]
61\NC one   \NC 1 \NC first  \NC \NR
62\NC two   \NC 2 \NC second \NC \NR
63\NC three \NC 3 \NC third  \NC \NR
64\stoptabulate
65\stoptyping
66\FlushStep
67
68\StopSteps \StopPage
69
70\startsubject[title={Coding in \LUA}]
71
72\StartSteps
73
74\starttyping
75local NC = context.NC
76local NR = context.NR
77
78context.starttabulate { "|l|c|r|" }
79NC() one   NC() 1 NC() first  NC() NR()
80NC() two   NC() 2 NC() second NC() NR()
81NC() three NC() 3 NC() third  NC() NR()
82context.stoptabulate()
83\stoptyping
84\FlushStep
85
86\StopSteps \StopPage
87
88\startsubject[title={Pure \LUA\ vs \TEX}]
89
90\StartSteps
91
92\starttyping
93function converters.ordinal(n,language)
94    local t = ordinals[language]
95    return t and t(n)
96end
97
98function commands.ordinal(n,language)
99    local t = ordinals[language]
100    local o = t and t(n)
101    if o then
102        context.highordinalstr(o)
103    end
104end
105\stoptyping
106\FlushStep
107
108\StopSteps \StopPage
109
110\startsubject[title={Up to \MKVI}]
111
112\StartSteps
113
114\starttyping
115\def\MyPlace#Country#City%
116  {\blank
117   #City is situated in #Country
118   \blank}
119
120\starttexdefinition MyName #Name
121    My name is: #Name.
122\stoptexdefinition
123
124\MyPlace{Netherlands}{Hasselt}
125\MyPlace{Poland}     {Bachotek}
126
127\MyName{Hans Hagen}
128\stoptyping
129\FlushStep
130
131\StopSteps \StopPage
132
133\startsubject[title={\CONTEXT\ \LUA\ Documents}]
134
135\StartSteps
136
137Let's look at some examples: \FlushStep
138
139\starttyping
140cld-math-001.cld
141music-001.cld
142m-zint.mkiv
143s-edu-01.mkiv
144m-morse.mkvi
145scrn-wid.[lua|mkvi]
146[grph|lpdf|back]-swf.mkiv
147\stoptyping
148\FlushStep
149
150(In 2016 I'd show different examples.) \FlushStep
151
152\StopSteps \StopPage
153
154\stopdocument
155