1if not modules then modules = { } end modules ['math-ttv'] = {
2 version = 1.001,
3 comment = "traditional tex vectors, companion to math-vfu.lua",
4 author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
5 copyright = "PRAGMA ADE / ConTeXt Development Team",
6 license = "see context related readme files",
7 dataonly = true,
8}
9
10local vfmath = fonts.handlers.vf.math
11local setletters = vfmath.setletters
12local setdigits = vfmath.setdigits
13
14local mathencodings = fonts.encodings.math
15
16local nps = fonts.helpers.newprivateslot
17
18
19
20
21
22
23
24
25mathencodings["large-to-small-private"] = {
26 [nps("ul brace piece")] = 0x7A,
27 [nps("ur brace piece")] = 0x7B,
28 [nps("ll brace piece")] = 0x7C,
29 [nps("lr brace piece")] = 0x7D,
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
60mathencodings["large-to-small"] = {
61 [0x00028] = 0x00,
62 [0x00029] = 0x01,
63 [0x0005B] = 0x02,
64 [0x0005D] = 0x03,
65 [0x0230A] = 0x04,
66 [0x0230B] = 0x05,
67 [0x02308] = 0x06,
68 [0x02309] = 0x07,
69 [0x0007B] = 0x08,
70 [0x0007D] = 0x09,
71 [0x027E8] = 0x0A,
72 [0x027E9] = 0x0B,
73 [0x0007C] = 0x0C,
74
75
76 [0x0005C] = 0x0F,
77
78
79
80
81 [0x02195] = 0x3F,
82
83
84 [0x0221A] = 0x70,
85 [0x021D5] = 0x77,
86 [0x02191] = 0x78,
87 [0x02193] = 0x79,
88 [0x021D1] = 0x7E,
89 [0x021D3] = 0x7F,
90 [0x0220F] = 0x59,
91 [0x02210] = 0x61,
92 [0x02211] = 0x58,
93 [0x0222B] = 0x5A,
94 [0x0222E] = 0x49,
95 [0x00302] = 0x62,
96 [0x00303] = 0x65,
97 [0x022C0] = 0x5E,
98 [0x022C1] = 0x5F,
99 [0x022C2] = 0x5C,
100 [0x022C3] = 0x5B,
101 [0x02044] = 0x0E,
102}
103
104
105
106
107
108
109mathencodings["tex-ex"] = {
110 [0x0220F] = 0x51,
111 [0x02210] = 0x60,
112 [0x02211] = 0x50,
113 [0x0222B] = 0x52,
114 [0x0222E] = 0x48,
115 [0x022C0] = 0x56,
116 [0x022C1] = 0x57,
117 [0x022C2] = 0x54,
118 [0x022C3] = 0x53,
119 [0x02A00] = 0x4A,
120 [0x02A01] = 0x4C,
121 [0x02A02] = 0x4E,
122
123 [0x02A04] = 0x55,
124 [0x02A06] = 0x46,
125}
126
127
128
129
130mathencodings["tex-mr"] = {
131 [0x00393] = 0x00,
132 [0x00394] = 0x01,
133 [0x02206] = 0x01,
134 [0x00398] = 0x02,
135 [0x0039B] = 0x03,
136 [0x0039E] = 0x04,
137 [0x003A0] = 0x05,
138 [0x003A3] = 0x06,
139 [0x003A5] = 0x07,
140 [0x003A6] = 0x08,
141 [0x003A8] = 0x09,
142 [0x003A9] = 0x0A,
143
144
145
146
147
148[0x00021] = 0x21,
149[0x00026] = 0x26,
150 [0x00028] = 0x28,
151 [0x00029] = 0x29,
152 [0x0002B] = 0x2B,
153 [0x0002F] = 0x2F,
154 [0x0003A] = 0x3A,
155 [0x02236] = 0x3A,
156 [0x0003B] = 0x3B,
157 [0x0003C] = 0x3C,
158 [0x0003D] = 0x3D,
159 [0x0003E] = 0x3E,
160 [0x0003F] = 0x3F,
161 [0x00391] = 0x41,
162 [0x00392] = 0x42,
163 [0x02145] = 0x44,
164 [0x00395] = 0x45,
165 [0x00397] = 0x48,
166 [0x00399] = 0x49,
167 [0x0039A] = 0x4B,
168 [0x0039C] = 0x4D,
169 [0x0039D] = 0x4E,
170 [0x0039F] = 0x4F,
171 [0x003A1] = 0x52,
172 [0x003A4] = 0x54,
173 [0x003A7] = 0x58,
174 [0x00396] = 0x5A,
175 [0x0005B] = 0x5B,
176 [0x0005D] = 0x5D,
177
178 [0x00302] = 0x5E,
179
180 [0x02146] = 0x64,
181 [0x02147] = 0x65,
182
183 [0x00303] = 0x7E,
184
185}
186
187mathencodings["tex-mr-missing"] = {
188 [0x02236] = 0x3A,
189}
190
191mathencodings["tex-ex-braces"] = {
192 [0x0007B] = 0x7B,
193 [0x0007D] = 0x7D,
194}
195
196mathencodings["tex-mi"] = {
197 [0x1D6E4] = 0x00,
198 [0x1D6E5] = 0x01,
199 [0x1D6E9] = 0x02,
200 [0x1D6F3] = 0x02,
201 [0x1D6EC] = 0x03,
202 [0x1D6EF] = 0x04,
203 [0x1D6F1] = 0x05,
204 [0x1D6F4] = 0x06,
205 [0x1D6F6] = 0x07,
206 [0x1D6F7] = 0x08,
207 [0x1D6F9] = 0x09,
208 [0x1D6FA] = 0x0A,
209 [0x1D6FC] = 0x0B,
210 [0x1D6FD] = 0x0C,
211 [0x1D6FE] = 0x0D,
212 [0x1D6FF] = 0x0E,
213 [0x1D716] = 0x0F,
214 [0x1D701] = 0x10,
215 [0x1D702] = 0x11,
216 [0x1D703] = 0x12,
217 [0x1D704] = 0x13,
218 [0x1D705] = 0x14,
219 [0x1D718] = 0x14,
220 [0x1D706] = 0x15,
221 [0x1D707] = 0x16,
222 [0x1D708] = 0x17,
223 [0x1D709] = 0x18,
224 [0x1D70B] = 0x19,
225 [0x1D70C] = 0x1A,
226 [0x1D70E] = 0x1B,
227 [0x1D70F] = 0x1C,
228 [0x1D710] = 0x1D,
229 [0x1D719] = 0x1E,
230 [0x1D712] = 0x1F,
231 [0x1D713] = 0x20,
232 [0x1D714] = 0x21,
233 [0x1D700] = 0x22,
234 [0x1D717] = 0x23,
235 [0x1D71B] = 0x24,
236 [0x1D71A] = 0x25,
237 [0x1D70D] = 0x26,
238 [0x1D711] = 0x27,
239 [0x021BC] = 0x28,
240 [0x021BD] = 0x29,
241 [0x021C0] = 0x2A,
242 [0x021C1] = 0x2B,
243
244
245 [nps("left hook piece")] = 0x2C,
246 [nps("right hook piece")] = 0x2D,
247 [0x025B7] = 0x2E,
248 [0x025C1] = 0x2F,
249 [0x022B3] = 0x2E,
250 [0x022B2] = 0x2F,
251
252
253
254
255
256
257
258
259
260
261
262 [0x0002C] = 0x3B,
263 [0x0003C] = 0x3C,
264
265 [0x02044] = 0x3D,
266 [0x0003E] = 0x3E,
267 [0x022C6] = 0x3F,
268 [0x02202] = 0x40,
269
270 [0x0266D] = 0x5B,
271 [0x0266E] = 0x5C,
272 [0x0266F] = 0x5D,
273 [0x02323] = 0x5E,
274 [0x02322] = 0x5F,
275 [0x02113] = 0x60,
276
277 [0x1D6A4] = 0x7B,
278 [0x1D6A5] = 0x7C,
279 [0x02118] = 0x7D,
280 [0x020D7] = 0x7E,
281
282}
283
284mathencodings["tex-it"] = {
285
286 [0x1D6E2] = 0x41,
287
288 [0x1D6E3] = 0x42,
289
290
291
292 [0x1D6E6] = 0x45,
293
294
295
296 [0x1D6E8] = 0x48,
297
298 [0x1D6EA] = 0x49,
299
300
301 [0x1D6EB] = 0x4B,
302
303
304 [0x1D6ED] = 0x4D,
305
306 [0x1D6EE] = 0x4E,
307
308 [0x1D6F0] = 0x4F,
309
310 [0x1D6F2] = 0x50,
311
312
313
314
315 [0x1D6F5] = 0x54,
316
317
318
319
320 [0x1D6F8] = 0x58,
321
322
323
324
325
326
327
328
329
330
331
332 [0x0210E] = 0x68,
333
334
335
336
337
338
339
340 [0x1D70A] = 0x6F,
341
342
343
344
345
346
347
348
349
350
351
352}
353
354mathencodings["tex-tf"] = { }
355mathencodings["tex-ss"] = { }
356mathencodings["tex-tt"] = { }
357mathencodings["tex-bf"] = { }
358mathencodings["tex-bi"] = { }
359mathencodings["tex-fraktur"] = { }
360mathencodings["tex-fraktur-bold"] = { }
361
362mathencodings["tex-sy"] = {
363 [0x0002D] = 0x00,
364 [0x02212] = 0x00,
365
366
367
368
369 [0x022C5] = 0x01,
370 [0x000D7] = 0x02,
371 [0x0002A] = 0x03,
372 [0x02217] = 0x03,
373 [0x000F7] = 0x04,
374 [0x022C4] = 0x05,
375 [0x000B1] = 0x06,
376 [0x02213] = 0x07,
377 [0x02295] = 0x08,
378 [0x02296] = 0x09,
379 [0x02297] = 0x0A,
380 [0x02298] = 0x0B,
381 [0x02299] = 0x0C,
382 [0x025EF] = 0x0D,
383 [0x02218] = 0x0E,
384 [0x02219] = 0x0F,
385 [0x02022] = 0x0F,
386 [0x0224D] = 0x10,
387 [0x02261] = 0x11,
388 [0x02286] = 0x12,
389 [0x02287] = 0x13,
390 [0x02264] = 0x14,
391 [0x02265] = 0x15,
392 [0x02AAF] = 0x16,
393
394 [0x02AB0] = 0x17,
395
396 [0x0223C] = 0x18,
397 [0x02248] = 0x19,
398 [0x02282] = 0x1A,
399 [0x02283] = 0x1B,
400 [0x0226A] = 0x1C,
401 [0x0226B] = 0x1D,
402 [0x0227A] = 0x1E,
403 [0x0227B] = 0x1F,
404 [0x02190] = 0x20,
405 [0x02192] = 0x21,
406
407
408 [0x02191] = 0x22,
409 [0x02193] = 0x23,
410 [0x02194] = 0x24,
411 [0x02197] = 0x25,
412 [0x02198] = 0x26,
413 [0x02243] = 0x27,
414 [0x021D0] = 0x28,
415 [0x021D2] = 0x29,
416 [0x021D1] = 0x2A,
417 [0x021D3] = 0x2B,
418 [0x021D4] = 0x2C,
419 [0x02196] = 0x2D,
420 [0x02199] = 0x2E,
421 [0x0221D] = 0x2F,
422 [0x02032] = 0x30,
423 [0x0221E] = 0x31,
424 [0x02208] = 0x32,
425 [0x0220B] = 0x33,
426 [0x025B3] = 0x34,
427 [0x025BD] = 0x35,
428 [0x00338] = 0x36,
429
430 [0x02200] = 0x38,
431 [0x02203] = 0x39,
432 [0x000AC] = 0x3A,
433 [0x02205] = 0x3B,
434 [0x0211C] = 0x3C,
435 [0x02111] = 0x3D,
436 [0x022A4] = 0x3E,
437 [0x022A5] = 0x3F,
438 [0x02135] = 0x40,
439 [0x1D49C] = 0x41,
440 [0x0212C] = 0x42,
441 [0x1D49E] = 0x43,
442 [0x1D49F] = 0x44,
443 [0x02130] = 0x45,
444 [0x02131] = 0x46,
445 [0x1D4A2] = 0x47,
446 [0x0210B] = 0x48,
447 [0x02110] = 0x49,
448 [0x1D4A5] = 0x4A,
449 [0x1D4A6] = 0x4B,
450 [0x02112] = 0x4C,
451 [0x02133] = 0x4D,
452 [0x1D4A9] = 0x4E,
453 [0x1D4AA] = 0x4F,
454 [0x1D4AB] = 0x50,
455 [0x1D4AC] = 0x51,
456 [0x0211B] = 0x52,
457 [0x1D4AE] = 0x53,
458 [0x1D4AF] = 0x54,
459 [0x1D4B0] = 0x55,
460 [0x1D4B1] = 0x56,
461 [0x1D4B2] = 0x57,
462 [0x1D4B3] = 0x58,
463 [0x1D4B4] = 0x59,
464 [0x1D4B5] = 0x5A,
465 [0x0222A] = 0x5B,
466 [0x02229] = 0x5C,
467 [0x0228E] = 0x5D,
468 [0x02227] = 0x5E,
469 [0x02228] = 0x5F,
470 [0x022A2] = 0x60,
471 [0x022A3] = 0x61,
472 [0x0230A] = 0x62,
473 [0x0230B] = 0x63,
474 [0x02308] = 0x64,
475 [0x02309] = 0x65,
476 [0x0007B] = 0x66,
477 [0x0007D] = 0x67,
478 [0x027E8] = 0x68,
479 [0x027E9] = 0x69,
480 [0x0007C] = 0x6A,
481 [0x02225] = 0x6B,
482
483 [0x02195] = 0x6C,
484 [0x021D5] = 0x6D,
485 [0x0005C] = 0x6E,
486 [0x02216] = 0x6E,
487 [0x02240] = 0x6F,
488 [0x0221A] = 0x70,
489 [0x02A3F] = 0x71,
490 [0x02207] = 0x72,
491 [0x1D6FB] = 0x72,
492
493 [0x02294] = 0x74,
494 [0x02293] = 0x75,
495 [0x02291] = 0x76,
496 [0x02292] = 0x77,
497 [0x000A7] = 0x78,
498 [0x02020] = 0x79,
499 [0x02021] = 0x7A,
500 [0x000B6] = 0x7B,
501 [0x02663] = 0x7C,
502 [0x02662] = 0x7D,
503 [0x02661] = 0x7E,
504 [0x02660] = 0x7F,
505
506
507 [nps("maps to piece")] = 0x37,
508}
509
510mathencodings["tex-fraktur"] = {
511
512
513 [0x0212D] = 0x43,
514
515
516
517
518 [0x0210C] = 0x48,
519 [0x02111] = 0x49,
520
521
522
523
524
525
526
527
528 [0x0211C] = 0x52,
529
530
531
532
533
534
535
536 [0x02128] = 0x5A,
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
567setletters(mathencodings, "tex-tf", 0x00041, 0x00061)
568setletters(mathencodings, "tex-mr", 0x00041, 0x00061)
569
570setletters(mathencodings, "tex-it", 0x1D434, 0x1D44E)
571setletters(mathencodings, "tex-ss", 0x1D5A0, 0x1D5BA)
572setletters(mathencodings, "tex-tt", 0x1D670, 0x1D68A)
573setletters(mathencodings, "tex-bf", 0x1D400, 0x1D41A)
574setletters(mathencodings, "tex-bi", 0x1D468, 0x1D482)
575setletters(mathencodings, "tex-fraktur", 0x1D504, 0x1D51E)
576setletters(mathencodings, "tex-fraktur-bold", 0x1D56C, 0x1D586)
577
578setdigits (mathencodings, "tex-mr", 0x00030)
579setdigits (mathencodings, "tex-tf", 0x00030)
580setdigits (mathencodings, "tex-ss", 0x1D7E2)
581setdigits (mathencodings, "tex-tt", 0x1D7F6)
582setdigits (mathencodings, "tex-bf", 0x1D7CE)
583
584
585
586
587
588 |