1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16\startmodule[mathtweaks]
17
18\unprotect
19
20\starttexdefinition protected showmathfonttweakstextaccent #1
21 \bTR
22 \bTD[width=7em,align=flushleft,style=mono] #1 \eTD
23 \bTD \m {\showglyphs \getvalue{#1}{i} } \eTD
24 \bTD \m {\showglyphs \getvalue{#1}{I} } \eTD
25 \bTD \m {\showglyphs \getvalue{#1}{x} } \eTD
26 \bTD \m {\showglyphs \getvalue{#1}{X} } \eTD
27 \bTD \m {\showglyphs \getvalue{#1}{xx} } \eTD
28 \bTD \m {\showglyphs \getvalue{#1}{XX} } \eTD
29 \eTR
30\stoptexdefinition
31
32\starttexdefinition protected showmathfonttweakswideaccent #1
33 \bTR
34 \bTD[width=7em,align=flushleft,style=mono] #1 \eTD
35 \bTD \m {\showglyphs \getvalue{#1}{i} } \eTD
36 \bTD \m {\showglyphs \getvalue{#1}{I} } \eTD
37 \bTD \m {\showglyphs \getvalue{#1}{x} } \eTD
38 \bTD \m {\showglyphs \getvalue{#1}{X} } \eTD
39 \bTD \m {\showglyphs \getvalue{#1}{xx} } \eTD
40 \bTD \m {\showglyphs \getvalue{#1}{XX} } \eTD
41 \bTD \m {\showglyphs \getvalue{#1}{xxxxx} } \eTD
42 \bTD \m {\showglyphs \getvalue{#1}{XXXXX} } \eTD
43 \eTR
44\stoptexdefinition
45
46\starttexdefinition protected showmathfonttweaksprime #1
47 \bTR
48 \bTD \type{#1} \eTD
49 \bTD \m {\showglyphs #1} \eTD
50 \eTR
51\stoptexdefinition
52
53\starttexdefinition protected showmathfonttweaksbracer #1
54 \bTR
55 \bTD \type{#1} \eTD
56 \bTD \m {\showglyphs \getvalue{#1}{x} } \eTD
57 \bTD \m {\showglyphs \getvalue{#1}{xxxxx} } \eTD
58 \bTD \m {\showglyphs \getvalue{#1}{X} } \eTD
59 \bTD \m {\showglyphs \getvalue{#1}{XXXXX} } \eTD
60 \eTR
61\stoptexdefinition
62
63\starttexdefinition protected showmathfonttweaks
64
65 \startsubject[title=text accents]
66 \startlinecorrection
67 \bTABLE[align=middle,offset=1ex]
68 \showmathfonttweaks_text_accent{grave}
69 \showmathfonttweaks_text_accent{bar}
70 \showmathfonttweaks_text_accent{acute}
71 \showmathfonttweaks_text_accent{hat}
72 \showmathfonttweaks_text_accent{check}
73 \showmathfonttweaks_text_accent{breve}
74 \showmathfonttweaks_text_accent{dot}
75 \showmathfonttweaks_text_accent{ring}
76 \showmathfonttweaks_text_accent{tilde}
77 \showmathfonttweaks_text_accent{ddot}
78 \showmathfonttweaks_text_accent{dddot}
79 \eTABLE
80 \stoplinecorrection
81 \stopsubject
82
83 \startsubject[title=wide accents]
84 \startlinecorrection
85 \bTABLE[align=middle,offset=1ex]
86 \showmathfonttweaks_wide_accent{widegrave}
87 \showmathfonttweaks_wide_accent{widebar}
88 \showmathfonttweaks_wide_accent{wideacute}
89 \showmathfonttweaks_wide_accent{widehat}
90 \showmathfonttweaks_wide_accent{widecheck}
91 \showmathfonttweaks_wide_accent{widebreve}
92 \showmathfonttweaks_wide_accent{widedot}
93 \showmathfonttweaks_wide_accent{widering}
94 \showmathfonttweaks_wide_accent{widetilde}
95 \showmathfonttweaks_wide_accent{wideddot}
96 \showmathfonttweaks_wide_accent{widedddot}
97 \eTABLE
98 \stoplinecorrection
99 \stopsubject
100
101 \startsubject[title=primes]
102 \startlinecorrection
103 \bTABLE[align=flushleft,offset=1ex]
104 \showmathfonttweaks_prime{x}
105 \showmathfonttweaks_prime{x}
106 \showmathfonttweaks_prime{x}
107 \showmathfonttweaks_prime{X}
108 \showmathfonttweaks_prime{X}
109 \showmathfonttweaks_prime{X}
110 \showmathfonttweaks_prime{x}
111 \showmathfonttweaks_prime{x2}
112 \showmathfonttweaks_prime{x2}
113 \showmathfonttweaks_prime{x22}
114 \showmathfonttweaks_prime{x}
115 \showmathfonttweaks_prime{x2}
116 \showmathfonttweaks_prime{x2}
117 \showmathfonttweaks_prime{x22}
118 \eTABLE
119 \stoplinecorrection
120 \stopsubject
121
122 \startsubject[title=bracers]
123 \startlinecorrection
124 \bTABLE[align=flushleft,offset=1ex]
125 \showmathfonttweaks_bracer{overbrace}
126 \showmathfonttweaks_bracer{underbrace}
127 \showmathfonttweaks_bracer{overbracket}
128 \showmathfonttweaks_bracer{underbracket}
129 \showmathfonttweaks_bracer{overparent}
130 \showmathfonttweaks_bracer{underparent}
131 \showmathfonttweaks_bracer{overbar}
132 \showmathfonttweaks_bracer{underbar}
133 \showmathfonttweaks_bracer{overline}
134 \showmathfonttweaks_bracer{underline}
135 \eTABLE
136 \stoplinecorrection
137 \stopsubject
138
139 \startsubject[title=whatever]
140 \startlinecorrection
141 \bTABLE[align=flushleft,offset=1ex]
142 \bTR
143 \bTD \m{\mfunction{máx}}\eTD
144 \eTR
145 \eTABLE
146 \stoplinecorrection
147 \stopsubject
148\stoptexdefinition
149
150\starttexdefinition protected showmathalphabettweakscheckflush #1
151 \dontleavehmode
152 \hbox \bgroup
153 \smallinfofont
154 \setstrut
155 \lower \dimexpr\dp\scratchbox\ht\strutbox\relax \hbox to \wd\scratchbox\bgroup
156 \hss
157 \strut
158 \hexnumber{#1}
159 \hss
160 \egroup
161 \hskip\wd\scratchbox
162 \box\scratchbox
163 \egroup
164\stoptexdefinition
165
166\starttexdefinition protected showmathalphabettweakscheckscripts
167 \subscript 1
168 \superscript 2
169 \subprescript 3
170 \superprescript4
171\stoptexdefinition
172
173\starttexdefinition protected showmathalphabettweakscheckhat #1
174 \setbox\scratchbox\ruledhbox {
175 \im {
176 \resetmathattributes
177 \widehat{\tocharacter#1}
178 \showmathalphabettweaks_check_scripts
179 }
180 }
181 \showmathalphabettweaks_check_flush{#1}
182\stoptexdefinition
183
184\starttexdefinition protected showmathalphabettweakscheckfences #1
185 \setbox\scratchbox\ruledhbox {
186 \im {
187 \resetmathattributes
188 \left(
189 \tocharacter#1\relax
190 \showmathalphabettweaks_check_scripts
191 \right)
192 }
193 }
194 \showmathalphabettweaks_check_flush{#1}
195\stoptexdefinition
196
197\starttexdefinition protected showmathalphabettweakscheck #1#2
198 \startsubsubsubject[title=#1]
199 \traverseblock {#1} {
200 \begingroup
201 \showglyphs
202 \showfontitalics
203 \showfontkerns
204 #2{##1}
205 \endgroup
206 \space\space
207 }
208 \removeunwantedspaces
209 \stopsubsubsubject
210\stoptexdefinition
211
212\starttexdefinition protected showmathalphabettweaksall #1
213 \startsubsubject[title={Numbers}]
214 \showmathalphabettweaks_check{digits normal}#1
215 \showmathalphabettweaks_check{digits bold}#1
216 \showmathalphabettweaks_check{digits sansserif normal}#1
217 \showmathalphabettweaks_check{digits sansserif bold}#1
218 \showmathalphabettweaks_check{digits monospace}#1
219 \showmathalphabettweaks_check{digits doublestruck}#1
220 \stopsubsubject
221 \startsubsubject[title={Lowercase}]
222 \showmathalphabettweaks_check{lowercase normal}#1
223 \showmathalphabettweaks_check{lowercase italic}#1
224 \showmathalphabettweaks_check{lowercase bold}#1
225 \showmathalphabettweaks_check{lowercase bold italic}#1
226 \showmathalphabettweaks_check{lowercase sansserif normal}#1
227 \showmathalphabettweaks_check{lowercase sansserif italic}#1
228 \showmathalphabettweaks_check{lowercase sansserif bold}#1
229 \showmathalphabettweaks_check{lowercase sansserif bolditalic}#1
230 \showmathalphabettweaks_check{lowercase monospace}#1
231 \showmathalphabettweaks_check{lowercase fraktur}#1
232 \showmathalphabettweaks_check{lowercase bold fraktur}#1
233 \showmathalphabettweaks_check{lowercase script}#1
234 \showmathalphabettweaks_check{lowercase bold script}#1
235 \showmathalphabettweaks_check{lowercase doublestruck}#1
236 \showmathalphabettweaks_check{lowercase greek normal}#1
237 \showmathalphabettweaks_check{lowercase greek italic}#1
238 \showmathalphabettweaks_check{lowercase greek bold}#1
239 \showmathalphabettweaks_check{lowercase greek bold italic}#1
240
241
242 \showmathalphabettweaks_check{lowercase greek sansserif bold}#1
243 \showmathalphabettweaks_check{lowercase greek sansserif bolditalic}#1
244 \stopsubsubject
245 \startsubsubject[title={Uppercase}]
246 \showmathalphabettweaks_check{uppercase normal}#1
247 \showmathalphabettweaks_check{uppercase italic}#1
248 \showmathalphabettweaks_check{uppercase bold}#1
249 \showmathalphabettweaks_check{uppercase bolditalic}#1
250 \showmathalphabettweaks_check{uppercase sansserif normal}#1
251 \showmathalphabettweaks_check{uppercase sansserif italic}#1
252 \showmathalphabettweaks_check{uppercase sansserif bold}#1
253 \showmathalphabettweaks_check{uppercase sansserif bolditalic}#1
254 \showmathalphabettweaks_check{uppercase monospace}#1
255 \showmathalphabettweaks_check{uppercase fraktur}#1
256 \showmathalphabettweaks_check{uppercase bold fraktur}#1
257 \showmathalphabettweaks_check{uppercase script}#1
258 \showmathalphabettweaks_check{uppercase bold script}#1
259 \showmathalphabettweaks_check{uppercase doublestruck}#1
260 \showmathalphabettweaks_check{uppercase greek normal}#1
261 \showmathalphabettweaks_check{uppercase greek italic}#1
262 \showmathalphabettweaks_check{uppercase greek bold}#1
263 \showmathalphabettweaks_check{uppercase greek bolditalic}#1
264 \showmathalphabettweaks_check{uppercase greek sansserif bold}#1
265 \showmathalphabettweaks_check{uppercase greek sansserif bolditalic}#1
266 \stopsubsubject
267\stoptexdefinition
268
269\starttexdefinition protected showmathaccenttweaks
270 \showmathalphabettweaks_all\showmathalphabettweaks_check_hat
271\stoptexdefinition
272
273\starttexdefinition protected showmathfencetweaks
274 \showmathalphabettweaks_all\showmathalphabettweaks_check_fences
275\stoptexdefinition
276
277\starttexdefinition protected showmathmiddletweaks
278 \dostepwiserecurse {5} {75} {1} {
279 $\left\{
280 \mathatom class \mathconstructcode \bgroup \vcenter \bgroup \hbox \bgroup
281 \blackrule
282 [\c!height=\dimexpr##1pt2\relax,
283 \c!depth=\dimexpr##1pt2\relax,
284 \c!width=\emwidth,
285 \c!color=darkblue]
286 \egroup \egroup \egroup
287 \middle
288
289 \right)$
290 \space
291 }
292 \removeunwantedspaces
293\stoptexdefinition
294
295\starttexdefinition protected showmathvarianttweaks
296\dm {
297 \dorecurse {\nofmathvariants "28} {
298 \char \getmathvariant ##1 "28
299 \char \getmathvariant ##1 "7B
300 \char \getmathvariant ##1 "7C
301 \char \getmathvariant ##1 "7D
302 \char \getmathvariant ##1 "29
303 }
304}
305\stoptexdefinition
306
307\protect
308
309\stopmodule
310
311\continueifinputfile{smathtweaks.mkxl}
312
313\setuplayout
314 [tight]
315
316\setuphead
317 [chapter]
318 [style=\bfd]
319
320\setuphead
321 [section]
322 [style=\bfc]
323
324\setuphead
325 [subsection]
326 [style=\bfb]
327
328\setuphead
329 [subsubsection]
330 [before=\blank,
331 style=\bfa]
332
333
334
335\starttext
336
337
338
339 \doifelse {\getdocumentargument{bodyfont}} {} {
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354 \setupbodyfont[bonum] \starttitle[title=\fontclass] \showmathmiddletweaks \stoptitle
355
356
357 } {
358
359 \normalexpanded{\setupbodyfont[\getdocumentargument{bodyfont},12pt]}
360 \showmathfonttweaks
361 \showmathaccenttweaks
362 \showmathfencetweaks
363 \showmathmiddletweaks
364 \showmathvarianttweaks
365 }
366
367\stoptext
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 |