diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-03-12 18:45:40 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-03-12 18:45:40 +0100 |
commit | 188632f4b0f71c5170a20f1b151bde68f603bfd9 (patch) | |
tree | 49a5a917a1ce6f17cbb6f542dff5b8254cd74c70 /tex/context/base/mkiv | |
parent | b7a7de31716616b7a5176259e2b60349f8089615 (diff) | |
download | context-188632f4b0f71c5170a20f1b151bde68f603bfd9.tar.gz |
2022-03-12 11:26:00
Diffstat (limited to 'tex/context/base/mkiv')
30 files changed, 1755 insertions, 784 deletions
diff --git a/tex/context/base/mkiv/anch-pos.lua b/tex/context/base/mkiv/anch-pos.lua index 77bf09e39..93ba661a7 100644 --- a/tex/context/base/mkiv/anch-pos.lua +++ b/tex/context/base/mkiv/anch-pos.lua @@ -49,6 +49,7 @@ local context = context local ctx_latelua = context.latelua local tex = tex +local texgetdimen = tex.getdimen local texgetcount = tex.getcount local texgetinteger = tex.getintegervalue or tex.getcount local texsetcount = tex.setcount @@ -574,8 +575,8 @@ implement { actions = function() nofparagraphs = nofparagraphs + 1 texsetcount("global","c_anch_positions_paragraph",nofparagraphs) - local box = getbox("strutbox") - local w, h, d = getwhd(box) + local h = texgetdimen("strutht") + local d = texgetdimen("strutdp") local t = { p = true, c = true, @@ -704,8 +705,8 @@ implement { name = "dosetpositionstrut", arguments = "string", actions = function(name) - local box = getbox("strutbox") - local w, h, d = getwhd(box) + local h = texgetdimen("strutht") + local d = texgetdimen("strutdp") local spec = { p = true, c = column, @@ -726,8 +727,8 @@ implement { name = "dosetpositionstrutkind", arguments = { "string", "integer" }, actions = function(name,kind) - local box = getbox("strutbox") - local w, h, d = getwhd(box) + local h = texgetdimen("strutht") + local d = texgetdimen("strutdp") local spec = { k = kind, p = true, diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua index 024002c07..aa6353297 100644 --- a/tex/context/base/mkiv/char-def.lua +++ b/tex/context/base/mkiv/char-def.lua @@ -22,6 +22,8 @@ adapting this file. Updated end 2021 as prelude to ar's remote talk at the meeting. Needs some indic checking (see comment field). + +Todo: get rid of specials = { "font", ... } in math ... we have already vectors. ]]-- local variants_emoji={ @@ -326,7 +328,7 @@ characters.data={ description="EXCLAMATION MARK", direction="on", linebreak="ex", - mathclass="close", + mathclass="factorial", synonyms={ "bang", "factorial" }, unicodeslot=0x21, }, @@ -338,7 +340,7 @@ characters.data={ description="QUOTATION MARK", direction="on", linebreak="qu", - mathclass="default", + mathclass="ordinary", synonyms={ "neutral quotation mark" }, unicodeslot=0x22, }, @@ -401,7 +403,7 @@ characters.data={ description="APOSTROPHE", direction="on", linebreak="qu", - mathclass="default", + mathclass="ordinary", synonyms={ "apl quote", "apostrophe-quote", "neutral single quotation mark" }, unicodeslot=0x27, }, @@ -476,7 +478,7 @@ characters.data={ description="HYPHEN-MINUS", direction="es", linebreak="hy", - mathclass="nothing", + mathclass="ordinary", mathextensible="h", mathfiller="relfill", mathname="mathhyphen", @@ -506,7 +508,7 @@ characters.data={ description="SOLIDUS", direction="cs", linebreak="sy", - mathclass="middle", + mathclass="division", synonyms={ "slash", "virgule" }, unicodeslot=0x2F, }, @@ -517,7 +519,7 @@ characters.data={ description="DIGIT ZERO", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x30, variants={ [0xFE00]="short diagonal stroke form", @@ -532,7 +534,7 @@ characters.data={ description="DIGIT ONE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x31, variants=variants_emoji, }, @@ -543,7 +545,7 @@ characters.data={ description="DIGIT TWO", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x32, variants=variants_emoji, }, @@ -554,7 +556,7 @@ characters.data={ description="DIGIT THREE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x33, variants=variants_emoji, }, @@ -565,7 +567,7 @@ characters.data={ description="DIGIT FOUR", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x34, variants=variants_emoji, }, @@ -576,7 +578,7 @@ characters.data={ description="DIGIT FIVE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x35, variants=variants_emoji, }, @@ -587,7 +589,7 @@ characters.data={ description="DIGIT SIX", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x36, variants=variants_emoji, }, @@ -598,7 +600,7 @@ characters.data={ description="DIGIT SEVEN", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x37, variants=variants_emoji, }, @@ -609,7 +611,7 @@ characters.data={ description="DIGIT EIGHT", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x38, variants=variants_emoji, }, @@ -620,7 +622,7 @@ characters.data={ description="DIGIT NINE", direction="en", linebreak="nu", - mathclass="number", + mathclass="digit", unicodeslot=0x39, variants=variants_emoji, }, @@ -723,7 +725,6 @@ characters.data={ direction="l", lccode=0x61, linebreak="al", - mathclass="variable", unicodeslot=0x41, }, { @@ -734,7 +735,6 @@ characters.data={ direction="l", lccode=0x62, linebreak="al", - mathclass="variable", unicodeslot=0x42, }, { @@ -745,7 +745,6 @@ characters.data={ direction="l", lccode=0x63, linebreak="al", - mathclass="variable", unicodeslot=0x43, }, { @@ -756,7 +755,6 @@ characters.data={ direction="l", lccode=0x64, linebreak="al", - mathclass="variable", unicodeslot=0x44, }, { @@ -767,7 +765,6 @@ characters.data={ direction="l", lccode=0x65, linebreak="al", - mathclass="variable", unicodeslot=0x45, }, { @@ -778,7 +775,6 @@ characters.data={ direction="l", lccode=0x66, linebreak="al", - mathclass="variable", unicodeslot=0x46, }, { @@ -789,7 +785,6 @@ characters.data={ direction="l", lccode=0x67, linebreak="al", - mathclass="variable", unicodeslot=0x47, }, { @@ -800,7 +795,6 @@ characters.data={ direction="l", lccode=0x68, linebreak="al", - mathclass="variable", unicodeslot=0x48, }, { @@ -812,7 +806,6 @@ characters.data={ direction="l", lccode=0x69, linebreak="al", - mathclass="variable", unicodeslot=0x49, }, { @@ -824,7 +817,6 @@ characters.data={ direction="l", lccode=0x6A, linebreak="al", - mathclass="variable", unicodeslot=0x4A, }, { @@ -835,7 +827,6 @@ characters.data={ direction="l", lccode=0x6B, linebreak="al", - mathclass="variable", unicodeslot=0x4B, }, { @@ -846,7 +837,6 @@ characters.data={ direction="l", lccode=0x6C, linebreak="al", - mathclass="variable", unicodeslot=0x4C, }, { @@ -857,7 +847,6 @@ characters.data={ direction="l", lccode=0x6D, linebreak="al", - mathclass="variable", unicodeslot=0x4D, }, { @@ -868,7 +857,6 @@ characters.data={ direction="l", lccode=0x6E, linebreak="al", - mathclass="variable", unicodeslot=0x4E, }, { @@ -879,7 +867,6 @@ characters.data={ direction="l", lccode=0x6F, linebreak="al", - mathclass="variable", unicodeslot=0x4F, }, { @@ -890,7 +877,6 @@ characters.data={ direction="l", lccode=0x70, linebreak="al", - mathclass="variable", unicodeslot=0x50, }, { @@ -901,7 +887,6 @@ characters.data={ direction="l", lccode=0x71, linebreak="al", - mathclass="variable", unicodeslot=0x51, }, { @@ -912,7 +897,6 @@ characters.data={ direction="l", lccode=0x72, linebreak="al", - mathclass="variable", unicodeslot=0x52, }, { @@ -923,7 +907,6 @@ characters.data={ direction="l", lccode=0x73, linebreak="al", - mathclass="variable", unicodeslot=0x53, }, { @@ -934,7 +917,6 @@ characters.data={ direction="l", lccode=0x74, linebreak="al", - mathclass="variable", unicodeslot=0x54, }, { @@ -945,7 +927,6 @@ characters.data={ direction="l", lccode=0x75, linebreak="al", - mathclass="variable", unicodeslot=0x55, }, { @@ -956,7 +937,6 @@ characters.data={ direction="l", lccode=0x76, linebreak="al", - mathclass="variable", unicodeslot=0x56, }, { @@ -967,7 +947,6 @@ characters.data={ direction="l", lccode=0x77, linebreak="al", - mathclass="variable", unicodeslot=0x57, }, { @@ -978,7 +957,6 @@ characters.data={ direction="l", lccode=0x78, linebreak="al", - mathclass="variable", unicodeslot=0x58, }, { @@ -989,7 +967,6 @@ characters.data={ direction="l", lccode=0x79, linebreak="al", - mathclass="variable", unicodeslot=0x59, }, { @@ -1000,7 +977,6 @@ characters.data={ direction="l", lccode=0x7A, linebreak="al", - mathclass="variable", unicodeslot=0x5A, }, { @@ -1025,7 +1001,7 @@ characters.data={ description="REVERSE SOLIDUS", direction="on", linebreak="pr", - mathclass="nothing", + mathclass="division", mathname="backslash", synonyms={ "backslash" }, unicodeslot=0x5C, @@ -1088,7 +1064,6 @@ characters.data={ description="LATIN SMALL LETTER A", direction="l", linebreak="al", - mathclass="variable", uccode=0x41, unicodeslot=0x61, }, @@ -1099,7 +1074,6 @@ characters.data={ description="LATIN SMALL LETTER B", direction="l", linebreak="al", - mathclass="variable", uccode=0x42, unicodeslot=0x62, }, @@ -1110,7 +1084,6 @@ characters.data={ description="LATIN SMALL LETTER C", direction="l", linebreak="al", - mathclass="variable", uccode=0x43, unicodeslot=0x63, }, @@ -1121,7 +1094,6 @@ characters.data={ description="LATIN SMALL LETTER D", direction="l", linebreak="al", - mathclass="variable", uccode=0x44, unicodeslot=0x64, }, @@ -1132,7 +1104,6 @@ characters.data={ description="LATIN SMALL LETTER E", direction="l", linebreak="al", - mathclass="variable", uccode=0x45, unicodeslot=0x65, }, @@ -1143,7 +1114,6 @@ characters.data={ description="LATIN SMALL LETTER F", direction="l", linebreak="al", - mathclass="variable", uccode=0x46, unicodeslot=0x66, }, @@ -1154,7 +1124,6 @@ characters.data={ description="LATIN SMALL LETTER G", direction="l", linebreak="al", - mathclass="variable", uccode=0x47, unicodeslot=0x67, }, @@ -1165,7 +1134,6 @@ characters.data={ description="LATIN SMALL LETTER H", direction="l", linebreak="al", - mathclass="variable", uccode=0x48, unicodeslot=0x68, }, @@ -1177,7 +1145,6 @@ characters.data={ description="LATIN SMALL LETTER I", direction="l", linebreak="al", - mathclass="variable", uccode=0x49, unicodeslot=0x69, }, @@ -1188,7 +1155,6 @@ characters.data={ description="LATIN SMALL LETTER J", direction="l", linebreak="al", - mathclass="variable", uccode=0x4A, unicodeslot=0x6A, }, @@ -1199,7 +1165,6 @@ characters.data={ description="LATIN SMALL LETTER K", direction="l", linebreak="al", - mathclass="variable", uccode=0x4B, unicodeslot=0x6B, }, @@ -1210,7 +1175,6 @@ characters.data={ description="LATIN SMALL LETTER L", direction="l", linebreak="al", - mathclass="variable", uccode=0x4C, unicodeslot=0x6C, }, @@ -1221,7 +1185,6 @@ characters.data={ description="LATIN SMALL LETTER M", direction="l", linebreak="al", - mathclass="variable", uccode=0x4D, unicodeslot=0x6D, }, @@ -1232,7 +1195,6 @@ characters.data={ description="LATIN SMALL LETTER N", direction="l", linebreak="al", - mathclass="variable", uccode=0x4E, unicodeslot=0x6E, }, @@ -1243,7 +1205,6 @@ characters.data={ description="LATIN SMALL LETTER O", direction="l", linebreak="al", - mathclass="variable", uccode=0x4F, unicodeslot=0x6F, }, @@ -1254,7 +1215,6 @@ characters.data={ description="LATIN SMALL LETTER P", direction="l", linebreak="al", - mathclass="variable", uccode=0x50, unicodeslot=0x70, }, @@ -1265,7 +1225,6 @@ characters.data={ description="LATIN SMALL LETTER Q", direction="l", linebreak="al", - mathclass="variable", uccode=0x51, unicodeslot=0x71, }, @@ -1276,7 +1235,6 @@ characters.data={ description="LATIN SMALL LETTER R", direction="l", linebreak="al", - mathclass="variable", uccode=0x52, unicodeslot=0x72, }, @@ -1287,7 +1245,6 @@ characters.data={ description="LATIN SMALL LETTER S", direction="l", linebreak="al", - mathclass="variable", uccode=0x53, unicodeslot=0x73, }, @@ -1298,7 +1255,6 @@ characters.data={ description="LATIN SMALL LETTER T", direction="l", linebreak="al", - mathclass="variable", uccode=0x54, unicodeslot=0x74, }, @@ -1309,7 +1265,6 @@ characters.data={ description="LATIN SMALL LETTER U", direction="l", linebreak="al", - mathclass="variable", uccode=0x55, unicodeslot=0x75, }, @@ -1320,7 +1275,6 @@ characters.data={ description="LATIN SMALL LETTER V", direction="l", linebreak="al", - mathclass="variable", uccode=0x56, unicodeslot=0x76, }, @@ -1331,7 +1285,6 @@ characters.data={ description="LATIN SMALL LETTER W", direction="l", linebreak="al", - mathclass="variable", uccode=0x57, unicodeslot=0x77, }, @@ -1342,7 +1295,6 @@ characters.data={ description="LATIN SMALL LETTER X", direction="l", linebreak="al", - mathclass="variable", uccode=0x58, unicodeslot=0x78, }, @@ -1353,7 +1305,6 @@ characters.data={ description="LATIN SMALL LETTER Y", direction="l", linebreak="al", - mathclass="variable", uccode=0x59, unicodeslot=0x79, }, @@ -1364,7 +1315,6 @@ characters.data={ description="LATIN SMALL LETTER Z", direction="l", linebreak="al", - mathclass="variable", uccode=0x5A, unicodeslot=0x7A, }, @@ -1394,7 +1344,7 @@ characters.data={ linebreak="ba", mathspec={ { - class="nothing", + class="ordinary", name="arrowvert", }, { @@ -1741,7 +1691,7 @@ characters.data={ description="YEN SIGN", direction="et", linebreak="pr", - mathclass="nothing", + mathclass="ordinary", mathname="yen", synonyms={ "yuan sign" }, unicodeslot=0xA5, @@ -1765,7 +1715,7 @@ characters.data={ description="SECTION SIGN", direction="on", linebreak="ai", - mathclass="box", + mathclass="ordinary", mathname="S", synonyms={ "european paragraph sign" }, unicodeslot=0xA7, @@ -1956,7 +1906,7 @@ characters.data={ description="PILCROW SIGN", direction="on", linebreak="ai", - mathclass="box", + mathclass="ordinary", mathname="P", synonyms={ "european section sign", "paragraph sign" }, unicodeslot=0xB6, @@ -4696,7 +4646,6 @@ characters.data={ description="LATIN SMALL LETTER LAMBDA WITH STROKE", direction="l", linebreak="al", - mathclass="variable", mathname="lambdabar", synonyms={ "latin letter lambda bar" }, unicodeslot=0x19B, @@ -8186,6 +8135,9 @@ characters.data={ description="COMBINING GRAVE ACCENT", direction="nsm", linebreak="cm", + mathclass="topaccent", + mathname="widegrave", + mathstretch="h", synonyms={ "greek varia" }, unicodeslot=0x300, }, @@ -8705,6 +8657,7 @@ characters.data={ description="COMBINING LOW LINE", direction="nsm", linebreak="cm", + mathextensible="l", synonyms={ "underline", "underscore" }, unicodeslot=0x332, }, @@ -9537,7 +9490,6 @@ characters.data={ direction="l", lccode=0x3B1, linebreak="al", - mathclass="variable", mathname="Alpha", unicodeslot=0x391, }, @@ -9550,7 +9502,6 @@ characters.data={ direction="l", lccode=0x3B2, linebreak="al", - mathclass="variable", mathname="Beta", unicodeslot=0x392, }, @@ -9563,7 +9514,6 @@ characters.data={ direction="l", lccode=0x3B3, linebreak="al", - mathclass="variable", mathname="Gamma", synonyms={ "gamma function" }, unicodeslot=0x393, @@ -9577,7 +9527,6 @@ characters.data={ direction="l", lccode=0x3B4, linebreak="al", - mathclass="variable", mathname="Delta", unicodeslot=0x394, }, @@ -9590,7 +9539,6 @@ characters.data={ direction="l", lccode=0x3B5, linebreak="al", - mathclass="variable", mathname="Epsilon", unicodeslot=0x395, }, @@ -9603,7 +9551,6 @@ characters.data={ direction="l", lccode=0x3B6, linebreak="al", - mathclass="variable", mathname="Zeta", unicodeslot=0x396, }, @@ -9616,7 +9563,6 @@ characters.data={ direction="l", lccode=0x3B7, linebreak="al", - mathclass="variable", mathname="Eta", unicodeslot=0x397, }, @@ -9629,7 +9575,6 @@ characters.data={ direction="l", lccode=0x3B8, linebreak="al", - mathclass="variable", mathname="Theta", unicodeslot=0x398, }, @@ -9642,7 +9587,6 @@ characters.data={ direction="l", lccode=0x3B9, linebreak="al", - mathclass="variable", mathname="Iota", unicodeslot=0x399, }, @@ -9655,7 +9599,6 @@ characters.data={ direction="l", lccode=0x3BA, linebreak="al", - mathclass="variable", mathname="Kappa", unicodeslot=0x39A, }, @@ -9668,7 +9611,6 @@ characters.data={ direction="l", lccode=0x3BB, linebreak="al", - mathclass="variable", mathname="Lambda", unicodeslot=0x39B, }, @@ -9681,7 +9623,6 @@ characters.data={ direction="l", lccode=0x3BC, linebreak="al", - mathclass="variable", mathname="Mu", unicodeslot=0x39C, }, @@ -9694,7 +9635,6 @@ characters.data={ direction="l", lccode=0x3BD, linebreak="al", - mathclass="variable", mathname="Nu", unicodeslot=0x39D, }, @@ -9707,7 +9647,6 @@ characters.data={ direction="l", lccode=0x3BE, linebreak="al", - mathclass="variable", mathname="Xi", unicodeslot=0x39E, }, @@ -9720,7 +9659,6 @@ characters.data={ direction="l", lccode=0x3BF, linebreak="al", - mathclass="variable", mathname="Omicron", unicodeslot=0x39F, }, @@ -9733,7 +9671,6 @@ characters.data={ direction="l", lccode=0x3C0, linebreak="al", - mathclass="variable", mathname="Pi", unicodeslot=0x3A0, }, @@ -9746,7 +9683,6 @@ characters.data={ direction="l", lccode=0x3C1, linebreak="al", - mathclass="variable", mathname="Rho", unicodeslot=0x3A1, }, @@ -9759,7 +9695,6 @@ characters.data={ direction="l", lccode=0x3C3, linebreak="al", - mathclass="variable", mathname="Sigma", unicodeslot=0x3A3, }, @@ -9772,7 +9707,6 @@ characters.data={ direction="l", lccode=0x3C4, linebreak="al", - mathclass="variable", mathname="Tau", unicodeslot=0x3A4, }, @@ -9785,7 +9719,6 @@ characters.data={ direction="l", lccode=0x3C5, linebreak="al", - mathclass="variable", mathname="Upsilon", unicodeslot=0x3A5, }, @@ -9798,7 +9731,6 @@ characters.data={ direction="l", lccode=0x3C6, linebreak="al", - mathclass="variable", mathname="Phi", unicodeslot=0x3A6, }, @@ -9811,7 +9743,6 @@ characters.data={ direction="l", lccode=0x3C7, linebreak="al", - mathclass="variable", mathname="Chi", unicodeslot=0x3A7, }, @@ -9824,7 +9755,6 @@ characters.data={ direction="l", lccode=0x3C8, linebreak="al", - mathclass="variable", mathname="Psi", unicodeslot=0x3A8, }, @@ -9837,7 +9767,6 @@ characters.data={ direction="l", lccode=0x3C9, linebreak="al", - mathclass="variable", mathname="Omega", unicodeslot=0x3A9, }, @@ -9933,7 +9862,6 @@ characters.data={ description="GREEK SMALL LETTER ALPHA", direction="l", linebreak="al", - mathclass="variable", mathname="alpha", uccode=0x391, unicodeslot=0x3B1, @@ -9946,7 +9874,6 @@ characters.data={ description="GREEK SMALL LETTER BETA", direction="l", linebreak="al", - mathclass="variable", mathname="beta", uccode=0x392, unicodeslot=0x3B2, @@ -9959,7 +9886,6 @@ characters.data={ description="GREEK SMALL LETTER GAMMA", direction="l", linebreak="al", - mathclass="variable", mathname="gamma", uccode=0x393, unicodeslot=0x3B3, @@ -9972,7 +9898,6 @@ characters.data={ description="GREEK SMALL LETTER DELTA", direction="l", linebreak="al", - mathclass="variable", mathname="delta", uccode=0x394, unicodeslot=0x3B4, @@ -9985,7 +9910,6 @@ characters.data={ description="GREEK SMALL LETTER EPSILON", direction="l", linebreak="al", - mathclass="variable", mathname="varepsilon", uccode=0x395, unicodeslot=0x3B5, @@ -9998,7 +9922,6 @@ characters.data={ description="GREEK SMALL LETTER ZETA", direction="l", linebreak="al", - mathclass="variable", mathname="zeta", uccode=0x396, unicodeslot=0x3B6, @@ -10011,7 +9934,6 @@ characters.data={ description="GREEK SMALL LETTER ETA", direction="l", linebreak="al", - mathclass="variable", mathname="eta", uccode=0x397, unicodeslot=0x3B7, @@ -10024,7 +9946,6 @@ characters.data={ description="GREEK SMALL LETTER THETA", direction="l", linebreak="al", - mathclass="variable", mathname="theta", uccode=0x398, unicodeslot=0x3B8, @@ -10037,7 +9958,6 @@ characters.data={ description="GREEK SMALL LETTER IOTA", direction="l", linebreak="al", - mathclass="variable", mathname="iota", uccode=0x399, unicodeslot=0x3B9, @@ -10050,7 +9970,6 @@ characters.data={ description="GREEK SMALL LETTER KAPPA", direction="l", linebreak="al", - mathclass="variable", mathname="kappa", uccode=0x39A, unicodeslot=0x3BA, @@ -10063,7 +9982,6 @@ characters.data={ description="GREEK SMALL LETTER LAMDA", direction="l", linebreak="al", - mathclass="variable", mathname="lambda", uccode=0x39B, unicodeslot=0x3BB, @@ -10076,7 +9994,6 @@ characters.data={ description="GREEK SMALL LETTER MU", direction="l", linebreak="al", - mathclass="variable", mathname="mu", uccode=0x39C, unicodeslot=0x3BC, @@ -10089,7 +10006,6 @@ characters.data={ description="GREEK SMALL LETTER NU", direction="l", linebreak="al", - mathclass="variable", mathname="nu", uccode=0x39D, unicodeslot=0x3BD, @@ -10102,7 +10018,6 @@ characters.data={ description="GREEK SMALL LETTER XI", direction="l", linebreak="al", - mathclass="variable", mathname="xi", uccode=0x39E, unicodeslot=0x3BE, @@ -10115,7 +10030,6 @@ characters.data={ description="GREEK SMALL LETTER OMICRON", direction="l", linebreak="al", - mathclass="variable", mathname="omicron", uccode=0x39F, unicodeslot=0x3BF, @@ -10128,7 +10042,6 @@ characters.data={ description="GREEK SMALL LETTER PI", direction="l", linebreak="al", - mathclass="variable", mathname="pi", synonyms={ "mathematical constant 3.141592... pi", "mathematical constant pi" }, uccode=0x3A0, @@ -10142,7 +10055,6 @@ characters.data={ description="GREEK SMALL LETTER RHO", direction="l", linebreak="al", - mathclass="variable", mathname="rho", uccode=0x3A1, unicodeslot=0x3C1, @@ -10154,7 +10066,6 @@ characters.data={ description="GREEK SMALL LETTER FINAL SIGMA", direction="l", linebreak="al", - mathclass="variable", mathname="varsigma", uccode=0x3C3, unicodeslot=0x3C2, @@ -10167,7 +10078,6 @@ characters.data={ description="GREEK SMALL LETTER SIGMA", direction="l", linebreak="al", - mathclass="variable", mathname="sigma", uccode=0x3A3, unicodeslot=0x3C3, @@ -10180,7 +10090,6 @@ characters.data={ description="GREEK SMALL LETTER TAU", direction="l", linebreak="al", - mathclass="variable", mathname="tau", uccode=0x3A4, unicodeslot=0x3C4, @@ -10193,7 +10102,6 @@ characters.data={ description="GREEK SMALL LETTER UPSILON", direction="l", linebreak="al", - mathclass="variable", mathname="upsilon", uccode=0x3A5, unicodeslot=0x3C5, @@ -10206,7 +10114,6 @@ characters.data={ description="GREEK SMALL LETTER PHI", direction="l", linebreak="al", - mathclass="variable", mathname="varphi", uccode=0x3A6, unicodeslot=0x3C6, @@ -10219,7 +10126,6 @@ characters.data={ description="GREEK SMALL LETTER CHI", direction="l", linebreak="al", - mathclass="variable", mathname="chi", uccode=0x3A7, unicodeslot=0x3C7, @@ -10232,7 +10138,6 @@ characters.data={ description="GREEK SMALL LETTER PSI", direction="l", linebreak="al", - mathclass="variable", mathname="psi", uccode=0x3A8, unicodeslot=0x3C8, @@ -10245,7 +10150,6 @@ characters.data={ description="GREEK SMALL LETTER OMEGA", direction="l", linebreak="al", - mathclass="variable", mathname="omega", uccode=0x3A9, unicodeslot=0x3C9, @@ -10337,7 +10241,6 @@ characters.data={ description="GREEK THETA SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="varTheta", specials={ "compat", 0x3B8 }, synonyms={ "script theta" }, @@ -10378,7 +10281,6 @@ characters.data={ description="GREEK PHI SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="phi", specials={ "compat", 0x3C6 }, uccode=0x3C6, @@ -10391,7 +10293,6 @@ characters.data={ description="GREEK PI SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="varpi", specials={ "compat", 0x3C0 }, synonyms={ "omega pi" }, @@ -10447,7 +10348,6 @@ characters.data={ direction="l", lccode=0x3DD, linebreak="al", - mathclass="variable", mathname="digamma", unicodeslot=0x3DC, }, @@ -10679,7 +10579,6 @@ characters.data={ description="GREEK LUNATE EPSILON SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="epsilon", specials={ "compat", 0x3B5 }, synonyms={ "straight epsilon" }, @@ -10691,7 +10590,6 @@ characters.data={ description="GREEK REVERSED LUNATE EPSILON SYMBOL", direction="on", linebreak="al", - mathclass="variable", mathname="backepsilon", synonyms={ "reversed straight epsilon" }, unicodeslot=0x3F6, @@ -23166,7 +23064,6 @@ characters.data={ direction="l", indic="d", indicmark="l", - indicorder="bh", linebreak="cm", unicodeslot=0x9C8, }, @@ -23218,7 +23115,8 @@ characters.data={ category="mc", description="BENGALI AU LENGTH MARK", direction="l", - indic="o", + indic="d", + indicmark="r", indicorder="ap", linebreak="cm", unicodeslot=0x9D7, @@ -62435,7 +62333,7 @@ characters.data={ name="Vert", }, { - class="nothing", + class="ordinary", name="Arrowvert", }, { @@ -62558,7 +62456,7 @@ characters.data={ name="dagger", }, { - class="box", + class="ordinary", name="dag", }, }, @@ -62579,7 +62477,7 @@ characters.data={ name="ddagger", }, { - class="box", + class="ordinary", name="ddag", }, }, @@ -62750,7 +62648,7 @@ characters.data={ description="PRIME", direction="et", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="prime", synonyms={ "feet", "minutes" }, unicodeslot=0x2032, @@ -62762,7 +62660,7 @@ characters.data={ description="DOUBLE PRIME", direction="et", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="doubleprime", specials={ "compat", 0x2032, 0x2032 }, synonyms={ "inches", "seconds" }, @@ -62773,7 +62671,7 @@ characters.data={ description="TRIPLE PRIME", direction="et", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="tripleprime", specials={ "compat", 0x2032, 0x2032, 0x2032 }, unicodeslot=0x2034, @@ -62785,7 +62683,7 @@ characters.data={ description="REVERSED PRIME", direction="on", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="reversedprime", unicodeslot=0x2035, }, @@ -62794,7 +62692,7 @@ characters.data={ description="REVERSED DOUBLE PRIME", direction="on", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="reverseddoubleprime", specials={ "compat", 0x2035, 0x2035 }, unicodeslot=0x2036, @@ -62804,7 +62702,7 @@ characters.data={ description="REVERSED TRIPLE PRIME", direction="on", linebreak="po", - mathclass="nothing", + mathclass="prime", mathname="reversedtripleprime", specials={ "compat", 0x2035, 0x2035, 0x2035 }, unicodeslot=0x2037, @@ -63089,7 +62987,7 @@ characters.data={ description="QUADRUPLE PRIME", direction="on", linebreak="al", - mathclass="nothing", + mathclass="prime", mathname="quadrupleprime", specials={ "compat", 0x2032, 0x2032, 0x2032, 0x2032 }, unicodeslot=0x2057, @@ -64046,7 +63944,7 @@ characters.data={ description="COMBINING ENCLOSING SQUARE", direction="nsm", linebreak="cm", - mathclass="default", + mathclass="ordinary", mathname="bigsquare", unicodeslot=0x20DE, }, @@ -64055,7 +63953,7 @@ characters.data={ description="COMBINING ENCLOSING DIAMOND", direction="nsm", linebreak="cm", - mathclass="default", + mathclass="ordinary", mathname="bigdiamond", unicodeslot=0x20DF, }, @@ -64220,7 +64118,6 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL C", direction="l", linebreak="al", - mathclass="variable", mathname="complexes", specials={ "font", 0x43 }, synonyms={ "complex numbers", "the set of complex numbers" }, @@ -64269,7 +64166,6 @@ characters.data={ description="EULER CONSTANT", direction="l", linebreak="al", - mathclass="variable", mathname="Eulerconst", specials={ "compat", 0x190 }, unicodeslot=0x2107, @@ -64333,7 +64229,6 @@ characters.data={ description="PLANCK CONSTANT", direction="l", linebreak="al", - mathclass="variable", mathname="Plankconst", specials={ "font", 0x68 }, unicodeslot=0x210E, @@ -64345,7 +64240,7 @@ characters.data={ linebreak="al", mathspec={ { - class="variable", + class="ordinary", name="hslash", }, { @@ -64372,7 +64267,6 @@ characters.data={ description="BLACK-LETTER CAPITAL I", direction="l", linebreak="al", - mathclass="default", mathname="Im", specials={ "font", 0x49 }, synonyms={ "imaginary part" }, @@ -64397,7 +64291,7 @@ characters.data={ description="SCRIPT SMALL L", direction="l", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="ell", specials={ "font", 0x6C }, synonyms={ "liter" }, @@ -64416,7 +64310,6 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL N", direction="l", linebreak="al", - mathclass="variable", mathname="naturalnumbers", specials={ "font", 0x4E }, synonyms={ "natural number" }, @@ -64448,7 +64341,6 @@ characters.data={ description="SCRIPT CAPITAL P", direction="on", linebreak="al", - mathclass="default", mathname="wp", synonyms={ "weierstrass elliptic function" }, unicodeslot=0x2118, @@ -64458,7 +64350,6 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL P", direction="l", linebreak="al", - mathclass="variable", mathname="primes", specials={ "font", 0x50 }, unicodeslot=0x2119, @@ -64468,7 +64359,6 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL Q", direction="l", linebreak="al", - mathclass="variable", mathname="rationals", specials={ "font", 0x51 }, synonyms={ "rational numbers", "the set of rational numbers" }, @@ -64491,7 +64381,6 @@ characters.data={ description="BLACK-LETTER CAPITAL R", direction="l", linebreak="al", - mathclass="default", mathname="Re", specials={ "font", 0x52 }, synonyms={ "real part" }, @@ -64502,7 +64391,6 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL R", direction="l", linebreak="al", - mathclass="variable", mathname="reals", specials={ "font", 0x52 }, synonyms={ "real numbers", "the set of real numbers" }, @@ -64566,7 +64454,6 @@ characters.data={ description="DOUBLE-STRUCK CAPITAL Z", direction="l", linebreak="al", - mathclass="variable", mathname="integers", specials={ "font", 0x5A }, synonyms={ "integers", "the set of integers" }, @@ -64589,7 +64476,6 @@ characters.data={ direction="l", lccode=0x3C9, linebreak="al", - mathclass="variable", mathname="ohm", specials={ "char", 0x3A9 }, unicodeslot=0x2126, @@ -64600,7 +64486,6 @@ characters.data={ description="INVERTED OHM SIGN", direction="on", linebreak="al", - mathclass="variable", mathname="mho", synonyms={ "mho" }, unicodeslot=0x2127, @@ -64618,7 +64503,6 @@ characters.data={ description="TURNED GREEK SMALL LETTER IOTA", direction="on", linebreak="al", - mathclass="variable", mathname="turnediota", synonyms={ "unique element" }, unicodeslot=0x2129, @@ -64642,7 +64526,6 @@ characters.data={ direction="l", lccode=0xE5, linebreak="ai", - mathclass="variable", mathname="Angstrom", specials={ "char", 0xC5 }, unicodeslot=0x212B, @@ -64744,7 +64627,7 @@ characters.data={ description="ALEF SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="aleph", specials={ "compat", 0x5D0 }, synonyms={ "first transfinite cardinal", "first transfinite cardinal countable" }, @@ -64755,7 +64638,7 @@ characters.data={ description="BET SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="beth", specials={ "compat", 0x5D1 }, synonyms={ "second transfinite cardinal", "second transfinite cardinal continuum" }, @@ -64766,7 +64649,7 @@ characters.data={ description="GIMEL SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="gimel", specials={ "compat", 0x5D2 }, synonyms={ "third transfinite cardinal" }, @@ -64777,7 +64660,7 @@ characters.data={ description="DALET SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="daleth", specials={ "compat", 0x5D3 }, synonyms={ "fourth transfinite cardinal" }, @@ -64889,7 +64772,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC CAPITAL D", direction="l", linebreak="al", - mathclass="nothing", + mathclass="differential", mathname="differentialD", specials={ "font", 0x44 }, unicodeslot=0x2145, @@ -64899,7 +64782,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL D", direction="l", linebreak="al", - mathclass="nothing", + mathclass="differential", mathname="differentiald", specials={ "font", 0x64 }, unicodeslot=0x2146, @@ -64909,7 +64792,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL E", direction="l", linebreak="al", - mathclass="nothing", + mathclass="exponential", mathname="exponentiale", specials={ "font", 0x65 }, unicodeslot=0x2147, @@ -64919,7 +64802,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL I", direction="l", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="imaginaryi", specials={ "font", 0x69 }, unicodeslot=0x2148, @@ -64929,7 +64812,7 @@ characters.data={ description="DOUBLE-STRUCK ITALIC SMALL J", direction="l", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="imaginaryj", specials={ "font", 0x6A }, unicodeslot=0x2149, @@ -66891,7 +66774,7 @@ characters.data={ description="PARTIAL DIFFERENTIAL", direction="on", linebreak="ai", - mathclass="default", + mathclass="differential", mathname="partial", unicodeslot=0x2202, }, @@ -66923,7 +66806,7 @@ characters.data={ description="EMPTY SET", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="emptyset", synonyms={ "null set" }, unicodeslot=0x2205, @@ -66947,7 +66830,7 @@ characters.data={ description="NABLA", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="nabla", synonyms={ "backward difference", "del" }, unicodeslot=0x2207, @@ -67229,7 +67112,7 @@ characters.data={ description="INFINITY", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="infty", unicodeslot=0x221E, }, @@ -67419,7 +67302,7 @@ characters.data={ name="int", }, { - class="nothing", + class="ordinary", name="intop", }, }, @@ -67439,7 +67322,7 @@ characters.data={ name="iint", }, { - class="nothing", + class="ordinary", name="iintop", }, }, @@ -67458,7 +67341,7 @@ characters.data={ name="iiint", }, { - class="nothing", + class="ordinary", name="iiintop", }, }, @@ -68790,7 +68673,7 @@ characters.data={ description="DOWN TACK", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="top", synonyms={ "top" }, unicodeslot=0x22A4, @@ -68804,7 +68687,7 @@ characters.data={ linebreak="ai", mathspec={ { - class="default", + class="ordinary", name="bot", }, { @@ -69717,11 +69600,11 @@ characters.data={ linebreak="al", mathspec={ { - class="ord", + class="ordinary", name="varnothing", }, { - class="ord", + class="ordinary", name="diameter", }, }, @@ -76494,7 +76377,7 @@ characters.data={ description="BLACK SPADE SUIT", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="spadesuit", unicodeslot=0x2660, variants=variants_emoji, @@ -76506,7 +76389,7 @@ characters.data={ description="WHITE HEART SUIT", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="heartsuit", unicodeslot=0x2661, }, @@ -76516,7 +76399,7 @@ characters.data={ description="WHITE DIAMOND SUIT", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="diamondsuit", unicodeslot=0x2662, }, @@ -76527,7 +76410,7 @@ characters.data={ description="BLACK CLUB SUIT", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="clubsuit", synonyms={ "shamrock" }, unicodeslot=0x2663, @@ -76629,7 +76512,7 @@ characters.data={ description="MUSIC FLAT SIGN", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="flat", unicodeslot=0x266D, }, @@ -76638,7 +76521,7 @@ characters.data={ description="MUSIC NATURAL SIGN", direction="on", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="natural", unicodeslot=0x266E, }, @@ -76649,7 +76532,7 @@ characters.data={ description="MUSIC SHARP SIGN", direction="on", linebreak="ai", - mathclass="default", + mathclass="ordinary", mathname="sharp", synonyms={ "infix bag count" }, unicodeslot=0x266F, @@ -77950,7 +77833,7 @@ characters.data={ description="CHECK MARK", direction="on", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="checkmark", unicodeslot=0x2713, }, @@ -78046,7 +77929,7 @@ characters.data={ description="MALTESE CROSS", direction="on", linebreak="al", - mathclass="nothing", + mathclass="ordinary", mathname="maltese", unicodeslot=0x2720, }, @@ -83685,7 +83568,7 @@ characters.data={ name="iiiint", }, { - class="nothing", + class="ordinary", name="iiiintop", }, }, @@ -227475,6 +227358,13 @@ characters.data={ description="MATHEMATICAL ITALIC CAPITAL D", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + name="Dd", + class="differential", + }, + }, specials={ "font", 0x44 }, unicodeslot=0x1D437, visual="it", @@ -227709,6 +227599,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL D", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + name="dd", + class="differential", + }, + }, specials={ "font", 0x64 }, unicodeslot=0x1D451, visual="it", @@ -227718,6 +227615,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL E", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + name="ee", + class="exponential", + }, + }, specials={ "font", 0x65 }, unicodeslot=0x1D452, visual="it", @@ -227745,6 +227649,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL I", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + name="ii", + class="imaginary", + }, + }, specials={ "font", 0x69 }, unicodeslot=0x1D456, visual="it", @@ -227754,6 +227665,13 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL J", direction="l", linebreak="al", + mathclass="ordinary", + mathspec={ + { + name="ji", + class="imaginary", + }, + }, specials={ "font", 0x6A }, unicodeslot=0x1D457, visual="it", @@ -232673,7 +232591,7 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL DOTLESS I", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="imath", specials={ "font", 0x131 }, unicodeslot=0x1D6A4, @@ -232684,7 +232602,7 @@ characters.data={ description="MATHEMATICAL ITALIC SMALL DOTLESS J", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="jmath", specials={ "font", 0x237 }, unicodeslot=0x1D6A5, @@ -233154,6 +233072,7 @@ characters.data={ description="MATHEMATICAL BOLD PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D6DB, visual="bf", @@ -233442,7 +233361,7 @@ characters.data={ description="MATHEMATICAL ITALIC NABLA", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", specials={ "font", 0x2207 }, unicodeslot=0x1D6FB, visual="it", @@ -233677,6 +233596,7 @@ characters.data={ description="MATHEMATICAL ITALIC PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D715, visual="it", @@ -233695,7 +233615,7 @@ characters.data={ description="MATHEMATICAL ITALIC THETA SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="vartheta", specials={ "font", 0x3D1 }, unicodeslot=0x1D717, @@ -233706,7 +233626,7 @@ characters.data={ description="MATHEMATICAL ITALIC KAPPA SYMBOL", direction="l", linebreak="al", - mathclass="default", + mathclass="ordinary", mathname="varkappa", specials={ "font", 0x3F0 }, unicodeslot=0x1D718, @@ -233726,7 +233646,6 @@ characters.data={ description="MATHEMATICAL ITALIC RHO SYMBOL", direction="l", linebreak="al", - mathclass="variable", mathname="varrho", specials={ "font", 0x3F1 }, unicodeslot=0x1D71A, @@ -234205,6 +234124,7 @@ characters.data={ description="MATHEMATICAL BOLD ITALIC PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D74F, visual="bi", @@ -234727,6 +234647,7 @@ characters.data={ description="MATHEMATICAL SANS-SERIF BOLD PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D789, visual="bf", @@ -235249,6 +235170,7 @@ characters.data={ description="MATHEMATICAL SANS-SERIF BOLD ITALIC PARTIAL DIFFERENTIAL", direction="on", linebreak="al", + mathclass="differential", specials={ "font", 0x2202 }, unicodeslot=0x1D7C3, visual="bi", diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index fb27e5d04..f33357f04 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2022.01.21 20:10} +\newcontextversion{2022.03.12 11:24} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 1aaa77a0f..1e81770dc 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -49,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2022.01.21 20:10} +\edef\contextversion{2022.03.12 11:24} %D Kind of special: diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua index 34c047290..d169faf64 100644 --- a/tex/context/base/mkiv/font-osd.lua +++ b/tex/context/base/mkiv/font-osd.lua @@ -6,6 +6,16 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag license = "see context related readme files" } +local experiment1 = false +local experiment2 = false +local experiment2b1 = false +local experiment2b2 = false + +experiments.register("fonts.indic.experiment1", function(v) experiment1 = v end) +experiments.register("fonts.indic.experiment2", function(v) experiment2 = v end) +experiments.register("fonts.indic.experiment2b1", function(v) experiment2b1 = v end) +experiments.register("fonts.indic.experiment2b2", function(v) experiment2b2 = v end) + -- we need to check nbsphash (context only) -- A few remarks: @@ -1382,13 +1392,16 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end if reph or vattu then +-- print(">>> has reph or vattu") local current = start local cns = nil local done = false while current ~= stop do +-- print("\t>>> current ~= stop yet") local c = current local n = getnext(current) if ra[getchar(current)] and halant[getchar(n)] then +-- print("\t\t>>> current ra; next halant") c = n n = getnext(n) local b, bn = base, base @@ -1402,6 +1415,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) if getstate(current,s_rphf) then -- position Reph (Ra + H) after post-base 'matra' (if any) since these -- become marks on the 'matra', not on the base glyph +-- print("\t\t\t>>> ra + halant form → reph") if b ~= current then if current == start then if head == start then @@ -1421,6 +1435,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end elseif cns and getnext(cns) ~= current then -- todo: optimize next -- position below-base Ra (vattu) following the consonants on which it is placed (either the base consonant or one of the pre-base consonants) +-- print("\t\t\t>>> ra below base (vattu) → rkrf") local cp = getprev(current) local cnsn = getnext(cns) setlink(cp,n) @@ -1434,14 +1449,17 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) current = getprev(n) end else +-- print("\t\t>>> NOT! current ra; next halant") local char = getchar(current) if consonant[char] then +-- print("\t\t\t>>> is consonant") cns = current local next = getnext(cns) if halant[getchar(next)] then cns = next end if not vatucache[char] then +-- print("\t\t\t\t>>> is in vatucache") next = getnext(cns) while dependent_vowel[getchar(next)] do cns = next @@ -1449,6 +1467,7 @@ local function reorder_one(head,start,stop,font,attr,nbspaces) end end elseif char == c_nbsp then +-- print("\t\t\t>>> is nbsp") nbspaces = nbspaces + 1 cns = current local next = getnext(cns) @@ -1917,6 +1936,8 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas reorderreph.coverage = { } -- use local rephbase[font] = { } -- use local +-- print("!!!!!! reorder two ") + for i=1,#seqsubset do -- this can be done more efficient, the last test and less getnext @@ -2104,6 +2125,7 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas end end else -- not Stand Alone cluster +-- print("!!!! not standalone cluster") local last = getnext(stop) while current ~= last do -- find base consonant local next = getnext(current) @@ -2173,7 +2195,10 @@ local function reorder_two(head,start,stop,font,attr,nbspaces) -- maybe do a pas end end -- - if not moved[current] and dependent_vowel[char] then +-- print("char: " .. char) +-- if not moved[current] and dependent_vowel[char] then + if dependent_vowel[char] then +-- print(">>!! dependent vowel") if pre_mark[char] then -- or: if before_main or before_half moved[current] = true -- can be helper to remove one node @@ -2384,8 +2409,8 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe if not n then return c end + local v = ischar(n,font) if variant == 1 then - local v = ischar(n,font) if v and nukta[v] then n = getnext(n) if n then @@ -2418,7 +2443,6 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end elseif variant == 2 then - local v = ischar(n,font) if v and nukta[v] then c = n end @@ -2443,11 +2467,11 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end -- c = ms_matra(c) - local n = getnext(c) + n = getnext(c) if not n then return c end - local v = ischar(n,font) + v = ischar(n,font) if not v then return c end @@ -2555,13 +2579,22 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe end end +-- Consonant syllable: +-- +-- { C + [ N ] + < H + [ < ZWNJ | ZWJ > ] | < ZWNJ | ZWJ > + H > } +-- + C +-- + [ N ] +-- + [ A ] +-- + [ < H + [ < ZWNJ|ZWJ > ] | { M } + [ N ] + [ H ] > ] +-- + [ SM ] +-- + [ ( VD ) ] + local function analyze_next_chars_two(c,font) - local n, v - n = getnext(c) + local n = getnext(c) if not n then return c end - v = ischar(n,font) + local v = ischar(n,font) if v and nukta[v] then c = n end @@ -2677,6 +2710,10 @@ local function analyze_next_chars_two(c,font) for k=1,#vowels do local v = vowels[k] if pre_mark[v] and not already_pre_mark then +-- print(">>> pre_mark") +-- if dependent_vowel[v] then +-- print(">>>> dependent vowel") +-- end already_pre_mark = true elseif above_mark[v] and not already_above_mark then already_above_mark = true @@ -3031,12 +3068,15 @@ local function method_two(head,font,attr) end end if independent_vowel[char] then +-- print("!!>>> independent_vowel") -- vowel-based syllable: [Ra+H]+V+[N]+[<[<ZWJ|ZWNJ>]+H+C|ZWJ+C>]+[{M}+[N]+[H]]+[SM]+[(VD)] current = analyze_next_chars_one(c,font,1) syllableend = current else +-- print("!!>>> dependent vowel") local standalone = char == c_nbsp if standalone then +-- print("!!>>> standalone") nbspaces = nbspaces + 1 local p = getprev(current) if not p then @@ -3050,10 +3090,12 @@ local function method_two(head,font,attr) end end if standalone then +-- print("!!>>>>>>> next standalone") -- Stand Alone cluster (at the start of the word only): #[Ra+H]+NBSP+[N]+[<[<ZWJ|ZWNJ>]+H+C>]+[{M}+[N]+[H]]+[SM]+[(VD)] current = analyze_next_chars_one(c,font,2) syllableend = current elseif consonant[getchar(current)] then +-- print("!!>>>>>>> a consonant") -- WHY current INSTEAD OF c ? -- Consonant syllable: {C+[N]+<H+[<ZWNJ|ZWJ>]|<ZWNJ|ZWJ>+H>} + C+[N]+[A] + [< H+[<ZWNJ|ZWJ>] | {M}+[N]+[H]>]+[SM]+[(VD)] current = analyze_next_chars_two(current,font) -- not c ! @@ -3062,6 +3104,7 @@ local function method_two(head,font,attr) end end if syllableend then +-- print("!!!>>> syllable end") syllabe = syllabe + 1 local c = syllablestart local n = getnext(syllableend) diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua index 2c955dbce..342541f12 100644 --- a/tex/context/base/mkiv/font-otc.lua +++ b/tex/context/base/mkiv/font-otc.lua @@ -130,7 +130,7 @@ local function validspecification(specification,name) end end -local function addfeature(data,feature,specifications) +local function addfeature(data,feature,specifications,prepareonly) -- todo: add some validator / check code so that we're more tolerant to -- user errors @@ -461,13 +461,13 @@ local function addfeature(data,feature,specifications) return false end + -- 0 == remove, false = ignore (remove is default) + local function prepare_chain(list,featuretype,sublookups,nocheck) -- todo: coveractions local rules = list.rules local coverage = { } if rules then - local rulehash = { } - local rulesize = 0 local lookuptype = types[featuretype] for nofrules=1,#rules do local rule = rules[nofrules] @@ -498,6 +498,15 @@ local function addfeature(data,feature,specifications) local lookups = rule.lookups or false local subtype = nil if lookups and sublookups then +-- inspect(lookups) +if #lookups > 0 then + local ns = stop - start + 1 + for i=1,ns do + if lookups[i] == nil then + lookups[i] = 0 + end + end +end local l = { } for k, v in sortedhash(lookups) do local t = type(v) @@ -535,6 +544,7 @@ local function addfeature(data,feature,specifications) if nofsequences > 0 then -- we merge coverage into one -- we copy as we can have different fonts if hassteps(lookups) then + -- sequence is the before|current|after match list local hashed = { } for i=1,nofsequences do local t = { } @@ -547,9 +557,9 @@ local function addfeature(data,feature,specifications) end hashed[i] = t end + -- hashed is the before|current|after match hash sequence = hashed - rulesize = rulesize + 1 - rulehash[rulesize] = { + local ruleset = { nofrules, -- 1 lookuptype, -- 2 sequence, -- 3 @@ -561,8 +571,15 @@ local function addfeature(data,feature,specifications) } for unic in sortedhash(sequence[start]) do local cu = coverage[unic] - if not cu then - coverage[unic] = rulehash -- can now be done cleaner i think + if cu then + local n = cu.n + 1 + cu[n] = ruleset + cu.n = n + else + coverage[unic] = { + ruleset, + n = 1, + } end end sequence.n = nofsequences @@ -571,7 +588,6 @@ local function addfeature(data,feature,specifications) end end end - rulehash.n = rulesize end return coverage end @@ -813,6 +829,9 @@ local function addfeature(data,feature,specifications) nofsteps = nofsteps, type = types[featuretype], } + if prepareonly then + return sequence + end end end @@ -900,6 +919,23 @@ local function enhance(data,filename,raw) end end +-- local function enhance(data,filename,raw) +-- local first = 1 +-- local last = #extrafeatures +-- while true do +-- for slot=first,last do +-- local specification = extrafeatures[slot] +-- addfeature(data,specification.name,specification) +-- end +-- if #extrafeatures > last then +-- first = last + 1 +-- last = #extrafeatures +-- else +-- break +-- end +-- end +-- end + otf.enhancers.enhance = enhance otf.enhancers.register("check extra features",enhance) diff --git a/tex/context/base/mkiv/lang-imp-indic.lua b/tex/context/base/mkiv/lang-imp-indic.lua index 5c766c5ef..164b765cc 100644 --- a/tex/context/base/mkiv/lang-imp-indic.lua +++ b/tex/context/base/mkiv/lang-imp-indic.lua @@ -1,12 +1,10 @@ -local zwj = utf.char(0x200D) - return { name = "indic transliterations", version = "1.00", comment = "Experimental code, the name of this file might change" .. "or maybe it become a llg file in the end.", - author = "kauśika and hans", + author = "Sreeram and Hans", copyright = "ConTeXt development team & whoever made this list", transliterations = { @@ -540,20 +538,20 @@ return { ["ḻṛ"] = "ळृ", ["ḻṝ"] = "ळॄ", --- - ["xa"] = "क्ष", - ["xā"] = "क्षा", - ["xi"] = "क्षि", - ["xī"] = "क्षी", - ["xu"] = "क्षु", - ["xū"] = "क्षू", - ["xe"] = "क्षे", - ["xo"] = "क्षो", - ["xai"] = "क्षै", - ["xau"] = "क्षौ", - ["xḷ"] = "क्षॢ", - ["xḹ"] = "क्षॣ", - ["xṛ"] = "क्षृ", - ["xṝ"] = "क्षॄ", + ["kṣa"] = "क्ष", + ["kṣā"] = "क्षा", + ["kṣi"] = "क्षि", + ["kṣī"] = "क्षी", + ["kṣu"] = "क्षु", + ["kṣū"] = "क्षू", + ["kṣe"] = "क्षे", + ["kṣo"] = "क्षो", + ["kṣai"] = "क्षै", + ["kṣau"] = "क्षौ", + ["kṣḷ"] = "क्षॢ", + ["kṣḹ"] = "क्षॣ", + ["kṣṛ"] = "क्षृ", + ["kṣṝ"] = "क्षॄ", --- ["jña"] = "ज्ञ", ["jñā"] = "ज्ञा", @@ -604,7 +602,7 @@ return { ["s"] = "स्", ["h"] = "ह्", ["ḻ"] = "ळ्", - ["x"] = "क्ष्", + ["kṣ"] = "क्ष्", ["jñ"] = "ज्ञ्", -- yogavaahas (always with phonetic) ["ṁ"] = "ं", @@ -617,6 +615,611 @@ return { ["||"] = "॥", }, }, + ["itrans to deva"] = { + mapping = { + --- vowels + ["a"] = "अ", + ["A"] = "आ", + ["i"] = "इ", + ["I"] = "ई", + ["u"] = "उ", + ["U"] = "ऊ", + ["RRi"] = "ऋ", + ["RRI"] = "ॠ", + ["LLi"] = "ऌ", + ["LLI"] = "ॡ", + ["e"] = "ए", + ["ai"] = "ऐ", + ["o"] = "ओ", + ["au"] = "औ", + --- consonant forms + ["ka"] = "क", + ["kA"] = "का", + ["ki"] = "कि", + ["kI"] = "की", + ["ku"] = "कु", + ["kU"] = "कू", + ["ke"] = "के", + ["ko"] = "को", + ["kai"] = "कै", + ["kau"] = "कौ", + ["kLLi"] = "कॢ", + ["kLLI"] = "कॣ", + ["kRRi"] = "कृ", + ["kRRI"] = "कॄ", + --- + ["kha"] = "ख", + ["khA"] = "खा", + ["khi"] = "खि", + ["khI"] = "खी", + ["khu"] = "खु", + ["khU"] = "खू", + ["khe"] = "खे", + ["kho"] = "खो", + ["khai"] = "खै", + ["khau"] = "खौ", + ["khLLi"] = "खॢ", + ["khLLI"] = "खॣ", + ["khRRi"] = "खृ", + ["khRRI"] = "खॄ", + --- + ["ga"] = "ग", + ["gA"] = "गा", + ["gi"] = "गि", + ["gI"] = "गी", + ["gu"] = "गु", + ["gU"] = "गू", + ["ge"] = "गे", + ["go"] = "गो", + ["gai"] = "गै", + ["gau"] = "गौ", + ["gLLi"] = "गॢ", + ["gLLI"] = "गॣ", + ["gRRi"] = "गृ", + ["gRRI"] = "गॄ", + --- + ["gha"] = "घ", + ["ghA"] = "घा", + ["ghi"] = "घि", + ["ghI"] = "घी", + ["ghu"] = "घु", + ["ghU"] = "घू", + ["ghe"] = "घे", + ["gho"] = "घो", + ["ghai"] = "घै", + ["ghau"] = "घौ", + ["ghLLi"] = "घॢ", + ["ghLLI"] = "घॣ", + ["ghRRi"] = "घृ", + ["ghRRI"] = "घॄ", + --- + ["~Na"] = "ङ", + ["~NA"] = "ङा", + ["~Ni"] = "ङि", + ["~NI"] = "ङी", + ["~Nu"] = "ङु", + ["~NU"] = "ङू", + ["~Ne"] = "ङे", + ["~No"] = "ङो", + ["~Nai"] = "ङै", + ["~Nau"] = "ङौ", + ["~NLLi"] = "ङॢ", + ["~NLLI"] = "ङॣ", + ["~NRRi"] = "ङृ", + ["~NRRI"] = "ङॄ", + --- + ["ca"] = "च", + ["cA"] = "चा", + ["ci"] = "चि", + ["cI"] = "ची", + ["cu"] = "चु", + ["cU"] = "चू", + ["ce"] = "चे", + ["co"] = "चो", + ["cai"] = "चै", + ["cau"] = "चौ", + ["cLLi"] = "चॢ", + ["cLLI"] = "चॣ", + ["cRRi"] = "चृ", + ["cRRI"] = "चॄ", + --- + ["cha"] = "छ", + ["chA"] = "छा", + ["chi"] = "छि", + ["chI"] = "छी", + ["chu"] = "छु", + ["chU"] = "छू", + ["che"] = "छे", + ["cho"] = "छो", + ["chai"] = "छै", + ["chau"] = "छौ", + ["chLLi"] = "छॢ", + ["chLLI"] = "छॣ", + ["chRRi"] = "छृ", + ["chRRI"] = "छॄ", + --- + ["ja"] = "ज", + ["jA"] = "जा", + ["ji"] = "जि", + ["jI"] = "जी", + ["ju"] = "जु", + ["jU"] = "जू", + ["je"] = "जे", + ["jo"] = "जो", + ["jai"] = "जै", + ["jau"] = "जौ", + ["jLLi"] = "जॢ", + ["jLLI"] = "जॣ", + ["jRRi"] = "जृ", + ["jRRI"] = "जॄ", + --- + ["jha"] = "झ", + ["jhA"] = "झा", + ["jhi"] = "झि", + ["jhI"] = "झी", + ["jhu"] = "झु", + ["jhU"] = "झू", + ["jhe"] = "झे", + ["jho"] = "झो", + ["jhai"] = "झै", + ["jhau"] = "झौ", + ["jhLLi"] = "झॢ", + ["jhLLI"] = "झॣ", + ["jhRRi"] = "झृ", + ["jhRRI"] = "झॄ", + --- + ["~na"] = "ञ", + ["~nA"] = "ञा", + ["~ni"] = "ञि", + ["~nI"] = "ञी", + ["~nu"] = "ञु", + ["~nU"] = "ञू", + ["~ne"] = "ञे", + ["~no"] = "ञो", + ["~nai"] = "ञै", + ["~nau"] = "ञौ", + ["~nLLi"] = "ञॢ", + ["~nLLI"] = "ञॣ", + ["~nRRi"] = "ञृ", + ["~nRRI"] = "ञॄ", + --- + ["Ta"] = "ट", + ["TA"] = "टा", + ["Ti"] = "टि", + ["TI"] = "टी", + ["Tu"] = "टु", + ["TU"] = "टू", + ["Te"] = "टे", + ["To"] = "टो", + ["Tai"] = "टै", + ["Tau"] = "टौ", + ["TLLi"] = "टॢ", + ["TLLI"] = "टॣ", + ["TRRi"] = "टृ", + ["TRRI"] = "टॄ", + --- + ["Tha"] = "ठ", + ["ThA"] = "ठा", + ["Thi"] = "ठि", + ["ThI"] = "ठी", + ["Thu"] = "ठु", + ["ThU"] = "ठू", + ["The"] = "ठे", + ["Tho"] = "ठो", + ["Thai"] = "ठै", + ["Thau"] = "ठौ", + ["ThLLi"] = "ठॢ", + ["ThLLI"] = "ठॣ", + ["ThRRi"] = "ठृ", + ["ThRRI"] = "ठॄ", + --- + ["Da"] = "ड", + ["DA"] = "डा", + ["Di"] = "डि", + ["DI"] = "डी", + ["Du"] = "डु", + ["DU"] = "डू", + ["De"] = "डे", + ["Do"] = "डो", + ["Dai"] = "डै", + ["Dau"] = "डौ", + ["DLLi"] = "डॢ", + ["DLLI"] = "डॣ", + ["DRRi"] = "डृ", + ["DRRI"] = "डॄ", + --- + ["Dha"] = "ढ", + ["DhA"] = "ढा", + ["Dhi"] = "ढि", + ["DhI"] = "ढी", + ["Dhu"] = "ढु", + ["DhU"] = "ढू", + ["Dhe"] = "ढे", + ["Dho"] = "ढो", + ["Dhai"] = "ढै", + ["Dhau"] = "ढौ", + ["DhLLi"] = "ढॢ", + ["DhLLI"] = "ढॣ", + ["DhRRi"] = "ढृ", + ["DhRRI"] = "ढॄ", + --- + ["Na"] = "ण", + ["NA"] = "णा", + ["Ni"] = "णि", + ["NI"] = "णी", + ["Nu"] = "णु", + ["NU"] = "णू", + ["Ne"] = "णे", + ["No"] = "णो", + ["Nai"] = "णै", + ["Nau"] = "णौ", + ["NLLi"] = "णॢ", + ["NLLI"] = "णॣ", + ["NRRi"] = "णृ", + ["NRRI"] = "णॄ", + --- + ["ta"] = "त", + ["tA"] = "ता", + ["ti"] = "ति", + ["tI"] = "ती", + ["tu"] = "तु", + ["tU"] = "तू", + ["te"] = "ते", + ["to"] = "तो", + ["tai"] = "तै", + ["tau"] = "तौ", + ["tLLi"] = "तॢ", + ["tLLI"] = "तॣ", + ["tRRi"] = "तृ", + ["tRRI"] = "तॄ", + --- + ["tha"] = "थ", + ["thA"] = "था", + ["thi"] = "थि", + ["thI"] = "थी", + ["thu"] = "थु", + ["thU"] = "थू", + ["the"] = "थे", + ["tho"] = "थो", + ["thai"] = "थै", + ["thau"] = "थौ", + ["thLLi"] = "थॢ", + ["thLLI"] = "थॣ", + ["thRRi"] = "थृ", + ["thRRI"] = "थॄ", + --- + ["da"] = "द", + ["dA"] = "दा", + ["di"] = "दि", + ["dI"] = "दी", + ["du"] = "दु", + ["dU"] = "दू", + ["de"] = "दे", + ["do"] = "दो", + ["dai"] = "दै", + ["dau"] = "दौ", + ["dLLi"] = "दॢ", + ["dLLI"] = "दॣ", + ["dRRi"] = "दृ", + ["dRRI"] = "दॄ", + --- + ["dha"] = "ध", + ["dhA"] = "धा", + ["dhi"] = "धि", + ["dhI"] = "धी", + ["dhu"] = "धु", + ["dhU"] = "धू", + ["dhe"] = "धे", + ["dho"] = "धो", + ["dhai"] = "धै", + ["dhau"] = "धौ", + ["dhLLi"] = "धॢ", + ["dhLLI"] = "धॣ", + ["dhRRi"] = "धृ", + ["dhRRI"] = "धॄ", + --- + ["na"] = "न", + ["nA"] = "ना", + ["ni"] = "नि", + ["nI"] = "नी", + ["nu"] = "नु", + ["nU"] = "नू", + ["ne"] = "ने", + ["no"] = "नो", + ["nai"] = "नै", + ["nau"] = "नौ", + ["nLLi"] = "नॢ", + ["nLLI"] = "नॣ", + ["nRRi"] = "नृ", + ["nRRI"] = "नॄ", + --- + ["pa"] = "प", + ["pA"] = "पा", + ["pi"] = "पि", + ["pI"] = "पी", + ["pu"] = "पु", + ["pU"] = "पू", + ["pe"] = "पे", + ["po"] = "पो", + ["pai"] = "पै", + ["pau"] = "पौ", + ["pLLi"] = "पॢ", + ["pLLI"] = "पॣ", + ["pRRi"] = "पृ", + ["pRRI"] = "पॄ", + --- + ["pha"] = "फ", + ["phA"] = "फा", + ["phi"] = "फि", + ["phI"] = "फी", + ["phu"] = "फु", + ["phU"] = "फू", + ["phe"] = "फे", + ["pho"] = "फो", + ["phai"] = "फै", + ["phau"] = "फौ", + ["phLLi"] = "फॢ", + ["phLLI"] = "फॣ", + ["phRRi"] = "फृ", + ["phRRI"] = "फॄ", + --- + ["ba"] = "ब", + ["bA"] = "बा", + ["bi"] = "बि", + ["bI"] = "बी", + ["bu"] = "बु", + ["bU"] = "बू", + ["be"] = "बे", + ["bo"] = "बो", + ["bai"] = "बै", + ["bau"] = "बौ", + ["bLLi"] = "बॢ", + ["bLLI"] = "बॣ", + ["bRRi"] = "बृ", + ["bRRI"] = "बॄ", + --- + ["bha"] = "भ", + ["bhA"] = "भा", + ["bhi"] = "भि", + ["bhI"] = "भी", + ["bhu"] = "भु", + ["bhU"] = "भू", + ["bhe"] = "भे", + ["bho"] = "भो", + ["bhai"] = "भै", + ["bhau"] = "भौ", + ["bhLLi"] = "भॢ", + ["bhLLI"] = "भॣ", + ["bhRRi"] = "भृ", + ["bhRRI"] = "भॄ", + --- + ["ma"] = "म", + ["mA"] = "मा", + ["mi"] = "मि", + ["mI"] = "मी", + ["mu"] = "मु", + ["mU"] = "मू", + ["me"] = "मे", + ["mo"] = "मो", + ["mai"] = "मै", + ["mau"] = "मौ", + ["mLLi"] = "मॢ", + ["mLLI"] = "मॣ", + ["mRRi"] = "मृ", + ["mRRI"] = "मॄ", + --- + ["ya"] = "य", + ["yA"] = "या", + ["yi"] = "यि", + ["yI"] = "यी", + ["yu"] = "यु", + ["yU"] = "यू", + ["ye"] = "ये", + ["yo"] = "यो", + ["yai"] = "यै", + ["yau"] = "यौ", + ["yLLi"] = "यॢ", + ["yLLI"] = "यॣ", + ["yRRi"] = "यृ", + ["yRRI"] = "यॄ", + --- + ["ra"] = "र", + ["rA"] = "रा", + ["ri"] = "रि", + ["rI"] = "री", + ["ru"] = "रु", + ["rU"] = "रू", + ["re"] = "रे", + ["ro"] = "रो", + ["rai"] = "रै", + ["rau"] = "रौ", + ["rLLi"] = "रॢ", + ["rLLI"] = "रॣ", + ["rRRi"] = "रृ", + ["rRRI"] = "रॄ", + --- + ["la"] = "ल", + ["lA"] = "ला", + ["li"] = "लि", + ["lI"] = "ली", + ["lu"] = "लु", + ["lU"] = "लू", + ["le"] = "ले", + ["lo"] = "लो", + ["lai"] = "लै", + ["lau"] = "लौ", + ["lLLi"] = "लॢ", + ["lLLI"] = "लॣ", + ["lRRi"] = "लृ", + ["lRRI"] = "लॄ", + --- + ["va"] = "व", + ["vA"] = "वा", + ["vi"] = "वि", + ["vI"] = "वी", + ["vu"] = "वु", + ["vU"] = "वू", + ["ve"] = "वे", + ["vo"] = "वो", + ["vai"] = "वै", + ["vau"] = "वौ", + ["vLLi"] = "वॢ", + ["vLLI"] = "वॣ", + ["vRRi"] = "वृ", + ["vRRI"] = "वॄ", + --- + ["sha"] = "श", + ["shA"] = "शा", + ["shi"] = "शि", + ["shI"] = "शी", + ["shu"] = "शु", + ["shU"] = "शू", + ["she"] = "शे", + ["sho"] = "शो", + ["shai"] = "शै", + ["shau"] = "शौ", + ["shLLi"] = "शॢ", + ["shLLI"] = "शॣ", + ["shRRi"] = "शृ", + ["shRRI"] = "शॄ", + --- + ["Sha"] = "ष", + ["ShA"] = "षा", + ["Shi"] = "षि", + ["ShI"] = "षी", + ["Shu"] = "षु", + ["ShU"] = "षू", + ["She"] = "षे", + ["Sho"] = "षो", + ["Shai"] = "षै", + ["Shau"] = "षौ", + ["ShLLi"] = "षॢ", + ["ShLLI"] = "षॣ", + ["ShRRi"] = "षृ", + ["ShRRI"] = "षॄ", + --- + ["sa"] = "स", + ["sA"] = "सा", + ["si"] = "सि", + ["sI"] = "सी", + ["su"] = "सु", + ["sU"] = "सू", + ["se"] = "से", + ["so"] = "सो", + ["sai"] = "सै", + ["sau"] = "सौ", + ["sLLi"] = "सॢ", + ["sLLI"] = "सॣ", + ["sRRi"] = "सृ", + ["sRRI"] = "सॄ", + --- + ["ha"] = "ह", + ["hA"] = "हा", + ["hi"] = "हि", + ["hI"] = "ही", + ["hu"] = "हु", + ["hU"] = "हू", + ["he"] = "हे", + ["ho"] = "हो", + ["hai"] = "है", + ["hau"] = "हौ", + ["hLLi"] = "हॢ", + ["hLLI"] = "हॣ", + ["hRRi"] = "हृ", + ["hRRI"] = "हॄ", + --- + ["ḻa"] = "ळ", + ["ḻA"] = "ळा", + ["ḻi"] = "ळि", + ["ḻI"] = "ळी", + ["ḻu"] = "ळु", + ["ḻU"] = "ळू", + ["ḻe"] = "ळे", + ["ḻo"] = "ळो", + ["ḻai"] = "ळै", + ["ḻau"] = "ळौ", + ["ḻLLi"] = "ळॢ", + ["ḻLLI"] = "ळॣ", + ["ḻRRi"] = "ळृ", + ["ḻRRI"] = "ळॄ", + --- + ["xa"] = "क्ष", + ["xA"] = "क्षा", + ["xi"] = "क्षि", + ["xI"] = "क्षी", + ["xu"] = "क्षु", + ["xU"] = "क्षू", + ["xe"] = "क्षे", + ["xo"] = "क्षो", + ["xai"] = "क्षै", + ["xau"] = "क्षौ", + ["xLLi"] = "क्षॢ", + ["xLLI"] = "क्षॣ", + ["xRRi"] = "क्षृ", + ["xRRI"] = "क्षॄ", + --- + ["j~na"] = "ज्ञ", + ["j~nA"] = "ज्ञा", + ["j~ni"] = "ज्ञि", + ["j~nI"] = "ज्ञी", + ["j~nu"] = "ज्ञु", + ["j~nU"] = "ज्ञू", + ["j~ne"] = "ज्ञे", + ["j~no"] = "ज्ञो", + ["j~nai"] = "ज्ञै", + ["j~nau"] = "ज्ञौ", + ["j~nLLi"] = "ज्ञॢ", + ["j~nLLI"] = "ज्ञॣ", + ["j~nRRi"] = "ज्ञृ", + ["j~nRRI"] = "ज्ञॄ", + --- + ["k"] = "क्", + ["kh"] = "ख्", + ["g"] = "ग्", + ["gh"] = "घ्", + ["~N"] = "ङ्", + ["c"] = "च्", + ["ch"] = "छ्", + ["j"] = "ज्", + ["jh"] = "झ्", + ["~n"] = "ञ्", + ["T"] = "ट्", + ["Th"] = "ठ्", + ["D"] = "ड्", + ["Dh"] = "ढ्", + ["N"] = "ण्", + ["t"] = "त्", + ["th"] = "थ्", + ["d"] = "द्", + ["dh"] = "ध्", + ["n"] = "न्", + ["p"] = "प्", + ["ph"] = "फ्", + ["b"] = "ब्", + ["bh"] = "भ्", + ["m"] = "म्", + ["y"] = "य्", + ["r"] = "र्", + ["l"] = "ल्", + ["v"] = "व्", + ["sh"] = "श्", + ["Sh"] = "ष्", + ["s"] = "स्", + ["h"] = "ह्", + ["ḻ"] = "ळ्", + ["x"] = "क्ष्", + ["j~n"] = "ज्ञ्", + -- yogavaahas (always with phonetic) + ["M"] = "ं", + ["H"] = "ः", + ["ँ"] = "ँ", + -- punctuations + ["viraama"] = "्", + ["."] = "।", + ["|"] = "।", + ["||"] = "॥", + }, + }, ["deva to iast"] = { mapping = { -- vowels @@ -1147,20 +1750,20 @@ return { ["ळृ"] = "l̤ṛ", ["ळॄ"] = "l̤ṝ", --- - ["क्ष"]= "xa", - ["क्षा"] = "xā", - ["क्षि"] = "xi", - ["क्षी"] = "xī", - ["क्षु"] = "xu", - ["क्षू"] = "xū", - ["क्षे"] = "xe", - ["क्षो"] = "xo", - ["क्षै"] = "xai", - ["क्षौ"] = "xau", - ["क्षॢ"] = "xḷ", - ["क्षॣ"] = "xḹ", - ["क्षृ"] = "xṛ", - ["क्षॄ"] = "xṝ", + ["क्ष"]= "kṣa", + ["क्षा"] = "kṣā", + ["क्षि"] = "kṣi", + ["क्षी"] = "kṣī", + ["क्षु"] = "kṣu", + ["क्षू"] = "kṣū", + ["क्षे"] = "kṣe", + ["क्षो"] = "kṣo", + ["क्षै"] = "kṣai", + ["क्षौ"] = "kṣau", + ["क्षॢ"] = "kṣḷ", + ["क्षॣ"] = "kṣḹ", + ["क्षृ"] = "kṣṛ", + ["क्षॄ"] = "kṣṝ", --- ["ज्ञ"]= "jña", ["ज्ञा"] = "jñā", @@ -1214,19 +1817,19 @@ return { ["क्ष्"] = "kṣ", ["ज्ञ्"] = "jñ", -- discard virama (?!) TODO: revisit this if need arises - -- ["्"] = "", - ["।"] = ".", - ["॥"] = ".", + -- ["्"] = "", + ["।"] = "|", + ["॥"] = "||", ["ं"] = "ṃ", ["ः"] = "ḥ", ["ऽ"] = "\'", -- disputed - ["ँ"] = "ँ", + ["ँ"] = "̃", -- diactrics (combining): provided for completeness -- warning: many fonts don't have these ["॒"] = "॒", -- could not test - -- ["॑"] = "̭", + -- ["॑"] = "̭", ["॑"] = "॑", ["᳚"] = "᳚", ["᳛"] = "᳛", @@ -1335,5 +1938,345 @@ return { ["’"] = "’", }, }, + ["deva to tlgu"] = { + mapping = { + -- vowels + ["अ"] = "అ", + ["आ"] = "ఆ", + ["इ"] = "ఇ", + ["ई"] = "ఈ", + ["उ"] = "ఉ", + ["ऊ"] = "ఊ", + ["ऋ"] = "ఋ", + ["ॠ"] = "ౠ", + ["ऌ"] = "ఌ", + ["ॡ"] = "ౡ", + ["ऎ"] = "ఎ", + ["ए"] = "ఏ", + ["ऐ"] = "ఐ", + ["ऒ"] = "ఒ", + ["ओ"] = "ఓ", + ["औ"] = "ఔ", + -- consonants + ["क"] = "క", + ["ख"] = "ఖ", + ["ग"] = "గ", + ["घ"] = "ఘ", + ["ङ"] = "ఙ", + ["च"] = "చ", + ["छ"] = "ఛ", + ["ज"] = "జ", + ["झ"] = "ఝ", + ["ञ"] = "ఞ", + ["ट"] = "ట", + ["ठ"] = "ఠ", + ["ड"] = "డ", + ["ढ"] = "ఢ", + ["ण"] = "ణ", + ["त"] = "త", + ["थ"] = "థ", + ["द"] = "ద", + ["ध"] = "ధ", + ["न"] = "న", + ["प"] = "ప", + ["फ"] = "ఫ", + ["ब"] = "బ", + ["भ"] = "భ", + ["म"] = "మ", + ["य"] = "య", + ["र"] = "ర", + ["ल"] = "ల", + ["व"] = "వ", + ["श"] = "శ", + ["ष"] = "ష", + ["स"] = "స", + ["ह"] = "హ", + ["ळ"] = "ళ", + ["क्ष"] = "క్ష", + ["ज्ञ"] = "జ్ఞ", + -- vowel marks + ["ा"] = "ా", + ["ि"] = "ి", + ["ी"] = "ీ", + ["ु"] = "ు", + ["ू"] = "ూ", + ["ृ"] = "ృ", + ["ॄ"] = "ౄ", + ["ॢ"] = "ౢ", + ["ॣ"] = "ౣ", + ["ॆ"] = "ె", + ["े"] = "ే", + ["ै"] = "ై", + ["ॊ"] = "ొ", + ["ो"] = "ో", + ["ौ"] = "ౌ", + -- always with phonetic + ["ं"] = "ం", + ["ः"] = "ః", + ["ँ"] = "ఀ", + -- punctuation marks + ["्"] = "్", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to knda"] = { + mapping = { + -- vowels + ["अ"] = "ಅ", + ["आ"] = "ಆ", + ["इ"] = "ಇ", + ["ई"] = "ಈ", + ["उ"] = "ಉ", + ["ऊ"] = "ಊ", + ["ऋ"] = "ಋ", + ["ॠ"] = "ೠ", + ["ऌ"] = "ಌ", + ["ॡ"] = "ೡ", + ["ऎ"] = "ಎ", + ["ए"] = "ಏ", + ["ऐ"] = "ಐ", + ["ऒ"] = "ಒ", + ["ओ"] = "ಓ", + ["औ"] = "ಔ", + -- consonants + ["क"] = "ಕ", + ["ख"] = "ಖ", + ["ग"] = "ಗ", + ["घ"] = "ಘ", + ["ङ"] = "ಙ", + ["च"] = "ಚ", + ["छ"] = "ಛ", + ["ज"] = "ಜ", + ["झ"] = "ಝ", + ["ञ"] = "ಞ", + ["ट"] = "ಟ", + ["ठ"] = "ಠ", + ["ड"] = "ಡ", + ["ढ"] = "ಢ", + ["ण"] = "ಣ", + ["त"] = "ತ", + ["थ"] = "ಥ", + ["द"] = "ದ", + ["ध"] = "ಧ", + ["न"] = "ನ", + ["प"] = "ಪ", + ["फ"] = "ಫ", + ["ब"] = "ಬ", + ["भ"] = "ಭ", + ["म"] = "ಮ", + ["य"] = "ಯ", + ["र"] = "ರ", + ["ल"] = "ಲ", + ["व"] = "ವ", + ["श"] = "ಶ", + ["ष"] = "ಷ", + ["स"] = "ಸ", + ["ह"] = "ಹ", + ["ळ"] = "ಳ", + ["क्ष"] = "ಕ್ಷ", + ["ज्ञ"] = "ಜ್ಞ", + -- vowel marks + ["ा"] = "ಾ", + ["ि"] = "ಿ", + ["ी"] = "ೀ", + ["ु"] = "ು", + ["ू"] = "ೂ", + ["ृ"] = "ೃ", + ["ॄ"] = "ೄ", + ["ॢ"] = "ೢ", + ["ॣ"] = "ೣ", + ["ॆ"] = "ೆ", + ["े"] = "ೇ", + ["ै"] = "ೈ", + ["ॊ"] = "ೊ", + ["ो"] = "ೋ", + ["ौ"] = "ೌ", + -- always with phonetic + ["ं"] = "ಂ", + ["ः"] = "ಃ", + ["ँ"] = "ಁ", + -- punctuation marks + ["्"] = "್", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to gujr"] = { + mapping = { + -- vowels + ["अ"] = "અ", + ["आ"] = "આ", + ["इ"] = "ઇ", + ["ई"] = "ઈ", + ["उ"] = "ઉ", + ["ऊ"] = "ઊ", + ["ऋ"] = "ઋ", + ["ॠ"] = "ૠ", + ["ऌ"] = "ઌ", + ["ॡ"] = "ૡ", + -- ["ऎ"] = "", + ["ए"] = "એ", + ["ऐ"] = "ઐ", + -- ["ऒ"] = "", + ["ओ"] = "ઓ", + ["औ"] = "ઔ", + -- consonants + ["क"] = "ક", + ["ख"] = "ખ", + ["ग"] = "ગ", + ["घ"] = "ઘ", + ["ङ"] = "ઙ", + ["च"] = "ચ", + ["छ"] = "છ", + ["ज"] = "જ", + ["झ"] = "ઝ", + ["ञ"] = "ઞ", + ["ट"] = "ટ", + ["ठ"] = "ઠ", + ["ड"] = "ડ", + ["ढ"] = "ઢ", + ["ण"] = "ણ", + ["त"] = "ત", + ["थ"] = "થ", + ["द"] = "દ", + ["ध"] = "ધ", + ["न"] = "ન", + ["प"] = "પ", + ["फ"] = "ફ", + ["ब"] = "બ", + ["भ"] = "ભ", + ["म"] = "મ", + ["य"] = "ય", + ["र"] = "ર", + ["ल"] = "લ", + ["व"] = "વ", + ["श"] = "શ", + ["ष"] = "ષ", + ["स"] = "સ", + ["ह"] = "હ", + ["ळ"] = "ળ", + ["क्ष"] = "ક્ષ", + ["ज्ञ"] = "જ્ઞ", + -- vowel marks + ["ा"] = "ા", + ["ि"] = "િ", + ["ी"] = "ી", + ["ु"] = "ુ", + ["ू"] = "ૂ", + ["ृ"] = "ૃ", + ["ॄ"] = "ૄ", + ["ॢ"] = "ૢ", + ["ॣ"] = "ૣ", + -- ["ॆ"] = "", + ["े"] = "ે", + ["ै"] = "ૈ", + -- ["ॊ"] = "", + ["ो"] = "ો", + ["ौ"] = "ૌ", + -- always with phonetic + ["ं"] = "ં", + ["ः"] = "ઃ", + ["ँ"] = "ઁ", + -- punctuation marks + ["्"] = "્", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, + ["deva to bngl"] = { + mapping = { + -- vowels + ["अ"] = "অ", + ["आ"] = "আ", + ["इ"] = "ই", + ["ई"] = "ঈ", + ["उ"] = "উ", + ["ऊ"] = "ঊ", + ["ऋ"] = "ঋ", + ["ॠ"] = "ৠ", + ["ऌ"] = "ঌ", + ["ॡ"] = "ৡ", + -- ["ऎ"] = "", + ["ए"] = "এ", + ["ऐ"] = "ঐ", + -- ["ऒ"] = "", + ["ओ"] = "ও", + ["औ"] = "ঔ", + -- consonants + ["क"] = "ক", + ["ख"] = "খ", + ["ग"] = "গ", + ["घ"] = "ঘ", + ["ङ"] = "ঙ", + ["च"] = "চ", + ["छ"] = "ছ", + ["ज"] = "জ", + ["झ"] = "ঝ", + ["ञ"] = "ঞ", + ["ट"] = "ট", + ["ठ"] = "ঠ", + ["ड"] = "ড", + ["ढ"] = "ঢ", + ["ण"] = "ণ", + ["त"] = "ত", + ["थ"] = "থ", + ["द"] = "দ", + ["ध"] = "ধ", + ["न"] = "ন", + ["प"] = "প", + ["फ"] = "ফ", + ["ब"] = "ব", + ["भ"] = "ভ", + ["म"] = "ম", + ["य"] = "য", + ["र"] = "র", + ["ल"] = "ল", + ["व"] = "ব", + ["श"] = "শ", + ["ष"] = "ষ", + ["स"] = "স", + ["ह"] = "হ", + -- ["ळ"] = "", + ["क्ष"] = "ক্ষ", + ["ज्ञ"] = "জ্ঞ", + -- vowel marks + ["ा"] = "া", + ["ि"] = "ি", + ["ी"] = "ী", + ["ु"] = "ু", + ["ू"] = "ূ", + ["ृ"] = "ৃ", + ["ॄ"] = "ৄ", + ["ॢ"] = "ৢ", + ["ॣ"] = "ৣ", + -- ["ॆ"] = "", + ["े"] = "ে", + ["ै"] = "ৈ", + -- ["ॊ"] = "", + ["ो"] = "ো", + ["ौ"] = "ৌ", + -- always with phonetic + ["ं"] = "ং", + ["ः"] = "ঃ", + ["ँ"] = "ঁ", + -- punctuation marks + ["्"] = "্", + ["'"] = "'", + ["।"] = ".", + ["॥"] = ".", + ["‘"] = "‘", + ["’"] = "’", + }, + }, } } diff --git a/tex/context/base/mkiv/lang-imp-serbian.lua b/tex/context/base/mkiv/lang-imp-serbian.lua index 9e2cf5ce6..6212500c2 100644 --- a/tex/context/base/mkiv/lang-imp-serbian.lua +++ b/tex/context/base/mkiv/lang-imp-serbian.lua @@ -1,46 +1,81 @@ -return { +local c2l = { + mapping = { + ["А"] = "A", ["а"] = "a", + ["Б"] = "B", ["б"] = "b", + ["В"] = "V", ["в"] = "v", + ["Г"] = "G", ["г"] = "g", + ["Д"] = "D", ["д"] = "d", + ["Ђ"] = "Đ", ["ђ"] = "đ", + ["Е"] = "E", ["е"] = "e", + ["Ж"] = "Ž", ["ж"] = "ž", + ["З"] = "Z", ["з"] = "z", + ["И"] = "I", ["и"] = "i", + ["Ј"] = "J", ["ј"] = "j", + ["К"] = "K", ["к"] = "k", + ["Л"] = "L", ["л"] = "l", + ["Љ"] = "Lj", ["љ"] = "lj", + ["М"] = "M", ["м"] = "m", + ["Н"] = "N", ["н"] = "n", + ["Њ"] = "Nj", ["њ"] = "nj", + ["О"] = "O", ["о"] = "o", + ["П"] = "P", ["п"] = "p", + ["Р"] = "R", ["р"] = "r", + ["С"] = "S", ["с"] = "s", + ["Т"] = "T", ["т"] = "t", + ["Ћ"] = "Ć", ["ћ"] = "ć", + ["У"] = "U", ["у"] = "u", + ["Ф"] = "F", ["ф"] = "f", + ["Х"] = "H", ["х"] = "h", + ["Ц"] = "C", ["ц"] = "c", + ["Ч"] = "Č", ["ч"] = "č", + ["Џ"] = "Dž", ["џ"] = "dž", + ["Ш"] = "Š", ["ш"] = "š", + } +} + +local C2L = { + mapping = { + ["А"] = "A", ["а"] = "a", + ["Б"] = "B", ["б"] = "b", + ["В"] = "V", ["в"] = "v", + ["Г"] = "G", ["г"] = "g", + ["Д"] = "D", ["д"] = "d", + ["Ђ"] = "Đ", ["ђ"] = "đ", + ["Е"] = "E", ["е"] = "e", + ["Ж"] = "Ž", ["ж"] = "ž", + ["З"] = "Z", ["з"] = "z", + ["И"] = "I", ["и"] = "i", + ["Ј"] = "J", ["ј"] = "j", + ["К"] = "K", ["к"] = "k", + ["Л"] = "L", ["л"] = "l", + ["Љ"] = "LJ", ["љ"] = "lj", + ["М"] = "M", ["м"] = "m", + ["Н"] = "N", ["н"] = "n", + ["Њ"] = "NJ", ["њ"] = "nj", + ["О"] = "O", ["о"] = "o", + ["П"] = "P", ["п"] = "p", + ["Р"] = "R", ["р"] = "r", + ["С"] = "S", ["с"] = "s", + ["Т"] = "T", ["т"] = "t", + ["Ћ"] = "Ć", ["ћ"] = "ć", + ["У"] = "U", ["у"] = "u", + ["Ф"] = "F", ["ф"] = "f", + ["Х"] = "H", ["х"] = "h", + ["Ц"] = "C", ["ц"] = "c", + ["Ч"] = "Č", ["ч"] = "č", + ["Џ"] = "DŽ", ["џ"] = "dž", + ["Ш"] = "Š", ["ш"] = "š", + } +} +return { name = "sebian transliterations", version = "1.00", - author = "Hans Hagen", - comment = "Experimental code, the name of this file might change" - .. "or maybe it become a llg file in the end.", + author = "Hans Hagen & Ivan Pešić", copyright = "ConTeXt development team & whoever made this list", - transliterations = { - ["serbian to latin"] = { - mapping = { - ["А"] = "A", ["а"] = "a", - ["Б"] = "B", ["б"] = "b", - ["В"] = "V", ["в"] = "v", - ["Г"] = "G", ["г"] = "g", - ["Д"] = "D", ["д"] = "d", - ["Е"] = "E", ["е"] = "e", - ["Ж"] = "Ž", ["ж"] = "ž", - ["З"] = "Z", ["з"] = "z", - ["И"] = "I", ["и"] = "i", - ["Й"] = "J", ["й"] = "j", - ["К"] = "K", ["к"] = "k", - ["Л"] = "L", ["л"] = "l", - ["М"] = "M", ["м"] = "m", - ["Н"] = "N", ["н"] = "n", - ["О"] = "O", ["о"] = "o", - ["П"] = "P", ["п"] = "p", - ["Р"] = "R", ["р"] = "r", - ["С"] = "S", ["с"] = "s", - ["Т"] = "T", ["т"] = "t", - ["У"] = "U", ["у"] = "u", - ["Ф"] = "F", ["ф"] = "f", - ["Х"] = "Ch", ["х"] = "ch", - ["Ц"] = "C", ["ц"] = "c", - ["Ч"] = "Č", ["ч"] = "č", - ["Ш"] = "Š", ["ш"] = "š", - ["Щ"] = "Št", ["щ"] = "št", - ["Ъ"] = "Ă", ["ъ"] = "ă", - ["Ь"] = "′", ["ь"] = "′", - ["Ю"] = "Ju", ["ю"] = "ju", - ["Я"] = "Ja", ["я"] = "ja", - } - } + ["serbian to latin"] = c2l, + c2l = c2l, + C2L = C2L, } } diff --git a/tex/context/base/mkiv/lpdf-pda.xml b/tex/context/base/mkiv/lpdf-pda.xml index 2f07fed2d..0de54aa2a 100644 --- a/tex/context/base/mkiv/lpdf-pda.xml +++ b/tex/context/base/mkiv/lpdf-pda.xml @@ -7,21 +7,9 @@ <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> - <dc:creator> - <rdf:Seq> - <rdf:li xml:lang="x-default"/> - </rdf:Seq> - </dc:creator> - <dc:description> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:description> - <dc:title> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:title> + <dc:creator/> + <dc:description/> + <dc:title/> </rdf:Description> <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> <pdfx:ID/> diff --git a/tex/context/base/mkiv/lpdf-pdx.xml b/tex/context/base/mkiv/lpdf-pdx.xml index 35726a5c0..45349b4d8 100644 --- a/tex/context/base/mkiv/lpdf-pdx.xml +++ b/tex/context/base/mkiv/lpdf-pdx.xml @@ -2,26 +2,19 @@ <!-- lpdf-pdx.xml --> +<!-- + There was a bug in the iso standard so now we just flush them flat because for some + reason there is no upward compatibulity. It's a sort of useless mess anyway. +--> + <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> - <dc:creator> - <rdf:Seq> - <rdf:li xml:lang="x-default"/> - </rdf:Seq> - </dc:creator> - <dc:description> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:description> - <dc:title> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:title> - </rdf:Description> + <dc:creator/> + <dc:description/> + <dc:title/> + </rdf:Description> <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> <pdfx:ID/> <pdfx:ConTeXt.Jobname/> diff --git a/tex/context/base/mkiv/lpdf-pua.xml b/tex/context/base/mkiv/lpdf-pua.xml index f717762b6..091a3d400 100644 --- a/tex/context/base/mkiv/lpdf-pua.xml +++ b/tex/context/base/mkiv/lpdf-pua.xml @@ -2,25 +2,24 @@ <!-- lpdf-pua.xml --> +<!-- + There was a bug in the ISO standard so now we just flush them flat because for some + reason there is no upward compatibulity. It's a sort of useless mess anyway. +--> + +<!-- + <dc:creator> <rdf:Seq><rdf:li xml:lang="x-default"/></rdf:Seq></dc:creator> + <dc:description><rdf:Alt><rdf:li xml:lang="x-default"/></rdf:Alt></dc:description> + <dc:title> <rdf:Alt><rdf:li xml:lang="x-default"/></rdf:Alt></dc:title> +--> + <x:xmpmeta xmlns:x="adobe:ns:meta/"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/pdf</dc:format> - <dc:creator> - <rdf:Seq> - <rdf:li xml:lang="x-default"/> - </rdf:Seq> - </dc:creator> - <dc:description> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:description> - <dc:title> - <rdf:Alt> - <rdf:li xml:lang="x-default"/> - </rdf:Alt> - </dc:title> + <dc:creator/> + <dc:description/> + <dc:title/> </rdf:Description> <rdf:Description rdf:about="" xmlns:pdfx="http://ns.adobe.com/pdfx/1.3/"> <pdfx:ID/> diff --git a/tex/context/base/mkiv/lpdf-xmp.lua b/tex/context/base/mkiv/lpdf-xmp.lua index 508bb1997..2ca3ab3fe 100644 --- a/tex/context/base/mkiv/lpdf-xmp.lua +++ b/tex/context/base/mkiv/lpdf-xmp.lua @@ -59,10 +59,11 @@ local mapping = { ["Producer"] = { "metadata","rdf:Description/pdf:Producer" }, -- ["Trapped"] = { "pdf", "rdf:Description/pdf:Trapped" }, -- '/False' in /Info, but 'False' in XMP -- Dublin Core schema - ["Author"] = { "metadata","rdf:Description/dc:creator/rdf:Seq/rdf:li" }, ["Format"] = { "metadata","rdf:Description/dc:format" }, -- optional, but nice to have - ["Subject"] = { "metadata","rdf:Description/dc:description/rdf:Alt/rdf:li" }, - ["Title"] = { "metadata","rdf:Description/dc:title/rdf:Alt/rdf:li" }, + -- These were dc:.../rdf:Seq/rdf:li but there was a (invalidating) bug in the iso + ["Author"] = { "metadata","rdf:Description/dc:creator" }, + ["Subject"] = { "metadata","rdf:Description/dc:description" }, + ["Title"] = { "metadata","rdf:Description/dc:title" }, -- XMP Basic schema ["CreateDate"] = { "date", "rdf:Description/xmp:CreateDate" }, ["CreationDate"] = { "date", "rdf:Description/xmp:CreationDate" }, -- dummy diff --git a/tex/context/base/mkiv/math-act.lua b/tex/context/base/mkiv/math-act.lua index e1ef751d7..4e3365d74 100644 --- a/tex/context/base/mkiv/math-act.lua +++ b/tex/context/base/mkiv/math-act.lua @@ -220,10 +220,10 @@ function mathematics.tweakaftercopyingfont(target,original) end end +sequencers.appendaction("mathparameters","system","mathematics.overloadparameters") sequencers.appendaction("mathparameters","system","mathematics.scaleparameters") sequencers.appendaction("mathparameters","system","mathematics.checkaccentbaseheight") -- should go in lfg instead sequencers.appendaction("mathparameters","system","mathematics.checkprivateparameters") -- after scaling ! -sequencers.appendaction("mathparameters","system","mathematics.overloadparameters") sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont") sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont") diff --git a/tex/context/base/mkiv/math-ini.lua b/tex/context/base/mkiv/math-ini.lua index 2a8129ca7..688f682c8 100644 --- a/tex/context/base/mkiv/math-ini.lua +++ b/tex/context/base/mkiv/math-ini.lua @@ -31,6 +31,8 @@ local ctx_doifelsesomething = commands.doifelsesomething local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end) +-- trace_defining = true + local report_math = logs.reporter("mathematics","initializing") mathematics = mathematics or { } @@ -55,78 +57,96 @@ local families = allocate { --- to be checked .. afew defaults in char-def that should be alpha local classes = allocate { - ord = 0, -- mathordcomm mathord - op = 1, -- mathopcomm mathop - bin = 2, -- mathbincomm mathbin - rel = 3, -- mathrelcomm mathrel - open = 4, -- mathopencomm mathopen - middle = 4, - close = 5, -- mathclosecomm mathclose - punct = 6, -- mathpunctcomm mathpunct - alpha = 7, -- mathalphacomm firstofoneargument - accent = 8, -- class 0 - radical = 9, - xaccent = 10, -- class 3 - topaccent = 11, -- class 0 - botaccent = 12, -- class 0 - under = 13, - over = 14, - delimiter = 15, - inner = 0, -- mathinnercomm mathinner - nothing = 0, -- mathnothingcomm firstofoneargument - choice = 0, -- mathchoicecomm @@mathchoicecomm - box = 0, -- mathboxcomm @@mathboxcomm - limop = 1, -- mathlimopcomm @@mathlimopcomm - nolop = 1, -- mathnolopcomm @@mathnolopcomm + ord = 0, -- mathordcomm mathord + op = 1, -- mathopcomm mathop + bin = 2, -- mathbincomm mathbin + rel = 3, -- mathrelcomm mathrel + open = 4, -- mathopencomm mathopen + middle = 4, + close = 5, -- mathclosecomm mathclose + punct = 6, -- mathpunctcomm mathpunct + alpha = 7, -- mathalphacomm firstofoneargument + accent = 8, -- class 0 + radical = 9, + xaccent = 10, -- class 3 + topaccent = 11, -- class 0 + botaccent = 12, -- class 0 + under = 13, + over = 14, + delimiter = 15, + division = 15, + inner = 0, -- mathinnercomm mathinner + choice = 0, -- mathchoicecomm @@mathchoicecomm + prime = 0, + differential = 0, + exponential = 0, + limop = 1, -- mathlimopcomm @@mathlimopcomm + nolop = 1, -- mathnolopcomm @@mathnolopcomm -- - ordinary = 0, -- ord - alphabetic = 7, -- alpha - unknown = 0, -- nothing - default = 0, -- nothing - punctuation = 6, -- punct - normal = 0, -- nothing - opening = 4, -- open - closing = 5, -- close - binary = 2, -- bin - relation = 3, -- rel - fence = 0, -- unknown - diacritic = 8, -- accent - large = 1, -- op - variable = 7, -- alphabetic - number = 7, -- alphabetic - root = 16, -- a private one + ordinary = 0, -- ord + alphabetic = 7, -- alpha + punctuation = 6, -- punct + opening = 4, -- open + closing = 5, -- close + binary = 2, -- bin + relation = 3, -- rel + diacritic = 8, -- accent + large = 1, -- op + variable = 7, -- alphabetic + number = 7, -- alphabetic + root = 16, -- a private one } -local open_class = 4 -local middle_class = 4 -local close_class = 5 -local accent_class = 8 -local radical_class = 9 -local topaccent_class = 11 -local botaccent_class = 12 -local under_class = 13 -local over_class = 14 -local delimiter_class = 15 -local root_class = 16 +local engineclasses = table.setmetatableindex(function(t,k) + if k then + local c = tonumber(k) or classes[k] or 0 + local v = c < 8 and c or 0 + t[k] = v + return v + else + return 0 + end +end) + +local ordinary_class = classes.ordinary +local open_class = classes.open +local middle_class = classes.middle +local close_class = classes.close +local accent_class = classes.accent +local radical_class = classes.radical +local topaccent_class = classes.topaccent +local botaccent_class = classes.botaccent +local under_class = classes.under +local over_class = classes.over +local delimiter_class = classes.delimiter +local division_class = classes.division +local root_class = classes.root local accents = allocate { accent = true, -- some can be both - topaccent = true, [11] = true, - botaccent = true, [12] = true, - under = true, [13] = true, - over = true, [14] = true, + topaccent = true, [topaccent_class] = true, + botaccent = true, [botaccent_class] = true, + under = true, [under_class] = true, + over = true, [over_class] = true, unknown = false, } +-- engine subtypes get from elsewhere + local codes = allocate { - ordinary = 0, [0] = "ordinary", - largeoperator = 1, "largeoperator", - binaryoperator = 2, "binaryoperator", - relation = 3, "relation", - openingsymbol = 4, "openingsymbol", - closingsymbol = 5, "closingsymbol", - punctuation = 6, "punctuation", - variable = 7, "variable", + ordinary = 0, [ 0] = "ordinary", + largeoperator = 1, [ 1] = "largeoperator", + binaryoperator = 2, [ 2] = "binaryoperator", + relation = 3, [ 3] = "relation", + openingsymbol = 4, [ 4] = "openingsymbol", + closingsymbol = 5, [ 5] = "closingsymbol", + punctuation = 6, [ 6] = "punctuation", + -- inner = 7, [ 7] = "inner", + -- undersymbol = 8, [ 8] = "undersymbol", + -- oversymbol = 9, [ 9] = "oversymbol", + -- fractionsymbol = 10, [10] = "fractionsymbol", + -- radicalsymbol = 11, [11] = "radicalsymbol", + middlesymbol = 12, [12] = "middlesymbol", } local extensibles = allocate { @@ -176,257 +196,206 @@ mathematics.codes = codes mathematics.families = families mathematics.virtualized = virtualized --- there will be proper functions soon (and we will move this code in-line) --- no need for " in class and family (saves space) - --- local function mathchar(class,family,slot) --- return formatters['\\Umathchar "%X "%X "%X '](class,family,slot) --- end --- --- local function mathaccent(class,family,slot) --- return formatters['\\Umathaccent "%X "%X "%X '](0,family,slot) -- no class --- end --- --- local function delimiter(class,family,slot) --- return formatters['\\Udelimiter "%X "%X "%X '](class,family,slot) --- end --- --- local function radical(family,slot) --- return formatters['\\Uradical "%X "%X '](family,slot) --- end --- --- local function root(family,slot) --- return formatters['\\Uroot "%X "%X '](family,slot) --- end --- --- local function mathchardef(name,class,family,slot) --- return formatters['\\Umathchardef\\%s "%X "%X "%X '](name,class,family,slot) --- end --- --- local function mathcode(target,class,family,slot) --- return formatters['\\Umathcode%s="%X "%X "%X '](target,class,family,slot) --- end --- --- local function mathtopaccent(class,family,slot) --- return formatters['\\Umathaccent "%X "%X "%X '](0,family,slot) -- no class --- end --- --- local function mathbotaccent(class,family,slot) --- return formatters['\\Umathaccent bottom "%X "%X "%X '](0,family,slot) -- no class --- end --- --- local function mathtopdelimiter(class,family,slot) --- return formatters['\\Udelimiterover "%X "%X '](family,slot) -- no class --- end --- --- local function mathbotdelimiter(class,family,slot) --- return formatters['\\Udelimiterunder "%X "%X '](family,slot) -- no class --- end - local escapes = characters.filters.utf.private.escapes --- not that many so no need to reuse tables +do -local setmathcharacter = function(class,family,slot,unicode,mset,dset) - if mset and codes[class] then -- regular codes < 7 - setmathcode("global",slot,class,family,unicode) - mset = false - end - if dset and class == open_class or class == close_class or class == middle_class then - setdelcode("global",slot,family,unicode,0,0) - dset = false + local setmathcharacter = function(class,family,slot,unicode,mset,dset) + if mset and codes[class] then -- regular codes < 7 + setmathcode("global",slot,class,family,unicode) + mset = false + end + if dset and (class == open_class or class == close_class or class == middle_class or class == division_class) then + setdelcode("global",slot,family,unicode,0,0) + dset = false + end + return mset, dset end - return mset, dset -end - --- todo: make nice setters for this in lua - -local f_accent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] -local f_topaccent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] -local f_botaccent = formatters[ [[\defUmathbotaccent \%s{%X}{%X}{%X}]] ] -local f_over = formatters[ [[\defUdelimiterover \%s{%X}{%X}{%X}]] ] -local f_under = formatters[ [[\defUdelimiterunder\%s{%X}{%X}{%X}]] ] -local f_fence = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] -local f_delimiter = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] -local f_radical = formatters[ [[\defUradical \%s{%X}{%X}]] ] -local f_root = formatters[ [[\defUroot \%s{%X}{%X}]] ] -local f_char = formatters[ [[\defUmathchar \%s{%X}{%X}{%X}]] ] - -local texmathchardef = tex.mathchardef - --- local setmathsymbol = function(name,class,family,slot) -- hex is nicer for tracing --- if class == classes.accent then --- ctx_sprint(f_topaccent(name,0,family,slot)) --- elseif class == classes.topaccent then --- ctx_sprint(f_topaccent(name,0,family,slot)) --- elseif class == classes.botaccent then --- ctx_sprint(f_botaccent(name,0,family,slot)) --- elseif class == classes.over then --- ctx_sprint(f_over(name,0,family,slot)) --- elseif class == classes.under then --- ctx_sprint(f_under(name,0,family,slot)) --- elseif class == open_class or class == close_class or class == middle_class then --- setdelcode("global",slot,{family,slot,0,0}) --- ctx_sprint(f_fence(name,class,family,slot)) --- elseif class == classes.delimiter then --- setdelcode("global",slot,{family,slot,0,0}) --- ctx_sprint(f_delimiter(name,0,family,slot)) --- elseif class == classes.radical then --- ctx_sprint(f_radical(name,family,slot)) --- elseif class == classes.root then --- ctx_sprint(f_root(name,family,slot)) --- elseif texmathchardef then --- texmathchardef(name,class,family,slot,"permanent") --- else --- -- beware, open/close and other specials should not end up here --- ctx_sprint(f_char(name,class,family,slot)) --- end --- end -local setmathsymbol = function(name,class,family,slot) -- hex is nicer for tracing - if class == accent_class then - ctx_sprint(f_topaccent(name,0,family,slot)) - elseif class == topaccent_class then - ctx_sprint(f_topaccent(name,0,family,slot)) - elseif class == botaccent_class then - ctx_sprint(f_botaccent(name,0,family,slot)) - elseif class == over_class then - ctx_sprint(f_over(name,0,family,slot)) - elseif class == under_class then - ctx_sprint(f_under(name,0,family,slot)) - elseif class == open_class or class == close_class or class == middle_class then - setdelcode("global",slot,{family,slot,0,0}) - ctx_sprint(f_fence(name,class,family,slot)) - elseif class == delimiter_class then - setdelcode("global",slot,{family,slot,0,0}) - ctx_sprint(f_delimiter(name,0,family,slot)) - elseif class == radical_class then - ctx_sprint(f_radical(name,family,slot)) - elseif class == root_class then - ctx_sprint(f_root(name,family,slot)) - elseif texmathchardef then - texmathchardef(name,class,family,slot,"permanent") - else - -- beware, open/close and other specials should not end up here - ctx_sprint(f_char(name,class,family,slot)) + local function report(class,engine,family,unicode,name) + local nametype = type(name) + if nametype == "string" then + report_math("class %a, engine %a, family %a, char %C, name %a",class,engine,family,unicode,name) + elseif nametype == "number" then + report_math("class %a, engine %a, family %a, char %C, number %U",class,engine,family,unicode,name) + else + report_math("class %a, engine %a, family %a, char %C",class,engine,family,unicode) + end end -end -local function report(class,family,unicode,name) - local nametype = type(name) - if nametype == "string" then - report_math("class name %a, class %a, family %a, char %C, name %a",classname,class,family,unicode,name) - elseif nametype == "number" then - report_math("class name %a, class %a, family %a, char %C, number %U",classname,class,family,unicode,name) - else - report_math("class name %a, class %a, family %a, char %C", classname,class,family,unicode) + local f_accent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] + local f_topaccent = formatters[ [[\defUmathtopaccent \%s{%X}{%X}{%X}]] ] + local f_botaccent = formatters[ [[\defUmathbotaccent \%s{%X}{%X}{%X}]] ] + local f_over = formatters[ [[\defUdelimiterover \%s{%X}{%X}{%X}]] ] + local f_under = formatters[ [[\defUdelimiterunder\%s{%X}{%X}{%X}]] ] + local f_fence = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] + local f_delimiter = formatters[ [[\defUdelimiter \%s{%X}{%X}{%X}]] ] + local f_radical = formatters[ [[\defUradical \%s{%X}{%X}]] ] + local f_root = formatters[ [[\defUroot \%s{%X}{%X}]] ] + local f_char = formatters[ [[\defUmathchar \%s{%X}{%X}{%X}]] ] + + local texmathchardef = tex.mathchardef + + local setmathsymbol = function(name,class,engine,family,slot) -- hex is nicer for tracing + if class == accent_class then + ctx_sprint(f_topaccent(name,0,family,slot)) + elseif class == topaccent_class then + ctx_sprint(f_topaccent(name,0,family,slot)) + elseif class == botaccent_class then + ctx_sprint(f_botaccent(name,0,family,slot)) + elseif class == over_class then + ctx_sprint(f_over(name,0,family,slot)) + elseif class == under_class then + ctx_sprint(f_under(name,0,family,slot)) + elseif class == open_class or class == close_class or class == middle_class then + setdelcode("global",slot,{family,slot,0,0}) + ctx_sprint(f_fence(name,engine,family,slot)) + elseif class == delimiter_class then + setdelcode("global",slot,{family,slot,0,0}) + ctx_sprint(f_delimiter(name,0,family,slot)) + elseif class == radical_class then + ctx_sprint(f_radical(name,family,slot)) + elseif class == root_class then + ctx_sprint(f_root(name,family,slot)) + elseif texmathchardef then + texmathchardef(name,engine,family,slot,"permanent") + else + -- beware, open/close and other specials should not end up here + ctx_sprint(f_char(name,engine,family,slot)) + end end -end --- there will be a combined \(math)chardef (tracker) - -function mathematics.define(family) - family = family or 0 - family = families[family] or family - local data = characters.data - for unicode, character in sortedhash(data) do - local symbol = character.mathsymbol - local mset = true - local dset = true - if symbol then - local other = data[symbol] - local class = other.mathclass - if class then - class = classes[class] or class -- no real checks needed - if trace_defining then - report(class,family,unicode,symbol) - end - mset, dset = setmathcharacter(class,family,unicode,symbol,mset,dset) + function mathematics.define(family) + family = family or 0 + family = families[family] or family + local data = characters.data + -- + local function remap(first,last) + for unicode=utfbyte(first),utfbyte(last) do + setmathcode("global",unicode,ordinary_class,family,unicode) end - local spec = other.mathspec - if spec then - for i=1,#spec do - local m = spec[i] - local class = m.class - if class then - class = classes[class] or class -- no real checks needed - mset, dset = setmathcharacter(class,family,unicode,symbol,mset,dset) + end + remap("0","9") + remap("A","Z") + remap("a","z") + -- + for unicode, character in sortedhash(data) do + local symbol = character.mathsymbol + local mset = true + local dset = true + if symbol then + local other = data[symbol] + local class = other.mathclass + if class then + local engine = engineclasses[class] + if trace_defining then + report(class,engine,family,unicode,symbol) end + mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset) end - end - end - local mathclass = character.mathclass - local mathspec = character.mathspec - if mathspec then - if mathclass then - local name = character.mathname - if name then - report_math("fatal error, conflicting mathclass and mathspec for %C",unicode) - os.exit() - else - local class = classes[mathclass] or mathclass -- no real checks needed - if not class then - if trace_defining then - report("unknown",family,unicode) + local spec = other.mathspec + if spec then + for i=1,#spec do + local m = spec[i] + local class = m.class + if class then + local engine = engineclasses[class] + -- todo: trace + mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset) end - else - if trace_defining then - report(class,family,unicode) - end - mset, dset = setmathcharacter(class,family,unicode,unicode,mset,dset) end end end - for i=1,#mathspec do - local m = mathspec[i] - local name = m.name - local class = m.class + local class = character.mathclass + local spec = character.mathspec + local name = character.mathname + if spec then + local done = false if class then - class = classes[class] or class -- no real checks needed if name then + report_math("fatal error, conflicting mathclass and mathspec for %C",unicode) + os.exit() + else + class = classes[class] or ordinary_class + local engine = engineclasses[class] if trace_defining then - report(class,family,unicode,name) + report(class,engine,family,unicode) end - setmathsymbol(name,class,family,unicode) + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) + done = true + end + end + for i=1,#spec do + local m = spec[i] + local name = m.name + local class = m.class or class + if class then + class = classes[class] or ordinary_class else - name = (class == classes.variable or class == classes.number) and character.adobename -- bad - if name and trace_defining then - report(class,family,unicode,name) + class = ordinary_class + end + if class then + local engine = engineclasses[class] + if name then + if trace_defining then + report(class,engine,family,unicode,name) + end + setmathsymbol(name,class,engine,family,unicode) + else + name = (class == classes.ordinary or class == classes.digit) and character.adobename -- bad + if name and trace_defining then + report(class,engine,family,unicode,name) + end + end + if not done then + mset, dset = setmathcharacter(engine,family,unicode,m.unicode or unicode,mset,dset) -- see solidus + done = true end end - mset, dset = setmathcharacter(class,family,unicode,m.unicode or unicode,mset,dset) -- see solidus - end - end - elseif mathclass then - local name = character.mathname - local class = classes[mathclass] or mathclass -- no real checks needed - if not class then - if trace_defining then - report("unknown",family,unicode,name) end - elseif name == false then - if trace_defining then - report(class,family,unicode,name) - end - mset, dset = setmathcharacter(class,family,unicode,unicode,mset,dset) else - -- if not name then - -- name = character.contextname -- too dangerous, we loose textslash and a few more - -- end - if name then - if trace_defining then - report(class,family,unicode,name) - end - setmathsymbol(name,class,family,unicode) + if class then + class = classes[class] or ordinary_class else + class = ordinary_class + end + if name ~= nil then + local engine = engineclasses[class] + if name == false then + if trace_defining then + report(class,engine,family,unicode,name) + end + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) + else + -- if not name then + -- name = character.contextname -- too dangerous, we loose textslash and a few more + -- end + if name then + if trace_defining then + report(class,engine,family,unicode,name) + end + setmathsymbol(name,class,engine,family,unicode) + else + if trace_defining then + report(class,engine,family,unicode,character.adobename) + end + end + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) + end + elseif class ~= ordinary_class then + local engine = engineclasses[class] if trace_defining then - report(class,family,unicode,character.adobename) + report(class,engine,family,unicode,character.adobename) end + mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset) end - mset, dset = setmathcharacter(class,family,unicode,unicode,mset,dset) end end + if trace_defining then + logs.stopfilelogging() + end end + end -- needed for mathml analysis diff --git a/tex/context/base/mkiv/math-int.mkiv b/tex/context/base/mkiv/math-int.mkiv index 5876eb7bb..0920415f9 100644 --- a/tex/context/base/mkiv/math-int.mkiv +++ b/tex/context/base/mkiv/math-int.mkiv @@ -68,8 +68,8 @@ \to \everyswitchmathematics \setupmathematics -% [\v!integral=nolimits] - [\v!integral=autolimits] +% [\c!integral=nolimits] + [\c!integral=autolimits] %D The following code is used for fallbacks and might become obsolete once %D we have enough \OPENTYPE\ math fonts. diff --git a/tex/context/base/mkiv/math-tag.lua b/tex/context/base/mkiv/math-tag.lua index 3c53c2cc8..5bbe5cb3a 100644 --- a/tex/context/base/mkiv/math-tag.lua +++ b/tex/context/base/mkiv/math-tag.lua @@ -99,7 +99,6 @@ local chardata = characters.data local getmathcodes = tex.getmathcodes local mathcodes = mathematics.codes local ordinary_mathcode = mathcodes.ordinary -local variable_mathcode = mathcodes.variable local fromunicode16 = fonts.mappings.fromunicode16 local fontcharacters = fonts.hashes.characters @@ -226,7 +225,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer local char = getchar(start) local code = getmathcodes(char) local tag - if code == ordinary_mathcode or code == variable_mathcode then + if code == ordinary_mathcode then local ch = chardata[char] local mc = ch and ch.mathclass if mc == "number" then diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index e294e65d1..c0a9d70e0 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -7881,6 +7881,10 @@ return { ["fr"]="commandebas", ["nl"]="ondercommando", }, + ["bottomcolor"]={ + ["en"]="bottomcolor", + ["nl"]="onderkleur", + }, ["bottomdistance"]={ ["cs"]="vzdalenostspodku", ["de"]="abstandunten", @@ -9453,6 +9457,10 @@ return { ["en"]="instance", ["fr"]="instance", }, + ["integral"]={ + ["en"]="integral", + ["fr"]="integrale", + }, ["intent"]={ ["en"]="intent", ["fr"]="intention", @@ -12427,6 +12435,10 @@ return { ["fr"]="commandehaut", ["nl"]="bovencommando", }, + ["topcolor"]={ + ["en"]="topcolor", + ["nl"]="bovenkleur", + }, ["topdistance"]={ ["cs"]="vzdalenostvrsku", ["de"]="obenabstand", @@ -12806,6 +12818,15 @@ return { ["pe"]="گاموای", ["ro"]="ystep", }, + ["leftsource"]={ + ["en"]="leftsource", + }, + ["rightsource"]={ + ["en"]="rightsource", + }, + ["middlesource"]={ + ["en"]="middlesource", + }, ["source"]={ ["en"]="source", }, @@ -16305,10 +16326,6 @@ return { ["pe"]="درحاشیهراست", ["ro"]="inmargineadreapta", }, - ["integral"]={ - ["en"]="integral", - ["fr"]="integrale", - }, ["interaction"]={ ["cs"]="interakce", ["de"]="interaktion", diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 2be5115e0..e5feab5d6 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -22,6 +22,7 @@ return { "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", + "thickermuskip", -- "directionlefttoright", "directionrighttoleft", -- @@ -77,7 +78,8 @@ return { "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", - "shapingpenaltiesfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", + "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", + "mathpenaltyfrozenparcode", -- "activemathcharcode", -- @@ -103,10 +105,11 @@ return { "trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode", -- "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", - "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "accentitalickernmathcontrolcode", - "delimiteritalickernmathcontrolcode", "noorditalickernmathcontrolcode", "charitalicwidthmathcontrolcode", - "charitalicnoreboxmathcontrolcode", "boxednoitalickernmathcontrolcode", "nostaircasekernmathcontrolcode", - "textitalickernmathcontrolcode", "noscriptitalickernmathcontrolcode", "italicshapekernmathcontrolcode", + "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "checkligatureandkernmathcontrolcode", + "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", + "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", + "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "italicshapekernmathcontrolcode", + "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", @@ -157,9 +160,16 @@ return { -- "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", -- - "mathordcode", "mathopcode", "mathbincode", "mathrelcode", "mathopencode", "mathclosecode", - "mathpunctcode", "mathalphacode", "mathinnercode", "mathnothingcode", "mathlimopcode", - "mathnolopcode", "mathboxcode", "mathchoicecode", "mathaccentcode", "mathradicalcode", + "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", + "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", + "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", + "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", + "mathvariablecode", "mathactivecode", "mathvcentercode", + "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", + -- + "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathfunctioncode", "mathdigitcode", + -- "mathtopaccentcode", "mathbottomaccentcode", "mathdelimitercode", "mathrootcode", "mathprintcode", -- + "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", -- "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", -- @@ -193,7 +203,7 @@ return { -- "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", - "discardzerotabskipsnormalizecode", + "discardzerotabskipsnormalizecode", "flattenleadersnormalizecode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", @@ -260,7 +270,8 @@ return { -- "donetrue", "donefalse", "foundtrue", "foundfalse", -- - "inlineordisplaymath","indisplaymath","forcedisplaymath","startforceddisplaymath","stopforceddisplaymath","startpickupmath","stoppickupmath","reqno", + "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", + "startpickupmath", "stoppickupmath", "reqno", "forceinlinemath", -- "mathortext", -- @@ -307,6 +318,7 @@ return { "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "simplegroupedcommandcs", "pickupgroupedcommand", "pickupgroupedcommandcs", + "mathgroupedcommandcs", -- "usedbaselineskip", "usedlineskip", "usedlineskiplimit", -- @@ -467,43 +479,51 @@ return { -- "ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing", "ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing", - "ordfracspacing", "ordradspacing", + "ordfracspacing", "ordradspacing", "ordmiddlespacing", "ordaccentspacing", -- "opordspacing", "opopspacing", "opbinspacing", "oprelspacing", "opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing", - "opfracspacing", "opradspacing", + "opfracspacing", "opradspacing", "opmiddlespacing", "opaccentspacing", -- "binordspacing", "binopspacing", "binbinspacing", "binrelspacing", "binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing", - "binfracspacing", "binradspacing", + "binfracspacing", "binradspacing", "binmiddlespacing", "binaccentspacing", -- "relordspacing", "relopspacing", "relbinspacing", "relrelspacing", "relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing", - "relfracspacing", "relradspacing", + "relfracspacing", "relradspacing", "relmiddlespacing", "relaccentspacing", -- "openordspacing", "openopspacing", "openbinspacing", "openrelspacing", "openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing", - "openfracspacing", "openradspacing", + "openfracspacing", "openradspacing", "openmiddlespacing", "openaccentspacing", -- "closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing", "closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing", - "closefracspacing", "closeradspacing", + "closefracspacing", "closeradspacing", "closemiddlespacing", "closeaccentspacing", -- "punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing", "punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing", - "punctfracspacing", "punctradspacing", + "punctfracspacing", "punctradspacing", "punctmiddlespacing", "punctaccentspacing", -- "innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing", "inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing", - "innerfracspacing", "innerradspacing", + "innerfracspacing", "innerradspacing", "innermiddlespacing", "inneraccentspacing", -- "fracordspacing", "fracopspacing", "fracbinspacing", "fracrelspacing", "fracopenspacing", "fracclosespacing", "fracpunctspacing", "fracinnerspacing", - "fracfracspacing", "fracradspacing", + "fracfracspacing", "fracradspacing", "fracmiddlespacing", "fracaccentspacing", -- "radordspacing", "radopspacing", "radbinspacing", "radrelspacing", "radopenspacing", "radclosespacing", "radpunctspacing", "radinnerspacing", - "radfracspacing", "radradspacing", + "radfracspacing", "radradspacing", "radmiddlespacing", "radaccentspacing", + -- + "middleordspacing", "middleopspacing", "middlebinspacing", "middlerelspacing", + "middleopenspacing", "middleclosespacing", "middlepunctspacing", "middleinnerspacing", + "middlefracspacing", "middleradspacing", "middlemiddlespacing", "middleaccentspacing", + -- + "accentordspacing", "accentopspacing", "accentbinspacing", "accentrelspacing", + "accentopenspacing", "accentclosespacing", "accentpunctspacing", "accentinnerspacing", + "accentfracspacing", "accentradspacing", "accentmiddlespacing", "accentaccentspacing", -- "normalreqno", -- diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index 6959944d9..bbc41176b 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -64,8 +64,6 @@ return { "widowpenalties", }, ["luatex"]={ - "UUskewed", - "UUskewedwithdelims", "Uabove", "Uabovewithdelims", "Uatop", @@ -84,16 +82,6 @@ return { "Umathadapttoleft", "Umathadapttoright", "Umathaxis", - "Umathbinbinspacing", - "Umathbinclosespacing", - "Umathbinfracspacing", - "Umathbininnerspacing", - "Umathbinopenspacing", - "Umathbinopspacing", - "Umathbinordspacing", - "Umathbinpunctspacing", - "Umathbinradspacing", - "Umathbinrelspacing", "Umathbotaccentvariant", "Umathchar", "Umathcharclass", @@ -103,16 +91,6 @@ return { "Umathcharnumdef", "Umathcharslot", "Umathclass", - "Umathclosebinspacing", - "Umathcloseclosespacing", - "Umathclosefracspacing", - "Umathcloseinnerspacing", - "Umathcloseopenspacing", - "Umathcloseopspacing", - "Umathcloseordspacing", - "Umathclosepunctspacing", - "Umathcloseradspacing", - "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", @@ -128,16 +106,6 @@ return { "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", - "Umathfracbinspacing", - "Umathfracclosespacing", - "Umathfracfracspacing", - "Umathfracinnerspacing", - "Umathfracopenspacing", - "Umathfracopspacing", - "Umathfracordspacing", - "Umathfracpunctspacing", - "Umathfracradspacing", - "Umathfracrelspacing", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", @@ -146,16 +114,6 @@ return { "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", - "Umathinnerbinspacing", - "Umathinnerclosespacing", - "Umathinnerfracspacing", - "Umathinnerinnerspacing", - "Umathinneropenspacing", - "Umathinneropspacing", - "Umathinnerordspacing", - "Umathinnerpunctspacing", - "Umathinnerradspacing", - "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", @@ -168,39 +126,9 @@ return { "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", - "Umathopbinspacing", - "Umathopclosespacing", - "Umathopenbinspacing", - "Umathopenclosespacing", - "Umathopenfracspacing", - "Umathopeninnerspacing", - "Umathopenopenspacing", - "Umathopenopspacing", - "Umathopenordspacing", - "Umathopenpunctspacing", - "Umathopenradspacing", - "Umathopenrelspacing", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", - "Umathopfracspacing", - "Umathopinnerspacing", - "Umathopopenspacing", - "Umathopopspacing", - "Umathopordspacing", - "Umathoppunctspacing", - "Umathopradspacing", - "Umathoprelspacing", - "Umathordbinspacing", - "Umathordclosespacing", - "Umathordfracspacing", - "Umathordinnerspacing", - "Umathordopenspacing", - "Umathordopspacing", - "Umathordordspacing", - "Umathordpunctspacing", - "Umathordradspacing", - "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", @@ -210,20 +138,14 @@ return { "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", - "Umathpunctbinspacing", - "Umathpunctclosespacing", - "Umathpunctfracspacing", - "Umathpunctinnerspacing", - "Umathpunctopenspacing", - "Umathpunctopspacing", - "Umathpunctordspacing", - "Umathpunctpunctspacing", - "Umathpunctradspacing", - "Umathpunctrelspacing", + "Umathpresubshiftdistance", + "Umathpresupshiftdistance", + "Umathprimeraise", + "Umathprimeshiftdrop", + "Umathprimeshiftup", + "Umathprimesupspace", + "Umathprimevariant", "Umathquad", - "Umathradbinspacing", - "Umathradclosespacing", - "Umathradfracspacing", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", @@ -231,33 +153,19 @@ return { "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", - "Umathradinnerspacing", - "Umathradopenspacing", - "Umathradopspacing", - "Umathradordspacing", - "Umathradpunctspacing", - "Umathradradspacing", - "Umathradrelspacing", - "Umathrelbinspacing", - "Umathrelclosespacing", - "Umathrelfracspacing", - "Umathrelinnerspacing", - "Umathrelopenspacing", - "Umathrelopspacing", - "Umathrelordspacing", - "Umathrelpunctspacing", - "Umathrelradspacing", - "Umathrelrelspacing", + "Umathruledepth", + "Umathruleheight", + "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathspacebeforescript", - "Umathspacingmode", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", + "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", @@ -265,6 +173,7 @@ return { "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", + "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", @@ -276,6 +185,7 @@ return { "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", + "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", @@ -285,12 +195,18 @@ return { "Unosubscript", "Unosuperprescript", "Unosuperscript", + "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", + "Uprimescript", "Uradical", "Uright", "Uroot", + "Ushiftedsubprescript", + "Ushiftedsubscript", + "Ushiftedsuperprescript", + "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", @@ -314,10 +230,14 @@ return { "aliased", "alignmark", "aligntab", + "allcrampedstyles", + "alldisplaystyles", "allmathstyles", + "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", + "alluncrampedstyles", "atendofgroup", "atendofgrouped", "attribute", @@ -347,6 +267,9 @@ return { "boxyoffset", "catcodetable", "clearmarks", + "copymathatomrule", + "copymathparent", + "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", @@ -480,13 +403,19 @@ return { "lastarguments", "lastchkdim", "lastchknum", + "lastleftclass", + "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastparcontext", + "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", + "letmathatomrule", + "letmathparent", + "letmathspacing", "letprotected", "lettonothing", "linedirection", @@ -512,15 +441,23 @@ return { "luatexbanner", "luatexrevision", "luatexversion", + "mathaccent", + "mathatom", + "mathatomskip", + "mathbackwardpenalties", "mathcontrolmode", "mathdelimitersmode", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", - "mathflattenmode", + "mathfenced", + "mathfencesmode", "mathfontcontrol", + "mathforwardpenalties", "mathfrac", + "mathghost", "mathlimitsmode", + "mathmiddle", "mathnolimitsmode", "mathpenaltiesmode", "mathrad", @@ -531,9 +468,14 @@ return { "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", + "mathslackmode", + "mathspacingmode", + "mathstackstyle", "mathstyle", + "mathstylefontid", "mathsurroundmode", "mathsurroundskip", + "maththreshold", "mugluespecdef", "mutable", "noaligned", @@ -562,26 +504,45 @@ return { "permanent", "postexhyphenchar", "posthyphenchar", + "postinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", + "preinlinepenalty", "prerelpenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", + "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", + "scaledemwidth", + "scaledexheight", + "scaledextraspace", + "scaledinterwordshrink", + "scaledinterwordspace", + "scaledinterwordstretch", + "scaledslantperpoint", "scantextokens", "semiexpanded", "semiprotected", + "setdefaultmathcodes", "setfontid", + "setmathatomrule", + "setmathignore", + "setmathoptions", + "setmathpostpenalty", + "setmathprepenalty", + "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", + "skewed", + "skewedwithdelims", "snapshotpar", "supmarkmode", "swapcsvalues", @@ -607,6 +568,7 @@ return { "tracingmarks", "tracingmath", "tracingnodes", + "uleaders", "undent", "unexpandedloop", "unletfrozen", @@ -900,7 +862,6 @@ return { "lower", "lowercase", "mark", - "mathaccent", "mathbin", "mathchar", "mathchardef", @@ -1010,6 +971,7 @@ return { "splitfirstmark", "splitmaxdepth", "splittopskip", + "srule", "string", "tabskip", "textfont", @@ -1018,6 +980,7 @@ return { "thickmuskip", "thinmuskip", "time", + "tinymuskip", "toks", "toksdef", "tolerance", diff --git a/tex/context/base/mkiv/node-ser.lua b/tex/context/base/mkiv/node-ser.lua index 0f4d13bb6..ee2abe0d2 100644 --- a/tex/context/base/mkiv/node-ser.lua +++ b/tex/context/base/mkiv/node-ser.lua @@ -133,7 +133,7 @@ setinspector("node",function(v) if isnode(v) then printtable(astable(v),tostring local function totable(n,flat,verbose,noattributes) -- nicest: n,true,true,true local function to_table(n,flat,verbose,noattributes) -- no need to pass - local f = getfields(n) + local f = getfields(n.id) local tt = { } for k=1,#f do local v = f[k] diff --git a/tex/context/base/mkiv/page-str.lua b/tex/context/base/mkiv/page-str.lua index e136a38b4..64e593e27 100644 --- a/tex/context/base/mkiv/page-str.lua +++ b/tex/context/base/mkiv/page-str.lua @@ -27,8 +27,9 @@ local write_node = nuts.write local flushnode = nuts.flush local copy_node_list = nuts.copylist local vpack_node_list = nuts.vpack +local new_rule = nuts.pool.rule -local getbox = nuts.getbox +----- getbox = nuts.getbox local setlink = nuts.setlink local getlist = nuts.getlist local setlist = nuts.setlist @@ -40,7 +41,6 @@ local settings_to_array = utilities.parsers.settings_to_array local enableaction = nodes.tasks.enableaction local texgetdimen = tex.getdimen ------ texgetbox = tex.getbox local trace_collecting = false trackers.register("streams.collecting", function(v) trace_collecting = v end) local trace_flushing = false trackers.register("streams.flushing", function(v) trace_flushing = v end) @@ -226,9 +226,11 @@ function streams.synchronize(list) -- this is an experiment ! local delta = delta_height -- for tracing while delta > 0 do -- we need to add some interline penalties - local line = copy_node_list(getbox("strutbox")) - setwhd(line,false,strutht,strutdp) + -- local line = copy_node_list(getbox("strutbox")) + -- setwhd(line,false,strutht,strutdp) + local line = new_rule(0,strutht,strutdp) -- no tracing if tail then + -- todo: inject at a better place setlink(tail,line) end tail = line diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 2675edd1b..75450daa5 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 7dea83d86..63b45c4c1 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-pag.lua b/tex/context/base/mkiv/strc-pag.lua index 9c040104d..5cdba5b76 100644 --- a/tex/context/base/mkiv/strc-pag.lua +++ b/tex/context/base/mkiv/strc-pag.lua @@ -322,10 +322,6 @@ function pages.on_right(n) end end -function pages.has_changed() - return texconditionals.layouthaschanged -end - function pages.in_body(n) return texgetcount("pagebodymode") > 0 end diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv index 568912a33..dd3e7c822 100644 --- a/tex/context/base/mkiv/syst-ini.mkiv +++ b/tex/context/base/mkiv/syst-ini.mkiv @@ -589,7 +589,7 @@ \protected\def\defUmathbotaccent #1#2#3#4{\global\instance\protected\def#1{\Umathbotaccent "#2 "#3 "#4 }} \protected\def\defUdelimiterover #1#2#3#4{\global\instance\protected\def#1{\Udelimiterover "#2 "#3 }} \protected\def\defUdelimiterunder #1#2#3#4{\global\instance\protected\def#1{\Udelimiterunder "#2 "#3 }} -\protected\def\defUdelimiter #1#2#3#4{\global\instance\protected\def#1{\Udelimiter "#2 "#2 "#4 }} +\protected\def\defUdelimiter #1#2#3#4{\global\instance\protected\def#1{\Udelimiter "#2 "#3 "#4 }} \protected\def\defUradical #1#2#3{\global\instance\protected\def#1{\Uradical "#2 "#3 }} \protected\def\defUroot #1#2#3{\global\instance\protected\def#1{\Uroot "#2 "#3 }} \protected\def\defUmathchar #1#2#3#4{\global\instance\Umathchardef #1 "#2 "#3 "#4 } diff --git a/tex/context/base/mkiv/typo-mar.lua b/tex/context/base/mkiv/typo-mar.lua index f8c135fa7..56324c790 100644 --- a/tex/context/base/mkiv/typo-mar.lua +++ b/tex/context/base/mkiv/typo-mar.lua @@ -270,8 +270,8 @@ function margins.save(t) if t.number then local leftmargindistance = texgetdimen("naturalleftmargindistance") local rightmargindistance = texgetdimen("naturalrightmargindistance") - local strutbox = getbox("strutbox") - local _, strutht, strutdp = getwhd(strutbox) + local strutht = texgetdimen("strutht") + local strutdp = texgetdimen("strutdp") -- better make a new table and make t entry in t t.box = content t.n = nofsaved diff --git a/tex/context/base/mkiv/util-sac.lua b/tex/context/base/mkiv/util-sac.lua index 796a620ba..36daef816 100644 --- a/tex/context/base/mkiv/util-sac.lua +++ b/tex/context/base/mkiv/util-sac.lua @@ -544,3 +544,39 @@ do end end + +if bit32 and not streams.tocardinal1 then + + local extract = bit32.extract + local char = string.char + + streams.tocardinal1 = char + function streams.tocardinal2(n) return char(extract( 8,8),extract( 0,8)) end + function streams.tocardinal3(n) return char(extract(16,8),extract( 8,8),extract(0,8)) end + function streams.tocardinal4(n) return char(extract(24,8),extract(16,8),extract(8,8),extract(0,8)) end + + streams.tocardinal1le = char + function streams.tocardinal2le(n) return char(extract(0,8),extract(8,8)) end + function streams.tocardinal3le(n) return char(extract(0,8),extract(8,8),extract(16,8)) end + function streams.tocardinal4le(n) return char(extract(0,8),extract(8,8),extract(16,8),extract(24,8)) end + +end + +if not streams.readcstring then + + local readchar = streams.readchar + local concat = table.concat + + function streams.readcstring(f) + local t = { } + while true do + local c = readchar(f) + if c and c ~= "\0" then + t[#t+1] = c + else + return concat(t) + end + end + end + +end diff --git a/tex/context/base/mkiv/util-sql-tickets.lua b/tex/context/base/mkiv/util-sql-tickets.lua index 3258fb186..d852212bc 100644 --- a/tex/context/base/mkiv/util-sql-tickets.lua +++ b/tex/context/base/mkiv/util-sql-tickets.lua @@ -18,7 +18,7 @@ local ostime, uuid, osfulltime = os.time, os.uuid, os.fulltime local random = math.random local concat = table.concat -if not utilities.sql then require("util-sql") end +-- if not utilities.sql then require("util-sql") end local sql = utilities.sql local tickets = { } diff --git a/tex/context/base/mkiv/util-sql.lua b/tex/context/base/mkiv/util-sql.lua index ce4a37f07..579bd7c09 100644 --- a/tex/context/base/mkiv/util-sql.lua +++ b/tex/context/base/mkiv/util-sql.lua @@ -121,7 +121,7 @@ if optional then local m = methods[k] if m then report_state("start loading method %a as %a",k,m) - require("libs-imp-" .. m) + require("libs-imp-" .. m .. "lmt") -- brrr report_state("loading method %a done",k) return rawget(t,m) else diff --git a/tex/context/base/mkiv/util-zip.lua b/tex/context/base/mkiv/util-zip.lua index 4aa87d5e8..4ceec7afd 100644 --- a/tex/context/base/mkiv/util-zip.lua +++ b/tex/context/base/mkiv/util-zip.lua @@ -48,6 +48,11 @@ local zlibdecompress = zlib.decompress local zlibdecompresssize = zlib.decompresssize local zlibchecksum = zlib.crc32 +if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then + local cs = zlibchecksum + zlibchecksum = function(str,n) return cs(n or 0, str) end +end + local decompress = function(source) return zlibdecompress (source,-15) end -- auto local decompresssize = function(source,targetsize) return zlibdecompresssize(source,targetsize,-15) end -- auto local calculatecrc = function(buffer,initial) return zlibchecksum (initial or 0,buffer) end @@ -565,7 +570,12 @@ else local compress = zlib.compress local decompress = zlib.decompress - local crc32 = zlib.crc32 + local zlibchecksum = zlib.crc32 + + if not CONTEXTLMTXMODE or CONTEXTLMTXMODE == 0 then + local cs = zlibchecksum + zlibchecksum = function(str,n) return cs(n or 0, str) end + end local streams = utilities.streams local openstream = streams.openstring @@ -606,16 +616,16 @@ else putcompressed = function(str,level,originalname) return concat { - identifier, -- 2 identifier - tocardinal1(0x08), -- 1 method - tocardinal1(0x08), -- 1 flags - tocardinal4(os.time()), -- 4 mtime - tocardinal1(0x02), -- 1 compression (2 or 4) - tocardinal1(0xFF), -- 1 operating + identifier, -- 2 identifier + tocardinal1(0x08), -- 1 method + tocardinal1(0x08), -- 1 flags + tocardinal4(os.time()), -- 4 mtime + tocardinal1(0x02), -- 1 compression (2 or 4) + tocardinal1(0xFF), -- 1 operating (originalname or "unknownname") .. "\0", compress(str,level,nil,gzipwindow), - tocardinal4(crc32(str)), -- 4 - tocardinal4(#str), -- 4 + tocardinal4(zlibchecksum(str)), -- 4 + tocardinal4(#str), -- 4 } end @@ -671,6 +681,4 @@ function gzip.decompress(s) end end -zipfiles.gunzipfile = gzip.load - return zipfiles |