diff options
Diffstat (limited to 'tex')
44 files changed, 682 insertions, 248 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index f962c4cc0..43eb2b440 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.02.12 08:53} +\newcontextversion{2018.02.14 16:18} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii index bebdad69c..befa5ec56 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2018.02.12 08:53} +\edef\contextversion{2018.02.14 16:18} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii index fdce40a3a..fcf11e680 100644 --- a/tex/context/base/mkii/mult-cs.mkii +++ b/tex/context/base/mkii/mult-cs.mkii @@ -185,6 +185,7 @@ \setinterfacevariable{extremestretch}{extremestretch} \setinterfacevariable{fact}{fakt} \setinterfacevariable{february}{unor} +\setinterfacevariable{field}{field} \setinterfacevariable{figure}{obrazek} \setinterfacevariable{figures}{obrazky} \setinterfacevariable{file}{soubor} @@ -376,6 +377,7 @@ \setinterfacevariable{norepeat}{norepeat} \setinterfacevariable{normal}{normalni} \setinterfacevariable{nospacing}{nospacing} +\setinterfacevariable{nostopper}{nostopper} \setinterfacevariable{not}{ne} \setinterfacevariable{notation}{notation} \setinterfacevariable{note}{note} @@ -848,6 +850,7 @@ \setinterfaceconstant{headerstate}{statuszahlavi} \setinterfaceconstant{headlabel}{popisekhlavicky} \setinterfaceconstant{headnumber}{cislonadpisu} +\setinterfaceconstant{headseparator}{headseparator} \setinterfaceconstant{headstyle}{stylhlavicky} \setinterfaceconstant{height}{vyska} \setinterfaceconstant{hfactor}{vfaktor} @@ -1004,6 +1007,7 @@ \setinterfaceconstant{numberset}{numberset} \setinterfaceconstant{numberstarter}{numberstarter} \setinterfaceconstant{numberstopper}{numberstopper} +\setinterfaceconstant{numberstrut}{numberstrut} \setinterfaceconstant{numberstyle}{stylcisla} \setinterfaceconstant{numberwidth}{numberwidth} \setinterfaceconstant{nx}{nx} @@ -1160,6 +1164,7 @@ \setinterfaceconstant{sidespacebefore}{bocnimezerapred} \setinterfaceconstant{sidethreshold}{sidethreshold} \setinterfaceconstant{sign}{znak} +\setinterfaceconstant{simplecommand}{simplecommand} \setinterfaceconstant{size}{velikost} \setinterfaceconstant{slantedfeatures}{slantedfeatures} \setinterfaceconstant{slantedfont}{slantedfont} @@ -1172,7 +1177,9 @@ \setinterfaceconstant{source}{zdroj} \setinterfaceconstant{space}{mezera} \setinterfaceconstant{spaceafter}{mezeraza} +\setinterfaceconstant{spaceafterside}{spaceafterside} \setinterfaceconstant{spacebefore}{mezerapred} +\setinterfaceconstant{spacebeforeside}{spacebeforeside} \setinterfaceconstant{spaceinbetween}{spaceinbetween} \setinterfaceconstant{spacing}{mezerovani} \setinterfaceconstant{specification}{specification} @@ -1237,6 +1244,7 @@ \setinterfaceconstant{titledistance}{vzdalenosttitulek} \setinterfaceconstant{titleleft}{titleleft} \setinterfaceconstant{titleright}{titleright} +\setinterfaceconstant{titlestrut}{titlestrut} \setinterfaceconstant{titlestyle}{styltitulek} \setinterfaceconstant{to}{na} \setinterfaceconstant{toffset}{toffset} diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua index 7e8011cb7..a305ee202 100644 --- a/tex/context/base/mkiv/char-def.lua +++ b/tex/context/base/mkiv/char-def.lua @@ -15328,7 +15328,7 @@ characters.data={ direction="an", linebreak="al", unicodeslot=0x600, - visible="yes", + visible=true, }, [0x601]={ arabic="u", @@ -15338,7 +15338,7 @@ characters.data={ direction="an", linebreak="al", unicodeslot=0x601, - visible="yes", + visible=true, }, [0x602]={ arabic="u", @@ -15348,7 +15348,7 @@ characters.data={ direction="an", linebreak="al", unicodeslot=0x602, - visible="yes", + visible=true, }, [0x603]={ arabic="u", @@ -15358,7 +15358,7 @@ characters.data={ direction="an", linebreak="al", unicodeslot=0x603, - visible="yes", + visible=true, }, [0x604]={ arabic="u", @@ -17252,7 +17252,7 @@ characters.data={ direction="an", linebreak="al", unicodeslot=0x6DD, - visible="yes", + visible=true, }, [0x6DE]={ category="me", @@ -17641,7 +17641,7 @@ characters.data={ linebreak="al", synonyms={ "syriac sam" }, unicodeslot=0x70F, - visible="yes", + visible=true, }, [0x710]={ arabic="r", @@ -59197,6 +59197,7 @@ characters.data={ }, [0x2000]={ category="zs", + contextname="enquad", description="EN QUAD", direction="ws", linebreak="ba", @@ -59205,6 +59206,7 @@ characters.data={ }, [0x2001]={ category="zs", + contextname="emquad", description="EM QUAD", direction="ws", linebreak="ba", @@ -61279,6 +61281,7 @@ characters.data={ specials={ "font", 0x67 }, synonyms={ "real number symbol" }, unicodeslot=0x210A, + visual="it", }, [0x210B]={ category="lu", @@ -61287,6 +61290,7 @@ characters.data={ linebreak="al", specials={ "font", 0x48 }, unicodeslot=0x210B, + visual="it", }, [0x210C]={ category="lu", @@ -61340,6 +61344,7 @@ characters.data={ linebreak="al", specials={ "font", 0x49 }, unicodeslot=0x2110, + visual="it", }, [0x2111]={ adobename="Ifraktur", @@ -61361,11 +61366,13 @@ characters.data={ specials={ "font", 0x4C }, synonyms={ "laplace transform" }, unicodeslot=0x2112, + visual="it", }, [0x2113]={ adobename="lsquare", category="ll", cjkwd="a", + comment="not: MATHEMATICAL SCRIPT SMALL L", description="SCRIPT SMALL L", direction="l", linebreak="ai", @@ -61454,6 +61461,7 @@ characters.data={ specials={ "font", 0x52 }, synonyms={ "riemann integral" }, unicodeslot=0x211B, + visual="it", }, [0x211C]={ adobename="Rfraktur", @@ -61625,6 +61633,7 @@ characters.data={ specials={ "font", 0x42 }, synonyms={ "bernoulli function" }, unicodeslot=0x212C, + visual="it", }, [0x212D]={ category="lu", @@ -61650,6 +61659,7 @@ characters.data={ specials={ "font", 0x65 }, synonyms={ "error", "natural exponent" }, unicodeslot=0x212F, + visual="it", }, [0x2130]={ category="lu", @@ -61659,6 +61669,7 @@ characters.data={ specials={ "font", 0x45 }, synonyms={ "electromotive force", "emf" }, unicodeslot=0x2130, + visual="it", }, [0x2131]={ category="lu", @@ -61668,6 +61679,7 @@ characters.data={ specials={ "font", 0x46 }, synonyms={ "fourier transform" }, unicodeslot=0x2131, + visual="it", }, [0x2132]={ category="lu", @@ -61688,6 +61700,7 @@ characters.data={ specials={ "font", 0x4D }, synonyms={ "german mark pre-wwii", "m-matrix" }, unicodeslot=0x2133, + visual="it", }, [0x2134]={ category="ll", @@ -61697,6 +61710,7 @@ characters.data={ specials={ "font", 0x6F }, synonyms={ "order" }, unicodeslot=0x2134, + visual="it", }, [0x2135]={ adobename="aleph", @@ -210424,6 +210438,7 @@ characters.data={ linebreak="al", specials={ "font", 0x41 }, unicodeslot=0x1D49C, + visual="it", }, [0x1D49E]={ category="lu", @@ -210432,6 +210447,7 @@ characters.data={ linebreak="al", specials={ "font", 0x43 }, unicodeslot=0x1D49E, + visual="it", }, [0x1D49F]={ category="lu", @@ -210440,6 +210456,7 @@ characters.data={ linebreak="al", specials={ "font", 0x44 }, unicodeslot=0x1D49F, + visual="it", }, [0x1D4A2]={ category="lu", @@ -210448,6 +210465,7 @@ characters.data={ linebreak="al", specials={ "font", 0x47 }, unicodeslot=0x1D4A2, + visual="it", }, [0x1D4A5]={ category="lu", @@ -210456,6 +210474,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4A }, unicodeslot=0x1D4A5, + visual="it", }, [0x1D4A6]={ category="lu", @@ -210464,6 +210483,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4B }, unicodeslot=0x1D4A6, + visual="it", }, [0x1D4A9]={ category="lu", @@ -210472,6 +210492,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4E }, unicodeslot=0x1D4A9, + visual="it", }, [0x1D4AA]={ category="lu", @@ -210480,6 +210501,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4F }, unicodeslot=0x1D4AA, + visual="it", }, [0x1D4AB]={ category="lu", @@ -210489,6 +210511,7 @@ characters.data={ specials={ "font", 0x50 }, synonyms={ "power set" }, unicodeslot=0x1D4AB, + visual="it", }, [0x1D4AC]={ category="lu", @@ -210497,6 +210520,7 @@ characters.data={ linebreak="al", specials={ "font", 0x51 }, unicodeslot=0x1D4AC, + visual="it", }, [0x1D4AE]={ category="lu", @@ -210505,6 +210529,7 @@ characters.data={ linebreak="al", specials={ "font", 0x53 }, unicodeslot=0x1D4AE, + visual="it", }, [0x1D4AF]={ category="lu", @@ -210513,6 +210538,7 @@ characters.data={ linebreak="al", specials={ "font", 0x54 }, unicodeslot=0x1D4AF, + visual="it", }, [0x1D4B0]={ category="lu", @@ -210521,6 +210547,7 @@ characters.data={ linebreak="al", specials={ "font", 0x55 }, unicodeslot=0x1D4B0, + visual="it", }, [0x1D4B1]={ category="lu", @@ -210529,6 +210556,7 @@ characters.data={ linebreak="al", specials={ "font", 0x56 }, unicodeslot=0x1D4B1, + visual="it", }, [0x1D4B2]={ category="lu", @@ -210537,6 +210565,7 @@ characters.data={ linebreak="al", specials={ "font", 0x57 }, unicodeslot=0x1D4B2, + visual="it", }, [0x1D4B3]={ category="lu", @@ -210545,6 +210574,7 @@ characters.data={ linebreak="al", specials={ "font", 0x58 }, unicodeslot=0x1D4B3, + visual="it", }, [0x1D4B4]={ category="lu", @@ -210553,6 +210583,7 @@ characters.data={ linebreak="al", specials={ "font", 0x59 }, unicodeslot=0x1D4B4, + visual="it", }, [0x1D4B5]={ category="lu", @@ -210561,6 +210592,7 @@ characters.data={ linebreak="al", specials={ "font", 0x5A }, unicodeslot=0x1D4B5, + visual="it", }, [0x1D4B6]={ category="ll", @@ -210569,6 +210601,7 @@ characters.data={ linebreak="al", specials={ "font", 0x61 }, unicodeslot=0x1D4B6, + visual="it", }, [0x1D4B7]={ category="ll", @@ -210577,6 +210610,7 @@ characters.data={ linebreak="al", specials={ "font", 0x62 }, unicodeslot=0x1D4B7, + visual="it", }, [0x1D4B8]={ category="ll", @@ -210585,6 +210619,7 @@ characters.data={ linebreak="al", specials={ "font", 0x63 }, unicodeslot=0x1D4B8, + visual="it", }, [0x1D4B9]={ category="ll", @@ -210593,6 +210628,7 @@ characters.data={ linebreak="al", specials={ "font", 0x64 }, unicodeslot=0x1D4B9, + visual="it", }, [0x1D4BB]={ category="ll", @@ -210601,6 +210637,7 @@ characters.data={ linebreak="al", specials={ "font", 0x66 }, unicodeslot=0x1D4BB, + visual="it", }, [0x1D4BD]={ category="ll", @@ -210609,6 +210646,7 @@ characters.data={ linebreak="al", specials={ "font", 0x68 }, unicodeslot=0x1D4BD, + visual="it", }, [0x1D4BE]={ category="ll", @@ -210617,6 +210655,7 @@ characters.data={ linebreak="al", specials={ "font", 0x69 }, unicodeslot=0x1D4BE, + visual="it", }, [0x1D4BF]={ category="ll", @@ -210625,6 +210664,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6A }, unicodeslot=0x1D4BF, + visual="it", }, [0x1D4C0]={ category="ll", @@ -210633,6 +210673,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6B }, unicodeslot=0x1D4C0, + visual="it", }, [0x1D4C1]={ category="ll", @@ -210641,6 +210682,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6C }, unicodeslot=0x1D4C1, + visual="it", }, [0x1D4C2]={ category="ll", @@ -210649,6 +210691,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6D }, unicodeslot=0x1D4C2, + visual="it", }, [0x1D4C3]={ category="ll", @@ -210657,6 +210700,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6E }, unicodeslot=0x1D4C3, + visual="it", }, [0x1D4C5]={ category="ll", @@ -210665,6 +210709,7 @@ characters.data={ linebreak="al", specials={ "font", 0x70 }, unicodeslot=0x1D4C5, + visual="it", }, [0x1D4C6]={ category="ll", @@ -210673,6 +210718,7 @@ characters.data={ linebreak="al", specials={ "font", 0x71 }, unicodeslot=0x1D4C6, + visual="it", }, [0x1D4C7]={ category="ll", @@ -210681,6 +210727,7 @@ characters.data={ linebreak="al", specials={ "font", 0x72 }, unicodeslot=0x1D4C7, + visual="it", }, [0x1D4C8]={ category="ll", @@ -210689,6 +210736,7 @@ characters.data={ linebreak="al", specials={ "font", 0x73 }, unicodeslot=0x1D4C8, + visual="it", }, [0x1D4C9]={ category="ll", @@ -210697,6 +210745,7 @@ characters.data={ linebreak="al", specials={ "font", 0x74 }, unicodeslot=0x1D4C9, + visual="it", }, [0x1D4CA]={ category="ll", @@ -210705,6 +210754,7 @@ characters.data={ linebreak="al", specials={ "font", 0x75 }, unicodeslot=0x1D4CA, + visual="it", }, [0x1D4CB]={ category="ll", @@ -210713,6 +210763,7 @@ characters.data={ linebreak="al", specials={ "font", 0x76 }, unicodeslot=0x1D4CB, + visual="it", }, [0x1D4CC]={ category="ll", @@ -210721,6 +210772,7 @@ characters.data={ linebreak="al", specials={ "font", 0x77 }, unicodeslot=0x1D4CC, + visual="it", }, [0x1D4CD]={ category="ll", @@ -210729,6 +210781,7 @@ characters.data={ linebreak="al", specials={ "font", 0x78 }, unicodeslot=0x1D4CD, + visual="it", }, [0x1D4CE]={ category="ll", @@ -210737,6 +210790,7 @@ characters.data={ linebreak="al", specials={ "font", 0x79 }, unicodeslot=0x1D4CE, + visual="it", }, [0x1D4CF]={ category="ll", @@ -210745,6 +210799,7 @@ characters.data={ linebreak="al", specials={ "font", 0x7A }, unicodeslot=0x1D4CF, + visual="it", }, [0x1D4D0]={ category="lu", @@ -210753,7 +210808,7 @@ characters.data={ linebreak="al", specials={ "font", 0x41 }, unicodeslot=0x1D4D0, - visual="bf", + visual="bi", }, [0x1D4D1]={ category="lu", @@ -210762,7 +210817,7 @@ characters.data={ linebreak="al", specials={ "font", 0x42 }, unicodeslot=0x1D4D1, - visual="bf", + visual="bi", }, [0x1D4D2]={ category="lu", @@ -210771,7 +210826,7 @@ characters.data={ linebreak="al", specials={ "font", 0x43 }, unicodeslot=0x1D4D2, - visual="bf", + visual="bi", }, [0x1D4D3]={ category="lu", @@ -210780,7 +210835,7 @@ characters.data={ linebreak="al", specials={ "font", 0x44 }, unicodeslot=0x1D4D3, - visual="bf", + visual="bi", }, [0x1D4D4]={ category="lu", @@ -210789,7 +210844,7 @@ characters.data={ linebreak="al", specials={ "font", 0x45 }, unicodeslot=0x1D4D4, - visual="bf", + visual="bi", }, [0x1D4D5]={ category="lu", @@ -210798,7 +210853,7 @@ characters.data={ linebreak="al", specials={ "font", 0x46 }, unicodeslot=0x1D4D5, - visual="bf", + visual="bi", }, [0x1D4D6]={ category="lu", @@ -210807,7 +210862,7 @@ characters.data={ linebreak="al", specials={ "font", 0x47 }, unicodeslot=0x1D4D6, - visual="bf", + visual="bi", }, [0x1D4D7]={ category="lu", @@ -210816,7 +210871,7 @@ characters.data={ linebreak="al", specials={ "font", 0x48 }, unicodeslot=0x1D4D7, - visual="bf", + visual="bi", }, [0x1D4D8]={ category="lu", @@ -210825,7 +210880,7 @@ characters.data={ linebreak="al", specials={ "font", 0x49 }, unicodeslot=0x1D4D8, - visual="bf", + visual="bi", }, [0x1D4D9]={ category="lu", @@ -210834,7 +210889,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4A }, unicodeslot=0x1D4D9, - visual="bf", + visual="bi", }, [0x1D4DA]={ category="lu", @@ -210843,7 +210898,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4B }, unicodeslot=0x1D4DA, - visual="bf", + visual="bi", }, [0x1D4DB]={ category="lu", @@ -210852,7 +210907,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4C }, unicodeslot=0x1D4DB, - visual="bf", + visual="bi", }, [0x1D4DC]={ category="lu", @@ -210861,7 +210916,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4D }, unicodeslot=0x1D4DC, - visual="bf", + visual="bi", }, [0x1D4DD]={ category="lu", @@ -210870,7 +210925,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4E }, unicodeslot=0x1D4DD, - visual="bf", + visual="bi", }, [0x1D4DE]={ category="lu", @@ -210879,7 +210934,7 @@ characters.data={ linebreak="al", specials={ "font", 0x4F }, unicodeslot=0x1D4DE, - visual="bf", + visual="bi", }, [0x1D4DF]={ category="lu", @@ -210888,7 +210943,7 @@ characters.data={ linebreak="al", specials={ "font", 0x50 }, unicodeslot=0x1D4DF, - visual="bf", + visual="bi", }, [0x1D4E0]={ category="lu", @@ -210897,7 +210952,7 @@ characters.data={ linebreak="al", specials={ "font", 0x51 }, unicodeslot=0x1D4E0, - visual="bf", + visual="bi", }, [0x1D4E1]={ category="lu", @@ -210906,7 +210961,7 @@ characters.data={ linebreak="al", specials={ "font", 0x52 }, unicodeslot=0x1D4E1, - visual="bf", + visual="bi", }, [0x1D4E2]={ category="lu", @@ -210915,7 +210970,7 @@ characters.data={ linebreak="al", specials={ "font", 0x53 }, unicodeslot=0x1D4E2, - visual="bf", + visual="bi", }, [0x1D4E3]={ category="lu", @@ -210924,7 +210979,7 @@ characters.data={ linebreak="al", specials={ "font", 0x54 }, unicodeslot=0x1D4E3, - visual="bf", + visual="bi", }, [0x1D4E4]={ category="lu", @@ -210933,7 +210988,7 @@ characters.data={ linebreak="al", specials={ "font", 0x55 }, unicodeslot=0x1D4E4, - visual="bf", + visual="bi", }, [0x1D4E5]={ category="lu", @@ -210942,7 +210997,7 @@ characters.data={ linebreak="al", specials={ "font", 0x56 }, unicodeslot=0x1D4E5, - visual="bf", + visual="bi", }, [0x1D4E6]={ category="lu", @@ -210951,7 +211006,7 @@ characters.data={ linebreak="al", specials={ "font", 0x57 }, unicodeslot=0x1D4E6, - visual="bf", + visual="bi", }, [0x1D4E7]={ category="lu", @@ -210960,7 +211015,7 @@ characters.data={ linebreak="al", specials={ "font", 0x58 }, unicodeslot=0x1D4E7, - visual="bf", + visual="bi", }, [0x1D4E8]={ category="lu", @@ -210969,7 +211024,7 @@ characters.data={ linebreak="al", specials={ "font", 0x59 }, unicodeslot=0x1D4E8, - visual="bf", + visual="bi", }, [0x1D4E9]={ category="lu", @@ -210978,7 +211033,7 @@ characters.data={ linebreak="al", specials={ "font", 0x5A }, unicodeslot=0x1D4E9, - visual="bf", + visual="bi", }, [0x1D4EA]={ category="ll", @@ -210987,7 +211042,7 @@ characters.data={ linebreak="al", specials={ "font", 0x61 }, unicodeslot=0x1D4EA, - visual="bf", + visual="bi", }, [0x1D4EB]={ category="ll", @@ -210996,7 +211051,7 @@ characters.data={ linebreak="al", specials={ "font", 0x62 }, unicodeslot=0x1D4EB, - visual="bf", + visual="bi", }, [0x1D4EC]={ category="ll", @@ -211005,7 +211060,7 @@ characters.data={ linebreak="al", specials={ "font", 0x63 }, unicodeslot=0x1D4EC, - visual="bf", + visual="bi", }, [0x1D4ED]={ category="ll", @@ -211014,7 +211069,7 @@ characters.data={ linebreak="al", specials={ "font", 0x64 }, unicodeslot=0x1D4ED, - visual="bf", + visual="bi", }, [0x1D4EE]={ category="ll", @@ -211023,7 +211078,7 @@ characters.data={ linebreak="al", specials={ "font", 0x65 }, unicodeslot=0x1D4EE, - visual="bf", + visual="bi", }, [0x1D4EF]={ category="ll", @@ -211032,7 +211087,7 @@ characters.data={ linebreak="al", specials={ "font", 0x66 }, unicodeslot=0x1D4EF, - visual="bf", + visual="bi", }, [0x1D4F0]={ category="ll", @@ -211041,7 +211096,7 @@ characters.data={ linebreak="al", specials={ "font", 0x67 }, unicodeslot=0x1D4F0, - visual="bf", + visual="bi", }, [0x1D4F1]={ category="ll", @@ -211050,7 +211105,7 @@ characters.data={ linebreak="al", specials={ "font", 0x68 }, unicodeslot=0x1D4F1, - visual="bf", + visual="bi", }, [0x1D4F2]={ category="ll", @@ -211059,7 +211114,7 @@ characters.data={ linebreak="al", specials={ "font", 0x69 }, unicodeslot=0x1D4F2, - visual="bf", + visual="bi", }, [0x1D4F3]={ category="ll", @@ -211068,7 +211123,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6A }, unicodeslot=0x1D4F3, - visual="bf", + visual="bi", }, [0x1D4F4]={ category="ll", @@ -211077,7 +211132,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6B }, unicodeslot=0x1D4F4, - visual="bf", + visual="bi", }, [0x1D4F5]={ category="ll", @@ -211086,7 +211141,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6C }, unicodeslot=0x1D4F5, - visual="bf", + visual="bi", }, [0x1D4F6]={ category="ll", @@ -211095,7 +211150,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6D }, unicodeslot=0x1D4F6, - visual="bf", + visual="bi", }, [0x1D4F7]={ category="ll", @@ -211104,7 +211159,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6E }, unicodeslot=0x1D4F7, - visual="bf", + visual="bi", }, [0x1D4F8]={ category="ll", @@ -211113,7 +211168,7 @@ characters.data={ linebreak="al", specials={ "font", 0x6F }, unicodeslot=0x1D4F8, - visual="bf", + visual="bi", }, [0x1D4F9]={ category="ll", @@ -211122,7 +211177,7 @@ characters.data={ linebreak="al", specials={ "font", 0x70 }, unicodeslot=0x1D4F9, - visual="bf", + visual="bi", }, [0x1D4FA]={ category="ll", @@ -211131,7 +211186,7 @@ characters.data={ linebreak="al", specials={ "font", 0x71 }, unicodeslot=0x1D4FA, - visual="bf", + visual="bi", }, [0x1D4FB]={ category="ll", @@ -211140,7 +211195,7 @@ characters.data={ linebreak="al", specials={ "font", 0x72 }, unicodeslot=0x1D4FB, - visual="bf", + visual="bi", }, [0x1D4FC]={ category="ll", @@ -211149,7 +211204,7 @@ characters.data={ linebreak="al", specials={ "font", 0x73 }, unicodeslot=0x1D4FC, - visual="bf", + visual="bi", }, [0x1D4FD]={ category="ll", @@ -211158,7 +211213,7 @@ characters.data={ linebreak="al", specials={ "font", 0x74 }, unicodeslot=0x1D4FD, - visual="bf", + visual="bi", }, [0x1D4FE]={ category="ll", @@ -211167,7 +211222,7 @@ characters.data={ linebreak="al", specials={ "font", 0x75 }, unicodeslot=0x1D4FE, - visual="bf", + visual="bi", }, [0x1D4FF]={ category="ll", @@ -211176,7 +211231,7 @@ characters.data={ linebreak="al", specials={ "font", 0x76 }, unicodeslot=0x1D4FF, - visual="bf", + visual="bi", }, [0x1D500]={ category="ll", @@ -211185,7 +211240,7 @@ characters.data={ linebreak="al", specials={ "font", 0x77 }, unicodeslot=0x1D500, - visual="bf", + visual="bi", }, [0x1D501]={ category="ll", @@ -211194,7 +211249,7 @@ characters.data={ linebreak="al", specials={ "font", 0x78 }, unicodeslot=0x1D501, - visual="bf", + visual="bi", }, [0x1D502]={ category="ll", @@ -211203,7 +211258,7 @@ characters.data={ linebreak="al", specials={ "font", 0x79 }, unicodeslot=0x1D502, - visual="bf", + visual="bi", }, [0x1D503]={ category="ll", @@ -211212,7 +211267,7 @@ characters.data={ linebreak="al", specials={ "font", 0x7A }, unicodeslot=0x1D503, - visual="bf", + visual="bi", }, [0x1D504]={ category="lu", diff --git a/tex/context/base/mkiv/char-tex.lua b/tex/context/base/mkiv/char-tex.lua index 658a01b0b..9fab2c8a4 100644 --- a/tex/context/base/mkiv/char-tex.lua +++ b/tex/context/base/mkiv/char-tex.lua @@ -429,6 +429,9 @@ local texsetcatcode = tex.setcatcode local contextsprint = context.sprint local ctxcatcodes = catcodes.numbers.ctxcatcodes +local texsetmacro = tokens.setters.macro +local texsetchar = tokens.setters.char + function texcharacters.defineaccents() local ctx_dodefineaccentcommand = context.dodefineaccentcommand local ctx_dodefineaccent = context.dodefineaccent @@ -484,12 +487,38 @@ tex.uprint = commands.utfchar -- in contect we don't use lc and uc codes (in fact in luatex we should have a hf code) -- so at some point we might drop this -local forbidden = tohash { -- at least now - 0x00A0, - 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x200B, 0x200C, 0x200D, - 0x202F, - 0x205F, - -- 0xFEFF, +-- The following get set at the TeX end: + +local forbidden = tohash { + 0x000A0, -- zs nobreakspace <self> + 0x000AD, -- cf softhyphen <self> + -- 0x00600, -- cf arabicnumber <self> + -- 0x00601, -- cf arabicsanah <self> + -- 0x00602, -- cf arabicfootnotemarker <self> + -- 0x00603, -- cf arabicsafha <self> + -- 0x00604, -- cf arabicsamvat <self> + -- 0x00605, -- cf arabicnumberabove <self> + -- 0x0061C, -- cf arabiclettermark <self> + -- 0x006DD, -- cf arabicendofayah <self> + -- 0x008E2, -- cf arabicdisputedendofayah <self> + 0x02000, -- zs enquad <self> + 0x02001, -- zs emquad <self> + 0x02002, -- zs enspace \kern .5\emwidth + 0x02003, -- zs emspace \hskip \emwidth + 0x02004, -- zs threeperemspace <self> + 0x02005, -- zs fourperemspace <self> + 0x02006, -- zs sixperemspace <self> + 0x02007, -- zs figurespace <self> + 0x02008, -- zs punctuationspace <self> + 0x02009, -- zs breakablethinspace <self> + 0x0200A, -- zs hairspace <self> + 0x0200B, -- cf zerowidthspace <self> + 0x0200C, -- cf zwnj <self> + 0x0200D, -- cf zwj <self> + 0x0202F, -- zs narrownobreakspace <self> + 0x0205F, -- zs medspace \textormathspace +\medmuskip 2 + -- 0x03000, -- zs ideographicspace <self> + -- 0x0FEFF, -- cf zerowidthnobreakspace \penalty \plustenthousand \kern \zeropoint } local csletters = characters.csletters -- also a signal that we have initialized @@ -548,18 +577,15 @@ if not csletters then if is_character[category] then if chr.unicodeslot < 128 then if isletter then - -- setmacro local c = utfchar(u) - contextsprint(ctxcatcodes,format("\\def\\%s{%s}",contextname,c)) -- has no s + texsetmacro(contextname,c) csletters[c] = u else - -- setchar - contextsprint(ctxcatcodes,format("\\chardef\\%s=%s",contextname,u)) -- has no s + texsetchar(contextname,u) end else - -- setmacro local c = utfchar(u) - contextsprint(ctxcatcodes,format("\\def\\%s{%s}",contextname,c)) -- has no s + texsetmacro(contextname,c) if isletter and u >= 32 and u <= 65536 then csletters[c] = u end @@ -584,9 +610,10 @@ if not csletters then end -- elseif is_command[category] and not forbidden[u] then - -- set - contextsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\"..contextname,"}}") - activated[#activated+1] = u + -- contextsprint("{\\catcode",u,"=13\\unexpanded\\gdef ",utfchar(u),"{\\",contextname,"}}") + -- activated[#activated+1] = u + local c = utfchar(u) + texsetmacro(contextname,c) elseif is_mark[category] then texsetlccode(u,u,u) -- for hyphenation end diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 115655526..0ec2b71d9 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2018.02.12 08:53} +\newcontextversion{2018.02.14 16:18} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index cf9008203..98b93bd28 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -41,7 +41,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2018.02.12 08:53} +\edef\contextversion{2018.02.14 16:18} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-chk.lua b/tex/context/base/mkiv/font-chk.lua index 106749078..b8533986f 100644 --- a/tex/context/base/mkiv/font-chk.lua +++ b/tex/context/base/mkiv/font-chk.lua @@ -35,6 +35,7 @@ local fontdata = fonthashes.identifiers local fontcharacters = fonthashes.characters local currentfont = font.current +local addcharacters = font.addcharacters local helpers = fonts.helpers @@ -196,7 +197,7 @@ local pdf_blob = "pdf: q %.6F 0 0 %.6F 0 0 cm %s %s %s rg %s %s %s RG 10 M 1 j 1 local cache = { } -- saves some tables but not that impressive local function missingtonode(tfmdata,character) - local commands = character.commands + local commands = character.commands local fake = hpack_node(new_special(commands[1][2])) -- todo: literal fake.width = character.width fake.height = character.height @@ -209,7 +210,11 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul local properties = tfmdata.properties local size = tfmdata.parameters.size local scale = size * bpfactor - local tonode = properties.finalized and missingtonode or nil + local tonode = nil + local collected = { } + if properties.finalized and not addcharacters then + tonode = missingtonode + end for i=1,#variants do local v = variants[i] local tag, r, g, b = v.tag, v.r, v.g, v.b @@ -231,10 +236,19 @@ local function addmissingsymbols(tfmdata) -- we can have an alternative with rul } cache[hash] = char end - addprivate(tfmdata, privatename, char) + local u = addprivate(tfmdata, privatename, char) + if not tonode then + collected[u] = char + end end end end + if #collected > 0 then + addcharacters(properties.id, { + type = "real", + characters = collected, + }) + end end registerotffeature { diff --git a/tex/context/base/mkiv/font-col.lua b/tex/context/base/mkiv/font-col.lua index 3cef9fbae..8d3152df4 100644 --- a/tex/context/base/mkiv/font-col.lua +++ b/tex/context/base/mkiv/font-col.lua @@ -16,6 +16,7 @@ local file, lpeg, table, string = file, lpeg, table, string local type, next, tonumber, toboolean = type, next, tonumber, toboolean local gmatch = string.gmatch local fastcopy = table.fastcopy +local formatters = string.formatters local nuts = nodes.nuts local tonut = nuts.tonut @@ -46,10 +47,19 @@ collections.definitions = definitions local vectors = collections.vectors or { } collections.vectors = vectors -local fontdata = fonts.hashes.identifiers -local chardata = fonts.hashes.characters -local propdata = fonts.hashes.properties +local fonthashes = fonts.hashes +local fonthelpers = fonts.helpers + +local fontdata = fonthashes.identifiers +local fontquads = fonthashes.quads +local chardata = fonthashes.characters +local propdata = fonthashes.properties + +local addprivate = fonthelpers.addprivate +local hasprivate = fonthelpers.hasprivate + local currentfont = font.current +local addcharacters = font.addcharacters local fontpatternhassize = fonts.helpers.fontpatternhassize @@ -133,6 +143,7 @@ function collections.define(name,font,ranges,details) rscale = tonumber (details.rscale) or 1, force = toboolean(details.force,true), check = toboolean(details.check,true), + factor = tonumber(details.factor), features = details.features, } end @@ -172,6 +183,10 @@ function collections.clonevector(name) local cloneid = list[i] local oldchars = fontdata[current].characters local newchars = fontdata[cloneid].characters + local factor = definition.factor + if factor then + vector.factor = factor + end if trace_collecting then report_fonts("remapping font %a to %a for range %U - %U",current,cloneid,start,stop) end @@ -257,6 +272,41 @@ function collections.report(message) end end +local function monoslot(font,char,parent,factor) + local tfmdata = fontdata[font] + local privatename = formatters["faked mono %s"](char) + local privateslot = hasprivate(tfmdata,privatename) + if privateslot then + return privateslot + else + local characters = tfmdata.characters + local properties = tfmdata.properties + local width = factor * fontquads[parent] + local character = characters[char] + if character then + local data = { + width = width, + height = character.height, + depth = character.depth, + commands = { + { "right", (width - character.width or 0)/2 }, + { "slot", 0, char } + } + } + local u = addprivate(tfmdata, privatename, data) + addcharacters(properties.id, { + type = "real", + characters = { + [u] = data + }, + } ) + return u + else + return char + end + end +end + function collections.process(head) -- this way we keep feature processing local done = false for n in traverse_char(tonut(head)) do @@ -278,12 +328,17 @@ function collections.process(head) -- this way we keep feature processing setfont(n,newfont,newchar) done = true else + local fakemono = vector.factor if trace_collecting then report_fonts("remapping font %a to %a for character %C%s", font,vect,char,not chardata[vect][char] and " (missing)" or "" ) end - setfont(n,vect) + if fakemono then + setfont(n,vect,monoslot(vect,char,font,fakemono)) + else + setfont(n,vect) + end done = true end end diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua index 833c9cdea..f9db5e0d9 100644 --- a/tex/context/base/mkiv/font-ext.lua +++ b/tex/context/base/mkiv/font-ext.lua @@ -645,22 +645,32 @@ local function manipulatedimensions(tfmdata,key,value) local parameters = tfmdata.parameters local emwidth = parameters.quad local exheight = parameters.xheight - local width = 0 - local height = 0 - local depth = 0 + local newwidth = false + local newheight = false + local newdepth = false if value == "strut" then - height = gettexdimen("strutht") - depth = gettexdimen("strutdp") + newheight = gettexdimen("strutht") + newdepth = gettexdimen("strutdp") + elseif value == "mono" then + newwidth = emwidth else local spec = settings_to_array(value) - width = (spec[1] or 0) * emwidth - height = (spec[2] or 0) * exheight - depth = (spec[3] or 0) * exheight + newwidth = tonumber(spec[1]) + newheight = tonumber(spec[2]) + newdepth = tonumber(spec[3]) + if newwidth then newwidth = newwidth * emwidth end + if newheight then newheight = newheight * exheight end + if newdepth then newdepth = newdepth * exheight end end - if width > 0 then + if newwidth or newheight or newdepth then local additions = { } for unicode, old_c in next, characters do - local oldwidth = old_c.width + local oldwidth = old_c.width + local oldheight = old_c.height + local olddepth = old_c.depth + local width = newwidth or oldwidth or 0 + local height = newheight or oldheight or 0 + local depth = newdepth or olddepth or 0 if oldwidth ~= width then -- Defining the tables in one step is more efficient -- than adding fields later. @@ -737,6 +747,53 @@ local dimensions_specification = { registerotffeature(dimensions_specification) registerafmfeature(dimensions_specification) +-------------------------------------------------------------------------------------------------------------- + +-- local function fakemonospace(tfmdata) +-- local resources = tfmdata.resources +-- local gposfeatures = resources.features.gpos +-- local characters = tfmdata.characters +-- local descriptions = tfmdata.descriptions +-- local sequences = resources.sequences +-- local coverage = { } +-- local units = tfmdata.shared.rawdata.metadata.units +-- for k, v in next, characters do +-- local w = descriptions[k].width +-- local d = units - w +-- coverage[k] = { -d/2, 0, units, 0 } +-- end +-- local f = { dflt = { dflt = true } } +-- local s = #sequences + 1 +-- local t = { +-- features = { fakemono = f }, +-- flags = { false, false, false, false }, +-- index = s, +-- name = "p_s_" .. s, +-- nofsteps = 1, +-- order = { "fakemono" }, +-- skiphash = false, +-- type = "gpos_single", +-- steps = { +-- { +-- format = "single", +-- coverage = coverage, +-- } +-- } +-- } +-- gposfeatures["fakemono"] = f +-- sequences[s] = t +-- end +-- +-- fonts.constructors.features.otf.register { +-- name = "fakemono", +-- description = "fake monospaced", +-- initializers = { +-- node = fakemonospace, +-- }, +-- } + +-------------------------------------------------------------------------------------------------------------- + -- for zhichu chen (see mailing list archive): we might add a few more variants -- in due time -- @@ -1214,7 +1271,7 @@ local function getprivatecharornode(tfmdata,name) local font = properties.id local slot = getprivateslot(font,name) if slot then - -- todo: set current attribibutes + -- todo: set current attributes local char = tfmdata.characters[slot] local tonode = char.tonode if tonode then diff --git a/tex/context/base/mkiv/font-fil.mkvi b/tex/context/base/mkiv/font-fil.mkvi index ba9d5e2c6..01fa4a338 100644 --- a/tex/context/base/mkiv/font-fil.mkvi +++ b/tex/context/base/mkiv/font-fil.mkvi @@ -461,13 +461,21 @@ % we can pack them +% \unexpanded\def\savefontclassparameters#style#rscale#features#fallbacks#goodies#designsize#direction% +% {\setxvalue{\??fontclass\fontclass#style\s!rscale }{#rscale}% +% \setxvalue{\??fontclass\fontclass#style\s!features }{#features}% +% \setxvalue{\??fontclass\fontclass#style\s!fallbacks }{#fallbacks}% +% \setxvalue{\??fontclass\fontclass#style\s!goodies }{#goodies}% +% \setxvalue{\??fontclass\fontclass#style\s!designsize}{#designsize}% +% \setxvalue{\??fontclass\fontclass#style\s!direction }{#direction}} + \unexpanded\def\savefontclassparameters#style#rscale#features#fallbacks#goodies#designsize#direction% - {\setxvalue{\??fontclass\fontclass#style\s!rscale }{#rscale}% - \setxvalue{\??fontclass\fontclass#style\s!features }{#features}% - \setxvalue{\??fontclass\fontclass#style\s!fallbacks }{#fallbacks}% - \setxvalue{\??fontclass\fontclass#style\s!goodies }{#goodies}% - \setxvalue{\??fontclass\fontclass#style\s!designsize}{#designsize}% - \setxvalue{\??fontclass\fontclass#style\s!direction }{#direction}} + {\letgvalue{\??fontclass\fontclass#style\s!rscale }#rscale% + \letgvalue{\??fontclass\fontclass#style\s!features }#features% + \letgvalue{\??fontclass\fontclass#style\s!fallbacks }#fallbacks% + \letgvalue{\??fontclass\fontclass#style\s!goodies }#goodies% + \letgvalue{\??fontclass\fontclass#style\s!designsize}#designsize% + \letgvalue{\??fontclass\fontclass#style\s!direction }#direction} % math % bonus diff --git a/tex/context/base/mkiv/lang-def.mkiv b/tex/context/base/mkiv/lang-def.mkiv index 96bb88767..28245e591 100644 --- a/tex/context/base/mkiv/lang-def.mkiv +++ b/tex/context/base/mkiv/lang-def.mkiv @@ -381,6 +381,23 @@ % Anatolian Languages +% Hebrew + +\installlanguage % same as arabic now .. someone needs to fix this + [\s!he] + [\c!spacing=\v!broad, + \c!leftsentence=\emdash, + \c!rightsentence=\emdash, + \c!leftsubsentence=\emdash, + \c!rightsubsentence=\emdash, + \c!leftquote=\upperleftsinglesixquote, + \c!rightquote=\upperrightsingleninequote, + \c!leftquotation=\upperleftdoublesixquote, + \c!rightquotation=\upperrightdoubleninequote, + \c!date={\v!day,\space,\v!month,{،\space},\v!year}] + +\installlanguage [\s!hebrew] [\s!he] + % Arabic Languages \installlanguage diff --git a/tex/context/base/mkiv/lang-dis.lua b/tex/context/base/mkiv/lang-dis.lua index df59359d2..65a53a702 100644 --- a/tex/context/base/mkiv/lang-dis.lua +++ b/tex/context/base/mkiv/lang-dis.lua @@ -8,6 +8,7 @@ if not modules then modules = { } end modules ['lang-dis'] = { local concat = table.concat +local tex = tex local nodes = nodes local tasks = nodes.tasks @@ -43,6 +44,8 @@ local traverse_id = nuts.traverse_id local flush_list = nuts.flush_list local flush_node = nuts.flush_node +local new_disc = nuts.pool.disc + local nodecodes = nodes.nodecodes local disccodes = nodes.disccodes @@ -58,6 +61,8 @@ local a_visualize = attributes.private("visualizediscretionary") local setattribute = tex.setattribute local getlanguagedata = languages.getdata +local prehyphenchar = lang.prehyphenchar +local posthyphenchar = lang.posthyphenchar local check_regular = true @@ -200,3 +205,28 @@ directives.register("hyphenator.flatten",function(v) setaction("processors","nodes.handlers.flatten",v) setaction("contributers","nodes.handlers.flattenline",v) end) + +-- moved here: + +function languages.explicithyphen(template) + local pre, post + local disc = new_disc() + if template then + local langdata = getlanguagedata(getlang(template)) + local instance = langdata and langdata.instance + if instance then + local prechr = prehyphenchar(instance) + local postchr = posthyphenchar(instance) + if prechr >= 0 then + pre = copy_node(template) + setchar(pre,prechr) + end + if postchr >= 0 then + post = copy_node(template) + setchar(post,postchr) + end + end + end + setdisc(disc,pre,post,nil,explicit_code,tex.exhyphenpenalty) + return disc +end diff --git a/tex/context/base/mkiv/lang-ini.mkiv b/tex/context/base/mkiv/lang-ini.mkiv index 9c5251913..7c83ae38f 100644 --- a/tex/context/base/mkiv/lang-ini.mkiv +++ b/tex/context/base/mkiv/lang-ini.mkiv @@ -539,6 +539,12 @@ \fi \to \everylanguage +% new + +\appendtoks + \usebidiparameter\languageparameter +\to \everylanguage + % this will move to core-spa ! \appendtoks @@ -559,12 +565,14 @@ % \setuplanguage[\s!default][\s!font=\v!auto] % \setuplanguage[nl][\s!font=\v!auto] -\ifdefined\feature \else \let\feature\gobbleoneargument \fi - \appendtoks \edef\p_language_font{\languageparameter\s!font}% - \ifx\p_language_font\v!auto + \ifx\p_language_font\empty\else + \ifx\p_language_font\v!auto \doaddfeature\currentlanguage + \else + \doaddfeature\p_language_font + \fi \fi \to \everylanguage diff --git a/tex/context/base/mkiv/math-fen.mkiv b/tex/context/base/mkiv/math-fen.mkiv index 4ea2dd08a..a32ea410e 100644 --- a/tex/context/base/mkiv/math-fen.mkiv +++ b/tex/context/base/mkiv/math-fen.mkiv @@ -15,6 +15,14 @@ \unprotect +% maybe always "method=auto" for: +% +% \switchtobodyfont[cambria] +% \ruledhbox{$f(x)$} +% \ruledhbox{\mathdelimitersmode6$f\left(x\right)$} +% \ruledhbox{\mathdelimitersmode7$f\left(x\right)$} +% \ruledhbox{$f\left(\frac{1}{x}\right)$} + % todo: mathstyle % \definemathfence [fancybracket] [bracket] [command=yes,color=blue] @@ -38,7 +46,7 @@ \let\setupmathfences\setupmathfence \setupmathfences - [\c!method=, + [\c!method=, % maybe always \v!auto \c!left=, \c!right=, \c!middle=, @@ -811,7 +819,11 @@ \fi \to \everysetupmathfence -\unexpanded\def\enableautofencemode {\mathdelimitersmode\plusseven} +\newconstant\c_math_fences_delimiters_mode \c_math_fences_delimiters_mode"16 % \numexpr"02+"04+"10\relax + +%unexpanded\def\enableautofencemode {\mathdelimitersmode\plussix} % the shift (1) is too fragile +\unexpanded\def\enableautofencemode {\mathdelimitersmode\c_math_fences_delimiters_mode} + \unexpanded\def\disableautofencemode{\mathdelimitersmode\zerocount} \appendtoks diff --git a/tex/context/base/mkiv/math-map.lua b/tex/context/base/mkiv/math-map.lua index 9e896e9ed..47e5cda0b 100644 --- a/tex/context/base/mkiv/math-map.lua +++ b/tex/context/base/mkiv/math-map.lua @@ -117,6 +117,7 @@ mathematics.gaps = allocate { [0x1D4AD] = 0x0211B, -- ℛ script R [0x1D4BA] = 0x0212F, -- ℯ script e [0x1D4BC] = 0x0210A, -- ℊ script g + -- [0x1D4C1] = 0x02113, -- exception: liter [0x1D4C4] = 0x02134, -- ℴ script o [0x1D506] = 0x0212D, -- ℭ fraktur C [0x1D50B] = 0x0210C, -- ℌ fraktur H diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua index a00c94a52..4c1997a64 100644 --- a/tex/context/base/mkiv/math-noa.lua +++ b/tex/context/base/mkiv/math-noa.lua @@ -1116,8 +1116,8 @@ do if list and next(list) then local n, t = 0, { } for k, v in sortedhash(list) do - n = n + v - t[#t+1] = formatters["%C"](k) + n = n + 1 + t[n] = formatters["%C"](k) end return formatters["% t (n=%s)"](t,n) end @@ -1472,10 +1472,12 @@ do end setattr(pointer,a_mathitalics,correction) setattr(parent,a_mathitalics,correction) + return -- so no reset later on end end end end + setattr(pointer,a_mathitalics,unsetvalue) end function handlers.italics(head,style,penalties) diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 2a43ba9cd..b875ddd38 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -129,9 +129,9 @@ return { "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", - "figurespace", "punctuationspace", "hairspace", + "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", - "optionalspace", "asciispacechar", + "optionalspace", "asciispacechar", "softhyphen", -- "Ux", "eUx", "Umathaccents", -- @@ -416,6 +416,7 @@ return { "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft","synchronizelayoutdirection","synchronizedisplaydirection","synchronizeinlinedirection", + "checkedlefttoright", "checkedrighttoleft", -- "lesshyphens", "morehyphens", "nohyphens", "dohyphens", -- diff --git a/tex/context/base/mkiv/mult-sys.mkiv b/tex/context/base/mkiv/mult-sys.mkiv index 03e1856ee..7000eed7b 100644 --- a/tex/context/base/mkiv/mult-sys.mkiv +++ b/tex/context/base/mkiv/mult-sys.mkiv @@ -61,6 +61,7 @@ \definesystemconstant {gbenglish} \definesystemconstant {gb} \definesystemconstant {german} \definesystemconstant {de} \definesystemconstant {greek} \definesystemconstant {gr} +\definesystemconstant {hebrew} \definesystemconstant {he} \definesystemconstant {hungarian} \definesystemconstant {hu} \definesystemconstant {italian} \definesystemconstant {it} \definesystemconstant {japanese} \definesystemconstant {ja} diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua index bdccf8cba..541301dcb 100644 --- a/tex/context/base/mkiv/node-ini.lua +++ b/tex/context/base/mkiv/node-ini.lua @@ -99,6 +99,13 @@ if not rulecodes[5] then rulecodes[8] = "radical" end +-- local dircodes = mark(getsubtypes("dir")) + +dircodes = allocate { + [0] = "normal", + [1] = "cancel", +} + -- local glyphcodes = allocate { -- [0] = "character", -- [1] = "glyph", @@ -297,6 +304,7 @@ local noadoptions = allocate { } skipcodes = allocate(swapped(skipcodes,skipcodes)) +dircodes = allocate(swapped(dircodes,dircodes)) boundarycodes = allocate(swapped(boundarycodes,boundarycodes)) noadcodes = allocate(swapped(noadcodes,noadcodes)) radicalcodes = allocate(swapped(radicalcodes,radicalcodes)) @@ -317,29 +325,31 @@ leadercodes = allocate(swapped(leadercodes,leadercodes)) usercodes = allocate(swapped(usercodes,usercodes)) noadoptions = allocate(swapped(noadoptions,noadoptions)) -nodes.skipcodes = skipcodes -nodes.boundarycodes = boundarycodes -nodes.noadcodes = noadcodes -nodes.nodecodes = nodecodes -nodes.whatcodes = whatcodes -nodes.listcodes = listcodes -nodes.glyphcodes = glyphcodes -nodes.kerncodes = kerncodes -nodes.penaltycodes = penaltycodes -nodes.mathcodes = mathcodes -nodes.fillcodes = fillcodes -nodes.margincodes = margincodes -nodes.disccodes = disccodes -nodes.accentcodes = accentcodes -nodes.radicalcodes = radicalcodes -nodes.fencecodes = fencecodes -nodes.rulecodes = rulecodes -nodes.leadercodes = leadercodes -nodes.usercodes = usercodes -nodes.noadoptions = noadoptions - -nodes.gluecodes = skipcodes -- more official -nodes.whatsitcodes = whatcodes -- more official +nodes.skipcodes = skipcodes +nodes.dircodes = dircodes +nodes.boundarycodes = boundarycodes +nodes.noadcodes = noadcodes +nodes.nodecodes = nodecodes +nodes.whatcodes = whatcodes +nodes.listcodes = listcodes +nodes.glyphcodes = glyphcodes +nodes.kerncodes = kerncodes +nodes.penaltycodes = penaltycodes +nodes.mathcodes = mathcodes +nodes.fillcodes = fillcodes +nodes.margincodes = margincodes +nodes.disccodes = disccodes +nodes.accentcodes = accentcodes +nodes.radicalcodes = radicalcodes +nodes.fencecodes = fencecodes +nodes.rulecodes = rulecodes +nodes.leadercodes = leadercodes +nodes.usercodes = usercodes +nodes.noadoptions = noadoptions + +nodes.gluecodes = skipcodes -- more official +nodes.directioncodes = dircodes -- more friendly +nodes.whatsitcodes = whatcodes -- more official nodes.marginkerncodes = margincodes nodes.discretionarycodes = disccodes diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua index 375719eb7..4dee2dd7f 100644 --- a/tex/context/base/mkiv/node-res.lua +++ b/tex/context/base/mkiv/node-res.lua @@ -61,36 +61,37 @@ setmetatable(userids, { -- nuts overload -local nuts = nodes.nuts -local nutpool = { } -nuts.pool = nutpool - -local tonut = nuts.tonut -local tonode = nuts.tonode - -local getbox = nuts.getbox -local getid = nuts.getid -local getlist = nuts.getlist -local getglue = nuts.getglue - -local setfield = nuts.setfield -local setchar = nuts.setchar -local setlist = nuts.setlist -local setwhd = nuts.setwhd -local setglue = nuts.setglue -local setdisc = nuts.setdisc -local setfont = nuts.setfont -local setkern = nuts.setkern -local setpenalty = nuts.setpenalty -local setdir = nuts.setdir -local setshift = nuts.setshift -local setwidth = nuts.setwidth -local setsubtype = nuts.setsubtype -local setleader = nuts.setleader - -local copy_nut = nuts.copy -local new_nut = nuts.new -local flush_nut = nuts.flush +local nuts = nodes.nuts +local nutpool = { } +nuts.pool = nutpool + +local tonut = nuts.tonut +local tonode = nuts.tonode + +local getbox = nuts.getbox +local getid = nuts.getid +local getlist = nuts.getlist +local getglue = nuts.getglue + +local setfield = nuts.setfield +local setchar = nuts.setchar +local setlist = nuts.setlist +local setwhd = nuts.setwhd +local setglue = nuts.setglue +local setdisc = nuts.setdisc +local setfont = nuts.setfont +local setkern = nuts.setkern +local setpenalty = nuts.setpenalty +local setdir = nuts.setdir +local setdirection = nuts.setdirection +local setshift = nuts.setshift +local setwidth = nuts.setwidth +local setsubtype = nuts.setsubtype +local setleader = nuts.setleader + +local copy_nut = nuts.copy +local new_nut = nuts.new +local flush_nut = nuts.flush -- at some point we could have a dual set (the overhead of tonut is not much larger than -- metatable associations at the lua/c end esp if we also take assignments into account @@ -342,6 +343,18 @@ function nutpool.textdir(dir) return t end +function nutpool.direction(dir,swap) + local t = copy_nut(textdir) + if not dir then + -- just a l2r start node + elseif swap then + setdirection(t,dir,true) + else + setdirection(t,dir,false) + end + return t +end + function nutpool.rule(width,height,depth,dir) -- w/h/d == nil will let them adapt local n = copy_nut(rule) if width or height or depth then diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv index 850315996..fbcf45caa 100644 --- a/tex/context/base/mkiv/spac-ali.mkiv +++ b/tex/context/base/mkiv/spac-ali.mkiv @@ -178,6 +178,38 @@ \unexpanded\def\synchronizeinlinedirection {\textdir T\ifconditional\inlinelefttoright L\else R\fi T\relax} +\unexpanded\def\checkedlefttoright + {\ifvmode + \spac_directions_lefttoright_vmode + \else + \spac_directions_lefttoright_hmode_checked + \fi} + +\unexpanded\def\checkedrighttoleft + {\ifvmode + \spac_directions_righttoleft_vmode + \else + \spac_directions_righttoleft_hmode_checked + \fi} + +\unexpanded\def\spac_directions_lefttoright_hmode_checked + {\ifconditional\inlinelefttoright\else + \lefttoright + \fi} + +\unexpanded\def\spac_directions_righttoleft_hmode_checked + {\ifconditional\inlinelefttoright + \righttoleft + \fi} + +\installcorenamespace{bidi} + +\letvalue{\??bidi\v!left }\checkedlefttoright \letvalue{\??bidi l2r}\checkedlefttoright +\letvalue{\??bidi\v!right}\checkedrighttoleft \letvalue{\??bidi r2l}\checkedrighttoleft + +\unexpanded\def\usebidiparameter#1% + {\begincsname\??bidi#1\c!bidi\endcsname} + % maybe some day: % % \newcount\postdirpenalty % \zerocount diff --git a/tex/context/base/mkiv/spac-chr.lua b/tex/context/base/mkiv/spac-chr.lua index 27eac1753..0fa639f92 100644 --- a/tex/context/base/mkiv/spac-chr.lua +++ b/tex/context/base/mkiv/spac-chr.lua @@ -34,10 +34,13 @@ local getnext = nuts.getnext local getprev = nuts.getprev local getattr = nuts.getattr local setattr = nuts.setattr +local getlang = nuts.getlang +local setchar = nuts.setchar local setattrlist = nuts.setattrlist local getfont = nuts.getfont local getchar = nuts.getchar local setsubtype = nuts.setsubtype +local setdisc = nuts.setdisc local isglyph = nuts.isglyph local setcolor = nodes.tracers.colors.set @@ -48,6 +51,8 @@ local remove_node = nuts.remove local traverse_id = nuts.traverse_id local traverse_char = nuts.traverse_char +local copy_node = nuts.copy + local tasks = nodes.tasks local nodepool = nuts.pool @@ -55,12 +60,15 @@ local new_penalty = nodepool.penalty local new_glue = nodepool.glue local new_kern = nodepool.kern local new_rule = nodepool.rule +local new_disc = nodepool.disc local nodecodes = nodes.nodecodes local skipcodes = nodes.skipcodes -local glyph_code = nodecodes.glyph +local disccodes = nodes.disccodes -local space_skip_code = skipcodes["spaceskip"] +local glyph_code = nodecodes.glyph +local space_skip_code = skipcodes.spaceskip +local explicit_code = disccodes.explicit local chardata = characters.data local is_punctuation = characters.is_punctuation @@ -240,6 +248,10 @@ local methods = { return nbsp(head,current) end, + [0x00AD] = function(head,current) -- softhyphen + return insert_node_after(head,current,languages.explicithyphen(current)) + end, + [0x2000] = function(head,current) -- enquad return inject_quad_space(0x2000,head,current,1/2) end, @@ -293,9 +305,11 @@ local methods = { end, [0x205F] = function(head,current) -- math thinspace - return inject_nobreak_space(0x205F,head,current,fontparameters[getfont(current)].space/8) + return inject_nobreak_space(0x205F,head,current,4*fontquads[getfont(current)]/18) end, + -- The next one is also a bom so maybe only when we have glyphs around it + -- [0xFEFF] = function(head,current) -- zerowidthnobreakspace -- return head, current -- end, diff --git a/tex/context/base/mkiv/spac-chr.mkiv b/tex/context/base/mkiv/spac-chr.mkiv index d153997cf..ed2cb47f9 100644 --- a/tex/context/base/mkiv/spac-chr.mkiv +++ b/tex/context/base/mkiv/spac-chr.mkiv @@ -56,8 +56,13 @@ % \nobreakspace {\begingroup\setalignstateattribute\normalUchar"00A0\endgroup} % 1 = left \edef\nobreakspace {\normalUchar"00A0} % space -\edef\ideographicspace {\normalUchar"2000} % quad/2 -\edef\ideographichalffillspace{\normalUchar"2001} % quad +\edef\softhyphen {\normalUchar"00AD} % softhyohen +\edef\enquad {\normalUchar"2000} % quad/2 +\edef\emquad {\normalUchar"2001} % quad + +\let\ideographicspace \enquad +\let\ideographichalffillspace \emquad + \edef\twoperemspace {\normalUchar"2002} % quad/2 % % "2003 % quad == \quad == \hskip\emwidth \edef\threeperemspace {\normalUchar"2004} % quad/3 @@ -79,9 +84,9 @@ \udef\zerowidthnobreakspace {\penalty\plustenthousand\kern\zeropoint} \udef\fiveperemspace {\hskip\dimexpr\emwidth/5\relax} -\let\zwnj\zerowidthnonjoiner -\let\zwj \zerowidthjoiner -\let\nbsp\nobreakspace +\let\zwnj \zerowidthnonjoiner +\let\zwj \zerowidthjoiner +\let\nbsp \nobreakspace \chardef\optionalspace"1F % will be space unless before punctuation diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv index 6c60be868..257535f73 100644 --- a/tex/context/base/mkiv/spac-hor.mkiv +++ b/tex/context/base/mkiv/spac-hor.mkiv @@ -515,7 +515,7 @@ \fi \ifdefined\softhyphen \else - \let\softhyphen\- + \let\softhyphen\explicitdiscretionary \fi \cldcontext{"\string\\unexpanded\string\\def\string\\\string\n{\string\\space}"} @@ -1013,19 +1013,22 @@ %D adapted to \type {\hspace}: \unexpanded\def\textormathspace #1#2#3{\ifmmode\mskip#1#2\else\kern #1\hspaceamount\empty{#3}\fi\relax} +\unexpanded\def\textormathspacecommand #1#2#3{\ifmmode\mskip#1#2\else#3\fi\relax} \unexpanded\def\breakabletextormathspace#1#2#3{\ifmmode\mskip#1#2\else\hskip#1\hspaceamount\empty{#3}\fi\relax} \newmuskip\hairmuskip \hairmuskip=.15mu \unexpanded\def\hairspace {\textormathspace+\hairmuskip{.5}} \unexpanded\def\thinspace {\textormathspace+\thinmuskip 1} -\unexpanded\def\medspace {\textormathspace+\medmuskip 2} +%unexpanded\def\medspace {\textormathspace+\medmuskip 2} % 4/18 em \unexpanded\def\thickspace {\textormathspace+\thickmuskip3} \unexpanded\def\neghairspace {\textormathspace-\thinmuskip{.5}} \unexpanded\def\negthinspace {\textormathspace-\thinmuskip 1} \unexpanded\def\negmedspace {\textormathspace-\medmuskip 2} \unexpanded\def\negthickspace{\textormathspace-\thickmuskip3} +\unexpanded\edef\medspace {\textormathspacecommand+\medmuskip{\Uchar"205F}} + % needed for unicode: %unexpanded\def\breakablethinspace {\breakabletextormathspace+\thinmuskip1} @@ -1043,10 +1046,10 @@ %unexpanded\def\zerowidthnobreakspace {\penalty\plustenthousand\kern\zeropoint} %unexpanded\def\zerowidthspace {\hskip\zeropoint} -\definehspace[.5][.1250\emspaceamount] % could also be [.1250\spaceamount] -\definehspace[1] [.1667\emspaceamount] -\definehspace[2] [.2222\emspaceamount] -\definehspace[3] [.2777\emspaceamount] +\definehspace[.5][.1250\emwidth] % hair +\definehspace[1] [.1667\emwidth] % thin +\definehspace[2] [.2222\emwidth] % med +\definehspace[3] [.2777\emwidth] % thick \let \, \thinspace \let \: \medspace diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex c945f4539..df2f42745 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 2f92e43e0..deb866c10 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/toks-ini.lua b/tex/context/base/mkiv/toks-ini.lua index a5d511c68..8f95f6692 100644 --- a/tex/context/base/mkiv/toks-ini.lua +++ b/tex/context/base/mkiv/toks-ini.lua @@ -16,6 +16,7 @@ local utfchar = utf.char local char = string.char local printtable = table.print local concat = table.concat +local format = string.format if setinspector then @@ -74,8 +75,15 @@ local set_macro = token.set_macro local get_macro = token.get_macro local get_meaning = token.get_meaning local get_cmdname = token.get_cmdname +local set_char = token.set_char local create_token = token.create +if not set_char then -- for a while + local contextsprint = context.sprint + local ctxcatcodes = catcodes.numbers.ctxcatcodes + set_char = function(n,u) contextsprint(ctxcatcodes,format("\\chardef\\%s=%s",n,u)) end +end + function tokens.defined(name) return get_cmdname(create_token(name)) ~= "undefined_cs" end @@ -257,6 +265,7 @@ tokens.getters = { -- these don't expand tokens.setters = { macro = set_macro, + char = set_char, count = tex.setcount, dimen = tex.setdimen, skip = tex.setglue, diff --git a/tex/context/base/mkiv/type-ini.mkvi b/tex/context/base/mkiv/type-ini.mkvi index 2ac3ee207..0633b828d 100644 --- a/tex/context/base/mkiv/type-ini.mkvi +++ b/tex/context/base/mkiv/type-ini.mkvi @@ -513,18 +513,32 @@ \setugvalue{#name}{\switchtotypeface[#name][#style]}% \fi}} +% \def\font_typefaces_defining_start#name#style#settings% +% {\let\@@tsrscale \!!plusone % as we push/pop +% \let\@@tsfeatures \empty +% \let\@@tsfallbacks \empty +% \let\@@tsgoodies \empty +% \let\@@tsdirection \empty +% \let\@@tsdesignsize\empty +% \geteparameters[\??ts][#settings]% todo raw +% \pushmacro\fontclass +% \pushmacro\fontclassstyle +% \setcurrentfontclass{#name}% +% \savefontclassparameters{#style}\@@tsrscale\@@tsfeatures\@@tsfallbacks\@@tsgoodies\@@tsdesignsize\@@tsdirection +% \the\everybeforedefinetypeface} + \def\font_typefaces_defining_start#name#style#settings% - {\let\@@tsrscale \!!plusone % as we push/pop - \let\@@tsfeatures \empty - \let\@@tsfallbacks \empty - \let\@@tsgoodies \empty - \let\@@tsdirection \empty - \let\@@tsdesignsize\empty + {\let\p_rscale \!!plusone % as we push/pop + \let\p_features \empty + \let\p_fallbacks \empty + \let\p_goodies \empty + \let\p_direction \empty + \let\p_designsize\empty \geteparameters[\??ts][#settings]% todo raw \pushmacro\fontclass \pushmacro\fontclassstyle \setcurrentfontclass{#name}% - \savefontclassparameters{#style}\@@tsrscale\@@tsfeatures\@@tsfallbacks\@@tsgoodies\@@tsdesignsize\@@tsdirection + \savefontclassparameters{#style}\p_rscale\p_features\p_fallbacks\p_goodies\p_designsize\p_direction \the\everybeforedefinetypeface} \def\tsvar#key#default% undocumented and unofficial diff --git a/tex/context/base/mkiv/typo-dir.mkiv b/tex/context/base/mkiv/typo-dir.mkiv index 18914d37b..a574e3c66 100644 --- a/tex/context/base/mkiv/typo-dir.mkiv +++ b/tex/context/base/mkiv/typo-dir.mkiv @@ -22,7 +22,11 @@ \registerctxluafile{typo-dha}{} \registerctxluafile{typo-dua}{} \registerctxluafile{typo-dub}{} -\registerctxluafile{typo-duc}{} +\doifelsefileexists{typo-duc-new.lua} { + \registerctxluafile{typo-duc-new}{} +} { + \registerctxluafile{typo-duc}{} +} \definesystemattribute[directions][public] diff --git a/tex/context/base/mkiv/typo-dub.lua b/tex/context/base/mkiv/typo-dub.lua index 21953bafd..d0747ae6c 100644 --- a/tex/context/base/mkiv/typo-dub.lua +++ b/tex/context/base/mkiv/typo-dub.lua @@ -559,28 +559,30 @@ local function resolve_weak(list,size,start,limit,orderbefore,orderafter) end else -- probably more efficient local runner = start + 2 - local before = list[start] - local entry = list[start + 1] - local after = list[runner] - while after do - local direction = entry.direction - if direction == "es" then - if before.direction == "en" and after.direction == "en" then - entry.direction = "en" - end - elseif direction == "cs" then - local prevdirection = before.direction - if prevdirection == "en" then - if after.direction == "en" then + if runner <= limit then + local before = list[start] + local entry = list[start + 1] + local after = list[runner] + while after do + local direction = entry.direction + if direction == "es" then + if before.direction == "en" and after.direction == "en" then entry.direction = "en" end - elseif prevdirection == "an" and after.direction == "an" then - entry.direction = "an" + elseif direction == "cs" then + local prevdirection = before.direction + if prevdirection == "en" then + if after.direction == "en" then + entry.direction = "en" + end + elseif prevdirection == "an" and after.direction == "an" then + entry.direction = "an" + end end + before = current + current = after + after = list[runner] end - before = current - current = after - after = list[runner] end end -- W5 diff --git a/tex/context/base/mkiv/typo-duc.lua b/tex/context/base/mkiv/typo-duc.lua index 7d3834b20..3449b6904 100644 --- a/tex/context/base/mkiv/typo-duc.lua +++ b/tex/context/base/mkiv/typo-duc.lua @@ -7,6 +7,8 @@ if not modules then modules = { } end modules ['typo-duc'] = { comment = "Unicode bidi (sort of) variant c", } +-- Will be replaced by typo-duc-new.lua! + -- This is a follow up on typo-uda which itself is a follow up on t-bidi by Khaled Hosny which -- in turn is based on minibidi.c from Arabeyes. This is a further optimizations, as well as -- an update on some recent unicode bidi developments. There is (and will) also be more control @@ -590,29 +592,31 @@ local function resolve_weak(list,size,start,limit,orderbefore,orderafter) end else -- only more efficient when we have es/cs local runner = start + 2 - local before = list[start] - local entry = list[start + 1] - local after = list[runner] - while after do - local direction = entry.direction - if direction == "es" then - if before.direction == "en" and after.direction == "en" then - entry.direction = "en" - end - elseif direction == "cs" then - local prevdirection = before.direction - if prevdirection == "en" then - if after.direction == "en" then + if runner <= limit then + local before = list[start] + local entry = list[start + 1] + local after = list[runner] + while after do + local direction = entry.direction + if direction == "es" then + if before.direction == "en" and after.direction == "en" then entry.direction = "en" end - elseif prevdirection == "an" and after.direction == "an" then - entry.direction = "an" + elseif direction == "cs" then + local prevdirection = before.direction + if prevdirection == "en" then + if after.direction == "en" then + entry.direction = "en" + end + elseif prevdirection == "an" and after.direction == "an" then + entry.direction = "an" + end end + before = current + current = after + after = list[runner] + runner = runner + 1 end - before = current - current = after - after = list[runner] - runner = runner + 1 end end -- end diff --git a/tex/context/base/mkiv/typo-itc.lua b/tex/context/base/mkiv/typo-itc.lua index 4545dfe2b..328bf1406 100644 --- a/tex/context/base/mkiv/typo-itc.lua +++ b/tex/context/base/mkiv/typo-itc.lua @@ -248,7 +248,7 @@ local function domath(head,current, done) a = a + 100 end if trace_italics then - report_italics("adding italic between math %C and non punctuation %C",getchar(glyph),char) + report_italics("%s italic %p between math %C and non punctuation %C","adding",a,getchar(glyph),char) end insert_node_after(head,glyph,correction_kern(a,glyph)) done = true @@ -262,11 +262,12 @@ local function domath(head,current, done) end local function mathhandler(head) - local current = tonut(head) + local nuthead = tonut(head) + local current = nuthead local done = false while current do if getid(current) == math_code then - current, done = domath(head,current,done) + current, done = domath(nuthead,current,done) end current = getnext(current) end diff --git a/tex/context/base/mkiv/typo-rep.lua b/tex/context/base/mkiv/typo-rep.lua index 5266aa103..b6aae0cae 100644 --- a/tex/context/base/mkiv/typo-rep.lua +++ b/tex/context/base/mkiv/typo-rep.lua @@ -51,11 +51,9 @@ nodes.stripping = nodes.stripping or { } local stripping = nodes.stripping stripping.glyphs = stripping.glyphs or { } local glyphs = stripping.glyphs local function initialize() - for k,v in next, chardata do - if v.category == "cf" and v.visible ~= "yes" then - if not glyphs[k] then - glyphs[k] = true - end + for k, v in next, chardata do + if v.category == "cf" and not v.visible and not glyphs[k] then + glyphs[k] = true end end initialize = nil diff --git a/tex/context/base/mkiv/util-sci.lua b/tex/context/base/mkiv/util-sci.lua index e028d2f95..35385a183 100644 --- a/tex/context/base/mkiv/util-sci.lua +++ b/tex/context/base/mkiv/util-sci.lua @@ -50,6 +50,9 @@ local function loadscitelexer() if not lexer then lexer = require("scite-context-lexer") require("scite-context-theme") -- uses lexer + if lexer then + lexer.context.disablewordcheck() + end end return lexer end diff --git a/tex/context/fonts/mkiv/type-imp-dejavu.mkiv b/tex/context/fonts/mkiv/type-imp-dejavu.mkiv index 710aada5d..582d8a764 100644 --- a/tex/context/fonts/mkiv/type-imp-dejavu.mkiv +++ b/tex/context/fonts/mkiv/type-imp-dejavu.mkiv @@ -17,26 +17,26 @@ \starttypescript [\s!serif] [dejavu] [\s!name] \setups[\s!font:\s!fallback:\s!serif] - \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=\s!default] - \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifbold] [\s!features=\s!default] - \definefontsynonym [\s!SerifItalic] [\s!name:dejavuserifitalic] [\s!features=\s!default] - \definefontsynonym [\s!SerifBoldItalic] [\s!name:dejavuserifbolditalic] [\s!features=\s!default] + \definefontsynonym [\s!Serif] [\s!name:dejavuserif] [\s!features=\s!default,\s!fallbacks=\s!Serif] + \definefontsynonym [\s!SerifBold] [\s!name:dejavuserifbold] [\s!features=\s!default,\s!fallbacks=\s!SerifBold] + \definefontsynonym [\s!SerifItalic] [\s!name:dejavuserifitalic] [\s!features=\s!default,\s!fallbacks=\s!SerifItalic] + \definefontsynonym [\s!SerifBoldItalic] [\s!name:dejavuserifbolditalic] [\s!features=\s!default,\s!fallbacks=\s!SerifBoldItalic] \stoptypescript \starttypescript [\s!sans] [dejavu] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [\s!name:dejavusans] [\s!features=\s!default] - \definefontsynonym [\s!SansBold] [\s!name:dejavusansbold] [\s!features=\s!default] - \definefontsynonym [\s!SansItalic] [\s!name:dejavusansoblique] [\s!features=\s!default] - \definefontsynonym [\s!SansBoldItalic] [\s!name:dejavusansboldoblique] [\s!features=\s!default] + \definefontsynonym [\s!Sans] [\s!name:dejavusans] [\s!features=\s!default,\s!fallbacks=\s!Sans] + \definefontsynonym [\s!SansBold] [\s!name:dejavusansbold] [\s!features=\s!default,\s!fallbacks=\s!SansBold] + \definefontsynonym [\s!SansItalic] [\s!name:dejavusansoblique] [\s!features=\s!default,\s!fallbacks=\s!SansItalic] + \definefontsynonym [\s!SansBoldItalic] [\s!name:dejavusansboldoblique] [\s!features=\s!default,\s!fallbacks=\s!SansBoldItalic] \stoptypescript \starttypescript [\s!mono] [dejavu] [\s!name] \setups[\s!font:\s!fallback:\s!mono] - \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=\s!none] - \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=\s!none] - \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=\s!none] - \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=\s!none] + \definefontsynonym [\s!Mono] [\s!name:dejavusansmono] [\s!features=\s!none,\s!fallbacks=\s!Mono] + \definefontsynonym [\s!MonoBold] [\s!name:dejavusansmonobold] [\s!features=\s!none,\s!fallbacks=\s!MonoBold] + \definefontsynonym [\s!MonoItalic] [\s!name:dejavusansmonooblique] [\s!features=\s!none,\s!fallbacks=\s!MonoItalic] + \definefontsynonym [\s!MonoBoldItalic] [\s!name:dejavusansmonoboldoblique] [\s!features=\s!none,\s!fallbacks=\s!MonoBoldItalic] \stoptypescript \starttypescript [\s!math][dejavu][\s!name] diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml index 97c22dec7..3ed472306 100644 --- a/tex/context/interface/mkii/keys-cs.xml +++ b/tex/context/interface/mkii/keys-cs.xml @@ -188,6 +188,7 @@ <cd:variable name='extremestretch' value='extremestretch'/> <cd:variable name='fact' value='fakt'/> <cd:variable name='february' value='unor'/> + <cd:variable name='field' value='field'/> <cd:variable name='figure' value='obrazek'/> <cd:variable name='figures' value='obrazky'/> <cd:variable name='file' value='soubor'/> @@ -379,6 +380,7 @@ <cd:variable name='norepeat' value='norepeat'/> <cd:variable name='normal' value='normalni'/> <cd:variable name='nospacing' value='nospacing'/> + <cd:variable name='nostopper' value='nostopper'/> <cd:variable name='not' value='ne'/> <cd:variable name='notation' value='notation'/> <cd:variable name='note' value='note'/> @@ -854,6 +856,7 @@ <cd:constant name='headerstate' value='statuszahlavi'/> <cd:constant name='headlabel' value='popisekhlavicky'/> <cd:constant name='headnumber' value='cislonadpisu'/> + <cd:constant name='headseparator' value='headseparator'/> <cd:constant name='headstyle' value='stylhlavicky'/> <cd:constant name='height' value='vyska'/> <cd:constant name='hfactor' value='vfaktor'/> @@ -1010,6 +1013,7 @@ <cd:constant name='numberset' value='numberset'/> <cd:constant name='numberstarter' value='numberstarter'/> <cd:constant name='numberstopper' value='numberstopper'/> + <cd:constant name='numberstrut' value='numberstrut'/> <cd:constant name='numberstyle' value='stylcisla'/> <cd:constant name='numberwidth' value='numberwidth'/> <cd:constant name='nx' value='nx'/> @@ -1166,6 +1170,7 @@ <cd:constant name='sidespacebefore' value='bocnimezerapred'/> <cd:constant name='sidethreshold' value='sidethreshold'/> <cd:constant name='sign' value='znak'/> + <cd:constant name='simplecommand' value='simplecommand'/> <cd:constant name='size' value='velikost'/> <cd:constant name='slantedfeatures' value='slantedfeatures'/> <cd:constant name='slantedfont' value='slantedfont'/> @@ -1178,7 +1183,9 @@ <cd:constant name='source' value='zdroj'/> <cd:constant name='space' value='mezera'/> <cd:constant name='spaceafter' value='mezeraza'/> + <cd:constant name='spaceafterside' value='spaceafterside'/> <cd:constant name='spacebefore' value='mezerapred'/> + <cd:constant name='spacebeforeside' value='spacebeforeside'/> <cd:constant name='spaceinbetween' value='spaceinbetween'/> <cd:constant name='spacing' value='mezerovani'/> <cd:constant name='specification' value='specification'/> @@ -1243,6 +1250,7 @@ <cd:constant name='titledistance' value='vzdalenosttitulek'/> <cd:constant name='titleleft' value='titleleft'/> <cd:constant name='titleright' value='titleright'/> + <cd:constant name='titlestrut' value='titlestrut'/> <cd:constant name='titlestyle' value='styltitulek'/> <cd:constant name='to' value='na'/> <cd:constant name='toffset' value='toffset'/> diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml index c3b44e3ea..7269859a7 100644 --- a/tex/context/interface/mkiv/context-en.xml +++ b/tex/context/interface/mkiv/context-en.xml @@ -11202,6 +11202,9 @@ <cd:parameter name="features"> <cd:constant type="cd:name"/> </cd:parameter> + <cd:parameter name="factor"> + <cd:constant type="cd:number"/> + </cd:parameter> </cd:assignments> </cd:arguments> </cd:command> @@ -18373,6 +18376,12 @@ <cd:parameter name="font"> <cd:constant type="auto"/> </cd:parameter> + <cd:parameter name="bidi"> + <cd:constant type="left"/> + <cd:constant type="right"/> + <cd:constant type="l2r"/> + <cd:constant type="r2l"/> + </cd:parameter> <cd:parameter name="text"> <cd:constant type="cd:text"/> </cd:parameter> diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex 1d8b2788a..fac1032e1 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-fonts.xml b/tex/context/interface/mkiv/i-fonts.xml index 2f9d890a9..1e6e169a4 100644 --- a/tex/context/interface/mkiv/i-fonts.xml +++ b/tex/context/interface/mkiv/i-fonts.xml @@ -34,6 +34,9 @@ <cd:parameter name="features"> <cd:constant type="cd:name"/> </cd:parameter> + <cd:parameter name="factor"> + <cd:constant type="cd:number"/> + </cd:parameter> </cd:assignments> </cd:arguments> </cd:command> diff --git a/tex/context/interface/mkiv/i-language.xml b/tex/context/interface/mkiv/i-language.xml index 652f6ffc6..357061321 100644 --- a/tex/context/interface/mkiv/i-language.xml +++ b/tex/context/interface/mkiv/i-language.xml @@ -62,6 +62,12 @@ <cd:parameter name="font"> <cd:constant type="auto"/> </cd:parameter> + <cd:parameter name="bidi"> + <cd:constant type="left"/> + <cd:constant type="right"/> + <cd:constant type="l2r"/> + <cd:constant type="r2l"/> + </cd:parameter> <cd:parameter name="text"> <cd:constant type="cd:text"/> </cd:parameter> @@ -131,7 +137,7 @@ <cd:resolve name="argument-false"/> </cd:arguments> </cd:command> - + <cd:command name="doiflanguageelse" level="system" category="language conditional" file="lang-ini.mkiv"> <cd:arguments> <cd:resolve name="argument-language"/> @@ -147,7 +153,7 @@ <cd:resolve name="argument-false"/> </cd:arguments> </cd:command> - + <cd:command name="doifpatternselse" level="system" category="language conditional" file="lang-ini.mkiv"> <cd:arguments> <cd:resolve name="argument-language"/> @@ -201,4 +207,4 @@ </cd:arguments> </cd:command> -</cd:interface>
\ No newline at end of file +</cd:interface> diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex a75adc464..348c81d92 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/context/modules/mkiv/x-mathml.lua b/tex/context/modules/mkiv/x-mathml.lua index 9650afab8..05feecf47 100644 --- a/tex/context/modules/mkiv/x-mathml.lua +++ b/tex/context/modules/mkiv/x-mathml.lua @@ -113,8 +113,8 @@ local o_replacements = { -- in main table ["$"] = "\\mmlchar{36}", -- $ ["%"] = "\\mmlchar{37}", ["&"] = "\\mmlchar{38}", - ["^"] = "\\mmlchar{94}{}", -- strange, sometimes luatex math sees the char instead of \char - ["_"] = "\\mmlchar{95}{}", -- so we need the {} + ["^"] = "\\mmlchar{94}{}", -- strange, sometimes luatex math sees the char instead of \char so we + ["_"] = "\\mmlchar{95}{}", -- need the {} ... has to do with active mess feedback into scanner ["~"] = "\\mmlchar{126}", [" "] = "", ["°"] = "^\\circ", -- hack diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index cab8b8331..0a24e8319 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 02/12/18 08:53:04 +-- merge date : 02/14/18 16:18:32 do -- begin closure to overcome local limits and interference |