summaryrefslogtreecommitdiff
path: root/doc/context/presentations/context/2021/context-2021-math.tex
blob: fce4ca4d51e26fc973329c291d41d43dc224c0b8 (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
% language=us

\usemodule[present-boring,abbreviations-logos]

\definecolor[maincolor] [r=.4]
\definecolor[extracolor][s=.1]

\startdocument
  [title={MATH},
   banner={complete control},
   location={context\enspace {\bf 2021}\enspace meeting}]

\starttitle[title=The benchmark]

\startitemize

\startitem
    Traditional \TEX\ has set the benchmark for typesetting math.
\stopitem

\startitem
    It uses three categories of fonts: alphabet, symbol, extensible.
\stopitem

\startitem
    Limitations in fonts have lead to some curious handling of dimensions.
\stopitem

\startitem
    The fact that there is \type {\over} makes for multipass scanning and
    processing.
\stopitem

\startitem
    The last family counts (when entering the second pass) so one has to use very
    controlled font switching.
\stopitem

\startitem
    Some features (limits, integrals, primes) rely on special macros and parsing.
\stopitem

\startitem
    One can end up in tricky font switching. Also, quite some fonts are loaded in
    order to set up the machinery.
\stopitem

\stopitemize

\stoptitle

\starttitle[title=Todays reality]

\startitemize

\startitem
    We now use \OPENTYPE\ math fonts. In fact, in \MKIV\ we always used only one
    font instance (unless we mix font families).
\stopitem

\startitem
    We operate in the \UNICODE\ domain, so in the end there was no need to bump the
    number of families in \LUATEX.
\stopitem

\startitem
    In \CONTEXT\ we use only a few font families: regular, regular r2l, bold, bold r2l.
\stopitem

\startitem
    All the tricky stuff is done with the help of \LUA. This already started very
    early in the \LUATEX\ project and has not changed.
\stopitem

\startitem
    But we still run into issues because the available fonts are inconsistent,
    incompatible, have issues and that is unlikely to change.
\stopitem

\startitem
    We have a virtual font system in place that was used during the transition (when no
    fonts were available).
\stopitem

\startitem
    In \CONTEXT\ there are various ways to deal with shortcomings in or extensions to fonts.
\stopitem

\startitem
    At some point we need to make up our minds, accept the issues with fonts, and
    just fix things runtime.
\stopitem

\stopitemize

\stoptitle

\starttitle[title=The engine]

\startitemize

\startitem
    In \LUATEX\ we started with a hybrid approach but eventually ended up with
    more split code paths.
\stopitem

\startitem
    In \LUAMETATEX\ nearly all aspects of the engine had made configurable and are under
    user control.
\stopitem

\startitem
    This permits experiments where we can apply old methods onto new fonts.
\stopitem

\stopitemize

\stoptitle

\starttitle[title=The tricky things]

\startitemize

\startitem
    Spacing in traditional math is a combination of widths and italic correction:
    we need to add them and sometimes afterwards subtract the italic correction.
    In \OPENTYPE\ math we don't lie about dimensions and apply italic correction
    selectively (as we have staircase kerns).
\stopitem

\startitem
    Special symbols like primes are quite inconsistent wrt dimensions and positioning
    and we need to catch that. We also need robust ways to collapse them to the proper
    \UNICODE\ symbol.
\stopitem

\startitem
    Larger variants (these \type {\bigg} things) needs some attention too.
\stopitem

\startitem
    We need to map characters onto the right shaped (alphabets) because hardly
    anyone will enter the \UNICODE\ math characters directly.
\stopitem

\startitem
    We might want to fix scripts, italics, kern pairs etc.
\stopitem

\stopitemize

\stoptitle

\starttitle[title=Implementation]

Among the new features (introduced over a period of time) are:

\startitemize

\startitem
    All kind of inter|-|class spacing parameters (in addition to what \LUATEX\
    already provides).
\stopitem

\startitem
    Dozens of \OPENTYPE\ font related spacing parameters (more that traditional
    \TEX).
\stopitem

\startitem
    Opened up additional font (and taste) related parameters (hard coded in
    traditional \TEX).
\stopitem

\startitem
    Opened up style related parameters (hard coded in traditional \TEX).
\stopitem

\startitem
    Control codes that make the engine follow a different (the traditional) code
    path (which can come in handy when testing or writing manuals).
\stopitem

\startitem
    The ability to simplify the result a bit wrt characters (the engine loves to
    box a lot).
\stopitem

\startitem
    Efficient font, style and parameter scaling by reusing fonts and thereby
    limiting the number of instances.
\stopitem

\startitem
    More options to special (constructed) symbols.
\stopitem

\startitem
    Let math related nodes carry around more control properties and states.
\stopitem

\startitem
    Support of local changes to math parameters.
\stopitem

\stopitemize

\stoptitle

\stopdocument

% mml
% vf chars for extensibles

% noads.handlers.showtree
% noads.handlers.unscript
% noads.handlers.unstack
% noads.handlers.variants
% noads.handlers.relocate
% noads.handlers.families
% noads.handlers.render
% noads.handlers.collapse
% noads.handlers.fixscripts
% noads.handlers.domains
% noads.handlers.autofences
% noads.handlers.resize
% noads.handlers.respace
% noads.handlers.alternates
% noads.handlers.tags
% noads.handlers.italics
% noads.handlers.kernpairs
% noads.handlers.classes

% builders.kernel.mlisttohlist
% noads.handlers.makeup
% noads.handlers.align