From 23b5ef45e7939a00addff726d02d6c29243177af Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 23 Feb 2023 21:40:04 +0100 Subject: 2023-02-23 21:26:00 --- .../lexers/data/scite-context-data-context.lua | 2 +- .../context/scite-context-data-context.properties | 133 +-- .../manuals/luatex/luatex-modifications.tex | 6 +- .../general/manuals/luatex/luatex-nodes.tex | 4 +- source/luametatex/source/lua/lmtinterface.c | 2 + source/luametatex/source/lua/lmtinterface.h | 5 + source/luametatex/source/lua/lmtnodelib.c | 8 + source/luametatex/source/lua/lmttexlib.c | 42 +- source/luametatex/source/luametatex.h | 2 +- source/luametatex/source/tex/texcommands.c | 2 + source/luametatex/source/tex/texcommands.h | 1 + source/luametatex/source/tex/texdumpdata.h | 2 +- source/luametatex/source/tex/texequivalents.h | 28 +- source/luametatex/source/tex/texmath.c | 33 +- source/luametatex/source/tex/texmath.h | 3 + source/luametatex/source/tex/texmlist.c | 79 +- source/luametatex/source/tex/texnodes.c | 6 + source/luametatex/source/tex/texnodes.h | 86 +- tex/context/base/mkii/cont-new.mkii | 2 +- tex/context/base/mkii/context.mkii | 2 +- tex/context/base/mkiv/back-pdp.lua | 56 +- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/lpdf-nod.lua | 25 +- tex/context/base/mkiv/mult-low.lua | 2 +- tex/context/base/mkiv/node-ini.lua | 1 + tex/context/base/mkiv/status-files.pdf | Bin 24546 -> 24601 bytes tex/context/base/mkiv/status-lua.pdf | Bin 265635 -> 265852 bytes tex/context/base/mkxl/back-imp-pdp.lmt | 4 +- tex/context/base/mkxl/cont-new.mkxl | 2 +- tex/context/base/mkxl/context.mkxl | 2 +- tex/context/base/mkxl/core-uti.lmt | 27 +- tex/context/base/mkxl/driv-shp.lmt | 9 + tex/context/base/mkxl/font-mat.mklx | 25 + tex/context/base/mkxl/font-vfc.lmt | 1 + tex/context/base/mkxl/grph-epd.lmt | 3 + tex/context/base/mkxl/lpdf-ano.lmt | 12 +- tex/context/base/mkxl/lpdf-epa.lmt | 29 +- tex/context/base/mkxl/math-act.lmt | 23 +- tex/context/base/mkxl/math-ali.mkxl | 16 +- tex/context/base/mkxl/math-frc.mkxl | 2 +- tex/context/base/mkxl/math-ini.mkxl | 1 + tex/context/base/mkxl/math-noa.lmt | 60 +- tex/context/base/mkxl/math-rad.mklx | 16 +- tex/context/base/mkxl/math-ttv.lmt | 358 ++----- tex/context/base/mkxl/math-vfu.lmt | 1125 ++++++++++++-------- tex/context/base/mkxl/pack-ori.lmt | 4 +- tex/context/base/mkxl/strc-lst.lmt | 12 +- tex/context/base/mkxl/strc-mat.mkxl | 5 + tex/context/base/mkxl/strc-ref.lmt | 69 +- tex/context/base/mkxl/strc-reg.lmt | 4 +- tex/context/base/mkxl/tabl-ntb.mkxl | 25 +- tex/context/base/mkxl/tabl-tsp.mkxl | 3 + tex/context/fonts/mkiv/antykwa-math.lfg | 152 ++- tex/context/fonts/mkiv/common-math-jmn.lfg | 119 +++ tex/context/fonts/mkiv/ebgaramond.lfg | 90 -- tex/context/fonts/mkiv/iwona-math.lfg | 21 +- tex/context/fonts/mkiv/kurier-math.lfg | 21 +- tex/context/fonts/mkiv/lucida-math.lfg | 2 +- tex/context/fonts/mkiv/type-imp-antykwa.mkiv | 116 +- tex/context/fonts/mkiv/type-imp-iwona.mkiv | 120 ++- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 62 files changed, 1744 insertions(+), 1272 deletions(-) create mode 100644 tex/context/fonts/mkiv/common-math-jmn.lfg delete mode 100644 tex/context/fonts/mkiv/ebgaramond.lfg diff --git a/context/data/scite/context/lexers/data/scite-context-data-context.lua b/context/data/scite/context/lexers/data/scite-context-data-context.lua index d3d8d0e5a..4c8884971 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-context.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-context.lua @@ -1,4 +1,4 @@ return { - ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "maxiterator", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", "thickermuskip", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "prerollrun", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "statuswrite", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "rlncatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "semicolonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", "mathpenaltyfrozenparcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", "extendaccentsmathcontrolcode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", "noitaliccorrectionglyphoptioncode", "islargeoperatorglyphoptioncode", "hasitalicshapeglyphoptioncode", "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", "noalignparcontextcode", "spanparcontextcode", "resetparcontextcode", "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", "mathmaybeordinarycode", "mathmayberelationcode", "mathmaybebinarycode", "mathnumbergroupcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "autoinsertedspace", "Ux", "eUx", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", "collapsehyphenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", "nopreslackclassoptioncode", "nopostslackclassoptioncode", "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", "carryoverlefttopkernclassoptioncode", "carryoverleftbottomkernclassoptioncode", "carryoverrighttopkernclassoptioncode", "carryoverrightbottomkernclassoptioncode", "preferdelimiterdimensionsclassoptioncode", "autoinjectclassoptioncode", "removeitaliccorrectionclassoptioncode", "operatoritaliccorrectionclassoptioncode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", "nokerningcode", "noligaturingcode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode" }, + ["constants"]={ "zerocount", "minusone", "minustwo", "plusone", "plustwo", "plusthree", "plusfour", "plusfive", "plussix", "plusseven", "pluseight", "plusnine", "plusten", "pluseleven", "plustwelve", "plussixteen", "plusfifty", "plushundred", "plusonehundred", "plustwohundred", "plusfivehundred", "plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone", "maxiterator", "zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint", "points", "halfpoint", "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip", "centeringfillskip", "stretchingfillskip", "shrinkingfillskip", "zeromuskip", "onemuskip", "pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi", "normalpagebox", "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty", "thickermuskip", "directionlefttoright", "directionrighttoleft", "endoflinetoken", "outputnewlinechar", "emptytoks", "empty", "undefined", "prerollrun", "voidbox", "emptybox", "emptyvbox", "emptyhbox", "bigskipamount", "medskipamount", "smallskipamount", "fmtname", "fmtversion", "texengine", "texenginename", "texengineversion", "texenginefunctionality", "luatexengine", "pdftexengine", "xetexengine", "unknownengine", "contextformat", "contextversion", "contextlmtxmode", "contextmark", "mksuffix", "activecatcode", "bgroup", "egroup", "endline", "conditionaltrue", "conditionalfalse", "attributeunsetvalue", "statuswrite", "uprotationangle", "rightrotationangle", "downrotationangle", "leftrotationangle", "inicatcodes", "ctxcatcodes", "texcatcodes", "notcatcodes", "txtcatcodes", "vrbcatcodes", "prtcatcodes", "nilcatcodes", "luacatcodes", "tpacatcodes", "tpbcatcodes", "xmlcatcodes", "ctdcatcodes", "rlncatcodes", "escapecatcode", "begingroupcatcode", "endgroupcatcode", "mathshiftcatcode", "alignmentcatcode", "endoflinecatcode", "parametercatcode", "superscriptcatcode", "subscriptcatcode", "ignorecatcode", "spacecatcode", "lettercatcode", "othercatcode", "activecatcode", "commentcatcode", "invalidcatcode", "tabasciicode", "newlineasciicode", "formfeedasciicode", "endoflineasciicode", "endoffileasciicode", "commaasciicode", "spaceasciicode", "periodasciicode", "hashasciicode", "dollarasciicode", "commentasciicode", "ampersandasciicode", "colonasciicode", "semicolonasciicode", "backslashasciicode", "circumflexasciicode", "underscoreasciicode", "leftbraceasciicode", "barasciicode", "rightbraceasciicode", "tildeasciicode", "delasciicode", "leftparentasciicode", "rightparentasciicode", "lessthanasciicode", "morethanasciicode", "doublecommentsignal", "atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode", "doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode", "primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode", "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode", "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode", "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode", "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode", "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode", "shapingpenaltyfrozenparcode", "orphanpenaltyfrozenparcode", "allfrozenparcode", "mathpenaltyfrozenparcode", "activemathcharcode", "activetabtoken", "activeformfeedtoken", "activeendoflinetoken", "batchmodecode", "nonstopmodecode", "scrollmodecode", "errorstopmodecode", "bottomlevelgroupcode", "simplegroupcode", "hboxgroupcode", "adjustedhboxgroupcode", "vboxgroupcode", "vtopgroupcode", "aligngroupcode", "noaligngroupcode", "outputgroupcode", "mathgroupcode", "discretionarygroupcode", "insertgroupcode", "vadjustgroupcode", "vcentergroupcode", "mathabovegroupcode", "mathchoicegroupcode", "alsosimplegroupcode", "semisimplegroupcode", "mathshiftgroupcode", "mathleftgroupcode", "localboxgroupcode", "splitoffgroupcode", "splitkeepgroupcode", "preamblegroupcode", "alignsetgroupcode", "finrowgroupcode", "discretionarygroupcode", "markautomigrationcode", "insertautomigrationcode", "adjustautomigrationcode", "preautomigrationcode", "postautomigrationcode", "charnodecode", "hlistnodecode", "vlistnodecode", "rulenodecode", "insertnodecode", "marknodecode", "adjustnodecode", "ligaturenodecode", "discretionarynodecode", "whatsitnodecode", "mathnodecode", "gluenodecode", "kernnodecode", "penaltynodecode", "unsetnodecode", "mathsnodecode", "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode", "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode", "applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode", "reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode", "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", "noitaliccorrectionglyphoptioncode", "islargeoperatorglyphoptioncode", "hasitalicshapeglyphoptioncode", "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode", "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode", "noalignparcontextcode", "spanparcontextcode", "resetparcontextcode", "leftoriginlistanchorcode", "leftheightlistanchorcode", "leftdepthlistanchorcode", "rightoriginlistanchorcode", "rightheightlistanchorcode", "rightdepthlistanchorcode", "centeroriginlistanchorcode", "centerheightlistanchorcode", "centerdepthlistanchorcode", "halfwaytotallistanchorcode", "halfwayheightlistanchorcode", "halfwaydepthlistanchorcode", "halfwayleftlistanchorcode", "halfwayrightlistanchorcode", "negatexlistsigncode", "negateylistsigncode", "negatelistsigncode", "fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink", "fontexheight", "fontemwidth", "fontextraspace", "slantperpoint", "mathexheight", "mathemwidth", "interwordspace", "interwordstretch", "interwordshrink", "exheight", "emwidth", "extraspace", "mathaxisheight", "muquad", "startmode", "stopmode", "startnotmode", "stopnotmode", "startmodeset", "stopmodeset", "doifmode", "doifelsemode", "doifmodeelse", "doifnotmode", "startmodeset", "stopmodeset", "startallmodes", "stopallmodes", "startnotallmodes", "stopnotallmodes", "doifallmodes", "doifelseallmodes", "doifallmodeselse", "doifnotallmodes", "startenvironment", "stopenvironment", "environment", "startcomponent", "stopcomponent", "component", "startproduct", "stopproduct", "product", "startproject", "stopproject", "project", "starttext", "stoptext", "startnotext", "stopnotext", "startdocument", "stopdocument", "documentvariable", "unexpandeddocumentvariable", "setupdocument", "presetdocument", "doifelsedocumentvariable", "doifdocumentvariableelse", "doifdocumentvariable", "doifnotdocumentvariable", "startmodule", "stopmodule", "usemodule", "usetexmodule", "useluamodule", "setupmodule", "currentmoduleparameter", "moduleparameter", "everystarttext", "everystoptext", "startTEXpage", "stopTEXpage", "enablemode", "disablemode", "preventmode", "definemode", "globalenablemode", "globaldisablemode", "globalpreventmode", "pushmode", "popmode", "typescriptone", "typescripttwo", "typescriptthree", "mathsizesuffix", "mathordinarycode", "mathordcode", "mathoperatorcode", "mathopcode", "mathbinarycode", "mathbincode", "mathrelationcode", "mathrelcode", "mathopencode", "mathclosecode", "mathpunctuationcode", "mathpunctcode", "mathovercode", "mathundercode", "mathinnercode", "mathradicalcode", "mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode", "mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode", "mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode", "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode", "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode", "mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode", "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode", "mathmaybeordinarycode", "mathmayberelationcode", "mathmaybebinarycode", "mathnumbergroupcode", "constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument", "luastringsep", "!!bs", "!!es", "lefttorightmark", "righttoleftmark", "lrm", "rlm", "bidilre", "bidirle", "bidipop", "bidilro", "bidirlo", "breakablethinspace", "nobreakspace", "nonbreakablespace", "narrownobreakspace", "zerowidthnobreakspace", "ideographicspace", "ideographichalffillspace", "twoperemspace", "threeperemspace", "fourperemspace", "fiveperemspace", "sixperemspace", "figurespace", "punctuationspace", "hairspace", "enquad", "emquad", "zerowidthspace", "zerowidthnonjoiner", "zerowidthjoiner", "zwnj", "zwj", "optionalspace", "asciispacechar", "softhyphen", "autoinsertedspace", "Ux", "eUx", "parfillleftskip", "parfillrightskip", "startlmtxmode", "stoplmtxmode", "startmkivmode", "stopmkivmode", "wildcardsymbol", "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode", "collapsehyphenationcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode", "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode", "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode", "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode", "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode", "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode", "discardzerotabskipsnormalizecode", "flattenhleadersnormalizecode", "normalizeparnormalizeparcode", "flattenvleadersnormalizeparcode", "nopreslackclassoptioncode", "nopostslackclassoptioncode", "lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode", "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions", "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode", "carryoverlefttopkernclassoptioncode", "carryoverleftbottomkernclassoptioncode", "carryoverrighttopkernclassoptioncode", "carryoverrightbottomkernclassoptioncode", "preferdelimiterdimensionsclassoptioncode", "autoinjectclassoptioncode", "removeitaliccorrectionclassoptioncode", "operatoritaliccorrectionclassoptioncode", "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode", "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode", "nokerningcode", "noligaturingcode", "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode", "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode", "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode", "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode" }, ["helpers"]={ "startsetups", "stopsetups", "startxmlsetups", "stopxmlsetups", "startluasetups", "stopluasetups", "starttexsetups", "stoptexsetups", "startrawsetups", "stoprawsetups", "startlocalsetups", "stoplocalsetups", "starttexdefinition", "stoptexdefinition", "starttexcode", "stoptexcode", "startcontextcode", "stopcontextcode", "startcontextdefinitioncode", "stopcontextdefinitioncode", "texdefinition", "doifelsesetups", "doifsetupselse", "doifsetups", "doifnotsetups", "setup", "setups", "texsetup", "xmlsetup", "luasetup", "directsetup", "fastsetup", "copysetups", "resetsetups", "doifelsecommandhandler", "doifcommandhandlerelse", "doifnotcommandhandler", "doifcommandhandler", "newmode", "setmode", "resetmode", "newsystemmode", "setsystemmode", "resetsystemmode", "pushsystemmode", "popsystemmode", "globalsetmode", "globalresetmode", "globalsetsystemmode", "globalresetsystemmode", "booleanmodevalue", "newcount", "newdimen", "newskip", "newmuskip", "newbox", "newtoks", "newread", "newwrite", "newmarks", "newinsert", "newattribute", "newif", "newlanguage", "newfamily", "newfam", "newhelp", "newinteger", "newdimension", "newgluespec", "newmugluespec", "aliasinteger", "aliasdimension", "then", "begcsname", "autorule", "strippedcsname", "checkedstrippedcsname", "nofarguments", "firstargumentfalse", "firstargumenttrue", "secondargumentfalse", "secondargumenttrue", "thirdargumentfalse", "thirdargumenttrue", "fourthargumentfalse", "fourthargumenttrue", "fifthargumentfalse", "fifthargumenttrue", "sixthargumentfalse", "sixthargumenttrue", "seventhargumentfalse", "seventhargumenttrue", "vkern", "hkern", "vpenalty", "hpenalty", "doglobal", "dodoglobal", "redoglobal", "resetglobal", "donothing", "untraceddonothing", "dontcomplain", "moreboxtracing", "lessboxtracing", "noboxtracing", "forgetall", "donetrue", "donefalse", "foundtrue", "foundfalse", "inlineordisplaymath", "indisplaymath", "forcedisplaymath", "startforceddisplaymath", "stopforceddisplaymath", "startpickupmath", "stoppickupmath", "reqno", "forceinlinemath", "mathortext", "thebox", "htdp", "unvoidbox", "hfilll", "vfilll", "mathbox", "mathlimop", "mathnolop", "mathnothing", "mathalpha", "currentcatcodetable", "defaultcatcodetable", "catcodetablename", "newcatcodetable", "startcatcodetable", "stopcatcodetable", "startextendcatcodetable", "stopextendcatcodetable", "pushcatcodetable", "popcatcodetable", "restorecatcodes", "setcatcodetable", "letcatcodecommand", "defcatcodecommand", "uedcatcodecommand", "hglue", "vglue", "hfillneg", "vfillneg", "hfilllneg", "vfilllneg", "hsplit", "ruledhss", "ruledhfil", "ruledhfill", "ruledhfilll", "ruledhfilneg", "ruledhfillneg", "normalhfillneg", "normalhfilllneg", "ruledvss", "ruledvfil", "ruledvfill", "ruledvfilll", "ruledvfilneg", "ruledvfillneg", "normalvfillneg", "normalvfilllneg", "ruledhbox", "ruledvbox", "ruledvtop", "ruleddbox", "ruledvcenter", "ruledmbox", "ruledhpack", "ruledvpack", "ruledtpack", "ruleddpack", "ruledvsplit", "ruledtsplit", "ruleddsplit", "ruledhskip", "ruledvskip", "ruledkern", "ruledmskip", "ruledmkern", "ruledhglue", "ruledvglue", "normalhglue", "normalvglue", "ruledpenalty", "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk", "scratchstring", "scratchstringone", "scratchstringtwo", "tempstring", "scratchcounter", "globalscratchcounter", "privatescratchcounter", "scratchdimen", "globalscratchdimen", "privatescratchdimen", "scratchskip", "globalscratchskip", "privatescratchskip", "scratchmuskip", "globalscratchmuskip", "privatescratchmuskip", "scratchtoks", "globalscratchtoks", "privatescratchtoks", "scratchbox", "globalscratchbox", "privatescratchbox", "scratchmacro", "scratchmacroone", "scratchmacrotwo", "scratchconditiontrue", "scratchconditionfalse", "ifscratchcondition", "scratchconditiononetrue", "scratchconditiononefalse", "ifscratchconditionone", "scratchconditiontwotrue", "scratchconditiontwofalse", "ifscratchconditiontwo", "globalscratchcounterone", "globalscratchcountertwo", "globalscratchcounterthree", "groupedcommand", "groupedcommandcs", "triggergroupedcommand", "triggergroupedcommandcs", "simplegroupedcommand", "simplegroupedcommandcs", "pickupgroupedcommand", "pickupgroupedcommandcs", "mathgroupedcommandcs", "usedbaselineskip", "usedlineskip", "usedlineskiplimit", "availablehsize", "localhsize", "setlocalhsize", "distributedhsize", "hsizefraction", "next", "nexttoken", "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", "flushnextbox", "boxisempty", "boxtostring", "contentostring", "prerolltostring", "givenwidth", "givenheight", "givendepth", "scangivendimensions", "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchitalic", "scratchhsize", "scratchvsize", "scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset", "scratchxposition", "scratchyposition", "scratchtopoffset", "scratchbottomoffset", "scratchleftoffset", "scratchrightoffset", "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchcounterfour", "scratchcounterfive", "scratchcountersix", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", "scratchdimenfour", "scratchdimenfive", "scratchdimensix", "scratchskipone", "scratchskiptwo", "scratchskipthree", "scratchskipfour", "scratchskipfive", "scratchskipsix", "scratchmuskipone", "scratchmuskiptwo", "scratchmuskipthree", "scratchmuskipfour", "scratchmuskipfive", "scratchmuskipsix", "scratchtoksone", "scratchtokstwo", "scratchtoksthree", "scratchtoksfour", "scratchtoksfive", "scratchtokssix", "scratchboxone", "scratchboxtwo", "scratchboxthree", "scratchboxfour", "scratchboxfive", "scratchboxsix", "scratchnx", "scratchny", "scratchmx", "scratchmy", "scratchunicode", "scratchmin", "scratchmax", "scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip", "doif", "doifnot", "doifelse", "firstinset", "doifinset", "doifnotinset", "doifelseinset", "doifinsetelse", "doifelsenextchar", "doifnextcharelse", "doifelsenextcharcs", "doifnextcharcselse", "doifelsenextoptional", "doifnextoptionalelse", "doifelsenextoptionalcs", "doifnextoptionalcselse", "doifelsefastoptionalcheck", "doiffastoptionalcheckelse", "doifelsefastoptionalcheckcs", "doiffastoptionalcheckcselse", "doifelsenextbgroup", "doifnextbgroupelse", "doifelsenextbgroupcs", "doifnextbgroupcselse", "doifelsenextparenthesis", "doifnextparenthesiselse", "doifelseundefined", "doifundefinedelse", "doifelsedefined", "doifdefinedelse", "doifundefined", "doifdefined", "doifelsevalue", "doifvalue", "doifnotvalue", "doifnothing", "doifsomething", "doifelsenothing", "doifnothingelse", "doifelsesomething", "doifsomethingelse", "doifvaluenothing", "doifvaluesomething", "doifelsevaluenothing", "doifvaluenothingelse", "doifelsedimension", "doifdimensionelse", "doifelsenumber", "doifnumberelse", "doifnumber", "doifnotnumber", "doifelsecommon", "doifcommonelse", "doifcommon", "doifnotcommon", "doifinstring", "doifnotinstring", "doifelseinstring", "doifinstringelse", "doifelseassignment", "doifassignmentelse", "docheckassignment", "doifelseassignmentcs", "doifassignmentelsecs", "validassignment", "novalidassignment", "doiftext", "doifelsetext", "doiftextelse", "doifnottext", "quitcondition", "truecondition", "falsecondition", "tracingall", "tracingnone", "loggingall", "tracingcatcodes", "showluatokens", "aliasmacro", "removetoks", "appendtoks", "prependtoks", "appendtotoks", "prependtotoks", "to", "endgraf", "endpar", "reseteverypar", "finishpar", "empty", "null", "space", "quad", "enspace", "emspace", "charspace", "nbsp", "crlf", "obeyspaces", "obeylines", "obeytabs", "obeypages", "obeyedspace", "obeyedline", "obeyedtab", "obeyedpage", "normalspace", "naturalspace", "controlspace", "normalspaces", "ignoretabs", "ignorelines", "ignorepages", "ignoreeofs", "setcontrolspaces", "executeifdefined", "singleexpandafter", "doubleexpandafter", "tripleexpandafter", "dontleavehmode", "removelastspace", "removeunwantedspaces", "keepunwantedspaces", "removepunctuation", "ignoreparskip", "forcestrutdepth", "onlynonbreakablespace", "wait", "writestatus", "define", "defineexpandable", "redefine", "setmeasure", "setemeasure", "setgmeasure", "setxmeasure", "definemeasure", "freezemeasure", "measure", "measured", "directmeasure", "setquantity", "setequantity", "setgquantity", "setxquantity", "definequantity", "freezequantity", "quantity", "quantitied", "directquantity", "installcorenamespace", "getvalue", "getuvalue", "setvalue", "setevalue", "setgvalue", "setxvalue", "letvalue", "letgvalue", "resetvalue", "undefinevalue", "ignorevalue", "setuvalue", "setuevalue", "setugvalue", "setuxvalue", "globallet", "udef", "ugdef", "uedef", "uxdef", "checked", "unique", "getparameters", "geteparameters", "getgparameters", "getxparameters", "forgetparameters", "copyparameters", "getdummyparameters", "dummyparameter", "directdummyparameter", "setdummyparameter", "letdummyparameter", "setexpandeddummyparameter", "resetdummyparameter", "usedummystyleandcolor", "usedummystyleparameter", "usedummycolorparameter", "processcommalist", "processcommacommand", "quitcommalist", "quitprevcommalist", "processaction", "processallactions", "processfirstactioninset", "processallactionsinset", "unexpanded", "expanded", "startexpanded", "stopexpanded", "protect", "unprotect", "firstofoneargument", "firstoftwoarguments", "secondoftwoarguments", "firstofthreearguments", "secondofthreearguments", "thirdofthreearguments", "firstoffourarguments", "secondoffourarguments", "thirdoffourarguments", "fourthoffourarguments", "firstoffivearguments", "secondoffivearguments", "thirdoffivearguments", "fourthoffivearguments", "fifthoffivearguments", "firstofsixarguments", "secondofsixarguments", "thirdofsixarguments", "fourthofsixarguments", "fifthofsixarguments", "sixthofsixarguments", "firstofoneunexpanded", "firstoftwounexpanded", "secondoftwounexpanded", "firstofthreeunexpanded", "secondofthreeunexpanded", "thirdofthreeunexpanded", "gobbleoneargument", "gobbletwoarguments", "gobblethreearguments", "gobblefourarguments", "gobblefivearguments", "gobblesixarguments", "gobblesevenarguments", "gobbleeightarguments", "gobbleninearguments", "gobbletenarguments", "gobbleoneoptional", "gobbletwooptionals", "gobblethreeoptionals", "gobblefouroptionals", "gobblefiveoptionals", "dorecurse", "doloop", "exitloop", "dostepwiserecurse", "recurselevel", "recursedepth", "dofastloopcs", "fastloopindex", "fastloopfinal", "dowith", "doloopovermatch", "doloopovermatched", "doloopoverlist", "newconstant", "setnewconstant", "setconstant", "setconstantvalue", "newconditional", "settrue", "setfalse", "settruevalue", "setfalsevalue", "setconditional", "newmacro", "setnewmacro", "newfraction", "newsignal", "newboundary", "dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty", "dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument", "dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty", "permitspacesbetweengroups", "dontpermitspacesbetweengroups", "nopdfcompression", "maximumpdfcompression", "normalpdfcompression", "onlypdfobjectcompression", "nopdfobjectcompression", "modulonumber", "dividenumber", "getfirstcharacter", "doifelsefirstchar", "doiffirstcharelse", "mathclassvalue", "startnointerference", "stopnointerference", "twodigits", "threedigits", "leftorright", "offinterlineskip", "oninterlineskip", "nointerlineskip", "strut", "halfstrut", "quarterstrut", "depthstrut", "halflinestrut", "noheightstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "strutgap", "begstrut", "endstrut", "lineheight", "leftboundary", "rightboundary", "signalcharacter", "aligncontentleft", "aligncontentmiddle", "aligncontentright", "shiftbox", "vpackbox", "hpackbox", "vpackedbox", "hpackedbox", "normalreqno", "startimath", "stopimath", "normalstartimath", "normalstopimath", "startdmath", "stopdmath", "normalstartdmath", "normalstopdmath", "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "normalprimescript", "superscript", "subscript", "nosuperscript", "nosubscript", "primescript", "superprescript", "subprescript", "nosuperprescript", "nosubsprecript", "uncramped", "cramped", "mathstyletrigger", "triggermathstyle", "triggeredmathstyle", "mathstylefont", "mathsmallstylefont", "mathstyleface", "mathsmallstyleface", "mathstylecommand", "mathpalette", "mathstylehbox", "mathstylevbox", "mathstylevcenter", "mathstylevcenteredhbox", "mathstylevcenteredvbox", "mathtext", "setmathsmalltextbox", "setmathtextbox", "pushmathstyle", "popmathstyle", "triggerdisplaystyle", "triggertextstyle", "triggerscriptstyle", "triggerscriptscriptstyle", "triggeruncrampedstyle", "triggercrampedstyle", "triggersmallstyle", "triggeruncrampedsmallstyle", "triggercrampedsmallstyle", "triggerbigstyle", "triggeruncrampedbigstyle", "triggercrampedbigstyle", "luaexpr", "expelsedoif", "expdoif", "expdoifnot", "expdoifelsecommon", "expdoifcommonelse", "expdoifelseinset", "expdoifinsetelse", "ctxdirectlua", "ctxlatelua", "ctxsprint", "ctxwrite", "ctxcommand", "ctxdirectcommand", "ctxlatecommand", "ctxreport", "ctxlua", "luacode", "lateluacode", "directluacode", "registerctxluafile", "ctxloadluafile", "luaversion", "luamajorversion", "luaminorversion", "ctxluacode", "luaconditional", "luaexpanded", "ctxluamatch", "startluaparameterset", "stopluaparameterset", "luaparameterset", "definenamedlua", "obeylualines", "obeyluatokens", "startluacode", "stopluacode", "startlua", "stoplua", "startctxfunction", "stopctxfunction", "ctxfunction", "startctxfunctiondefinition", "stopctxfunctiondefinition", "installctxfunction", "installprotectedctxfunction", "installprotectedctxscanner", "installctxscanner", "resetctxscanner", "cldprocessfile", "cldloadfile", "cldloadviafile", "cldcontext", "cldcommand", "carryoverpar", "freezeparagraphproperties", "defrostparagraphproperties", "setparagraphfreezing", "forgetparagraphfreezing", "updateparagraphproperties", "updateparagraphpenalties", "updateparagraphdemerits", "updateparagraphshapes", "updateparagraphlines", "lastlinewidth", "assumelongusagecs", "righttolefthbox", "lefttorighthbox", "righttoleftvbox", "lefttorightvbox", "righttoleftvtop", "lefttorightvtop", "rtlhbox", "ltrhbox", "rtlvbox", "ltrvbox", "rtlvtop", "ltrvtop", "autodirhbox", "autodirvbox", "autodirvtop", "leftorrighthbox", "leftorrightvbox", "leftorrightvtop", "lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft", "synchronizelayoutdirection", "synchronizedisplaydirection", "synchronizeinlinedirection", "dirlre", "dirrle", "dirlro", "dirrlo", "rtltext", "ltrtext", "lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing", "compounddiscretionary", "Ucheckedstartdisplaymath", "Ucheckedstopdisplaymath", "break", "nobreak", "allowbreak", "goodbreak", "nospace", "nospacing", "dospacing", "naturalhbox", "naturalvbox", "naturalvtop", "naturalhpack", "naturalvpack", "naturaltpack", "reversehbox", "reversevbox", "reversevtop", "reversehpack", "reversevpack", "reversetpack", "hcontainer", "vcontainer", "tcontainer", "frule", "compoundhyphenpenalty", "start", "stop", "unsupportedcs", "openout", "closeout", "write", "openin", "closein", "read", "readline", "readfromterminal", "boxlines", "boxline", "setboxline", "copyboxline", "boxlinewd", "boxlineht", "boxlinedp", "boxlinenw", "boxlinenh", "boxlinend", "boxlinels", "boxliners", "boxlinelh", "boxlinerh", "boxlinelp", "boxlinerp", "boxlinein", "boxrangewd", "boxrangeht", "boxrangedp", "bitwiseset", "bitwiseand", "bitwiseor", "bitwisexor", "bitwisenot", "bitwisenil", "ifbitwiseand", "bitwise", "bitwiseshift", "bitwiseflip", "textdir", "linedir", "pardir", "boxdir", "prelistbox", "postlistbox", "prelistcopy", "postlistcopy", "setprelistbox", "setpostlistbox", "noligaturing", "nokerning", "noexpansion", "noprotrusion", "noleftkerning", "noleftligaturing", "norightkerning", "norightligaturing", "noitaliccorrection", "futureletnexttoken", "defbackslashbreak", "letbackslashbreak", "pushoverloadmode", "popoverloadmode", "pushrunstate", "poprunstate", "suggestedalias", "showboxhere", "discoptioncodestring", "flagcodestring", "frozenparcodestring", "glyphoptioncodestring", "groupcodestring", "hyphenationcodestring", "mathcontrolcodestring", "mathflattencodestring", "normalizecodestring", "parcontextcodestring", "newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox", "newlocalwrite", "newlocalread", "setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox", "ifexpression" }, } \ No newline at end of file diff --git a/context/data/scite/context/scite-context-data-context.properties b/context/data/scite/context/scite-context-data-context.properties index 8e2cfcf53..45479331b 100644 --- a/context/data/scite/context/scite-context-data-context.properties +++ b/context/data/scite/context/scite-context-data-context.properties @@ -53,72 +53,73 @@ fractionrulemathcontrolcode accentskewhalfmathcontrolcode accentskewapplymathcon applyordinaryitalickernmathcontrolcode applycharitalickernmathcontrolcode reboxcharitalickernmathcontrolcode applyboxeditalickernmathcontrolcode staircasekernmathcontrolcode \ applytextitalickernmathcontrolcode applyscriptitalickernmathcontrolcode checkspaceitalickernmathcontrolcode checktextitalickernmathcontrolcode analyzescriptnucleuscharmathcontrolcode \ analyzescriptnucleuslistmathcontrolcode analyzescriptnucleusboxmathcontrolcode accenttopskewwithoffsetmathcontrolcode ignorekerndimensionsmathcontrolcode ignoreflataccentsmathcontrolcode \ -extendaccentsmathcontrolcode noligaturingglyphoptioncode nokerningglyphoptioncode noexpansionglyphoptioncode noprotrusionglyphoptioncode \ -noleftkerningglyphoptioncode noleftligaturingglyphoptioncode norightkerningglyphoptioncode norightligaturingglyphoptioncode noitaliccorrectionglyphoptioncode \ -islargeoperatorglyphoptioncode hasitalicshapeglyphoptioncode normalparcontextcode vmodeparcontextcode vboxparcontextcode \ -vtopparcontextcode vcenterparcontextcode vadjustparcontextcode insertparcontextcode outputparcontextcode \ -alignparcontextcode noalignparcontextcode spanparcontextcode resetparcontextcode leftoriginlistanchorcode \ -leftheightlistanchorcode leftdepthlistanchorcode rightoriginlistanchorcode rightheightlistanchorcode rightdepthlistanchorcode \ -centeroriginlistanchorcode centerheightlistanchorcode centerdepthlistanchorcode halfwaytotallistanchorcode halfwayheightlistanchorcode \ -halfwaydepthlistanchorcode halfwayleftlistanchorcode halfwayrightlistanchorcode negatexlistsigncode negateylistsigncode \ -negatelistsigncode fontslantperpoint fontinterwordspace fontinterwordstretch fontinterwordshrink \ -fontexheight fontemwidth fontextraspace slantperpoint mathexheight \ -mathemwidth interwordspace interwordstretch interwordshrink exheight \ -emwidth extraspace mathaxisheight muquad startmode \ -stopmode startnotmode stopnotmode startmodeset stopmodeset \ -doifmode doifelsemode doifmodeelse doifnotmode startmodeset \ -stopmodeset startallmodes stopallmodes startnotallmodes stopnotallmodes \ -doifallmodes doifelseallmodes doifallmodeselse doifnotallmodes startenvironment \ -stopenvironment environment startcomponent stopcomponent component \ -startproduct stopproduct product startproject stopproject \ -project starttext stoptext startnotext stopnotext \ -startdocument stopdocument documentvariable unexpandeddocumentvariable setupdocument \ -presetdocument doifelsedocumentvariable doifdocumentvariableelse doifdocumentvariable doifnotdocumentvariable \ -startmodule stopmodule usemodule usetexmodule useluamodule \ -setupmodule currentmoduleparameter moduleparameter everystarttext everystoptext \ -startTEXpage stopTEXpage enablemode disablemode preventmode \ -definemode globalenablemode globaldisablemode globalpreventmode pushmode \ -popmode typescriptone typescripttwo typescriptthree mathsizesuffix \ -mathordinarycode mathordcode mathoperatorcode mathopcode mathbinarycode \ -mathbincode mathrelationcode mathrelcode mathopencode mathclosecode \ -mathpunctuationcode mathpunctcode mathovercode mathundercode mathinnercode \ -mathradicalcode mathfractioncode mathmiddlecode mathaccentcode mathfencedcode \ -mathghostcode mathvariablecode mathactivecode mathvcentercode mathconstructcode \ -mathwrappedcode mathbegincode mathendcode mathexplicitcode mathdivisioncode \ -mathfactorialcode mathdimensioncode mathexperimentalcode mathtextpunctuationcode mathimaginarycode \ -mathdifferentialcode mathexponentialcode mathellipsiscode mathfunctioncode mathdigitcode \ -mathalphacode mathboxcode mathchoicecode mathnothingcode mathlimopcode \ -mathnolopcode mathunsetcode mathunspacedcode mathallcode mathfakecode \ -mathunarycode mathmaybeordinarycode mathmayberelationcode mathmaybebinarycode mathnumbergroupcode \ -constantnumber constantnumberargument constantdimen constantdimenargument constantemptyargument \ -luastringsep !!bs !!es lefttorightmark righttoleftmark \ -lrm rlm bidilre bidirle bidipop \ -bidilro bidirlo breakablethinspace nobreakspace nonbreakablespace \ -narrownobreakspace zerowidthnobreakspace ideographicspace ideographichalffillspace twoperemspace \ -threeperemspace fourperemspace fiveperemspace sixperemspace figurespace \ -punctuationspace hairspace enquad emquad zerowidthspace \ -zerowidthnonjoiner zerowidthjoiner zwnj zwj optionalspace \ -asciispacechar softhyphen autoinsertedspace Ux eUx \ -parfillleftskip parfillrightskip startlmtxmode stoplmtxmode startmkivmode \ -stopmkivmode wildcardsymbol normalhyphenationcode automatichyphenationcode explicithyphenationcode \ -syllablehyphenationcode uppercasehyphenationcode collapsehyphenationcode compoundhyphenationcode strictstarthyphenationcode \ -strictendhyphenationcode automaticpenaltyhyphenationcode explicitpenaltyhyphenationcode permitgluehyphenationcode permitallhyphenationcode \ -permitmathreplacehyphenationcode forcecheckhyphenationcode lazyligatureshyphenationcode forcehandlerhyphenationcode feedbackcompoundhyphenationcode \ -ignoreboundshyphenationcode partialhyphenationcode completehyphenationcode normalizelinenormalizecode parindentskipnormalizecode \ -swaphangindentnormalizecode swapparsshapenormalizecode breakafterdirnormalizecode removemarginkernsnormalizecode clipwidthnormalizecode \ -flattendiscretionariesnormalizecode discardzerotabskipsnormalizecode flattenhleadersnormalizecode normalizeparnormalizeparcode flattenvleadersnormalizeparcode \ -nopreslackclassoptioncode nopostslackclassoptioncode lefttopkernclassoptioncode righttopkernclassoptioncode leftbottomkernclassoptioncode \ -rightbottomkernclassoptioncode lookaheadforendclassoptioncode noitaliccorrectionclassoptioncode defaultmathclassoptions checkligatureclassoptioncode \ -checkitaliccorrectionclassoptioncode checkkernpairclassoptioncode flattenclassoptioncode omitpenaltyclassoptioncode unpackclassoptioncode \ -raiseprimeclassoptioncode carryoverlefttopkernclassoptioncode carryoverleftbottomkernclassoptioncode carryoverrighttopkernclassoptioncode carryoverrightbottomkernclassoptioncode \ -preferdelimiterdimensionsclassoptioncode autoinjectclassoptioncode removeitaliccorrectionclassoptioncode operatoritaliccorrectionclassoptioncode noligaturingglyphoptioncode \ -nokerningglyphoptioncode noleftligatureglyphoptioncode noleftkernglyphoptioncode norightligatureglyphoptioncode norightkernglyphoptioncode \ -noexpansionglyphoptioncode noprotrusionglyphoptioncode noitaliccorrectionglyphoptioncode nokerningcode noligaturingcode \ -frozenflagcode tolerantflagcode protectedflagcode primitiveflagcode permanentflagcode \ -noalignedflagcode immutableflagcode mutableflagcode globalflagcode overloadedflagcode \ -immediateflagcode conditionalflagcode valueflagcode instanceflagcode ordmathflattencode \ -binmathflattencode relmathflattencode punctmathflattencode innermathflattencode normalworddiscoptioncode \ -preworddiscoptioncode postworddiscoptioncode continueifinputfile continuewhenlmtxmode continuewhenmkivmode +extendaccentsmathcontrolcode extenddelimitersmathcontrolcode noligaturingglyphoptioncode nokerningglyphoptioncode noexpansionglyphoptioncode \ +noprotrusionglyphoptioncode noleftkerningglyphoptioncode noleftligaturingglyphoptioncode norightkerningglyphoptioncode norightligaturingglyphoptioncode \ +noitaliccorrectionglyphoptioncode islargeoperatorglyphoptioncode hasitalicshapeglyphoptioncode normalparcontextcode vmodeparcontextcode \ +vboxparcontextcode vtopparcontextcode vcenterparcontextcode vadjustparcontextcode insertparcontextcode \ +outputparcontextcode alignparcontextcode noalignparcontextcode spanparcontextcode resetparcontextcode \ +leftoriginlistanchorcode leftheightlistanchorcode leftdepthlistanchorcode rightoriginlistanchorcode rightheightlistanchorcode \ +rightdepthlistanchorcode centeroriginlistanchorcode centerheightlistanchorcode centerdepthlistanchorcode halfwaytotallistanchorcode \ +halfwayheightlistanchorcode halfwaydepthlistanchorcode halfwayleftlistanchorcode halfwayrightlistanchorcode negatexlistsigncode \ +negateylistsigncode negatelistsigncode fontslantperpoint fontinterwordspace fontinterwordstretch \ +fontinterwordshrink fontexheight fontemwidth fontextraspace slantperpoint \ +mathexheight mathemwidth interwordspace interwordstretch interwordshrink \ +exheight emwidth extraspace mathaxisheight muquad \ +startmode stopmode startnotmode stopnotmode startmodeset \ +stopmodeset doifmode doifelsemode doifmodeelse doifnotmode \ +startmodeset stopmodeset startallmodes stopallmodes startnotallmodes \ +stopnotallmodes doifallmodes doifelseallmodes doifallmodeselse doifnotallmodes \ +startenvironment stopenvironment environment startcomponent stopcomponent \ +component startproduct stopproduct product startproject \ +stopproject project starttext stoptext startnotext \ +stopnotext startdocument stopdocument documentvariable unexpandeddocumentvariable \ +setupdocument presetdocument doifelsedocumentvariable doifdocumentvariableelse doifdocumentvariable \ +doifnotdocumentvariable startmodule stopmodule usemodule usetexmodule \ +useluamodule setupmodule currentmoduleparameter moduleparameter everystarttext \ +everystoptext startTEXpage stopTEXpage enablemode disablemode \ +preventmode definemode globalenablemode globaldisablemode globalpreventmode \ +pushmode popmode typescriptone typescripttwo typescriptthree \ +mathsizesuffix mathordinarycode mathordcode mathoperatorcode mathopcode \ +mathbinarycode mathbincode mathrelationcode mathrelcode mathopencode \ +mathclosecode mathpunctuationcode mathpunctcode mathovercode mathundercode \ +mathinnercode mathradicalcode mathfractioncode mathmiddlecode mathaccentcode \ +mathfencedcode mathghostcode mathvariablecode mathactivecode mathvcentercode \ +mathconstructcode mathwrappedcode mathbegincode mathendcode mathexplicitcode \ +mathdivisioncode mathfactorialcode mathdimensioncode mathexperimentalcode mathtextpunctuationcode \ +mathimaginarycode mathdifferentialcode mathexponentialcode mathellipsiscode mathfunctioncode \ +mathdigitcode mathalphacode mathboxcode mathchoicecode mathnothingcode \ +mathlimopcode mathnolopcode mathunsetcode mathunspacedcode mathallcode \ +mathfakecode mathunarycode mathmaybeordinarycode mathmayberelationcode mathmaybebinarycode \ +mathnumbergroupcode constantnumber constantnumberargument constantdimen constantdimenargument \ +constantemptyargument luastringsep !!bs !!es lefttorightmark \ +righttoleftmark lrm rlm bidilre bidirle \ +bidipop bidilro bidirlo breakablethinspace nobreakspace \ +nonbreakablespace narrownobreakspace zerowidthnobreakspace ideographicspace ideographichalffillspace \ +twoperemspace threeperemspace fourperemspace fiveperemspace sixperemspace \ +figurespace punctuationspace hairspace enquad emquad \ +zerowidthspace zerowidthnonjoiner zerowidthjoiner zwnj zwj \ +optionalspace asciispacechar softhyphen autoinsertedspace Ux \ +eUx parfillleftskip parfillrightskip startlmtxmode stoplmtxmode \ +startmkivmode stopmkivmode wildcardsymbol normalhyphenationcode automatichyphenationcode \ +explicithyphenationcode syllablehyphenationcode uppercasehyphenationcode collapsehyphenationcode compoundhyphenationcode \ +strictstarthyphenationcode strictendhyphenationcode automaticpenaltyhyphenationcode explicitpenaltyhyphenationcode permitgluehyphenationcode \ +permitallhyphenationcode permitmathreplacehyphenationcode forcecheckhyphenationcode lazyligatureshyphenationcode forcehandlerhyphenationcode \ +feedbackcompoundhyphenationcode ignoreboundshyphenationcode partialhyphenationcode completehyphenationcode normalizelinenormalizecode \ +parindentskipnormalizecode swaphangindentnormalizecode swapparsshapenormalizecode breakafterdirnormalizecode removemarginkernsnormalizecode \ +clipwidthnormalizecode flattendiscretionariesnormalizecode discardzerotabskipsnormalizecode flattenhleadersnormalizecode normalizeparnormalizeparcode \ +flattenvleadersnormalizeparcode nopreslackclassoptioncode nopostslackclassoptioncode lefttopkernclassoptioncode righttopkernclassoptioncode \ +leftbottomkernclassoptioncode rightbottomkernclassoptioncode lookaheadforendclassoptioncode noitaliccorrectionclassoptioncode defaultmathclassoptions \ +checkligatureclassoptioncode checkitaliccorrectionclassoptioncode checkkernpairclassoptioncode flattenclassoptioncode omitpenaltyclassoptioncode \ +unpackclassoptioncode raiseprimeclassoptioncode carryoverlefttopkernclassoptioncode carryoverleftbottomkernclassoptioncode carryoverrighttopkernclassoptioncode \ +carryoverrightbottomkernclassoptioncode preferdelimiterdimensionsclassoptioncode autoinjectclassoptioncode removeitaliccorrectionclassoptioncode operatoritaliccorrectionclassoptioncode \ +noligaturingglyphoptioncode nokerningglyphoptioncode noleftligatureglyphoptioncode noleftkernglyphoptioncode norightligatureglyphoptioncode \ +norightkernglyphoptioncode noexpansionglyphoptioncode noprotrusionglyphoptioncode noitaliccorrectionglyphoptioncode nokerningcode \ +noligaturingcode frozenflagcode tolerantflagcode protectedflagcode primitiveflagcode \ +permanentflagcode noalignedflagcode immutableflagcode mutableflagcode globalflagcode \ +overloadedflagcode immediateflagcode conditionalflagcode valueflagcode instanceflagcode \ +ordmathflattencode binmathflattencode relmathflattencode punctmathflattencode innermathflattencode \ +normalworddiscoptioncode preworddiscoptioncode postworddiscoptioncode continueifinputfile continuewhenlmtxmode \ +continuewhenmkivmode keywordclass.context.helpers=\ startsetups stopsetups startxmlsetups stopxmlsetups \ diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex index d4fc437e6..3bd23ff27 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex @@ -600,6 +600,7 @@ primitives (for as far their functionality is still around) you now can do this: \starttyping \protected\def\pdfliteral {\pdfextension literal} +\protected\def\pdflateliteral {\pdfextension lateliteral} \protected\def\pdfcolorstack {\pdfextension colorstack} \protected\def\pdfsetmatrix {\pdfextension setmatrix} \protected\def\pdfsave {\pdfextension save\relax} @@ -747,11 +748,12 @@ normally generated by the engine. You even need to include the brackets here! Although we started from a merge of \PDFTEX\ and \ALEPH, by now the code base as well as functionality has diverted from those parents. Here we show the options -that can be passed to the extensions. +that can be passed to the extensions. The \type {shipout} option is a compatibility +feature. Instead one can use the \type {deferred} prefix. \starttexsyntax \pdfextension literal - [ direct | page | raw ] { tokens } + [shipout] [ direct | page | raw ] { tokens } \stoptexsyntax \starttexsyntax diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex index 5f8c2582c..1883a0c46 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex @@ -914,7 +914,7 @@ output file. \startsection[title={\PDF\ backend whatsits}] -\subsection{\whs {pdf_literal}} +\subsection{\whs {pdf_literal} and \whs {pdf_late_literal}} \starttabulate[|l|l|p|] \DB field \BC type \BC explanation \NC \NR @@ -1250,7 +1250,7 @@ This converts a single type name to its internal numeric representation. \libindex {type} \libindex {subtype} -In the argument is a number, then the \type {type} function converts an internal +If the argument is a number, then the next function converts an internal numeric representation to an external string representation. Otherwise, it will return the string \type {node} if the object represents a node, and \type {nil} otherwise. diff --git a/source/luametatex/source/lua/lmtinterface.c b/source/luametatex/source/lua/lmtinterface.c index 9156f0aaf..2c94feb6f 100644 --- a/source/luametatex/source/lua/lmtinterface.c +++ b/source/luametatex/source/lua/lmtinterface.c @@ -435,6 +435,7 @@ void lmt_initialize_interface(void) set_math_parameter_value(math_parameter_delimiter_percent, math_int_parameter, delimiterpercent); set_math_parameter_value(math_parameter_delimiter_shortfall, math_dimen_parameter, delimitershortfall); + set_math_parameter_value(math_parameter_delimiter_extend_margin, math_dimen_parameter, delimiterextendmargin); set_math_parameter_value(math_parameter_over_line_variant, math_style_parameter, overlinevariant); set_math_parameter_value(math_parameter_under_line_variant, math_style_parameter, underlinevariant); @@ -548,4 +549,5 @@ void lmt_initialize_interface(void) set_math_font_parameter(FlattenedAccentBottomShiftDown, math_dimen_parameter); set_math_font_parameter(DelimiterPercent, math_int_parameter); set_math_font_parameter(DelimiterShortfall, math_dimen_parameter); + set_math_font_parameter(DelimiterExtendMargin, math_dimen_parameter); } diff --git a/source/luametatex/source/lua/lmtinterface.h b/source/luametatex/source/lua/lmtinterface.h index 59ef808c8..26481d075 100644 --- a/source/luametatex/source/lua/lmtinterface.h +++ b/source/luametatex/source/lua/lmtinterface.h @@ -560,6 +560,7 @@ make_lua_key(L, data);\ make_lua_key(L, deep_frozen_cs_dont_expand);\ make_lua_key(L, deep_frozen_cs_end_template);\ make_lua_key(L, def);\ +make_lua_key(L, deferred);\ make_lua_key(L, define_char_code);\ make_lua_key(L, define_family);\ make_lua_key(L, define_font);\ @@ -572,6 +573,8 @@ make_lua_key(L, delimiter);\ make_lua_key(L, delimiter_number);\ make_lua_key(L, delimiterover);\ make_lua_key(L, delimiterovervariant);\ +make_lua_key(L, DelimiterExtendMargin);\ +make_lua_key(L, delimiterextendmargin);\ make_lua_key(L, DelimiterPercent);\ make_lua_key(L, delimiterpercent);\ make_lua_key(L, DelimiterShortfall);\ @@ -749,6 +752,7 @@ make_lua_key(L, indentskip);\ make_lua_key(L, index);\ make_lua_key(L, info);\ make_lua_key(L, Info);\ +make_lua_key(L, inherited);\ make_lua_key(L, inner);\ make_lua_key(L, innerlocation);\ make_lua_key(L, innerxoffset);\ @@ -1126,6 +1130,7 @@ make_lua_key(L, ScriptScriptPercentScaleDown);\ make_lua_key(L, scriptscriptscale);\ make_lua_key(L, second);\ make_lua_key(L, semisimple);\ +make_lua_key(L, semiprotected);\ make_lua_key(L, set);\ make_lua_key(L, set_auxiliary);\ make_lua_key(L, set_box);\ diff --git a/source/luametatex/source/lua/lmtnodelib.c b/source/luametatex/source/lua/lmtnodelib.c index 72b9918e4..997115267 100644 --- a/source/luametatex/source/lua/lmtnodelib.c +++ b/source/luametatex/source/lua/lmtnodelib.c @@ -6763,6 +6763,10 @@ static int nodelib_common_getfield(lua_State *L, int direct, halfword n) nodelib_push_direct_or_node(L, direct, radical_left_delimiter(n)); } else if (lua_key_eq(s, right)) { nodelib_push_direct_or_node(L, direct, radical_right_delimiter(n)); + } else if (lua_key_eq(s, top)) { + nodelib_push_direct_or_node(L, direct, radical_top_delimiter(n)); + } else if (lua_key_eq(s, bottom)) { + nodelib_push_direct_or_node(L, direct, radical_bottom_delimiter(n)); } else if (lua_key_eq(s, degree)) { nodelib_push_direct_or_node(L, direct, radical_degree(n)); } else if (lua_key_eq(s, width)) { @@ -7436,6 +7440,10 @@ static int nodelib_common_setfield(lua_State *L, int direct, halfword n) radical_left_delimiter(n) = nodelib_direct_or_node_from_index(L, direct, 3); } else if (lua_key_eq(s, right)) { radical_right_delimiter(n) = nodelib_direct_or_node_from_index(L, direct, 3); + } else if (lua_key_eq(s, top)) { + radical_top_delimiter(n) = nodelib_direct_or_node_from_index(L, direct, 3); + } else if (lua_key_eq(s, bottom)) { + radical_bottom_delimiter(n) = nodelib_direct_or_node_from_index(L, direct, 3); } else if (lua_key_eq(s, degree)) { radical_degree(n) = nodelib_direct_or_node_from_index(L, direct, 3); } else if (lua_key_eq(s, width)) { diff --git a/source/luametatex/source/lua/lmttexlib.c b/source/luametatex/source/lua/lmttexlib.c index 0afd6cdf6..38c8e3fa8 100644 --- a/source/luametatex/source/lua/lmttexlib.c +++ b/source/luametatex/source/lua/lmttexlib.c @@ -4928,23 +4928,28 @@ static int texlib_getautomigrationvalues(lua_State *L) static int texlib_getflagvalues(lua_State *L) { - lua_createtable(L, 2, 15); - lua_push_key_at_index(L, frozen, frozen_flag_bit); - lua_push_key_at_index(L, permanent, permanent_flag_bit); - lua_push_key_at_index(L, immutable, immutable_flag_bit); - lua_push_key_at_index(L, primitive, primitive_flag_bit); - lua_push_key_at_index(L, mutable, mutable_flag_bit); - lua_push_key_at_index(L, noaligned, noaligned_flag_bit); - lua_push_key_at_index(L, instance, instance_flag_bit); - lua_push_key_at_index(L, untraced, untraced_flag_bit); - lua_push_key_at_index(L, global, global_flag_bit); - lua_push_key_at_index(L, tolerant, tolerant_flag_bit); - lua_push_key_at_index(L, protected, protected_flag_bit); - lua_push_key_at_index(L, overloaded, overloaded_flag_bit); - lua_push_key_at_index(L, aliased, aliased_flag_bit); - lua_push_key_at_index(L, immediate, immediate_flag_bit); - lua_push_key_at_index(L, conditional, conditional_flag_bit); - lua_push_key_at_index(L, value, value_flag_bit); + lua_createtable(L, 2, 18); + /* what about the rest */ + lua_push_key_at_index(L, frozen, frozen_flag_bit); + lua_push_key_at_index(L, permanent, permanent_flag_bit); + lua_push_key_at_index(L, immutable, immutable_flag_bit); + lua_push_key_at_index(L, primitive, primitive_flag_bit); + lua_push_key_at_index(L, mutable, mutable_flag_bit); + lua_push_key_at_index(L, noaligned, noaligned_flag_bit); + lua_push_key_at_index(L, instance, instance_flag_bit); + lua_push_key_at_index(L, untraced, untraced_flag_bit); + lua_push_key_at_index(L, global, global_flag_bit); + lua_push_key_at_index(L, tolerant, tolerant_flag_bit); + lua_push_key_at_index(L, protected, protected_flag_bit); + lua_push_key_at_index(L, overloaded, overloaded_flag_bit); + lua_push_key_at_index(L, aliased, aliased_flag_bit); + lua_push_key_at_index(L, immediate, immediate_flag_bit); + lua_push_key_at_index(L, conditional, conditional_flag_bit); + lua_push_key_at_index(L, value, value_flag_bit); + lua_push_key_at_index(L, semiprotected, semiprotected_flag_bit); + lua_push_key_at_index(L, inherited, inherited_flag_bit); + lua_push_key_at_index(L, constant, constant_flag_bit); + lua_push_key_at_index(L, deferred, deferred_flag_bit); return 1; } @@ -5240,7 +5245,7 @@ static int texlib_getdiscstatevalues(lua_State *L) static int texlib_getmathcontrolvalues(lua_State *L) { - lua_createtable(L, 2, 23); + lua_createtable(L, 2, 24); lua_set_string_by_index(L, math_control_use_font_control, "usefontcontrol"); lua_set_string_by_index(L, math_control_over_rule, "overrule"); lua_set_string_by_index(L, math_control_under_rule, "underrule"); @@ -5266,6 +5271,7 @@ static int texlib_getmathcontrolvalues(lua_State *L) lua_set_string_by_index(L, math_control_ignore_kern_dimensions, "ignorekerndimensions"); lua_set_string_by_index(L, math_control_ignore_flat_accents, "ignoreflataccents"); lua_set_string_by_index(L, math_control_extend_accents, "extendaccents"); + lua_set_string_by_index(L, math_control_extend_delimiters, "extenddelimiters"); return 1; } diff --git a/source/luametatex/source/luametatex.h b/source/luametatex/source/luametatex.h index 19175a487..410d4dd68 100644 --- a/source/luametatex/source/luametatex.h +++ b/source/luametatex/source/luametatex.h @@ -92,7 +92,7 @@ # define luametatex_version 210 # define luametatex_revision 06 # define luametatex_version_string "2.10.06" -# define luametatex_development_id 20230209 +# define luametatex_development_id 20230224 # define luametatex_name_camelcase "LuaMetaTeX" # define luametatex_name_lowercase "luametatex" diff --git a/source/luametatex/source/tex/texcommands.c b/source/luametatex/source/tex/texcommands.c index e52825b33..76b171789 100644 --- a/source/luametatex/source/tex/texcommands.c +++ b/source/luametatex/source/tex/texcommands.c @@ -990,6 +990,7 @@ void tex_initialize_commands(void) tex_primitive(luatex_command, "overloaded", prefix_cmd, overloaded_code, 0); tex_primitive(luatex_command, "aliased", prefix_cmd, aliased_code, 0); tex_primitive(luatex_command, "immediate", prefix_cmd, immediate_code, 0); + tex_primitive(luatex_command, "deferred", prefix_cmd, deferred_code, 0); tex_primitive(luatex_command, "semiprotected", prefix_cmd, semiprotected_code, 0); tex_primitive(luatex_command, "enforced", prefix_cmd, enforced_code, 0); tex_primitive(luatex_command, "inherited", prefix_cmd, inherited_code, 0); @@ -1216,6 +1217,7 @@ void tex_initialize_commands(void) /* */ tex_primitive(luatex_command, "Umathdelimiterpercent", set_math_parameter_cmd, math_parameter_delimiter_percent, 0); tex_primitive(luatex_command, "Umathdelimitershortfall", set_math_parameter_cmd, math_parameter_delimiter_shortfall, 0); + tex_primitive(luatex_command, "Umathdelimiterextendmargin", set_math_parameter_cmd, math_parameter_delimiter_extend_margin, 0); /* */ tex_primitive(luatex_command, "Umathoverlinevariant", set_math_parameter_cmd, math_parameter_over_line_variant, 0); tex_primitive(luatex_command, "Umathunderlinevariant", set_math_parameter_cmd, math_parameter_under_line_variant, 0); diff --git a/source/luametatex/source/tex/texcommands.h b/source/luametatex/source/tex/texcommands.h index 57dc30f4f..faeb38247 100644 --- a/source/luametatex/source/tex/texcommands.h +++ b/source/luametatex/source/tex/texcommands.h @@ -831,6 +831,7 @@ typedef enum prefix_codes { overloaded_code, aliased_code, immediate_code, + deferred_code, /* conditional_code */ /* value_code */ semiprotected_code, diff --git a/source/luametatex/source/tex/texdumpdata.h b/source/luametatex/source/tex/texdumpdata.h index 87d987421..847bfa46f 100644 --- a/source/luametatex/source/tex/texdumpdata.h +++ b/source/luametatex/source/tex/texdumpdata.h @@ -55,7 +55,7 @@ */ -# define luametatex_format_fingerprint 684 +# define luametatex_format_fingerprint 686 /* These end up in the string pool. */ diff --git a/source/luametatex/source/tex/texequivalents.h b/source/luametatex/source/tex/texequivalents.h index d64c78807..cc7f74ffc 100644 --- a/source/luametatex/source/tex/texequivalents.h +++ b/source/luametatex/source/tex/texequivalents.h @@ -1163,6 +1163,7 @@ typedef enum flag_bit { semiprotected_flag_bit = 0x10000, inherited_flag_bit = 0x20000, constant_flag_bit = 0x40000, + deferred_flag_bit = 0x80000, /* this might move up */ } flag_bits; /*tex Flags: */ @@ -1185,6 +1186,7 @@ typedef enum flag_bit { # define add_overloaded_flag(a) ((a) | overloaded_flag_bit) # define add_aliased_flag(a) ((a) | aliased_flag_bit) # define add_immediate_flag(a) ((a) | immediate_flag_bit) +# define add_deferred_flag(a) ((a) | deferred_flag_bit) # define add_conditional_flag(a) ((a) | conditional_flag_bit) # define add_value_flag(a) ((a) | value_flag_bit) # define add_inherited_flag(a) ((a) | inherited_flag_bit) @@ -1207,32 +1209,10 @@ typedef enum flag_bit { # define remove_overloaded_flag(a) ((a) & ~overloaded_flag_bit) # define remove_aliased_flag(a) ((a) & ~aliased_flag_bit) # define remove_immediate_flag(a) ((a) & ~immediate_flag_bit) +# define remove_deferred_flag(a) ((a) & ~deferred_flag_bit) # define remove_conditional_flag(a) ((a) & ~conditional_flag_bit) # define remove_value_flag(a) ((a) & ~value_flag_bit) -// do we really need the == here - -// # define is_frozen(a) (((a) & frozen_flag_bit) == frozen_flag_bit) -// # define is_permanent(a) (((a) & permanent_flag_bit) == permanent_flag_bit) -// # define is_immutable(a) (((a) & immutable_flag_bit) == immutable_flag_bit) -// # define is_primitive(a) (((a) & primitive_flag_bit) == primitive_flag_bit) -// # define is_mutable(a) (((a) & mutable_flag_bit) == mutable_flag_bit) -// # define is_noaligned(a) (((a) & noaligned_flag_bit) == noaligned_flag_bit) -// # define is_instance(a) (((a) & instance_flag_bit) == instance_flag_bit) -// # define is_untraced(a) (((a) & untraced_flag_bit) == untraced_flag_bit) -// -// # define is_global(a) (((a) & global_flag_bit) == global_flag_bit) -// # define is_tolerant(a) (((a) & tolerant_flag_bit) == tolerant_flag_bit) -// # define is_protected(a) (((a) & protected_flag_bit) == protected_flag_bit) -// # define is_semiprotected(a) (((a) & semiprotected_flag_bit) == semiprotected_flag_bit) -// # define is_overloaded(a) (((a) & overloaded_flag_bit) == overloaded_flag_bit) -// # define is_aliased(a) (((a) & aliased_flag_bit) == aliased_flag_bit) -// # define is_immediate(a) (((a) & immediate_flag_bit) == immediate_flag_bit) -// # define is_conditional(a) (((a) & conditional_flag_bit) == conditional_flag_bit) -// # define is_value(a) (((a) & value_flag_bit) == value_flag_bit) -// # define is_inherited(a) (((a) & inherited_flag_bit) == inherited_flag_bit) -// # define is_constant(a) (((a) & constant_flag_bit) == constant_flag_bit) - # define is_frozen(a) (((a) & frozen_flag_bit)) # define is_permanent(a) (((a) & permanent_flag_bit)) # define is_immutable(a) (((a) & immutable_flag_bit)) @@ -1249,12 +1229,12 @@ typedef enum flag_bit { # define is_overloaded(a) (((a) & overloaded_flag_bit)) # define is_aliased(a) (((a) & aliased_flag_bit)) # define is_immediate(a) (((a) & immediate_flag_bit)) +# define is_deferred(a) (((a) & deferred_flag_bit)) # define is_conditional(a) (((a) & conditional_flag_bit)) # define is_value(a) (((a) & value_flag_bit)) # define is_inherited(a) (((a) & inherited_flag_bit)) # define is_constant(a) (((a) & constant_flag_bit)) - # define is_expandable(cmd) (cmd > max_command_cmd) # define global_or_local(a) (is_global(a) ? level_one : cur_level) diff --git a/source/luametatex/source/tex/texmath.c b/source/luametatex/source/tex/texmath.c index 0820b2405..1b62a389c 100644 --- a/source/luametatex/source/tex/texmath.c +++ b/source/luametatex/source/tex/texmath.c @@ -1037,7 +1037,7 @@ static void tex_aux_display_simple_noad(halfword n, int threshold, int max) tex_aux_display_common_noad(n, threshold, max); } -static void tex_aux_display_radical_noad(halfword n, int threshold, int max) +static void tex_aux_display_radical_noad(halfword n, int threshold, int max) /* todo: more fields */ { if (noad_width(n)) { tex_print_format(", width %D", noad_width(n), pt_unit); @@ -1071,7 +1071,7 @@ static void tex_aux_display_radical_noad(halfword n, int threshold, int max) tex_aux_display_common_noad(n, threshold, max); } -static void tex_aux_display_accent_noad(halfword n, int threshold, int max) +static void tex_aux_display_accent_noad(halfword n, int threshold, int max) /* todo: more fields */ { halfword top_char = accent_top_character(n); halfword bottom_char = accent_bottom_character(n); @@ -1129,7 +1129,7 @@ static void tex_aux_display_accent_noad(halfword n, int threshold, int max) tex_aux_display_common_noad(n, threshold, max); } -static void tex_aux_display_fence_noad(halfword n, int threshold, int max) +static void tex_aux_display_fence_noad(halfword n, int threshold, int max) /* todo: more fields */ { if (noad_height(n)) { tex_print_format(", height %D", noad_height(n), pt_unit); @@ -1163,7 +1163,7 @@ static void tex_aux_display_fence_noad(halfword n, int threshold, int max) tex_print_node_list(fence_delimiter_bottom(n), "bottom", threshold, max); } -static void tex_aux_display_fraction_noad(halfword n, int threshold, int max) +static void tex_aux_display_fraction_noad(halfword n, int threshold, int max) /* todo: more fields */ { halfword leftdelimiter = tex_aux_valid_delimiter(fraction_left_delimiter(n)); halfword rightdelimiter = tex_aux_valid_delimiter(fraction_right_delimiter(n)); @@ -2660,9 +2660,11 @@ void tex_run_math_radical(void) halfword variant = 0; /* quad, harmless */ halfword attrlist = null; tex_tail_append(radical); + halfword top = null; + halfword bottom = null; /* only kewords to UI ones? */ while (1) { - switch (tex_scan_character("abeswlmrhndABESWLMRHDN", 0, 1, 0)) { + switch (tex_scan_character("abeswlmrhndtABESWLMRHDNT", 0, 1, 0)) { case 0: goto DONE; case 'a': case 'A': @@ -2675,6 +2677,16 @@ void tex_run_math_radical(void) options = options | noad_option_exact; } break; + case 'b': case 'B': + if (tex_scan_mandate_keyword("bottom", 1)) { + bottom = 1; + } + break; + case 't': case 'T': + if (tex_scan_mandate_keyword("top", 1)) { + top = 1; + } + break; case 's': case 'S': switch (tex_scan_character("itoITO", 0, 0, 0)) { case 't': case 'T': @@ -2824,6 +2836,16 @@ void tex_run_math_radical(void) tex_confusion("scan math radical"); break; } + if (top) { + top = tex_new_node(delimiter_node, 0); + radical_top_delimiter(radical) = top; + tex_aux_scan_delimiter(top, umath_mathcode, unset_noad_class); + } + if (bottom) { + bottom = tex_new_node(delimiter_node, 0); + radical_bottom_delimiter(radical) = bottom; + tex_aux_scan_delimiter(bottom, umath_mathcode, unset_noad_class); + } } switch (code) { case h_extensible_radical_subtype: @@ -5199,6 +5221,7 @@ void tex_fixup_math_parameters(int fam, int size, int f, int level) tex_aux_define_all_math_parameters(size, math_parameter_flattened_accent_bottom_shift_down, math_parameter(f, FlattenedAccentBottomShiftDown), level); /* engine, undefined */ tex_aux_define_all_math_parameters(size, math_parameter_delimiter_percent, math_parameter(f, DelimiterPercent), level); /* engine, undefined */ tex_aux_define_all_math_parameters(size, math_parameter_delimiter_shortfall, math_parameter(f, DelimiterShortfall), level); /* engine, undefined */ + tex_aux_define_all_math_parameters(size, math_parameter_delimiter_extend_margin, math_parameter(f, DelimiterExtendMargin), level); /* engine, undefined */ tex_aux_define_all_math_parameters(size, math_parameter_radical_extensible_after, math_parameter(f, RadicalKernAfterExtensible), level); /* engine, undefined */ tex_aux_define_all_math_parameters(size, math_parameter_radical_extensible_before, math_parameter(f, RadicalKernBeforeExtensible), level); /* engine, undefined */ diff --git a/source/luametatex/source/tex/texmath.h b/source/luametatex/source/tex/texmath.h index 79f40c13b..ba02e8373 100644 --- a/source/luametatex/source/tex/texmath.h +++ b/source/luametatex/source/tex/texmath.h @@ -169,6 +169,7 @@ typedef enum math_parameters { /* */ math_parameter_delimiter_percent, math_parameter_delimiter_shortfall, + math_parameter_delimiter_extend_margin, /* */ math_parameter_over_line_variant, math_parameter_under_line_variant, @@ -514,6 +515,7 @@ typedef enum math_parameter_codes { FlattenedAccentBottomShiftDown, DelimiterPercent, DelimiterShortfall, + DelimiterExtendMargin, /* done */ math_parameter_last_code, } math_parameter_codes; @@ -682,6 +684,7 @@ typedef enum math_control_codes { math_control_ignore_kern_dimensions = 0x0400000, /* for bad fonts (like xits fence depths) */ math_control_ignore_flat_accents = 0x0800000, math_control_extend_accents = 0x1000000, + math_control_extend_delimiters = 0x2000000, } math_control_codes; /*tex This is what we use for \OPENTYPE\ in \CONTEXT: */ diff --git a/source/luametatex/source/tex/texmlist.c b/source/luametatex/source/tex/texmlist.c index 8409f8df3..56b780506 100644 --- a/source/luametatex/source/tex/texmlist.c +++ b/source/luametatex/source/tex/texmlist.c @@ -309,6 +309,21 @@ inline static void tex_aux_make_style(halfword current, halfword *current_style, } } +/*tex + There is no need to be more subtle, if needed we can always do some extensive checking for the + combined styles. Basically this is just a catch for |\allmathstyles|. Also keep in mind that + there no grouping inside a formula: we can cook up something but in the end one always has some + synchronization problem because the next atom is likely outside the group anyway. +*/ + +inline static void tex_aux_set_parameter(halfword current, halfword style) +{ + if (is_valid_math_style(node_subtype(current))) { + style = node_subtype(current); + } + tex_def_math_parameter(style, parameter_name(current), parameter_value(current), cur_level + lmt_math_state.level, indirect_math_regular); +} + void tex_set_math_text_font(halfword style, int usetextfont) { halfword size = tex_aux_set_style_to_size(style); @@ -753,9 +768,20 @@ static halfword tex_aux_fraction_rule(scaled width, scaled height, halfword att, */ -static halfword tex_aux_overbar(halfword box, scaled gap, scaled height, scaled krn, halfword att, quarterword index, halfword size, halfword fam) +static halfword tex_aux_make_delimiter(halfword target, halfword delimiter, int size, scaled targetsize, int flat, int style, int shift, int *stack, scaled *delta, scaled tolerance, int nooverflow, delimiterextremes *extremes, scaled move); + +static halfword tex_aux_overbar(halfword box, scaled gap, scaled height, scaled krn, halfword att, quarterword index, halfword size, halfword fam, halfword topdelimiter, halfword style) { - halfword rule = tex_aux_fraction_rule(box_width(box), height, att, index, size, fam); + halfword rule = topdelimiter + ? tex_aux_make_delimiter(null, topdelimiter, size, box_width(box), 1, style, 0, NULL, NULL, 0, 0, NULL, 0) + : tex_aux_fraction_rule(box_width(box), height, att, index, size, fam); + /*tex Safeguard: */ + if (topdelimiter && box_width(rule) > box_width(box)) { + halfword delta = (box_width(rule) - box_width(box)) / 2; + tex_aux_prepend_hkern_to_box_list(box, delta, horizontal_math_kern_subtype, "narrow delimiter"); + tex_aux_append_hkern_to_box_list(box, delta, horizontal_math_kern_subtype, "narrow delimiter"); + box_width(box) = box_width(rule); + } if (gap) { halfword kern = tex_new_kern_node(gap, vertical_math_kern_subtype); tex_attach_attribute_list_attribute(kern, att); @@ -1504,6 +1530,24 @@ static halfword tex_aux_make_delimiter(halfword target, halfword delimiter, int added. See (**). */ result = tex_aux_char_box(fnt, chr, att, delta, glyph_math_delimiter_subtype, flat ? targetsize : 0, style); + if (flat) { + /* This will be done when we have a reasonable example. */ + } else { + if (box_total(result) < targetsize && tex_aux_math_engine_control(fnt, math_control_extend_delimiters) && tex_char_has_tag_from_font(fnt, chr, extend_last_tag)) { + halfword glyph = box_list(result); + if (glyph && node_type(glyph) == glyph_node) { + scaled margin = tex_get_math_y_parameter_default(style, math_parameter_delimiter_extend_margin, 0); + scaled amount = targetsize - 2 * margin; + if (amount > 0) { + double ratio = (double) amount/box_total(result); + glyph_y_scale(glyph) = lround((double) glyph_y_scale(glyph) * ratio); + glyph_y_offset(glyph) = lround((double) box_total(glyph) * ratio); + box_height(result) = lround((double) box_height(result) * ratio); + box_depth(result) = lround((double) box_depth(result) * ratio); + } + } + } + } if (stack) { *stack = 0 ; } @@ -1532,7 +1576,7 @@ static halfword tex_aux_make_delimiter(halfword target, halfword delimiter, int } } if (do_parts) { - if (has_noad_option_phantom(target) || has_noad_option_void(target)) { + if (target && (has_noad_option_phantom(target) || has_noad_option_void(target))) { result = tex_aux_make_list_phantom(result, has_noad_option_void(target), att); } else { result = register_extensible(fnt, chr, size, result, att); @@ -2158,7 +2202,8 @@ static void tex_aux_make_over(halfword target, halfword style, halfword size, ha halfword result = tex_aux_overbar( tex_aux_clean_box(noad_nucleus(target), tex_math_style_variant(style, math_parameter_over_line_variant), style, math_nucleus_list, 0, NULL), vgap, thickness, kern, - get_attribute_list(noad_nucleus(target)), math_over_rule_subtype, size, fam + get_attribute_list(noad_nucleus(target)), math_over_rule_subtype, size, fam, + null, style ); node_subtype(result) = math_over_list; kernel_math_list(noad_nucleus(target)) = result; @@ -2324,6 +2369,7 @@ static void tex_aux_make_root_radical(halfword target, int style, int size, kern scaled fam = delimiter_small_family(radical_left_delimiter(target)); halfword leftdelimiter = radical_left_delimiter(target); halfword rightdelimiter = radical_right_delimiter(target); + halfword topdelimiter = radical_top_delimiter(target); halfword delimiter = leftdelimiter ? leftdelimiter : rightdelimiter; halfword companion = leftdelimiter ? rightdelimiter : null; halfword radical = null; @@ -2411,7 +2457,7 @@ static void tex_aux_make_root_radical(halfword target, int style, int size, kern } { halfword total = box_total(delimiter); - halfword list = tex_aux_overbar(nucleus, clearance, theta, kern, get_attribute_list(delimiter), math_radical_rule_subtype, size, fam); + halfword list = tex_aux_overbar(nucleus, clearance, theta, kern, get_attribute_list(delimiter), math_radical_rule_subtype, size, fam, topdelimiter, style); radical = tex_aux_link_radical(list, delimiter, companion, rightdelimiter); if (radical_degree(target)) { halfword degree = tex_aux_clean_box(radical_degree(target), script_script_style, style, math_degree_list, 0, NULL); @@ -3501,9 +3547,16 @@ static halfword tex_aux_make_stretched_fraction(halfword target, int style, int if (box_width(middle) < box_width(fraction)) { /*tex It's always in the details: */ scaled delta = (box_width(fraction) - box_width(middle)) / 2; - tex_aux_prepend_hkern_to_box_list(middle, delta, horizontal_math_kern_subtype, "bad delimiter"); - tex_aux_append_hkern_to_box_list(middle, delta, horizontal_math_kern_subtype, "bad delimiter"); + tex_aux_prepend_hkern_to_box_list(middle, delta, horizontal_math_kern_subtype, "narrow delimiter"); + tex_aux_append_hkern_to_box_list(middle, delta, horizontal_math_kern_subtype, "narrow delimiter"); box_width(middle) = box_width(fraction); + } else if (box_width(middle) > box_width(fraction)) { + scaled delta = (box_width(middle) - box_width(fraction)) / 2; + tex_aux_prepend_hkern_to_box_list(numerator, delta, horizontal_math_kern_subtype, "wide delimiter"); + tex_aux_append_hkern_to_box_list(numerator, delta, horizontal_math_kern_subtype, "wide delimiter"); + tex_aux_prepend_hkern_to_box_list(denominator, delta, horizontal_math_kern_subtype, "wide delimiter"); + tex_aux_append_hkern_to_box_list(denominator, delta, horizontal_math_kern_subtype, "wide delimiter"); + box_width(fraction) = box_width(middle); } tex_aux_compensate_fraction_rule(target, fraction, middle, thickness); box_list(fraction) = tex_aux_assemble_fraction(target, style, size, numerator, denominator, middle, delta, shift_up, shift_down); @@ -4950,7 +5003,7 @@ static void tex_aux_make_scripts(halfword target, halfword kernel, scaled italic } } /*tex - Each of the scripts gets treated. Traditionally a super and subscript are looked and and + Each of the scripts gets treated. Traditionally a super and subscript are looked at and vercially spaced out together which in turn results in the staricase kerns needing that information. Prescripts we handle differently: they are always aligned, so there the maximum kern wins. @@ -6337,7 +6390,7 @@ static void tex_mlist_to_hlist_preroll_radicals(mliststate *state) tex_aux_make_style(current, ¤t_style, NULL); break; case parameter_node: - tex_def_math_parameter(node_subtype(current), parameter_name(current), parameter_value(current), cur_level + lmt_math_state.level, indirect_math_regular); + tex_aux_set_parameter(current, current_style); break; } current = node_next(current); @@ -6530,7 +6583,7 @@ static void tex_mlist_to_hlist_preroll_dimensions(mliststate *state) goto DONE_WITH_NODE; case parameter_node: /* maybe not needed as we do a first pass */ - tex_def_math_parameter(node_subtype(current), parameter_name(current), parameter_value(current), cur_level + lmt_math_state.level, indirect_math_regular); + tex_aux_set_parameter(current, current_style); goto DONE_WITH_NODE; case insert_node: case mark_node: @@ -6612,7 +6665,7 @@ static void tex_mlist_to_hlist_size_fences(mliststate *state) break; case parameter_node: /* tricky as this is sort of persistent, we need to reset it at the start */ - tex_def_math_parameter(node_subtype(current), parameter_name(current), parameter_value(current), cur_level + lmt_math_state.level, indirect_math_regular); + tex_aux_set_parameter(current, current_style); break; } current = node_next(current); @@ -6788,7 +6841,7 @@ static void tex_mlist_to_hlist_finalize_list(mliststate *state) tex_aux_wipe_noad(recent); goto RESTART; case parameter_node: - tex_def_math_parameter(node_subtype(current), parameter_name(current), parameter_value(current), cur_level + lmt_math_state.level, indirect_math_regular); + tex_aux_set_parameter(current, current_style); recent = current; current = node_next(current); tex_aux_wipe_noad(recent); @@ -6910,7 +6963,7 @@ static void tex_mlist_to_hlist_finalize_list(mliststate *state) } if (current_type == simple_noad) { pre_penalty = tex_aux_math_penalty(state->main_style, 1, current_subtype); - post_penalty = tex_aux_math_penalty(state->main_style,0, current_subtype); + post_penalty = tex_aux_math_penalty(state->main_style, 0, current_subtype); } /*tex Dirty trick: */ /* todo: use kerns info */ current_plus_glyph = tex_aux_get_plus_glyph(current); diff --git a/source/luametatex/source/tex/texnodes.c b/source/luametatex/source/tex/texnodes.c index 625a4346b..09aa74d57 100644 --- a/source/luametatex/source/tex/texnodes.c +++ b/source/luametatex/source/tex/texnodes.c @@ -1205,6 +1205,8 @@ halfword tex_copy_node(halfword p) /* how about null */ case radical_noad: copy_sub_node(radical_left_delimiter(r), radical_left_delimiter(p)) ; copy_sub_node(radical_right_delimiter(r), radical_right_delimiter(p)) ; + copy_sub_node(radical_top_delimiter(r), radical_top_delimiter(p)) ; + copy_sub_node(radical_bottom_delimiter(r), radical_bottom_delimiter(p)) ; copy_sub_list(radical_degree(r), radical_degree(p)) ; break; case fraction_noad: @@ -1394,6 +1396,8 @@ void tex_flush_node(halfword p) case radical_noad: tex_aux_free_sub_node(radical_left_delimiter(p)); tex_aux_free_sub_node(radical_right_delimiter(p)); + tex_aux_free_sub_node(radical_top_delimiter(p)); + tex_aux_free_sub_node(radical_bottom_delimiter(p)); tex_aux_free_sub_node_list(radical_degree(p)); break; case accent_noad: @@ -1510,6 +1514,8 @@ static void tex_aux_check_node(halfword p) tex_aux_node_range_test(p, radical_degree(p)); tex_aux_node_range_test(p, radical_left_delimiter(p)); tex_aux_node_range_test(p, radical_right_delimiter(p)); + tex_aux_node_range_test(p, radical_top_delimiter(p)); + tex_aux_node_range_test(p, radical_bottom_delimiter(p)); break; case fraction_noad: // tex_aux_node_range_test(p, fraction_numerator(p)); diff --git a/source/luametatex/source/tex/texnodes.h b/source/luametatex/source/tex/texnodes.h index e19ff933d..f3f9276a6 100644 --- a/source/luametatex/source/tex/texnodes.h +++ b/source/luametatex/source/tex/texnodes.h @@ -1576,36 +1576,38 @@ typedef enum simple_choice_subtypes { \starttabulate[|l|l|l|l|l|l|] \FL - \BC \BC noad \BC accent \BC fraction \BC radical \NC fence \NC \NR - \ML \NC - \NC vlink 2 \NC new_hlist \NC \NC \NC \NC \NC \NR - \ML \NC - \NC vinfo 2 \NC nucleus \NC \NC \NC \NC \NC \NR - \NC vlink 3 \NC supscr \NC \NC numerator \NC \NC \NC \NR - \NC vinfo 3 \NC subscr \NC \NC denominator \NC \NC \NC \NR - \NC vlink 4 \NC supprescr \NC \NC \NC \NC \NC \NR - \NC vinfo 4 \NC subprescr \NC \NC \NC \NC \NC \NR - \ML \NC - \NC vlink 5 \NC italic \NC \NC \NC \NC \NC \NR - \NC vinfo 5 \NC width \NC \NC \NC \NC \NC \NR - \NC vlink 6 \NC height \NC \NC \NC \NC \NC \NR - \NC vinfo 6 \NC depth \NC \NC \NC \NC \NC \NR - \ML \NC - \NC vlink 7 \NC options \NC \NC \NC \NC \NC \NR - \NC vinfo 7 \NC style \NC \NC \NC \NC \NC \NR - \NC vlink 8 \NC family \NC \NC \NC \NC \NC \NR - \NC vinfo 8 \NC class \NC \NC \NC \NC \NC \NR - \NC vlink 9 \NC source \NC \NC \NC \NC \NC \NR - \NC vinfo 9 \NC prime \NC \NC \NC \NC \NC \NR - \NC vlink 10 \NC leftslack \NC \NC \NC \NC \NC \NR - \NC vinfo 10 \NC rightslack \NC \NC \NC \NC \NC \NR - \ML \NC - \NC vlink 11 \NC extra_1 \NC top_character \NC rule_thickness \NC degree \NC list \NC \NR - \NC vinfo 11 \NC extra_2 \NC bot_character \NC left_delimiter \NC left_delimiter \NC source \NC \NR - \NC vlink 12 \NC extra_3 \NC overlay_character \NC right_delimiter \NC right_delimiter \NC top \NC \NR - \NC vinfo 12 \NC extra_4 \NC fraction \NC middle_delimiter \NC \NC bottom \NC \NR - \NC vlink 13 \NC extra_5 \NC topovershoot \NC \NC height \NC topovershoot \NC \NR - \NC vinfo 13 \NC extra_6 \NC botovershoot \NC \NC depth \NC botovershoot \NC \NR + \BC \BC noad \BC accent \BC fraction \BC radical \NC fence \NC \NR + \ML + \NC vlink 2 \NC new_hlist \NC \NC \NC \NC \NC \NR + \ML + \NC vinfo 2 \NC nucleus \NC \NC \NC \NC \NC \NR + \NC vlink 3 \NC supscr \NC \NC \NC \NC \NC \NR + \NC vinfo 3 \NC subscr \NC \NC \NC \NC \NC \NR + \NC vlink 4 \NC supprescr \NC \NC \NC \NC \NC \NR + \NC vinfo 4 \NC subprescr \NC \NC \NC \NC \NC \NR + \ML + \NC vlink 5 \NC italic \NC \NC \NC \NC \NC \NR + \NC vinfo 5 \NC width \NC \NC \NC \NC \NC \NR + \NC vlink 6 \NC height \NC \NC \NC \NC \NC \NR + \NC vinfo 6 \NC depth \NC \NC \NC \NC \NC \NR + \ML + \NC vlink 7 \NC options \NC \NC \NC \NC \NC \NR + \NC vinfo 7 \NC style \NC \NC \NC \NC \NC \NR + \NC vlink 8 \NC family \NC \NC \NC \NC \NC \NR + \NC vinfo 8 \NC class \NC \NC \NC \NC \NC \NR + \NC vlink 9 \NC source \NC \NC \NC \NC \NC \NR + \NC vinfo 9 \NC prime \NC \NC \NC \NC \NC \NR + \NC vlink 10 \NC leftslack \NC \NC \NC \NC \NC \NR + \NC vinfo 10 \NC rightslack \NC \NC \NC \NC \NC \NR + \ML + \NC vlink 11 \NC extra_1 \NC top_character \NC rule_thickness \NC degree \NC list \NC \NR + \NC vinfo 11 \NC extra_2 \NC bot_character \NC left_delimiter \NC left_delimiter \NC source \NC \NR + \NC vlink 12 \NC extra_3 \NC overlay_character \NC right_delimiter \NC right_delimiter \NC top \NC \NR + \NC vinfo 12 \NC extra_4 \NC fraction \NC middle_delimiter \NC size \NC bottom \NC \NR + \NC vlink 13 \NC extra_5 \NC topovershoot \NC h_factor \NC height \NC topovershoot \NC \NR + \NC vinfo 13 \NC extra_6 \NC botovershoot \NC v_factor \NC depth \NC botovershoot \NC \NR + \NC vlink 14 \NC extra_7 \NC \NC numerator \NC top_delimiter \NC \NC \NR + \NC vinfo 14 \NC extra_8 \NC \NC denominator \NC bottom_delimiter \NC \NC \NR \LL \stoptabulate @@ -1627,7 +1629,7 @@ typedef enum simple_choice_subtypes { //define noad_state_toptotal(a) vlink(a,5) //define noad_state_bottomtotal(a) vinfo(a,5) -# define noad_size 14 +# define noad_size 15 # define noad_new_hlist(a) vlink(a,2) /*tex the translation of an mlist; a bit confusing name */ # define noad_nucleus(a) vinfo(a,2) # define noad_supscr(a) vlink(a,3) @@ -1663,6 +1665,8 @@ typedef enum simple_choice_subtypes { # define noad_extra_4(a) vinfo(a,12) # define noad_extra_5(a) vlink(a,13) # define noad_extra_6(a) vinfo(a,13) +# define noad_extra_7(a) vlink(a,14) +# define noad_extra_8(a) vinfo(a,14) # define noad_total(a) (noad_height(a) + noad_depth(a)) @@ -1980,14 +1984,14 @@ typedef enum fence_subtypes { */ # define fraction_noad_size noad_size -# define fraction_numerator noad_supprescr /* ! */ -# define fraction_denominator noad_subprescr /* ! */ # define fraction_rule_thickness noad_extra_1 # define fraction_left_delimiter noad_extra_2 # define fraction_right_delimiter noad_extra_3 # define fraction_middle_delimiter noad_extra_4 # define fraction_h_factor noad_extra_5 # define fraction_v_factor noad_extra_6 +# define fraction_numerator noad_extra_7 +# define fraction_denominator noad_extra_8 typedef enum fraction_subtypes { over_fraction_subtype, @@ -2004,13 +2008,15 @@ typedef enum fraction_subtypes { used for extensibles (over, under, etc) so the name is is somewhat confusing. */ -# define radical_noad_size noad_size -# define radical_degree noad_extra_1 -# define radical_left_delimiter noad_extra_2 -# define radical_right_delimiter noad_extra_3 -# define radical_size noad_extra_4 -# define radical_height noad_extra_5 -# define radical_depth noad_extra_6 +# define radical_noad_size noad_size +# define radical_degree noad_extra_1 +# define radical_left_delimiter noad_extra_2 +# define radical_right_delimiter noad_extra_3 +# define radical_size noad_extra_4 +# define radical_height noad_extra_5 +# define radical_depth noad_extra_6 +# define radical_top_delimiter noad_extra_7 +# define radical_bottom_delimiter noad_extra_8 typedef enum radical_subtypes { normal_radical_subtype, diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 736e64033..5f1de5611 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{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %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 3337f07f0..6e61cb41f 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{2023.02.14 17:41} +\edef\contextversion{2023.02.23 21:23} %D For those who want to use this: diff --git a/tex/context/base/mkiv/back-pdp.lua b/tex/context/base/mkiv/back-pdp.lua index 857f13ef2..3de83bef1 100644 --- a/tex/context/base/mkiv/back-pdp.lua +++ b/tex/context/base/mkiv/back-pdp.lua @@ -22,6 +22,7 @@ local tokenscanners = tokens.scanners local scanword = tokenscanners.word local scankeyword = tokenscanners.keyword local scanstring = tokenscanners.string +local scantoks = tokenscanners.toks local scaninteger = tokenscanners.integer local scanwhd = tokenscanners.whd @@ -30,6 +31,7 @@ local report = logs.reporter("backend") local nodepool = nodes.pool local newliteral = nodepool.literal +local newlateliteral = nodepool.lateliteral local newsave = nodepool.save local newrestore = nodepool.restore local newsetmatrix = nodepool.setmatrix @@ -40,8 +42,24 @@ local variables = interfaces.variables -- literals +-- local function pdfliteral() +-- context(newliteral(scanword() or "origin",scanstring())) +-- end + +-- Who knows what will end up in e.g. tikz .. so we now do: + local function pdfliteral() - context(newliteral(scanword() or "origin",scanstring())) + local word = scanword() + local node + if word == "shipout" then + context(newlateliteral(scanword() or "origin",scantoks())) + else + context(newliteral(word or "origin",scanstring())) + end +end + +local function pdflateliteral() + context(newlateliteral(scanword() or "origin",scantoks())) end -- objects @@ -198,14 +216,15 @@ end -- mapfile mapline includechars catalog info names trailer local extensions = { - literal = pdfliteral, - obj = pdfobj, - refobj = pdfrefobj, - dest = pdfdest, - annot = pdfannot, - save = pdfsave, - restore = pdfrestore, - setmatrix = pdfsetmatrix, + literal = pdfliteral, + lateliteral = pdflateliteral, + obj = pdfobj, + refobj = pdfrefobj, + dest = pdfdest, + annot = pdfannot, + save = pdfsave, + restore = pdfrestore, + setmatrix = pdfsetmatrix, } local function pdfextension() @@ -276,12 +295,13 @@ implement { name = "pdfvariable", actions = pdfvariable } -- for the moment (tikz) -implement { name = "pdfliteral", actions = pdfliteral } -implement { name = "pdfobj", actions = pdfobj } -implement { name = "pdflastobj", actions = pdflastobj } -implement { name = "pdfrefobj", actions = pdfrefobj } ---------- { name = "pdfannot", actions = pdfannot } ---------- { name = "pdfdest", actions = pdfdest } ---------- { name = "pdfsave", actions = pdfsave } ---------- { name = "pdfrestore", actions = pdfrestore } ---------- { name = "pdfsetmatrix", actions = pdfsetmatrix } +implement { name = "pdfliteral", actions = pdfliteral } +implement { name = "pdflateliteral", actions = pdflateliteral } +implement { name = "pdfobj", actions = pdfobj } +implement { name = "pdflastobj", actions = pdflastobj } +implement { name = "pdfrefobj", actions = pdfrefobj } +--------- { name = "pdfannot", actions = pdfannot } +--------- { name = "pdfdest", actions = pdfdest } +--------- { name = "pdfsave", actions = pdfsave } +--------- { name = "pdfrestore", actions = pdfrestore } +--------- { name = "pdfsetmatrix", actions = pdfsetmatrix } diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index b525836df..0fe54e581 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{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %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 a5e343291..ea936fd95 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{2023.02.14 17:41} +\edef\contextversion{2023.02.23 21:23} %D Kind of special: diff --git a/tex/context/base/mkiv/lpdf-nod.lua b/tex/context/base/mkiv/lpdf-nod.lua index fcb2d1457..6702ed506 100644 --- a/tex/context/base/mkiv/lpdf-nod.lua +++ b/tex/context/base/mkiv/lpdf-nod.lua @@ -24,10 +24,11 @@ local register = nodepool.register local whatsit_code = nodecodes.whatsit -local savewhatsit_code = whatsitcodes.save -local restorewhatsit_code = whatsitcodes.restore -local setmatrixwhatsit_code = whatsitcodes.setmatrix -local literalwhatsit_code = whatsitcodes.literal +local savewhatsit_code = whatsitcodes.save +local restorewhatsit_code = whatsitcodes.restore +local setmatrixwhatsit_code = whatsitcodes.setmatrix +local literalwhatsit_code = whatsitcodes.literal +local lateliteralwhatsit_code = whatsitcodes.lateliteral local literalvalues = nodes.literalvalues local originliteral_code = literalvalues.origin @@ -66,6 +67,22 @@ function nodepool.literal(mode,str) end end +-- We only define this for testing as we don't need it: + +local lateliteralnode = register(new_node(whatsit_code, lateliteralwhatsit_code)) + +function nodepool.lateliteral(mode,str) + local t = copy_node(lateliteralnode) + if str then + setfield(t,"mode",literals[mode] and mode or pageliteral_code) + setdata(t,str) + else + setfield(t,"mode",pageliteral_code) + setdata(t,mode) + end + return t +end + local savenode = register(new_node(whatsit_code, savewhatsit_code)) local restorenode = register(new_node(whatsit_code, restorewhatsit_code)) local setmatrixnode = register(new_node(whatsit_code, setmatrixwhatsit_code)) diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 088bc698c..686fbfb7a 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -113,7 +113,7 @@ return { "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", - "extendaccentsmathcontrolcode", + "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua index 4c27357b7..ef7d4afed 100644 --- a/tex/context/base/mkiv/node-ini.lua +++ b/tex/context/base/mkiv/node-ini.lua @@ -201,6 +201,7 @@ end if not whatcodes.literal then whatcodes.literal = whatcodes.pdfliteral + whatcodes.lateliteral = whatcodes.pdflateliteral whatcodes.save = whatcodes.pdfsave whatcodes.restore = whatcodes.pdfrestore whatcodes.setmatrix = whatcodes.pdfsetmatrix diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 70fe4d224..95229e3fe 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 9540ac450..07a4610e0 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkxl/back-imp-pdp.lmt b/tex/context/base/mkxl/back-imp-pdp.lmt index 4c5d61b22..6b5a0edf9 100644 --- a/tex/context/base/mkxl/back-imp-pdp.lmt +++ b/tex/context/base/mkxl/back-imp-pdp.lmt @@ -6,8 +6,8 @@ if not modules then modules = { } end modules ['back-imp-pdp'] = { license = "see context related readme files" } --- This is temporary ... awaiting a better test .. basically we can --- always use this: pdf primitives. +-- We don't support late literals unless it's really needed by some third party +-- code. local context = context local lpdf = lpdf diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 667b2bc6d..45393d871 100644 --- a/tex/context/base/mkxl/cont-new.mkxl +++ b/tex/context/base/mkxl/cont-new.mkxl @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %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/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl index b0539ce74..f5d46c9db 100644 --- a/tex/context/base/mkxl/context.mkxl +++ b/tex/context/base/mkxl/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \immutable\edef\contextformat {\jobname} -\immutable\edef\contextversion{2023.02.14 17:41} +\immutable\edef\contextversion{2023.02.23 21:23} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/core-uti.lmt b/tex/context/base/mkxl/core-uti.lmt index 8ce0cca4a..48737d7f6 100644 --- a/tex/context/base/mkxl/core-uti.lmt +++ b/tex/context/base/mkxl/core-uti.lmt @@ -409,8 +409,33 @@ function job.loadother(filename,cache) end unpacked.job.packed = nil -- nicer in inspecting if cache then - cache[filename] = unpacked + othercache[filename] = unpacked end + -- + local lists = utilitydata.structures.lists.collected or { } + local sections = utilitydata.structures.sections.collected or { } + local pages = utilitydata.structures.pages .collected or { } + for i=1,#lists do + local entry = lists[i] + local references = entry.references + if references then + local section = references.section + local realpage = references.realpage + -- maybe entry.* instead: + references.sectiondata = section and sections[section] + references.pagedata = realpage and pages[realpage] + -- get rid of these, maybe even crash as these are bogus + -- references.internal = nil + -- references.realpage = nil + -- references.section = nil + references.x = nil + references.y = nil + end + end + -- + -- also do the references here + -- + structures.references.registerfromlist(lists,derived,pages,sections) end end statistics.stoptiming(loadedfiles) diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt index 73e7085b2..09928f303 100644 --- a/tex/context/base/mkxl/driv-shp.lmt +++ b/tex/context/base/mkxl/driv-shp.lmt @@ -298,6 +298,7 @@ local flush_character do local csx = packet[3] local csy = packet[4] or csx pos_h = pos_h + flushchar(fnt,chr,csx,csy) +* sx elseif command == "slot" then local index = packet[2] local chr = packet[3] @@ -305,6 +306,7 @@ local flush_character do local csy = packet[5] or csx if index == 0 then pos_h = pos_h + flushchar(font,chr,csx,csy) +* sx else local okay = fonts and fonts[index] if okay then @@ -314,10 +316,12 @@ local flush_character do fnt = font end pos_h = pos_h + flushchar(fnt,chr,csx,csy) +* sx end else -- safeguard, we assume the font itself (often index 1) pos_h = pos_h + flushchar(font,chr,csx,csy) +* sx end end elseif command == "use" then @@ -394,6 +398,11 @@ local flush_character do pos_h = ph pos_v = pv end + elseif command == "stay" then + -- we can do a fast one if needed, it's more an experiment + push() + flushchar(font,packet[2],1,1) + pop() elseif command == "compose" then -- for now idem local ph = pos_h local pv = pos_v diff --git a/tex/context/base/mkxl/font-mat.mklx b/tex/context/base/mkxl/font-mat.mklx index 942c2fecd..76f6f87b9 100644 --- a/tex/context/base/mkxl/font-mat.mklx +++ b/tex/context/base/mkxl/font-mat.mklx @@ -555,4 +555,29 @@ \fi \to\everybodyfont +%D Something new, see type {type-imp-antykwa} for an example: + +% if we get more: + +% \installcorenamespace {fractionbar} +% \installcorenamespace {radicalbar} + +% \def\installfractionbar#1#2{\defcsname\??fractionbar#1\endcsname{#2}} +% \def\installradicalbar #1#2{\defcsname\??radicalbar #1\endcsname{#2}} + +% \def\fractionbarunicode{\ifcsname\??fractionbar\fontclass\endcsname\lastnamedcs\else\zerocount\fi} +% \def\radicalbarunicode {\ifcsname\??radicalbar \fontclass\endcsname\lastnamedcs\else\zerocount\fi} + +\mutable\lettonothing\currentmathfontclass + +\def\math_synchronize_setup + {\let\currentmathfontclass\fontclass + \fastsetup\fontclass} + +\appendtoks + \ifx\fontclass\currentmathfontclass\else + \math_synchronize_setup + \fi +\to \everymathematics + \protect \endinput diff --git a/tex/context/base/mkxl/font-vfc.lmt b/tex/context/base/mkxl/font-vfc.lmt index 479aa4ca0..6e9cd4013 100644 --- a/tex/context/base/mkxl/font-vfc.lmt +++ b/tex/context/base/mkxl/font-vfc.lmt @@ -82,6 +82,7 @@ end helpers.commands = utilities.storage.allocate { char = setmetatableindex(function(t,k) local v = { "char", k } t[k] = v return v end), + stay = setmetatableindex(function(t,k) local v = { "stay", k } t[k] = v return v end), right = setmetatableindex(function(t,k) local v = { "right", k } t[k] = v return v end), left = setmetatableindex(function(t,k) local v = { "left", k } t[k] = v return v end), down = setmetatableindex(function(t,k) local v = { "down", k } t[k] = v return v end), diff --git a/tex/context/base/mkxl/grph-epd.lmt b/tex/context/base/mkxl/grph-epd.lmt index 6f9e44f63..505599fff 100644 --- a/tex/context/base/mkxl/grph-epd.lmt +++ b/tex/context/base/mkxl/grph-epd.lmt @@ -36,6 +36,9 @@ local function mergegoodies(optionlist) if all or options[variables.layer] then codeinjections.mergeviewerlayers() end + if all or options[variables.media] then + codeinjections.mergerenditions() + end codeinjections.flushmergelayer() end diff --git a/tex/context/base/mkxl/lpdf-ano.lmt b/tex/context/base/mkxl/lpdf-ano.lmt index ed26b512e..55b145730 100644 --- a/tex/context/base/mkxl/lpdf-ano.lmt +++ b/tex/context/base/mkxl/lpdf-ano.lmt @@ -10,8 +10,16 @@ if not modules then modules = { } end modules ['lpdf-ano'] = { -- todo: /AA << WC << ... >> >> : WillClose actions etc --- internal references are indicated by a number (and turned into ) --- we only flush internal destinations that are referred +-- Internal references are indicated by a number (and turned into ) +-- we only flush internal destinations that are referred. + +-- In the end one can wonder if it was worth the effort to keep up with annotations. +-- Where acrobat at least supports most (can differ per version) other viewers +-- support partial. For instance sumatra (that I use for testing) can open an +-- external links but doesn't go to the page. So don't report issues before making +-- sure that it's not your browser that fails. One cannto complain about what comes +-- for free (browsers) but one should also not praise non commercial software to +-- much without looking critical at how it performs. local next, tostring, tonumber, rawget, type = next, tostring, tonumber, rawget, type local rep, format, find = string.rep, string.format, string.find diff --git a/tex/context/base/mkxl/lpdf-epa.lmt b/tex/context/base/mkxl/lpdf-epa.lmt index 750c008fb..26bb9f703 100644 --- a/tex/context/base/mkxl/lpdf-epa.lmt +++ b/tex/context/base/mkxl/lpdf-epa.lmt @@ -549,7 +549,7 @@ local function copyF(v,lock) -- todo: bxor 24 end -- Speed is not really an issue so we don't optimize this code too much. In the end (after --- testing we end up with less code that we started with. +-- testing) we ended up with less code that we started with. function codeinjections.mergecomments(specification) local specification, fullname, document = validdocument(specification) @@ -867,6 +867,33 @@ function codeinjections.mergefields(specification) end end +-- The crappy parts of pdf .. too unpredictable. + +function codeinjections.mergerenditions(specification) +-- local specification, fullname, document = validdocument(specification) +-- if not document then +-- return "" +-- end +-- local pagenumber = specification.page or 1 +-- local pagedata = document.pages[pagenumber] +-- local annotations = pagedata and pagedata.Annots +-- if annotations and #annotations > 0 then +-- local llx, lly, urx, ury, width, height, xscale, yscale = getmediasize(specification,pagedata,xscale,yscale) +-- initializelayer(height,width) +-- -- +-- for i=1,#annotations do +-- -- we keep the order +-- local annotation = annotations[i] +-- if annotation then +-- local subtype = annotation.Subtype +-- if subtype == "Screen" then +-- print("not done") +-- end +-- end +-- end +-- end +end + -- Beware, bookmarks can be in pdfdoc encoding or in unicode. However, in mkiv we -- write out the strings in unicode (hex). When we read them in, we check for a bom -- and convert to utf. diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt index 19a43ce87..370415c81 100644 --- a/tex/context/base/mkxl/math-act.lmt +++ b/tex/context/base/mkxl/math-act.lmt @@ -1666,6 +1666,17 @@ do -- local addprivate = fonts.helpers.addprivate -- local newnextglyph = addprivate(target,formatters["M-N-%H"](nextglyph),newnextdata) + local nps = fonts.helpers.newprivateslot + + local umbracepiece = nps("um brace piece") -- will be created + local lmbracepiece = nps("lm brace piece") -- will be created + local cmbracepiece = nps("cm brace piece") -- will be created : center piece for brace builder hack + + local ulbracepiece = nps("ul brace piece") + local urbracepiece = nps("ur brace piece") + local llbracepiece = nps("ll brace piece") + local lrbracepiece = nps("lr brace piece") + local over = { factor = "over" } local under = { factor = "under" } @@ -2201,6 +2212,10 @@ do -- mirror -- smaller + local nps = fonts.helpers.newprivateslot + + local radicalbarextender = nps("radical bar extender") -- we reserve it here + local list = { 0x221A, } @@ -2627,7 +2642,7 @@ do width = 2*width - 1*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { char, left, char }, } characters[triple] = { @@ -2635,7 +2650,7 @@ do width = 3*width - 2*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { char, left, char, left, char }, } if trace_tweaking then @@ -2972,7 +2987,7 @@ do width = 2*width - 1*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { charcommand[single], leftcommand[advance], @@ -2988,7 +3003,7 @@ do width = 3*width - 2*advance, height = height, depth = depth, - callback = "devirtualize", +-- callback = "devirtualize", commands = { charcommand[single], leftcommand[advance], diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl index 20ea1d279..baaa4666a 100644 --- a/tex/context/base/mkxl/math-ali.mkxl +++ b/tex/context/base/mkxl/math-ali.mkxl @@ -739,10 +739,14 @@ {\c_math_eqalign_column\zerocount \rawprocesscommacommand[#1]\math_eqalign_set_columns_step} -\letcsname\??mathalignmentvariant\v!normal\endcsname\zerocount -\letcsname\??mathalignmentvariant\v!left \endcsname\plusone -\letcsname\??mathalignmentvariant\v!right \endcsname\plustwo -\letcsname\??mathalignmentvariant\v!middle\endcsname\plusthree +% can't we reuse these numbers ? + +\letcsname\??mathalignmentvariant\v!normal \endcsname\zerocount +\letcsname\??mathalignmentvariant\v!flushright\endcsname\plusone +\letcsname\??mathalignmentvariant\v!left \endcsname\plusone +\letcsname\??mathalignmentvariant\v!right \endcsname\plustwo +\letcsname\??mathalignmentvariant\v!flushleft \endcsname\plustwo +\letcsname\??mathalignmentvariant\v!middle \endcsname\plusthree %D \starttyping %D \placeformula[eqn0]\startformula \startalign[n=1] a\NR \stopalign \stopformula See \in[eqn0] @@ -2514,9 +2518,13 @@ \defcsname\??mathboxlocation\v!left \endcsname {\c_strc_math_number_location\plusone} +\defcsname\??mathboxlocation\v!flushright\endcsname + {\c_strc_math_number_location\plusone} \defcsname\??mathboxlocation\v!right\endcsname {\c_strc_math_number_location\plustwo} +\defcsname\??mathboxlocation\v!flushleft\endcsname + {\c_strc_math_number_location\plustwo} \defcsname\??mathboxlocation\v!atrightmargin\endcsname {\c_strc_math_number_location\plustwo diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl index d11acac9b..47edc52c4 100644 --- a/tex/context/base/mkxl/math-frc.mkxl +++ b/tex/context/base/mkxl/math-frc.mkxl @@ -333,7 +333,7 @@ \s!vfactor \numexpr\mathfractionparameter\c!vfactor\relax \s!source \number\namedboxanchor{\mathfractionparameter\c!source}} -\installcorenamespace{mathalignsimple} +\installcorenamespace{mathalignsimple} % this should move to math-ali \defcsname\??mathalignsimple\v!right \endcsname#1{#1\hfill} \defcsname\??mathalignsimple\v!flushleft \endcsname#1{#1\hfill} diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index c3bbb9587..c76d7313a 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -123,6 +123,7 @@ % +\ignorekerndimensionsmathcontrolcode % xits needs this (bad depth of fences) % +\ignoreflataccentsmathcontrolcode +\extendaccentsmathcontrolcode + +\extenddelimitersmathcontrolcode \relax % \mathpenaltiesmode\plusone diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt index 1ee5c26e3..4a0cb5744 100644 --- a/tex/context/base/mkxl/math-noa.lmt +++ b/tex/context/base/mkxl/math-noa.lmt @@ -883,31 +883,47 @@ do setattr(pointer,a_mathsize,0) local delimiter = getdelimiter(pointer) if delimiter then - local chr, fnt, fam = getcharspec(delimiter) - if chr > 0 and fnt > 0 then - local data = fontdata[fnt] -local chardata = data.characters[chr] -local template = chardata.varianttemplate - local char = mathematics.big(data,template or chr,size,method) - local ht = getheight(pointer) - local dp = getdepth(pointer) - if template or ht == 1 or dp == 1 then -- 1 scaled point is a signal - local chardata = data.characters[char] - if template or ht == 1 then - setheight(pointer,chardata.height) + local oldchar, font, fam = getcharspec(delimiter) + if oldchar > 0 and font > 0 then + local ht = getheight(pointer) + local dp = getdepth(pointer) + local data = fontdata[font] + local characters = data.characters + local olddata = characters[oldchar] +-- local oldheight = olddata.height or 0 +-- local olddepth = olddata.depth or 0 + local template = olddata.varianttemplate + local newchar = mathematics.big(data,template or oldchar,size,method) + local newdata = characters[newchar] + local newheight = newdata.height or 0 + local newdepth = newdata.depth or 0 + if template then +-- local ratio = (newheight + newdepth) / (oldheight + olddepth) +-- setheight(pointer,ratio * oldheight) +-- setdepth(pointer,ratio * olddepth) + setheight(pointer,newheight) + setdepth(pointer,newdepth) + if not olddata.extensible then + -- check this on bonum and antykwa + setoptions(pointer,0) end - if template or dp == 1 then - setdepth(pointer,chardata.depth) + if trace_fences then +-- report_fences("replacing %C using method %a, size %a, template %C and ratio %.3f",newchar,method,size,template,ratio) + report_fences("replacing %C using method %a, size %a and template %C",newchar,method,size,template) + end + else + -- 1 scaled point is a signal, for now + if ht == 1 then + setheight(pointer,newheight) + end + if dp == 1 then + setdepth(pointer,newdepth) + end + setchar(delimiter,newchar) + if trace_fences then + report_fences("replacing %C by %C using method %a and size %a",oldchar,char,method,size) end end - if trace_fences then - report_fences("replacing %C by %C using method %a and size %a",chr,char,method,size) - end -if template then - setoptions(pointer,0) -else - setchar(delimiter,char) -end end end end diff --git a/tex/context/base/mkxl/math-rad.mklx b/tex/context/base/mkxl/math-rad.mklx index cb3cdb0a8..703481c08 100644 --- a/tex/context/base/mkxl/math-rad.mklx +++ b/tex/context/base/mkxl/math-rad.mklx @@ -189,14 +189,25 @@ % as struts are sort of predictable we can now fix all fonts in the lfg file. \protected\def\math_radical_common#degree% - {\Urooted + {\scratchcounter\ifcstok{\mathradicalparameter\c!rule}\v!symbol + \mathradicalparameter\c!top\relax + \else + \zerocount + \fi + \Urooted \s!height\dimexpr\mathradicalparameter\c!height\relax \s!depth \dimexpr\mathradicalparameter\c!depth\relax \s!source\numexpr\namedboxanchor{\mathradicalparameter\c!source}\relax \s!style \normalmathstyle + \ifzeronum\scratchcounter\else + top % \s!top + \fi \zerocount \mathradicalparameter\c!left \zerocount \mathradicalparameter\c!right - \relax + \ifzeronum\scratchcounter\else + \zerocount\scratchcounter + \fi + \relax {\mathstrut#degree}} \defcsname\??mathradicalalternative\v!default\endcsname % #body% @@ -365,6 +376,7 @@ \integerdef\delimitedleftanutityuc \privatecharactercode{delimited left annuity} \integerdef\delimitedrightanutityuc \privatecharactercode{delimited right annuity} +\integerdef\radicalbarextenderuc \privatecharactercode{radical bar extender} \definemathradical [rannuity] diff --git a/tex/context/base/mkxl/math-ttv.lmt b/tex/context/base/mkxl/math-ttv.lmt index e33a23478..3393ecc03 100644 --- a/tex/context/base/mkxl/math-ttv.lmt +++ b/tex/context/base/mkxl/math-ttv.lmt @@ -13,6 +13,48 @@ local setdigits = vfmath.setdigits local mathencodings = fonts.encodings.math +local nps = fonts.helpers.newprivateslot + +-- mathencodings["large-to-small-private"] = { +-- [0xFE07A] = 0x7A, -- bracehtipdownleft +-- [0xFE07B] = 0x7B, -- bracehtipdownright +-- [0xFE07C] = 0x7C, -- bracehtipupleft +-- [0xFE07D] = 0x7D, -- bracehtipupright +-- } + +mathencodings["large-to-small-private"] = { + [nps("ul brace piece")] = 0x7A, -- bracehtipdownleft + [nps("ur brace piece")] = 0x7B, -- bracehtipdownright + [nps("ll brace piece")] = 0x7C, -- bracehtipupleft + [nps("lr brace piece")] = 0x7D, -- bracehtipupright +} + +-- mathencodings["extensible-jmn-private"] = { +-- [0xFE080] = 200, -- minusjmn +-- [0xFE081] = 201, -- minusrightjmn +-- [0xFE082] = 202, -- minusleftjmn +-- [0xFE083] = 203, -- equaljmn +-- [0xFE084] = 204, -- equalrightjmn +-- [0xFE085] = 205, -- equalleftjmn +-- [0xFE086] = 206, -- arrowleftjmn +-- [0xFE087] = 207, -- arrowrightjmn +-- [0xFE088] = 208, -- arrowdblleftjmn +-- [0xFE089] = 209, -- arrowdblrightjmn +-- } + +-- mathencodings["extensible-jmn-private"] = { +-- [nps("rule middle piece")] = 200, -- minusjmn +-- [nps("rule right piece")] = 201, -- minusrightjmn +-- [nps("rule left piece")] = 202, -- minusleftjmn +-- [nps("double rule middle piece")] = 203, -- equaljmn +-- [nps("double rule right piece")] = 204, -- equalrightjmn +-- [nps("double rule left piece")] = 205, -- equalleftjmn +-- [nps("arrow left piece")] = 206, -- arrowleftjmn +-- [nps("arrow right piece")] = 207, -- arrowrightjmn +-- [nps("double arrow left piece")] = 208, -- arrowdblleftjmn +-- [nps("double arrow right piece")] = 209, -- arrowdblrightjmn +-- } + -- varphi is part of the alphabet, contrary to the other var*s' mathencodings["large-to-small"] = { @@ -59,14 +101,6 @@ mathencodings["large-to-small"] = { [0x02044] = 0x0E, -- / } -mathencodings["large-to-small-private"] = { - [0xFE07A] = 0x7A, -- bracehtipdownleft - [0xFE07B] = 0x7B, -- bracehtipdownright - [0xFE07C] = 0x7C, -- bracehtipupleft - [0xFE07D] = 0x7D, -- bracehtipupright - -} - -- Beware: these are (in cm/lm) below the baseline due to limitations -- in the tfm format but the engine (combined with the mathclass) takes -- care of it. If we need them in textmode, we should make them virtual @@ -111,17 +145,17 @@ mathencodings["tex-mr"] = { -- [0x002D8] = 0x15, -- [math]breve -- [0x000AF] = 0x16, -- [math]bar -- [0x00021] = 0x21, -- ! - [0x00028] = 0x28, -- ( - [0x00029] = 0x29, -- ) - [0x0002B] = 0x2B, -- + - [0x0002F] = 0x2F, -- / - [0x0003A] = 0x3A, -- : - [0x02236] = 0x3A, -- colon - [0x0003B] = 0x3B, -- ; - [0x0003C] = 0x3C, -- < - [0x0003D] = 0x3D, -- = - [0x0003E] = 0x3E, -- > - [0x0003F] = 0x3F, -- ? + [0x00028] = 0x28, -- ( + [0x00029] = 0x29, -- ) + [0x0002B] = 0x2B, -- + + [0x0002F] = 0x2F, -- / + [0x0003A] = 0x3A, -- : + [0x02236] = 0x3A, -- colon + [0x0003B] = 0x3B, -- ; + [0x0003C] = 0x3C, -- < + [0x0003D] = 0x3D, -- = + [0x0003E] = 0x3E, -- > + [0x0003F] = 0x3F, -- ? [0x00391] = 0x41, -- Alpha [0x00392] = 0x42, -- Beta [0x02145] = 0x44, @@ -136,8 +170,8 @@ mathencodings["tex-mr"] = { [0x003A4] = 0x54, -- Tau [0x003A7] = 0x58, -- Chi [0x00396] = 0x5A, -- Zeta - [0x0005B] = 0x5B, -- [ - [0x0005D] = 0x5D, -- ] + [0x0005B] = 0x5B, -- [ + [0x0005D] = 0x5D, -- ] -- [0x0005E] = 0x5E, -- [math]hat -- the text one [0x00302] = 0x5E, -- [math]hat -- the real math one -- [0x002D9] = 0x5F, -- [math]dot @@ -204,8 +238,10 @@ mathencodings["tex-mi"] = { [0x021BD] = 0x29, -- leftharpoondown [0x021C0] = 0x2A, -- rightharpoonup [0x021C1] = 0x2B, -- rightharpoondown - [0xFE322] = 0x2C, -- lhook (hook for combining arrows) - [0xFE323] = 0x2D, -- rhook (hook for combining arrows) +-- [0xFE322] = 0x2C, -- lhook (hook for combining arrows) +-- [0xFE323] = 0x2D, -- rhook (hook for combining arrows) + [nps("left hook piece")] = 0x2C, -- bracehtipdownleft + [nps("right hook piece")] = 0x2D, -- bracehtipdownleft [0x025B7] = 0x2E, -- triangleright : cf lmmath / BJ [0x025C1] = 0x2F, -- triangleleft : cf lmmath / BJ [0x022B3] = 0x2E, -- triangleright : cf lmmath this a cramped triangles / BJ / see * @@ -463,281 +499,11 @@ mathencodings["tex-sy"] = { [0x02662] = 0x7D, -- diamondsuit [0x02661] = 0x7E, -- heartsuit [0x02660] = 0x7F, -- spadesuit - [0xFE321] = 0x37, -- mapstochar - - [0xFE325] = 0x30, -- prime 0x02032 + -- [0xFE321] = 0x37, -- mapstochar + -- [0xFE325] = 0x30, -- prime 0x02032 + [nps("maps to piece")] = 0x37, -- mapstochar } --- -- The names in masm10.enc can be trusted best and are shown in the first --- -- column, while in the second column we show the tex/ams names. As usual --- -- it costs hours to figure out such a table. --- --- mathencodings["tex-ma"] = { --- [0x022A1] = 0x00, -- squaredot \boxdot --- [0x0229E] = 0x01, -- squareplus \boxplus --- [0x022A0] = 0x02, -- squaremultiply \boxtimes --- [0x025A1] = 0x03, -- square \square \Box --- [0x025A0] = 0x04, -- squaresolid \blacksquare --- [0x025AA] = 0x05, -- squaresmallsolid \centerdot --- [0x022C4] = 0x06, -- diamond \Diamond \lozenge --- [0x02666] = 0x07, -- diamondsolid \blacklozenge --- [0x021BB] = 0x08, -- clockwise \circlearrowright --- [0x021BA] = 0x09, -- anticlockwise \circlearrowleft --- [0x021CC] = 0x0A, -- harpoonleftright \rightleftharpoons --- [0x021CB] = 0x0B, -- harpoonrightleft \leftrightharpoons --- [0x0229F] = 0x0C, -- squareminus \boxminus --- [0x022A9] = 0x0D, -- forces \Vdash --- [0x022AA] = 0x0E, -- forcesbar \Vvdash --- [0x022A8] = 0x0F, -- satisfies \vDash --- [0x021A0] = 0x10, -- dblarrowheadright \twoheadrightarrow --- [0x0219E] = 0x11, -- dblarrowheadleft \twoheadleftarrow --- [0x021C7] = 0x12, -- dblarrowleft \leftleftarrows --- [0x021C9] = 0x13, -- dblarrowright \rightrightarrows --- [0x021C8] = 0x14, -- dblarrowup \upuparrows --- [0x021CA] = 0x15, -- dblarrowdwn \downdownarrows --- [0x021BE] = 0x16, -- harpoonupright \upharpoonright \restriction --- [0x021C2] = 0x17, -- harpoondownright \downharpoonright --- [0x021BF] = 0x18, -- harpoonupleft \upharpoonleft --- [0x021C3] = 0x19, -- harpoondownleft \downharpoonleft --- [0x021A3] = 0x1A, -- arrowtailright \rightarrowtail --- [0x021A2] = 0x1B, -- arrowtailleft \leftarrowtail --- [0x021C6] = 0x1C, -- arrowparrleftright \leftrightarrows --- -- [0x021C5] = 0x00, -- \updownarrows (missing in lm) --- [0x021C4] = 0x1D, -- arrowparrrightleft \rightleftarrows --- [0x021B0] = 0x1E, -- shiftleft \Lsh --- [0x021B1] = 0x1F, -- shiftright \Rsh --- [0x021DD] = 0x20, -- squiggleright \leadsto \rightsquigarrow --- [0x021AD] = 0x21, -- squiggleleftright \leftrightsquigarrow --- [0x021AB] = 0x22, -- curlyleft \looparrowleft --- [0x021AC] = 0x23, -- curlyright \looparrowright --- [0x02257] = 0x24, -- circleequal \circeq --- [0x0227F] = 0x25, -- followsorequal \succsim --- [0x02273] = 0x26, -- greaterorsimilar \gtrsim --- [0x02A86] = 0x27, -- greaterorapproxeql \gtrapprox --- [0x022B8] = 0x28, -- multimap \multimap --- [0x02234] = 0x29, -- therefore \therefore --- [0x02235] = 0x2A, -- because \because --- [0x02251] = 0x2B, -- equalsdots \Doteq \doteqdot --- [0x0225C] = 0x2C, -- defines \triangleq --- [0x0227E] = 0x2D, -- precedesorequal \precsim --- [0x02272] = 0x2E, -- lessorsimilar \lesssim --- [0x02A85] = 0x2F, -- lessorapproxeql \lessapprox --- [0x02A95] = 0x30, -- equalorless \eqslantless --- [0x02A96] = 0x31, -- equalorgreater \eqslantgtr --- [0x022DE] = 0x32, -- equalorprecedes \curlyeqprec --- [0x022DF] = 0x33, -- equalorfollows \curlyeqsucc --- [0x0227C] = 0x34, -- precedesorcurly \preccurlyeq --- [0x02266] = 0x35, -- lessdblequal \leqq --- [0x02A7D] = 0x36, -- lessorequalslant \leqslant --- [0x02276] = 0x37, -- lessorgreater \lessgtr --- [0x02035] = 0x38, -- primereverse \backprime --- -- [0x0] = 0x39, -- axisshort \dabar --- [0x02253] = 0x3A, -- equaldotrightleft \risingdotseq --- [0x02252] = 0x3B, -- equaldotleftright \fallingdotseq --- [0x0227D] = 0x3C, -- followsorcurly \succcurlyeq --- [0x02267] = 0x3D, -- greaterdblequal \geqq --- [0x02A7E] = 0x3E, -- greaterorequalslant \geqslant --- [0x02277] = 0x3F, -- greaterorless \gtrless --- [0x0228F] = 0x40, -- squareimage \sqsubset --- [0x02290] = 0x41, -- squareoriginal \sqsupset --- -- wrong: see ** --- -- [0x022B3] = 0x42, -- triangleright \rhd \vartriangleright --- -- [0x022B2] = 0x43, -- triangleleft \lhd \vartriangleleft --- -- cf lm --- [0x022B5] = 0x44, -- trianglerightequal \unrhd \trianglerighteq --- [0x022B4] = 0x45, -- triangleleftequal \unlhd \trianglelefteq --- -- --- [0x02605] = 0x46, -- star \bigstar --- [0x0226C] = 0x47, -- between \between --- [0x025BC] = 0x48, -- triangledownsld \blacktriangledown --- [0x025B6] = 0x49, -- trianglerightsld \blacktriangleright --- [0x025C0] = 0x4A, -- triangleleftsld \blacktriangleleft --- -- [0x0] = 0x4B, -- arrowaxisright --- -- [0x0] = 0x4C, -- arrowaxisleft --- [0x025B2] = 0x4D, -- triangle \triangleup \vartriangle --- [0x025B2] = 0x4E, -- trianglesolid \blacktriangle --- [0x025BD] = 0x4F, -- triangleinv \triangledown --- [0x02256] = 0x50, -- ringinequal \eqcirc --- [0x022DA] = 0x51, -- lessequalgreater \lesseqgtr --- [0x022DB] = 0x52, -- greaterlessequal \gtreqless --- [0x02A8B] = 0x53, -- lessdbleqlgreater \lesseqqgtr --- [0x02A8C] = 0x54, -- greaterdbleqlless \gtreqqless --- [0x000A5] = 0x55, -- Yen \yen --- [0x021DB] = 0x56, -- arrowtripleright \Rrightarrow --- [0x021DA] = 0x57, -- arrowtripleleft \Lleftarrow --- [0x02713] = 0x58, -- check \checkmark --- [0x022BB] = 0x59, -- orunderscore \veebar --- [0x022BC] = 0x5A, -- nand \barwedge --- [0x02306] = 0x5B, -- perpcorrespond \doublebarwedge --- [0x02220] = 0x5C, -- angle \angle --- [0x02221] = 0x5D, -- measuredangle \measuredangle --- [0x02222] = 0x5E, -- sphericalangle \sphericalangle --- -- [0x0] = 0x5F, -- proportional \varpropto --- -- [0x0] = 0x60, -- smile \smallsmile --- -- [0x0] = 0x61, -- frown \smallfrown --- [0x022D0] = 0x62, -- subsetdbl \Subset --- [0x022D1] = 0x63, -- supersetdbl \Supset --- [0x022D3] = 0x64, -- uniondbl \doublecup \Cup --- [0x022D2] = 0x65, -- intersectiondbl \doublecap \Cap --- [0x022CF] = 0x66, -- uprise \curlywedge --- [0x022CE] = 0x67, -- downfall \curlyvee --- [0x022CB] = 0x68, -- multiopenleft \leftthreetimes --- [0x022CC] = 0x69, -- multiopenright \rightthreetimes --- [0x02AC5] = 0x6A, -- subsetdblequal \subseteqq --- [0x02AC6] = 0x6B, -- supersetdblequal \supseteqq --- [0x0224F] = 0x6C, -- difference \bumpeq --- [0x0224E] = 0x6D, -- geomequivalent \Bumpeq --- [0x022D8] = 0x6E, -- muchless \lll \llless --- [0x022D9] = 0x6F, -- muchgreater \ggg \gggtr --- [0x0231C] = 0x70, -- rightanglenw \ulcorner --- [0x0231D] = 0x71, -- rightanglene \urcorner --- [0x024C7] = 0x72, -- circleR \circledR --- [0x024C8] = 0x73, -- circleS \circledS --- [0x022D4] = 0x74, -- fork \pitchfork --- [0x02214] = 0x75, -- dotplus \dotplus --- [0x0223D] = 0x76, -- revsimilar \backsim --- [0x022CD] = 0x77, -- revasymptequal \backsimeq -- AM: Check this! I mapped it to simeq. --- [0x0231E] = 0x78, -- rightanglesw \llcorner --- [0x0231F] = 0x79, -- rightanglese \lrcorner --- [0x02720] = 0x7A, -- maltesecross \maltese --- [0x02201] = 0x7B, -- complement \complement --- [0x022BA] = 0x7C, -- intercal \intercal --- [0x0229A] = 0x7D, -- circlering \circledcirc --- [0x0229B] = 0x7E, -- circleasterisk \circledast --- [0x0229D] = 0x7F, -- circleminus \circleddash --- } --- --- mathencodings["tex-mb"] = { --- -- [0x0] = 0x00, -- lessornotequal \lvertneqq --- -- [0x0] = 0x01, -- greaterornotequal \gvertneqq --- [0x02270] = 0x02, -- notlessequal \nleq --- [0x02271] = 0x03, -- notgreaterequal \ngeq --- [0x0226E] = 0x04, -- notless \nless --- [0x0226F] = 0x05, -- notgreater \ngtr --- [0x02280] = 0x06, -- notprecedes \nprec --- [0x02281] = 0x07, -- notfollows \nsucc --- [0x02268] = 0x08, -- lessornotdbleql \lneqq --- [0x02269] = 0x09, -- greaterornotdbleql \gneqq --- -- [0x0] = 0x0A, -- notlessorslnteql \nleqslant --- -- [0x0] = 0x0B, -- notgreaterorslnteql \ngeqslant --- [0x02A87] = 0x0C, -- lessnotequal \lneq --- [0x02A88] = 0x0D, -- greaternotequal \gneq --- -- [0x0] = 0x0E, -- notprecedesoreql \npreceq --- -- [0x0] = 0x0F, -- notfollowsoreql \nsucceq --- [0x022E8] = 0x10, -- precedeornoteqvlnt \precnsim --- [0x022E9] = 0x11, -- followornoteqvlnt \succnsim --- [0x022E6] = 0x12, -- lessornotsimilar \lnsim --- [0x022E7] = 0x13, -- greaterornotsimilar \gnsim --- -- [0x0] = 0x14, -- notlessdblequal \nleqq --- -- [0x0] = 0x15, -- notgreaterdblequal \ngeqq --- [0x02AB5] = 0x16, -- precedenotslnteql \precneqq --- [0x02AB6] = 0x17, -- follownotslnteql \succneqq --- [0x02AB9] = 0x18, -- precedenotdbleqv \precnapprox --- [0x02ABA] = 0x19, -- follownotdbleqv \succnapprox --- [0x02A89] = 0x1A, -- lessnotdblequal \lnapprox --- [0x02A8A] = 0x1B, -- greaternotdblequal \gnapprox --- [0x02241] = 0x1C, -- notsimilar \nsim --- [0x02247] = 0x1D, -- notapproxequal \ncong --- -- [0x0] = 0x1E, -- upslope \diagup --- -- [0x0] = 0x1F, -- downslope \diagdown --- -- [0x0] = 0x20, -- notsubsetoreql \varsubsetneq --- -- [0x0] = 0x21, -- notsupersetoreql \varsupsetneq --- -- [0x0] = 0x22, -- notsubsetordbleql \nsubseteqq --- -- [0x0] = 0x23, -- notsupersetordbleql \nsupseteqq --- [0x02ACB] = 0x24, -- subsetornotdbleql \subsetneqq --- [0x02ACC] = 0x25, -- supersetornotdbleql \supsetneqq --- -- [0x0] = 0x26, -- subsetornoteql \varsubsetneqq --- -- [0x0] = 0x27, -- supersetornoteql \varsupsetneqq --- [0x0228A] = 0x28, -- subsetnoteql \subsetneq --- [0x0228B] = 0x29, -- supersetnoteql \supsetneq --- [0x02288] = 0x2A, -- notsubseteql \nsubseteq --- [0x02289] = 0x2B, -- notsuperseteql \nsupseteq --- [0x02226] = 0x2C, -- notparallel \nparallel --- [0x02224] = 0x2D, -- notbar \nmid \ndivides --- -- [0x0] = 0x2E, -- notshortbar \nshortmid --- -- [0x0] = 0x2F, -- notshortparallel \nshortparallel --- [0x022AC] = 0x30, -- notturnstile \nvdash --- [0x022AE] = 0x31, -- notforces \nVdash --- [0x022AD] = 0x32, -- notsatisfies \nvDash --- [0x022AF] = 0x33, -- notforcesextra \nVDash --- [0x022ED] = 0x34, -- nottriangeqlright \ntrianglerighteq --- [0x022EC] = 0x35, -- nottriangeqlleft \ntrianglelefteq --- [0x022EA] = 0x36, -- nottriangleleft \ntriangleleft --- [0x022EB] = 0x37, -- nottriangleright \ntriangleright --- [0x0219A] = 0x38, -- notarrowleft \nleftarrow --- [0x0219B] = 0x39, -- notarrowright \nrightarrow --- [0x021CD] = 0x3A, -- notdblarrowleft \nLeftarrow --- [0x021CF] = 0x3B, -- notdblarrowright \nRightarrow --- [0x021CE] = 0x3C, -- notdblarrowboth \nLeftrightarrow --- [0x021AE] = 0x3D, -- notarrowboth \nleftrightarrow --- [0x022C7] = 0x3E, -- dividemultiply \divideontimes --- [0x02300] = 0x3F, -- diametersign \varnothing --- [0x02204] = 0x40, -- notexistential \nexists --- [0x1D538] = 0x41, -- A (blackboard A) --- [0x1D539] = 0x42, -- B --- [0x02102] = 0x43, -- C --- [0x1D53B] = 0x44, -- D --- [0x1D53C] = 0x45, -- E --- [0x1D53D] = 0x46, -- F --- [0x1D53E] = 0x47, -- G --- [0x0210D] = 0x48, -- H --- [0x1D540] = 0x49, -- I --- [0x1D541] = 0x4A, -- J --- [0x1D542] = 0x4B, -- K --- [0x1D543] = 0x4C, -- L --- [0x1D544] = 0x4D, -- M --- [0x02115] = 0x4E, -- N --- [0x1D546] = 0x4F, -- O --- [0x02119] = 0x50, -- P --- [0x0211A] = 0x51, -- Q --- [0x0211D] = 0x52, -- R --- [0x1D54A] = 0x53, -- S --- [0x1D54B] = 0x54, -- T --- [0x1D54C] = 0x55, -- U --- [0x1D54D] = 0x56, -- V --- [0x1D54E] = 0x57, -- W --- [0x1D54F] = 0x58, -- X --- [0x1D550] = 0x59, -- Y --- [0x02124] = 0x5A, -- Z (blackboard Z) --- [0x02132] = 0x60, -- finv \Finv --- [0x02141] = 0x61, -- fmir \Game --- -- [0x0] = 0x62, tildewide --- -- [0x0] = 0x63, tildewider --- -- [0x0] = 0x64, Finv --- -- [0x0] = 0x65, Gmir --- [0x02127] = 0x66, -- Omegainv \mho --- [0x000F0] = 0x67, -- eth \eth --- [0x02242] = 0x68, -- equalorsimilar \eqsim --- [0x02136] = 0x69, -- beth \beth --- [0x02137] = 0x6A, -- gimel \gimel --- [0x02138] = 0x6B, -- daleth \daleth --- [0x022D6] = 0x6C, -- lessdot \lessdot --- [0x022D7] = 0x6D, -- greaterdot \gtrdot --- [0x022C9] = 0x6E, -- multicloseleft \ltimes --- [0x022CA] = 0x6F, -- multicloseright \rtimes --- -- [0x0] = 0x70, -- barshort \shortmid --- -- [0x0] = 0x71, -- parallelshort \shortparallel --- -- [0x02216] = 0x72, -- integerdivide \smallsetminus (2216 already part of tex-sy --- -- [0x0] = 0x73, -- similar \thicksim --- -- [0x0] = 0x74, -- approxequal \thickapprox --- [0x0224A] = 0x75, -- approxorequal \approxeq --- [0x02AB8] = 0x76, -- followsorequal \succapprox --- [0x02AB7] = 0x77, -- precedesorequal \precapprox --- [0x021B6] = 0x78, -- archleftdown \curvearrowleft --- [0x021B7] = 0x79, -- archrightdown \curvearrowright --- [0x003DC] = 0x7A, -- Digamma \digamma --- [0x003F0] = 0x7B, -- kappa \varkappa --- [0x1D55C] = 0x7C, -- k \Bbbk (blackboard k) --- [0x0210F] = 0x7D, -- planckover2pi \hslash % 0x7D --- [0x00127] = 0x7E, -- planckover2pi1 \hbar % 0x7E --- [0x003F6] = 0x7F, -- epsiloninv \backepsilon --- } --- --- mathencodings["tex-mc"] = { --- -- this file has no tfm so it gets mapped in the private space --- [0xFE324] = "mapsfromchar", --- } - mathencodings["tex-fraktur"] = { -- [0x1D504] = 0x41, -- A (fraktur A) -- [0x1D505] = 0x42, -- B diff --git a/tex/context/base/mkxl/math-vfu.lmt b/tex/context/base/mkxl/math-vfu.lmt index bdd5de103..f3e0ea814 100644 --- a/tex/context/base/mkxl/math-vfu.lmt +++ b/tex/context/base/mkxl/math-vfu.lmt @@ -47,6 +47,7 @@ fonts.handlers.vf.math = vfmath local helpers = fonts.helpers local addprivate = helpers.addprivate +local hasprivate = helpers.hasprivate local vfcommands = helpers.commands local rightcommand = vfcommands.right @@ -56,511 +57,535 @@ local upcommand = vfcommands.up local push = vfcommands.push local pop = vfcommands.pop local slotcommand = vfcommands.slot +local staycommand = vfcommands.stay -local function brace(main,characters,id,size,unicode,first,rule,left,right,rule,last) - if not characters[unicode] then - local template = characters[first] - if template then - if not characters[rule] then - local width = template.width / 4 - local height = template.height - characters[rule] = { - height = 3*height, - depth = 2*height, - width = width, - commands = { push, { "rule", height, width }, pop }, +local nps = fonts.helpers.newprivateslot +local ps = fonts.helpers.privateslot + +do + + local function horibar(main,unicode,rule,left,right,normal) + local characters = main.characters + if not characters[unicode] then + local height = main.mathparameters.defaultrulethickness or 4*65536/10 + local f_rule = rule and formatters["M-HORIBAR-RULE-%H"](rule) + local p_rule = rule and hasprivate(main,f_rule) + if rule and left and right and normal then + local ldata = characters[left] + local mdata = characters[rule] + local rdata = characters[right] + local ndata = characters[normal] + local lwidth = ldata.width or 0 + local mwidth = mdata.width or 0 + local rwidth = rdata.width or 0 + local nwidth = ndata.width or 0 + local down = (mdata.height / 2) - height + -- + local f_left = right and formatters["M-HORIBAR-LEFT-%H"](right) + local f_right = right and formatters["M-HORIBAR-RIGHT-%H"](right) + local p_left = left and hasprivate(main,f_left) + local p_right = right and hasprivate(main,f_right) + -- + if not characters[p_rule] then + p_rule = addprivate(main,f_rule,{ + height = height, + width = mwidth, + width = .95*mwidth, + commands = { + push, + leftcommand[.025*mwidth], + downcommand[down], + slotcommand[0][rule], + pop, + }, + }) + end + if not characters[p_left] then + p_left = addprivate(main,f_left,{ + height = height, + width = lwidth, + width = .95*lwidth, + commands = { + push, + leftcommand[.025*lwidth], + downcommand[down], + slotcommand[0][left], + pop, + }, + }) + end + if not characters[p_right] then + p_right = addprivate(main,f_right,{ + height = height, + width = rwidth, + width = .95*rwidth, + commands = { + push, + leftcommand[.025*rwidth], + downcommand[down], + slotcommand[0][right], + pop, + }, + }) + end + characters[unicode] = { + keepvirtual = true, + partsorientation = "horizontal", + height = height, + width = nwidth, + commands = { + downcommand[down], + slotcommand[0][normal] + }, + parts = { + { glyph = p_left, ["end"] = 0.4*lwidth }, + { glyph = p_rule, extender = 1, ["start"] = mwidth, ["end"] = mwidth }, + { glyph = p_right, ["start"] = 0.6*rwidth }, + } } - end - characters[unicode] = { - keepvirtual = true, - partsorientation = "horizontal", - parts = { - { glyph = first }, - { glyph = rule, extender = 1 }, - { glyph = left }, - { glyph = right }, - { glyph = rule, extender = 1 }, - { glyph = last }, + else + local width = main.parameters.quad/4 or 4*65536 + if not characters[p_rule] then + p_rule = addprivate(main,f_rule,{ + height = height, + width = width, + commands = { push, { "rule", height, width }, pop }, + }) + end + characters[unicode] = { + keepvirtual = true, + partsorientation = "horizontal", + parts = { + { glyph = p_rule }, + { glyph = p_rule, extender = 1, ["start"] = width/2, ["end"] = width/2 }, + } } - } + end end end -end -local function horibar(main,characters,id,size,unicode,rule) - if not characters[unicode] then - if not characters[rule] then - local width = main.parameters .quad/4 or 4*65536 + -- local rootbarmiddle -- false = addprivate(main,formatters["M-R-%H"](next)) + -- local rootbarright -- false = addprivate(main,formatters["M-R-%H"](next)) + + local function rootbar(main,unicode,rule,right,normal) + local characters = main.characters + if not characters[unicode] then local height = main.mathparameters.defaultrulethickness or 4*65536/10 - characters[rule] = { - height = height, - width = width, - commands = { push, { "rule", height, width }, pop }, - } + if rule and right and normal then + local mdata = characters[rule] + local rdata = characters[right] + local ndata = characters[normal] + local mwidth = mdata.width or 0 + local rwidth = rdata.width or 0 + local nwidth = ndata.width or 0 + local down = (mdata.height / 2) - height + -- + local f_rule = rule and formatters["M-ROOTBAR-RULE-%H"](rule) + local f_right = right and formatters["M-ROOTBAR-RIGHT-%H"](right) + local p_rule = rule and hasprivate(main,f_rule) + local p_right = right and hasprivate(main,f_right) + -- + if not p_rule then + p_rule = addprivate(main,f_rule,{ + height = height, + width = .95*mwidth, + commands = { + push, + leftcommand[.05*mwidth], + downcommand[down], + slotcommand[0][rule], + pop, + }, + }) + end + if right and not p_right then + p_right = addprivate(main,p_right,{ + height = height, + width = .95*rwidth, + commands = { + push, + leftcommand[.05*rwidth], + downcommand[down], + slotcommand[0][right], + pop, + }, + }) + end + characters[unicode] = { + keepvirtual = true, + partsorientation = "horizontal", + height = height, + width = rwidth, + commands = { + slotcommand[0][p_right], + }, + parts = { + { glyph = p_rule, extender = 1, ["start"] = mwidth, ["end"] = 0.9*mwidth }, + { glyph = p_right, ["start"] = 0.6*rwidth }, + } + } + end end - characters[unicode] = { - keepvirtual = true, - partsorientation = "horizontal", - parts = { - { glyph = rule }, - { glyph = rule, extender = 1 }, - } - } end -end -local function parent(main,characters,id,size,unicode,first,rule,last,where) - if not characters[unicode] then - local template = characters[first] - if template then - if not characters[rule] then - local width = template.width / 4 - local height = template.height - characters[rule] = { - height = where == "top" and height or 3*height, - depth = where == "top" and 2*height or 0, - width = width, - commands = { push, { "rule", height, width }, pop }, + local function parent(main,unicode,first,rule,last,where) + local characters = main.characters + local chardata = characters[unicode] + if characters[unicode] then + local template = characters[first] + if template then + if not characters[rule] then + local xheight = main.mathparameters.xheight + local width = template.width / 4 + local height = template.height + local depth = template.depth + local rheight = where == "top" and height or 3*height + local rdepth = where == "top" and 2*height or 0 + characters[rule] = { + height = rheight, + depth = rdepth, + width = width, + commands = { push, { "rule", height, width }, pop }, + } + characters[first].depth = rdepth + characters[last] .depth = rdepth + while true do + chardata.height = chardata.height - xheight + chardata.depth = 0 + chardata.yoffset = -xheight + local next = chardata.next + if next then + unicode = next + chardata = characters[unicode] + else + break + end + end + end + chardata.keepvirtual = true + chardata.partsorientation = "horizontal" + chardata.parts = { + { glyph = first }, + { glyph = rule, extender = 1 }, + { glyph = last }, } end - characters[unicode] = { - keepvirtual = true, - partsorientation = "horizontal", - parts = { + end + end + + local function brace(main,unicode,first,rule,left,right,rule,last) + local characters = main.characters + local chardata = characters[unicode] + if chardata then + local template = characters[first] + if template then + if not characters[rule] then + local xheight = main.mathparameters.xheight + local width = template.width / 4 + local height = template.height + local depth = template.depth + local rheight = 3*height + local rdepth = 2*height + characters[rule] = { + height = rheight, + depth = rdepth, + width = width, + commands = { push, { "rule", height, width }, pop }, + } + characters[first].depth = rdepth + characters[last] .depth = rdepth + characters[left] .height = rheight + characters[right].height = rheight + while true do + chardata.height = chardata.height - xheight + chardata.depth = 0 + chardata.yoffset = -xheight + local next = chardata.next + if next then + unicode = next + chardata = characters[unicode] + else + break + end + end + end + chardata.keepvirtual = true + chardata.partsorientation = "horizontal" + chardata.parts = { { glyph = first }, { glyph = rule, extender = 1 }, + { glyph = left }, + { glyph = right }, + { glyph = rule, extender = 1 }, { glyph = last }, } - } + end end end -end - --- local function extension(main,characters,id,size,unicode,first,middle,last) --- local chr = characters[unicode] --- if not chr then --- return -- skip --- end --- local fw = characters[first] --- if not fw then --- return --- end --- local mw = characters[middle] --- if not mw then --- return --- end --- local lw = characters[last] --- if not lw then --- return --- end --- fw = fw.width --- mw = mw.width --- lw = lw.width --- if fw == 0 then --- fw = 1 --- end --- if lw == 0 then --- lw = 1 --- end --- chr.partsorientation = "horizontal" --- chr.parts = { --- { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw }, --- { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw }, --- { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw }, --- } --- end - --- local step = 0.2 -- 0.1 is nicer but gives larger files --- local function clipped(main,characters,id,size,unicode,original) -- push/pop needed? --- local minus = characters[original] --- if minus then --- local mu = size/18 --- local step = 3*mu --- local width = minus.width --- if width > step then --- width = width - step --- step = step / 2 --- else --- width = width / 2 --- step = width --- end --- characters[unicode] = { --- width = width, --- height = minus.height, --- depth = minus.depth, --- commands = { --- push, --- leftcommand[step], --- slotcommand[id][original], --- pop, --- } --- } --- end --- end - -local function dots(main,characters,id,size,unicode) - local c = characters[0x002E] - if c then - local w = c.width - local h = c.height - local d = c.depth - local mu = size/18 - local right3mu = rightcommand[3*mu] - local right1mu = rightcommand[1*mu] - local up1size = upcommand[.1*size] - local up4size = upcommand[.4*size] - local up7size = upcommand[.7*size] - local right2muw = rightcommand[2*mu + w] - local slot = slotcommand[id][0x002E] - if unicode == 0x22EF then - local c = characters[0x022C5] - if c then - local width = c.width - local height = c.height - local depth = c.depth - local slot = slotcommand[id][0x022C5] + local function dots(main,unicode) + local characters = main.characters + local c = characters[0x002E] + if c then + local w = c.width + local h = c.height + local d = c.depth + local size = main.parameters.size + local mu = size/18 + local right3mu = rightcommand[3*mu] + local right1mu = rightcommand[1*mu] + local up1size = upcommand[.1*size] + local up4size = upcommand[.4*size] + local up7size = upcommand[.7*size] + local right2muw = rightcommand[2*mu + w] + local slot = slotcommand[0][0x002E] + if unicode == 0x22EF then + local c = characters[0x022C5] + if c then + local width = c.width + local height = c.height + local depth = c.depth + local slot = slotcommand[0][0x022C5] + -- local stay = staycommand[0x022C5] + -- local right3mu = rightcommand[width+3*mu] + characters[unicode] = { + width = 3*width + 2*3*mu, + height = height, + depth = depth, + commands = { + slot, right3mu, slot, right3mu, slot, + -- push, slot, right3mu, slot, right3mu, slot, pop, + -- stay, right3mu, stay, right3mu, stay, + } + } + end + elseif unicode == 0x22EE then characters[unicode] = { - width = 3*width + 2*3*mu, - height = height, - depth = depth, + width = w, + height = h+0.8*size, + depth = 0, commands = { - push, slot, right3mu, slot, right3mu, slot, pop, + -- push, push, slot, pop, up4size, push, slot, pop, up4size, slot, pop, + push, slot, pop, up4size, push, slot, pop, up4size, slot, } } - end - elseif unicode == 0x22EE then - characters[unicode] = { - width = w, - height = h+0.8*size, - depth = 0, - commands = { - push, push, slot, pop, up4size, push, slot, pop, up4size, slot, pop, + elseif unicode == 0x22F1 then + characters[unicode] = { + width = 3*w + 6*size/18, + height = h+0.7*size, + depth = 0, + commands = { + -- push, + right1mu, + push, up7size, slot, pop, + right2muw, + push, up4size, slot, pop, + right2muw, + push, up1size, slot, pop, + right1mu, + -- pop + } } - } - elseif unicode == 0x22F1 then + elseif unicode == 0x22F0 then + characters[unicode] = { + width = 3*w + 6*size/18, + height = h+0.7*size, + depth = 0, + commands = { + -- push, + right1mu, + push, up1size, slot, pop, + right2muw, + push, up4size, slot, pop, + right2muw, + push, up7size, slot, pop, + right1mu, + -- pop + } + } + else + characters[unicode] = { + width = 3*w + 2*3*mu, + height = h, + depth = d, + commands = { + -- push, slot, right3mu, slot, right3mu, slot, pop, + slot, right3mu, slot, right3mu, slot, + } + } + end + end + end + + local function jointwo(main,unicode,u1,d12,u2) + local characters = main.characters + local c1 = characters[u1] + local c2 = characters[u2] + if c1 and c2 then + local w1 = c1.width + local w2 = c2.width + local width + if d12 == false then + d12 = 0 + width = w2 + elseif d12 < 0 then + d12 = d12 * w2 + width = w2 + else + d12 = d12 * main.parameters.size/18 -- mu + width = w1 + w2 - d12 + end characters[unicode] = { - width = 3*w + 6*size/18, - height = h+0.7*size, - depth = 0, + width = width, + height = max(c1.height or 0, c2.height or 0), + depth = max(c1.depth or 0, c2.depth or 0), commands = { - push, - right1mu, - push, up7size, slot, pop, - right2muw, - push, up4size, slot, pop, - right2muw, - push, up1size, slot, pop, - right1mu, - pop - } + -- { "inspect" }, + -- { "trace" }, + slotcommand[0][u1], + -- { "trace" }, + d12 ~= 0 and leftcommand[d12] or false, + slotcommand[0][u2], + -- { "trace" }, + }, } - elseif unicode == 0x22F0 then + end + end + + local function overlaytwo(main,unicode,u1,factor,u2) -- not ... + local characters = main.characters + local c1 = characters[u1] + local c2 = characters[u2] + if c1 and c2 then + local width = c2.width characters[unicode] = { - width = 3*w + 6*size/18, - height = h+0.7*size, - depth = 0, + width = width, + height = max(c1.height or 0, c2.height or 0), + depth = max(c1.depth or 0, c2.depth or 0), commands = { push, - right1mu, - push, up1size, slot, pop, - right2muw, - push, up4size, slot, pop, - right2muw, - push, up7size, slot, pop, - right1mu, - pop - } + slotcommand[0][u2], -- = + pop, + factor ~= 0 and rightcommand[factor*width] or false, + slotcommand[0][u1], -- / + }, } - else + end + end + + local function jointhree(main,unicode,u1,d12,u2,d23,u3) + local characters = main.characters + local c1 = characters[u1] + local c2 = characters[u2] + local c3 = characters[u3] + if c1 and c2 and c3 then + local w1 = c1.width + local w2 = c2.width + local w3 = c3.width + local mu = main.parameters.size/18 + d12 = d12 * ds + d23 = d23 * ds characters[unicode] = { - width = 3*w + 2*3*mu, - height = h, - depth = d, + width = w1 + w2 + w3 - d12 - d23, + height = max(c1.height or 0, c2.height or 0, c3.height or 0), + depth = max(c1.depth or 0, c2.depth or 0, c3.depth or 0), commands = { - push, slot, right3mu, slot, right3mu, slot, pop, + -- push, + slotcommand[0][u1], + -- pop, + d12 ~= 0 and leftcommand[d12] or false, + -- push, + slotcommand[0][u2], + -- pop, + d23 ~= 0 and leftcommand[d23] or false, + -- push, + slotcommand[0][u3], + -- pop, } } end end -end --- local function vertbar(main,characters,id,size,parent,scale,unicode) --- local cp = characters[parent] --- if cp then --- local sc = scale * size --- local pc = slotcommand[id][parent] --- characters[unicode] = { --- width = cp.width, --- height = cp.height + sc, --- depth = cp.depth + sc, --- next = cp.next, -- can be extensible --- commands = { --- push, upcommand [sc], pc, pop, --- push, downcommand[sc], pc, pop, --- pc, --- }, --- } --- cp.next = unicode --- end --- end - -local function jointwo(main,characters,id,size,unicode,u1,d12,u2,what) - local c1 = characters[u1] - local c2 = characters[u2] - if c1 and c2 then - local w1 = c1.width - local w2 = c2.width - local width - if d12 == false then - d12 = 0 - width = w2 - else - d12 = d12 * size/18 -- mu - width = w1 + w2 - d12 + local function stack(main,unicode,u1,d12,u2) + local characters = main.characters + local c1 = characters[u1] + if not c1 then + return end + local c2 = characters[u2] + if not c2 then + return + end + local w1 = c1.width or 0 + local h1 = c1.height or 0 + local d1 = c1.depth or 0 + local w2 = c2.width or 0 + local h2 = c2.height or 0 + local d2 = c2.depth or 0 + local mu = main.parameters.size/18 characters[unicode] = { - width = width, - height = max(c1.height or 0, c2.height or 0), - depth = max(c1.depth or 0, c2.depth or 0), - commands = { --- { "inspect" }, --- { "trace" }, - slotcommand[id][u1], --- { "trace" }, - d12 ~= 0 and leftcommand[d12] or false, - slotcommand[id][u2], --- { "trace" }, - }, - } - end -end - -local function jointhree(main,characters,id,size,unicode,u1,d12,u2,d23,u3) - local c1 = characters[u1] - local c2 = characters[u2] - local c3 = characters[u3] - if c1 and c2 and c3 then - local w1 = c1.width - local w2 = c2.width - local w3 = c3.width - d12 = d12 * size/18 -- mu - d23 = d23 * size/18 -- mu - characters[unicode] = { - width = w1 + w2 + w3 - d12 - d23, - height = max(c1.height or 0, c2.height or 0, c3.height or 0), - depth = max(c1.depth or 0, c2.depth or 0, c3.depth or 0), + width = w1, + height = h1 + h2 + d12*mu, + depth = d1, commands = { --- push, - slotcommand[id][u1], --- pop, - d12 ~= 0 and leftcommand[d12] or false, --- push, - slotcommand[id][u2], --- pop, - d23 ~= 0 and leftcommand[d23] or false, --- push, - slotcommand[id][u3], --- pop, + slotcommand[0][u1], + leftcommand[w1/2 + w2/2], + downcommand[-h1 + d2 -d12*mu], + slotcommand[0][u2], } } end -end - -local function stack(main,characters,id,size,unicode,u1,d12,u2) - local c1 = characters[u1] - if not c1 then - return - end - local c2 = characters[u2] - if not c2 then - return - end - local w1 = c1.width or 0 - local h1 = c1.height or 0 - local d1 = c1.depth or 0 - local w2 = c2.width or 0 - local h2 = c2.height or 0 - local d2 = c2.depth or 0 - local mu = size/18 - characters[unicode] = { - width = w1, - height = h1 + h2 + d12*mu, - depth = d1, - commands = { - slotcommand[id][u1], - leftcommand[w1/2 + w2/2], - downcommand[-h1 + d2 -d12*mu], - slotcommand[id][u2], - } - } -end -local function repeated(main,characters,id,size,unicode,u,n,fraction) - local c = characters[u] - if c then - if n == 1 then - -- skip this one - else - local width = c.width - local italic = fraction*width -- c.italic or 0 -- larger ones have funny italics - local tc = slotcommand[id][u] - local tr = leftcommand[italic] -- see hack elsewhere - local commands = { } - for i=1,n-1 do + local function repeated(main,unicode,u,n,fraction) + local characters = main.characters + local c = characters[u] + if c then + if n == 1 then + -- skip this one + else + local width = c.width + local italic = fraction*width -- c.italic or 0 -- larger ones have funny italics + local tc = slotcommand[0][u] + local tr = leftcommand[italic] -- see hack elsewhere + local commands = { } + for i=1,n-1 do + commands[#commands+1] = tc + commands[#commands+1] = tr + end commands[#commands+1] = tc - commands[#commands+1] = tr - end - commands[#commands+1] = tc - local next = c.next - if next then - local p = addprivate(main,formatters["M-R-%H"](next)) - repeated(main,characters,id,size,p,next,n,fraction) - next = p + local next = c.next + if next then + local p = addprivate(main,formatters["M-R-%H"](next)) + repeated(main,p,next,n,fraction) + next = p + end + characters[unicode] = { + width = width + (n-1)*(width-italic), + height = c.height, + depth = c.depth, + italic = italic, + commands = commands, + keepvirtual = true, + next = next, + } end - characters[unicode] = { - width = width + (n-1)*(width-italic), - height = c.height, - depth = c.depth, - italic = italic, - commands = commands, - keepvirtual = true, - next = next, - } end end -end - --- local function cloned(main,characters,id,size,source,target) --- local data = characters[source] --- if data then --- characters[target] = data --- return true --- end --- end - --- we use the fact that context defines the smallest sizes first .. a real dirty and ugly hack - --- todo: use privates as we don't need access by number - -local data_of_smaller = nil -local size_of_smaller = 0 - -function vfmath.addmissing(main,id,size) - - local id_of_smaller = nil - - if size < size_of_smaller or size_of_smaller == 0 then - data_of_smaller = main.fonts[id] - id_of_smaller = id - else - id_of_smaller = #main.fonts + 1 - main.fonts[id_of_smaller] = data_of_smaller - end - - -- here id is the index in fonts (normally 14 or so) and that slot points to self - - local characters = main.characters - local shared = main.shared - local variables = main.goodies.mathematics and main.goodies.mathematics.variables or { } - local joinrelfactor = variables.joinrelfactor or 3 - - brace (main,characters,id,size,0x23DE,0xFE07A,0xFE070,0xFE07D,0xFE07C,0xFE070,0xFE07B) - brace (main,characters,id,size,0x23DF,0xFE07C,0xFE070,0xFE07B,0xFE07A,0xFE070,0xFE07D) - - parent (main,characters,id,size,0x23DC,0xFE07A,0xFE071,0xFE07B,"top") - parent (main,characters,id,size,0x23DD,0xFE07C,0xFE072,0xFE07D,"bottom") - - dots (main,characters,id,size,0x2026) -- ldots - dots (main,characters,id,size,0x22EE) -- vdots - dots (main,characters,id,size,0x22EF) -- cdots - dots (main,characters,id,size,0x22F1) -- ddots - dots (main,characters,id,size,0x22F0) -- udots - - horibar (main,characters,id,size,0x203E,0xFE073) -- overbar underbar - - -- vertbar (main,characters,id,size,0x0007C,0.10,0xFF601) -- big : 0.85 bodyfontsize - -- vertbar (main,characters,id,size,0xFF601,0.30,0xFF602) -- Big : 1.15 bodyfontsize - -- vertbar (main,characters,id,size,0xFF602,0.30,0xFF603) -- bigg : 1.45 bodyfontsize - -- vertbar (main,characters,id,size,0xFF603,0.30,0xFF604) -- Bigg : 1.75 bodyfontsize - -- vertbar (main,characters,id,size,0x02016,0.10,0xFF605) - -- vertbar (main,characters,id,size,0xFF605,0.30,0xFF606) - -- vertbar (main,characters,id,size,0xFF606,0.30,0xFF607) - -- vertbar (main,characters,id,size,0xFF607,0.30,0xFF608) - -- clipped (main,characters,id,size,0xFF501,0x0002D) -- minus - -- clipped (main,characters,id,size,0xFF502,0x02190) -- lefthead - -- clipped (main,characters,id,size,0xFF503,0x02192) -- righthead - -- clipped (main,characters,id,size,0xFF504,0xFE321) -- mapsto - -- clipped (main,characters,id,size,0xFF505,0xFE322) -- lhook - -- clipped (main,characters,id,size,0xFF506,0xFE323) -- rhook - -- clipped (main,characters,id,size,0xFF507,0xFE324) -- mapsfrom - -- clipped (main,characters,id,size,0xFF508,0x021D0) -- double lefthead - -- clipped (main,characters,id,size,0xFF509,0x021D2) -- double righthead - -- clipped (main,characters,id,size,0xFF50A,0x0003D) -- equal - -- clipped (main,characters,id,size,0xFF50B,0x0219E) -- lefttwohead - -- clipped (main,characters,id,size,0xFF50C,0x021A0) -- righttwohead - -- clipped (main,characters,id,size,0xFF50D,0xFF350) -- lr arrow combi snippet - -- clipped (main,characters,id,size,0xFF50E,0xFF351) -- lr arrow combi snippet - -- clipped (main,characters,id,size,0xFF50F,0xFF352) -- lr arrow combi snippet - -- clipped (main,characters,id,size,0xFF510,0x02261) -- equiv - - -- extension(main,characters,id,size,0x2190,0xFF502,0xFF501,0xFF501) -- \leftarrow - -- extension(main,characters,id,size,0x2192,0xFF501,0xFF501,0xFF503) -- \rightarrow - - -- extension(main,characters,id,size,0x002D,0xFF501,0xFF501,0xFF501) -- \rel - -- extension(main,characters,id,size,0x003D,0xFF50A,0xFF50A,0xFF50A) -- \equal - -- extension(main,characters,id,size,0x2261,0xFF510,0xFF510,0xFF510) -- \equiv - - -- jointwo (main,characters,id,size,0x21A6,0xFE321,0,0x02192) -- \mapstochar\rightarrow - -- jointwo (main,characters,id,size,0x21A9,0x02190,joinrelfactor,0xFE323) -- \leftarrow\joinrel\rhook - -- jointwo (main,characters,id,size,0x21AA,0xFE322,joinrelfactor,0x02192) -- \lhook\joinrel\rightarrow - jointwo (main,characters,id,size,0x27F5,0x02190,joinrelfactor,0x0002D) -- \leftarrow\joinrel\relbar - jointwo (main,characters,id,size,0x27F6,0x0002D,joinrelfactor,0x02192,2) -- \relbar\joinrel\rightarrow - jointwo (main,characters,id,size,0x27F7,0x02190,joinrelfactor,0x02192) -- \leftarrow\joinrel\rightarrow - jointwo (main,characters,id,size,0x27F8,0x021D0,joinrelfactor,0x0003D) -- \Leftarrow\joinrel\Relbar - jointwo (main,characters,id,size,0x27F9,0x0003D,joinrelfactor,0x021D2) -- \Relbar\joinrel\Rightarrow - jointwo (main,characters,id,size,0x27FA,0x021D0,joinrelfactor,0x021D2) -- \Leftarrow\joinrel\Rightarrow - -- jointhree(main,characters,id,size,0x27FB,0x02190,joinrelfactor,0x0002D,0,0xFE324) -- \leftarrow\joinrel\relbar\mapsfromchar - -- jointhree(main,characters,id,size,0x27FC,0xFE321,0,0x0002D,joinrelfactor,0x02192) -- \mapstochar\relbar\joinrel\rightarrow - - -- extension(main,characters,id,size,0x21A6,0xFF504,0xFF501,0xFF503) -- \mapstochar\rightarrow - -- extension(main,characters,id,size,0x21A9,0xFF502,0xFF501,0xFF506) -- \leftarrow\joinrel\rhook - -- extension(main,characters,id,size,0x21AA,0xFF505,0xFF501,0xFF503) -- \lhook\joinrel\rightarrow - -- extension(main,characters,id,size,0x27F5,0xFF502,0xFF501,0xFF501) -- \leftarrow\joinrel\relbar - -- extension(main,characters,id,size,0x27F6,0xFF501,0xFF501,0xFF503) -- \relbar\joinrel\rightarrow - -- extension(main,characters,id,size,0x27F7,0xFF502,0xFF501,0xFF503) -- \leftarrow\joinrel\rightarrow - -- extension(main,characters,id,size,0x27F8,0xFF508,0xFF50A,0xFF50A) -- \Leftarrow\joinrel\Relbar - -- extension(main,characters,id,size,0x27F9,0xFF50A,0xFF50A,0xFF509) -- \Relbar\joinrel\Rightarrow - -- extension(main,characters,id,size,0x27FA,0xFF508,0xFF50A,0xFF509) -- \Leftarrow\joinrel\Rightarrow - -- extension(main,characters,id,size,0x27FB,0xFF502,0xFF501,0xFF507) -- \leftarrow\joinrel\relbar\mapsfromchar - -- extension(main,characters,id,size,0x27FC,0xFF504,0xFF501,0xFF503) -- \mapstochar\relbar\joinrel\rightarrow - - -- extension(main,characters,id,size,0x219E,0xFF50B,0xFF501,0xFF501) -- \twoheadleftarrow\joinrel\relbar - -- extension(main,characters,id,size,0x21A0,0xFF501,0xFF501,0xFF50C) -- \relbar\joinrel\twoheadrightarrow - -- extension(main,characters,id,size,0x21C4,0xFF50D,0xFF50E,0xFF50F) -- leftoverright - - -- 21CB leftrightharpoon - -- 21CC rightleftharpoon - - stack(main,characters,id,size,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over= - - jointwo(main,characters,id,size,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3) - jointwo(main,characters,id,size,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel= - jointwo(main,characters,id,size,0x2260,0x00338,0,0x0003D) -- \not\equal - jointwo(main,characters,id,size,0x2284,0x00338,false,0x02282) -- \not\subset - jointwo(main,characters,id,size,0x2285,0x00338,false,0x02283) -- \not\supset - jointwo(main,characters,id,size,0x2209,0x00338,false,0x02208) -- \not\in - jointwo(main,characters,id,size,0x2254,0x03A,0,0x03D) -- := (≔) - - repeated(main,characters,id,size,0x222B,0x222B,1,1/2) - repeated(main,characters,id,size,0x222C,0x222B,2,1/2) - repeated(main,characters,id,size,0x222D,0x222B,3,1/2) - - characters[0x02B9] = characters[0x2032] -- we're nice + vfmath.builders = { + horibar = horibar, + rootbar = rootbar, + parent = parent, + brace = brace, + dots = dots, + jointwo = jointwo, + overlaytwo = overlaytwo, + jointhree = jointhree, + stack = stack, + repeated = repeated, + } - data_of_smaller = main.fonts[id] - size_of_smaller = size + -- todo: move this to the lfg files end @@ -706,6 +731,7 @@ local function virtualize(s,uni,fci,skewchar,move,mathparameters,unicode,paramet depth = half - axis end -- + local next = fci.next return { advance = advance, width = width, @@ -797,7 +823,9 @@ function vfmath.define(specification,set,goodies) hasitalics = true, hasmath = true, } - local goodies = { } + if not goodies then + goodies = { } + end local main = { metadata = metadata, properties = properties, @@ -899,8 +927,8 @@ function vfmath.define(specification,set,goodies) mathparameters.sup3 = newparameters[15] or 0 -- sup3 : superscript shift-up in cramped styles mathparameters.sub1 = newparameters[16] or 0 -- sub1 : subscript shift-down if superscript is absent mathparameters.sub2 = newparameters[17] or 0 -- sub2 : subscript shift-down if superscript is present - mathparameters.sup_drop = newparameters[18] or 0 -- sup_drop : superscript baseline below top of large box - mathparameters.sub_drop = newparameters[19] or 0 -- sub_drop : subscript baseline below bottom of large box + mathparameters.supdrop = newparameters[18] or 0 -- supdrop : superscript baseline below top of large box + mathparameters.subdrop = newparameters[19] or 0 -- subdrop : subscript baseline below bottom of large box mathparameters.delim1 = newparameters[20] or 0 -- delim1 : size of \atopwithdelims delimiters in display styles mathparameters.delim2 = newparameters[21] or 0 -- delim2 : size of \atopwithdelims delimiters in non-displays mathparameters.axisheight = newparameters[22] or 0 -- axisheight : height of fraction lines above the baseline @@ -984,11 +1012,24 @@ function vfmath.define(specification,set,goodies) end end end +-- if ss.jmn then +-- local extension = mathencodings["extensible-jmn-private"] +-- for unicode, index in sortedhash(extension) do +-- if not characters[unicode] then +-- local uni = backmap and backmap[index] or index +-- local fci = fc[uni] +-- characters[unicode] = virtualize(s,uni,fci,skewchar,false,mathparameters,unicode,fp) +-- end +-- end +-- end if isextension then local extension = mathencodings["large-to-small"] for uni, fci in sortedhash(fc) do - if not done[uni] then - local t = virtualize(s,uni,fci,skewchar,tonumber(badones and badones[fci.name or ""]),mathparameters,nil,fp) + local name = fci.name or "" + if ignore and ignore[name] then + -- get rid of ugly antykwa bar + elseif not done[uni] then + local t = virtualize(s,uni,fci,skewchar,tonumber(badones and badones[name]),mathparameters,nil,fp) local o = addprivate(main,f_extra(offset)) extras[uni] = o characters[o] = t @@ -1011,7 +1052,7 @@ function vfmath.define(specification,set,goodies) end fci.keepvirtual = true fci.parts = p - fci.partsorientation = "vertical" + fci.partsorientation = "vertical" -- nasty as some are horizontal fci.partsitalic = fci.partsitalic or fci.italic end end @@ -1045,7 +1086,11 @@ function vfmath.define(specification,set,goodies) size = size, fontname = name, -- diagnostics } - vfmath.addmissing(main,#fontlist,size) + -- + local addmissing = goodies.mathematics.addmissing + if type(addmissing) == "function" then + addmissing(main) + end -- mathematics.addfallbacks(main) -- @@ -1056,6 +1101,22 @@ function vfmath.define(specification,set,goodies) main.mathconstants = main.mathparameters -- we directly pass it to TeX (bypasses the scaler) so this is needed main.MathConstants = main.mathconstants main.nomath = false + -- + mathematics.tweaks.setoptions(main,main,{ + tweak = "setoptions", + set = { "ignorekerndimensions" } + }) -- we have dp > ht fences + -- + mathematics.tweaks.fixprimes(main, main, { + tweak = "fixprimes", + factor = 1, -- accent base height + fake = 0.9, -- replace multiples with this width proportion + }) + -- +-- mathematics.tweaks.addbars(main,main,{ +-- tweak = "addbars", +-- advance = 0.52, +-- }) -- if trace_virtual or trace_timings then report_virtual("loading and virtualizing font %a at size %p took %0.3f seconds",name,size,os.clock()-start) @@ -1086,3 +1147,145 @@ function vfmath.setdigits(font_encoding, name, digits) enc[digits+i] = i + 0x30 end end + +-- local function extension(main,characters,id,size,unicode,first,middle,last) +-- local chr = characters[unicode] +-- if not chr then +-- return -- skip +-- end +-- local fw = characters[first] +-- if not fw then +-- return +-- end +-- local mw = characters[middle] +-- if not mw then +-- return +-- end +-- local lw = characters[last] +-- if not lw then +-- return +-- end +-- fw = fw.width +-- mw = mw.width +-- lw = lw.width +-- if fw == 0 then +-- fw = 1 +-- end +-- if lw == 0 then +-- lw = 1 +-- end +-- chr.partsorientation = "horizontal" +-- chr.parts = { +-- { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw }, +-- { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw }, +-- { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw }, +-- } +-- end + +-- local step = 0.2 -- 0.1 is nicer but gives larger files + +-- local function clipped(main,characters,id,size,unicode,original) -- push/pop needed? +-- local minus = characters[original] +-- if minus then +-- local mu = size/18 +-- local step = 3*mu +-- local width = minus.width +-- if width > step then +-- width = width - step +-- step = step / 2 +-- else +-- width = width / 2 +-- step = width +-- end +-- characters[unicode] = { +-- width = width, +-- height = minus.height, +-- depth = minus.depth, +-- commands = { +-- push, +-- leftcommand[step], +-- slotcommand[0][original], +-- pop, +-- } +-- } +-- end +-- end + +-- local function vertbar(main,characters,id,size,parent,scale,unicode) +-- local cp = characters[parent] +-- if cp then +-- local sc = scale * size +-- local pc = slotcommand[0][parent] +-- characters[unicode] = { +-- width = cp.width, +-- height = cp.height + sc, +-- depth = cp.depth + sc, +-- next = cp.next, -- can be extensible +-- commands = { +-- push, upcommand [sc], pc, pop, +-- push, downcommand[sc], pc, pop, +-- pc, +-- }, +-- } +-- cp.next = unicode +-- end +-- end + +-- vertbar (main,characters,id,size,0x0007C,0.10,0xFF601) -- big : 0.85 bodyfontsize +-- vertbar (main,characters,id,size,0xFF601,0.30,0xFF602) -- Big : 1.15 bodyfontsize +-- vertbar (main,characters,id,size,0xFF602,0.30,0xFF603) -- bigg : 1.45 bodyfontsize +-- vertbar (main,characters,id,size,0xFF603,0.30,0xFF604) -- Bigg : 1.75 bodyfontsize +-- vertbar (main,characters,id,size,0x02016,0.10,0xFF605) +-- vertbar (main,characters,id,size,0xFF605,0.30,0xFF606) +-- vertbar (main,characters,id,size,0xFF606,0.30,0xFF607) +-- vertbar (main,characters,id,size,0xFF607,0.30,0xFF608) + +-- clipped (main,characters,id,size,0xFF501,0x0002D) -- minus +-- clipped (main,characters,id,size,0xFF502,0x02190) -- lefthead +-- clipped (main,characters,id,size,0xFF503,0x02192) -- righthead +-- clipped (main,characters,id,size,0xFF504,ps("maps to piece") -- mapsto +-- clipped (main,characters,id,size,0xFF505,0xFE322) -- lhook +-- clipped (main,characters,id,size,0xFF506,0xFE323) -- rhook +-- clipped (main,characters,id,size,0xFF507,0xFE324) -- mapsfrom +-- clipped (main,characters,id,size,0xFF508,0x021D0) -- double lefthead +-- clipped (main,characters,id,size,0xFF509,0x021D2) -- double righthead +-- clipped (main,characters,id,size,0xFF50A,0x0003D) -- equal +-- clipped (main,characters,id,size,0xFF50B,0x0219E) -- lefttwohead +-- clipped (main,characters,id,size,0xFF50C,0x021A0) -- righttwohead +-- clipped (main,characters,id,size,0xFF50D,0xFF350) -- lr arrow combi snippet +-- clipped (main,characters,id,size,0xFF50E,0xFF351) -- lr arrow combi snippet +-- clipped (main,characters,id,size,0xFF50F,0xFF352) -- lr arrow combi snippet +-- clipped (main,characters,id,size,0xFF510,0x02261) -- equiv + +-- extension(main,characters,id,size,0x2190,0xFF502,0xFF501,0xFF501) -- \leftarrow +-- extension(main,characters,id,size,0x2192,0xFF501,0xFF501,0xFF503) -- \rightarrow + +-- extension(main,characters,id,size,0x002D,0xFF501,0xFF501,0xFF501) -- \rel +-- extension(main,characters,id,size,0x003D,0xFF50A,0xFF50A,0xFF50A) -- \equal +-- extension(main,characters,id,size,0x2261,0xFF510,0xFF510,0xFF510) -- \equiv + +-- local lh = ps("left hook piece")] -- was FE322 +-- local rh = ps("right hook piece")] -- was FE323 + +-- jointwo (main,characters,id,size,0x21A6,ps("maps to piece"),0,0x02192) -- \mapstochar\rightarrow +-- jointwo (main,characters,id,size,0x21A9,0x02190,joinrelfactor,0xFE323) -- \leftarrow\joinrel\rhook +-- jointwo (main,characters,id,size,0x21AA,0xFE322,joinrelfactor,0x02192) -- \lhook\joinrel\rightarrow +-- jointhree(main,characters,id,size,0x27FB,0x02190,joinrelfactor,0x0002D,0,0xFE324) -- \leftarrow\joinrel\relbar\mapsfromchar + +-- jointhree(main,characters,id,size,0x27FC,ps("maps to piece"),0,0x0002D,joinrelfactor,0x02192) -- \mapstochar\relbar\joinrel\rightarrow + +-- extension(main,characters,id,size,0x21A6,0xFF504,0xFF501,0xFF503) -- \mapstochar\rightarrow +-- extension(main,characters,id,size,0x21A9,0xFF502,0xFF501,0xFF506) -- \leftarrow\joinrel\rhook +-- extension(main,characters,id,size,0x21AA,0xFF505,0xFF501,0xFF503) -- \lhook\joinrel\rightarrow +-- extension(main,characters,id,size,0x27F5,0xFF502,0xFF501,0xFF501) -- \leftarrow\joinrel\relbar +-- extension(main,characters,id,size,0x27F6,0xFF501,0xFF501,0xFF503) -- \relbar\joinrel\rightarrow +-- extension(main,characters,id,size,0x27F7,0xFF502,0xFF501,0xFF503) -- \leftarrow\joinrel\rightarrow +-- extension(main,characters,id,size,0x27F8,0xFF508,0xFF50A,0xFF50A) -- \Leftarrow\joinrel\Relbar +-- extension(main,characters,id,size,0x27F9,0xFF50A,0xFF50A,0xFF509) -- \Relbar\joinrel\Rightarrow +-- extension(main,characters,id,size,0x27FA,0xFF508,0xFF50A,0xFF509) -- \Leftarrow\joinrel\Rightarrow +-- extension(main,characters,id,size,0x27FB,0xFF502,0xFF501,0xFF507) -- \leftarrow\joinrel\relbar\mapsfromchar +-- extension(main,characters,id,size,0x27FC,0xFF504,0xFF501,0xFF503) -- \mapstochar\relbar\joinrel\rightarrow + +-- extension(main,characters,id,size,0x219E,0xFF50B,0xFF501,0xFF501) -- \twoheadleftarrow\joinrel\relbar +-- extension(main,characters,id,size,0x21A0,0xFF501,0xFF501,0xFF50C) -- \relbar\joinrel\twoheadrightarrow +-- extension(main,characters,id,size,0x21C4,0xFF50D,0xFF50E,0xFF50F) -- leftoverright diff --git a/tex/context/base/mkxl/pack-ori.lmt b/tex/context/base/mkxl/pack-ori.lmt index a786b19ef..81e8776b9 100644 --- a/tex/context/base/mkxl/pack-ori.lmt +++ b/tex/context/base/mkxl/pack-ori.lmt @@ -30,8 +30,8 @@ local horizontal = { [variables.middle] = 0x000, [variables.flushleft] = 0x100, [variables.flushright] = 0x200, - [variables.left] = 0x300, - [variables.right] = 0x400, + [variables.left] = 0x300, -- why not 0x100 + [variables.right] = 0x400, -- why not 0x200 } implement { diff --git a/tex/context/base/mkxl/strc-lst.lmt b/tex/context/base/mkxl/strc-lst.lmt index 703e580d7..359fbd6b6 100644 --- a/tex/context/base/mkxl/strc-lst.lmt +++ b/tex/context/base/mkxl/strc-lst.lmt @@ -873,17 +873,17 @@ end filters[v_product] = function(specification) local reference = specification.reference if reference and reference ~= "" then - -- local utilitydata = job.loadother(reference,true) - local fullname = file.replacesuffix(reference,"tuc") - if lfs.isfile(fullname) then - local utilitydata = job.loadother(fullname) + local utilitydata = job.loadother(reference,true) +-- local fullname = file.replacesuffix(reference,"tuc") +-- if lfs.isfile(fullname) then +-- local utilitydata = job.loadother(fullname) if utilitydata then local collected = utilitydata.structures.lists.collected or { } - setmetatableindex(collected,{ external = reference }) local result = { } local nofresult = 0 local all = specification.all local names = specification.names +setmetatableindex(result,{ external = reference }) -- brr for i=1,#collected do local v = collected[i] local m = v.metadata @@ -893,7 +893,7 @@ filters[v_product] = function(specification) end end return result - end +-- end end end return { } diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl index 86e77e63c..bcbe4a6f8 100644 --- a/tex/context/base/mkxl/strc-mat.mkxl +++ b/tex/context/base/mkxl/strc-mat.mkxl @@ -1326,6 +1326,11 @@ \lastnamedcs\else\begincsname\??mathtextalign\v!middle:\v!auto\endcsname \fi} +\letcsname\??mathtextalign\v!right \expandafter\endcsname\csname\??mathtextalign\v!flushleft \endcsname +\letcsname\??mathtextalign\v!left \expandafter\endcsname\csname\??mathtextalign\v!flushright \endcsname +\letcsname\??mathtextalign\v!right:\v!auto\expandafter\endcsname\csname\??mathtextalign\v!flushleft :\v!auto\endcsname +\letcsname\??mathtextalign\v!left :\v!auto\expandafter\endcsname\csname\??mathtextalign\v!flushright:\v!auto\endcsname + \startsetups[math:penalties:\v!text] \interlinepenalty \plustenthousand \shapingpenalty \plustenthousand diff --git a/tex/context/base/mkxl/strc-ref.lmt b/tex/context/base/mkxl/strc-ref.lmt index 238201336..b97a1619b 100644 --- a/tex/context/base/mkxl/strc-ref.lmt +++ b/tex/context/base/mkxl/strc-ref.lmt @@ -494,7 +494,7 @@ implement { -- no metatable here .. better be sparse -local function register_from_lists(collected,derived,pages,sections) +local function register_from_list(collected,derived,pages,sections) local derived_g = derived[""] -- global local derived_p = nil local derived_c = nil @@ -556,7 +556,11 @@ local function register_from_lists(collected,derived,pages,sections) end end -references.registerinitializer(function() register_from_lists(lists.collected,derived) end) +references.registerfromlist = function(collected,pages,sections) + register_from_list(collected,derived,pages,sections) +end + +references.registerinitializer(function() register_from_list(lists.collected,derived) end) -- tracing @@ -1025,13 +1029,26 @@ local function loadexternalreferences(name,utilitydata) report_importing("registering %a reference, kind %a, name %a, prefix %a, reference %a", "external","regular",name,prefix,reference) end - local section = reference.section - local realpage = reference.realpage - if section then - reference.sectiondata = lists[section] - end - if realpage then - reference.pagedata = pages[realpage] + -- weird code + -- local section = reference.section + -- local realpage = reference.realpage + -- if section then + -- reference.sectiondata = lists[section] + -- end + -- if realpage then + -- reference.pagedata = pages[realpage] + -- end + -- better? + local references = data.references -- hm. plural + if references then + local section = references.section + local realpage = references.realpage + if not references.sectiondata then + references.sectiondata = sections[references.section or false] + end + if not references.pagedata then + references.pagedata = pages[references.realpage or false] + end end end end @@ -1046,20 +1063,18 @@ local function loadexternalreferences(name,utilitydata) local kind = metadata.kind local realpage = references.realpage if kind and realpage then - references.pagedata = pages[realpage] + -- quite likely already done so this might go + if pages and not references.pagedata then + references.pagedata = pages[references.realpage or false] + end + if sections and not references.sectiondata then + references.sectiondata = sections[references.section or false] + end + -- local prefix = references.prefix or "" if prefix == "" then prefix = name -- this can clash! end - local section = references.section - if section then - -- we have to make sure that the right section is used, see helpers.prefix - if sections then - references.sectiondata = sections[section] - else - -- warning - end - end local target = external[prefix] if not target then target = { } @@ -1127,8 +1142,9 @@ local function loadproductreferences(productname,componentname,utilitydata) local struc = utilitydata.structures if struc then local productreferences = struc.references.collected -- direct references - local lists = struc.lists.collected -- indirect references (derived) - local pages = struc.pages.collected -- pagenumber data + local lists = struc.lists.collected -- indirect references (derived) + local pages = struc.pages.collected -- pagenumber data + local sections = struc.sections.collected -- section number data -- we use indirect tables to save room but as they are eventually -- just references we resolve them to data here (the mechanisms -- that use this data check for indirectness) @@ -1138,13 +1154,11 @@ local function loadproductreferences(productname,componentname,utilitydata) report_importing("registering %s reference, kind %a, name %a, prefix %a, reference %a", "product","regular",productname,prefix,reference) end - local section = reference.section - local realpage = reference.realpage - if section then - reference.sectiondata = lists[section] + if not reference.sectiondata then + reference.sectiondata = sections[reference.section or false] end - if realpage then - reference.pagedata = pages[realpage] + if not reference.pagedata then + reference.pagedata = pages[reference.realpage or false] end end end @@ -1160,7 +1174,6 @@ local function loadproductreferences(productname,componentname,utilitydata) local kind = metadata.kind local realpage = references.realpage if kind and realpage then - references.pagedata = pages[realpage] local prefix = references.prefix or "" local component = references.component local ctarget, ptarget diff --git a/tex/context/base/mkxl/strc-reg.lmt b/tex/context/base/mkxl/strc-reg.lmt index 85198a151..a3a7dae6c 100644 --- a/tex/context/base/mkxl/strc-reg.lmt +++ b/tex/context/base/mkxl/strc-reg.lmt @@ -1403,7 +1403,9 @@ function registers.flush(data,options,prefixspec,pagespec) if nofpages > 0 then -- or 0 d = dd for p=1,nofpages do - local first, last = pages[p][1], pages[p][2] + local page = pages[p] + local first = page[1] + local last = page[2] if first == last then if first.references.lastrealpage then pagerange(first,first,true,prefixspec,pagespec) diff --git a/tex/context/base/mkxl/tabl-ntb.mkxl b/tex/context/base/mkxl/tabl-ntb.mkxl index 049dff58c..6eb926b09 100644 --- a/tex/context/base/mkxl/tabl-ntb.mkxl +++ b/tex/context/base/mkxl/tabl-ntb.mkxl @@ -331,13 +331,13 @@ \letcsname\??naturaltablesqueeze\v!local\endcsname\donetrue \def\tabl_ntb_let_gal{\gletcsname\??naturaltablegal\m_tabl_tbl_level\endcsname} -\def\tabl_ntb_get_gal{\csname\??naturaltablegal\m_tabl_tbl_level\endcsname} +\def\tabl_ntb_get_gal{\csname \??naturaltablegal\m_tabl_tbl_level\endcsname} \def\tabl_ntb_let_tal#1{\gletcsname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname} -\def\tabl_ntb_get_tal#1{\csname\??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname} +\def\tabl_ntb_get_tal#1{\csname \??naturaltabletal\m_tabl_tbl_level:\number#1\endcsname} \def\tabl_ntb_set_nob#1{\letcsname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone} -\def\tabl_ntb_get_nob#1{\ifcsname\??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone\else\zerocount\fi} +\def\tabl_ntb_get_nob#1{\ifcsname \??naturaltablenob\m_tabl_tbl_level:\number#1\endcsname\plusone\else\zerocount\fi} %def\tabl_ntb_set_tag#1#2{\expandafter\integerdef\csname\??naturaltabletag\m_tabl_tbl_level:\number#1:\number#2\endcsname} \def\tabl_ntb_set_col#1#2{\expandafter\integerdef\csname\??naturaltablecol\m_tabl_tbl_level:\number#1:\number#2\endcsname} @@ -733,9 +733,23 @@ % \bTR \bTD left \eTD\bTD right \eTD\eTR % \eTABLE +% plugin + +\let\tabl_ntb_section_mark \relax +\let\tabl_ntb_section_checkup\relax +\let\tabl_ntb_section_split \relax +\let\tabl_ntb_section_install\relax +\let\tabl_ntb_section_setup \relax +\let\tabl_ntb_section_wrapup \relax + +% till here + \tolerant\protected\def\tabl_ntb_tr[#1]% {\c_tabl_ntb_running_col\zerocount \c_tabl_ntb_encountered_col\zerocount + % + \tabl_ntb_section_mark + % \advanceby\c_tabl_ntb_maximum_row\plusone \ifparameter#1\or \expandafter\tabl_ntb_tr_yes @@ -1009,6 +1023,7 @@ \setupcurrentnaturaltablelocal[\c!align={\v!right,\v!broad,\v!high},#1]% % \tabl_ntb_anchor_setup + \tabl_ntb_section_setup % \d_tabl_ntb_leftmargindistance \naturaltablelocalparameter\c!leftmargindistance\relax \d_tabl_ntb_rightmargindistance\naturaltablelocalparameter\c!rightmargindistance\relax @@ -1052,6 +1067,7 @@ \let\currentTABLEcolumn\tabl_ntb_current_column \let\nofTABLErows \tabl_ntb_n_of_rows \let\nofTABLEcolumns \tabl_ntb_n_of_columns + % \enforced\let\bTR\tabl_ntb_bTR \enforced\let\bTD\tabl_ntb_bTD \enforced\let\bTH\tabl_ntb_bTH @@ -1133,6 +1149,7 @@ % \vskip-\strutdp % \fi \fi + \tabl_ntb_section_wrapup % tracing % \iftrue % \blank \tttf @@ -1375,6 +1392,7 @@ \ifconditional\c_strc_tags_enabled \tabl_ntb_start_tagged \fi + \tabl_ntb_section_checkup \hbox\bgroup \kern\dimexpr\d_tabl_ntb_leftmargindistance\relax} @@ -1798,6 +1816,7 @@ \t_split_after{\m_tabl_ntb_after_split}% \t_split_before{\m_tabl_ntb_before_split}% not used (yet) \setbox\b_split_content\vbox{\tabl_ntb_flush_content}% + \tabl_ntb_section_install % we need content to be set \ifmultipleTBLheads \localcontrolledloop\plusone\c_tabl_ntb_n_of_head_lines\plusone {\setbox\scratchbox\vsplit\b_split_content to \lineheight diff --git a/tex/context/base/mkxl/tabl-tsp.mkxl b/tex/context/base/mkxl/tabl-tsp.mkxl index 160357a06..6facbfcae 100644 --- a/tex/context/base/mkxl/tabl-tsp.mkxl +++ b/tex/context/base/mkxl/tabl-tsp.mkxl @@ -217,6 +217,7 @@ \newtoks \t_split_before \newtoks \t_split_inbetween \newtoks \t_split_after +\newtoks \t_split_section \newtoks \everyresettsplit \newinteger \c_split_minimum_free_lines @@ -246,6 +247,7 @@ \t_split_inbetween \emptytoks \t_split_before \emptytoks \t_split_after \emptytoks + \t_split_section \emptytoks \let\postprocesstsplit \donothing \to \everyresettsplit @@ -301,6 +303,7 @@ \setbox\b_split_result\vbox {\ifdim\ht\b_split_head>\zeropoint \unvcopy\b_split_head + \the\t_split_section \the\t_split_inbetween \fi}% \ifconditional\c_tabl_split_done \else diff --git a/tex/context/fonts/mkiv/antykwa-math.lfg b/tex/context/fonts/mkiv/antykwa-math.lfg index 3c34d7af0..5bbd2cf6c 100644 --- a/tex/context/fonts/mkiv/antykwa-math.lfg +++ b/tex/context/fonts/mkiv/antykwa-math.lfg @@ -1,35 +1,115 @@ +local common = fonts.goodies.load("common-math-jmn.lfg") +local helpers = common.mathematics.helpers + +if not fonts.encodings.math["extensible-jmn-private"] then + + local nps = fonts.helpers.newprivateslot + + fonts.encodings.math["extensible-jmn-private"] = { + [nps("rule middle piece")] = 200, -- minusjmn + [nps("rule right piece")] = 201, -- minusrightjmn + [nps("rule left piece")] = 202, -- minusleftjmn + [nps("double rule middle piece")] = 203, -- equaljmn + [nps("double rule right piece")] = 204, -- equalrightjmn + [nps("double rule left piece")] = 205, -- equalleftjmn + [nps("arrow left piece")] = 206, -- arrowleftjmn + [nps("arrow right piece")] = 207, -- arrowrightjmn + [nps("double arrow left piece")] = 208, -- arrowdblleftjmn + [nps("double arrow right piece")] = 209, -- arrowdblrightjmn + } + +end + +local fraction = .25 + local badones = { - summationtext = .25, - producttext = .25, - integraltext = .25, - uniontext = .25, - intersectiontext = .25, - unionmultitext = .25, - logicalandtext = .25, - logicalortext = .25, - summationdisplay = .25, - productdisplay = .25, - integraldisplay = .25, - uniondisplay = .25, - intersectiondisplay = .25, - unionmultidisplay = .25, - logicalanddisplay = .25, - logicalordisplay = .25, - coproducttext = .25, - coproductdisplay = .25, + summationtext = fraction, + producttext = fraction, + integraltext = fraction, + uniontext = fraction, + intersectiontext = fraction, + unionmultitext = fraction, + logicalandtext = fraction, + logicalortext = fraction, + summationdisplay = fraction, + productdisplay = fraction, + integraldisplay = fraction, + uniondisplay = fraction, + intersectiondisplay = fraction, + unionmultidisplay = fraction, + logicalanddisplay = fraction, + logicalordisplay = fraction, + coproducttext = fraction, + coproductdisplay = fraction, + + braceleftBig = fraction, + braceleftBigg = fraction, + braceleftbig = fraction, + braceleftbigg = fraction, + parenleftBig = fraction, + parenleftBigg = fraction, + parenleftbig = fraction, + parenleftbigg = fraction, + bracketleftBig = fraction, + bracketleftBigg = fraction, + bracketleftbig = fraction, + bracketleftbigg = fraction, + ceilingleftBig = fraction, + ceilingleftBigg = fraction, + ceilingleftbig = fraction, + ceilingleftbigg = fraction, + floorleftBig = fraction, + floorleftBigg = fraction, + floorleftbig = fraction, + floorleftbigg = fraction, + anglebracketleftBig = fraction, + anglebracketleftBigg = fraction, + anglebracketleftbig = fraction, + anglebracketleftbigg = fraction, + + bracerightBig = fraction, + bracerightBigg = fraction, + bracerightbig = fraction, + bracerightbigg = fraction, + parenrightBig = fraction, + parenrightBigg = fraction, + parenrightbig = fraction, + parenrightbigg = fraction, + bracketrightBig = fraction, + bracketrightBigg = fraction, + bracketrightbig = fraction, + bracketrightbigg = fraction, + ceilingrightBig = fraction, + ceilingrightBigg = fraction, + ceilingrightbig = fraction, + ceilingrightbigg = fraction, + floorrightBig = fraction, + floorrightBigg = fraction, + floorrightbig = fraction, + floorrightbigg = fraction, + anglebracketrightBig = fraction, + anglebracketrightBigg = fraction, + anglebracketrightbig = fraction, + anglebracketrightbigg = fraction, + + backslashBig = fraction, + backslashBigg = fraction, + backslashbig = fraction, + backslashbigg = fraction, } local uglyones = { - braceleft = true, - braceright = true, + braceleft = true, + braceright = true, + vextendsingle = true, + vextenddouble = true, } - return { name = "antykwa-math", version = "1.00", comment = "Goodies that complement antykwa math.", - author = "Hans, Mojca, Aditya", + author = "Hans, Mojca, Aditya, Mikael", copyright = "ConTeXt development team", mathematics = { mapfiles = { @@ -37,7 +117,10 @@ return { "antt-mi.map", "antt-sy.map", "antt-ex.map", - "mkiv-base.map", + -- "mkiv-base.map", + }, + variables = { + notshiftfactor = 0.075, }, virtuals = { ["antykwa-math"] = { @@ -48,9 +131,10 @@ return { { name = "mi-anttri.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttbi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttb.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttrz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunska-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttr.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttr.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["antykwa-light-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-antykwa-light", main = true, parameters = false }, @@ -60,9 +144,10 @@ return { { name = "mi-anttli.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttri.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttr.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttlz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunskaLight-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttl.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttl.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyone }, }, ["antykwa-cond-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-antykwa-cond", main = true, parameters = false }, @@ -72,9 +157,10 @@ return { { name = "mi-anttcri.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttcbi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttcb.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttcrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttcrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttcrz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunskaCond-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttcr.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttcr.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyone }, }, ["antykwa-lightcond-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-antykwa-lightcond", main = true, parameters = false }, @@ -84,10 +170,12 @@ return { { name = "mi-anttcli.tfm", vector = "tex-it", skewchar=0x7F }, { name = "mi-anttcri.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-anttcr.tfm", vector = "tex-bf", skewchar=0x7F }, - { name = "sy-anttclz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, + { name = "sy-anttclz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true, ignore = uglyones }, -- jmn = true + { name = "sy-anttclz.tfm", vector = "extensible-jmn-private", skewchar=0x30 }, { name = "file:AntykwaTorunskaCondLight-Regular", vector = "tex-ex-braces", backmap = false }, - { name = "ex-anttcl.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-anttcl.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyone }, } - } + }, + addmissing = helpers.addmissing, } } diff --git a/tex/context/fonts/mkiv/common-math-jmn.lfg b/tex/context/fonts/mkiv/common-math-jmn.lfg new file mode 100644 index 000000000..331d65a5d --- /dev/null +++ b/tex/context/fonts/mkiv/common-math-jmn.lfg @@ -0,0 +1,119 @@ +return { + name = "common-math-jmn", + version = "1.00", + comment = "Goodies that complement the JMN collection.", + author = "Hans, Mikael", + copyright = "ConTeXt development team", + mathematics = { + helpers = { + addmissing = function(main) + + local builders = fonts.handlers.vf.math.builders + local ps = fonts.helpers.privateslot + + local characters = main.characters + local variables = main.goodies.mathematics and main.goodies.mathematics.variables or { } + local joinrelfactor = variables.joinrelfactor or 3 + local notshiftfactor = variables.notshiftfactor or 0 + + local umbracepiece = ps("um brace piece") + local lmbracepiece = ps("lm brace piece") + local cmbracepiece = ps("cm brace piece") + + local ulbracepiece = ps("ul brace piece") + local urbracepiece = ps("ur brace piece") + local llbracepiece = ps("ll brace piece") + local lrbracepiece = ps("lr brace piece") + + builders.brace(main,0x23DE,ulbracepiece,cmbracepiece,lrbracepiece,llbracepiece,cmbracepiece,urbracepiece) + builders.brace(main,0x23DF,llbracepiece,cmbracepiece,urbracepiece,ulbracepiece,cmbracepiece,lrbracepiece) + + builders.parent(main,0x23DC,ulbracepiece,umbracepiece,urbracepiece,"top") + builders.parent(main,0x23DD,llbracepiece,lmbracepiece,lrbracepiece,"bottom") + + builders.dots(main,0x2026) -- ldots + builders.dots(main,0x22EE) -- vdots + builders.dots(main,0x22EF) -- cdots + builders.dots(main,0x22F1) -- ddots + builders.dots(main,0x22F0) -- udots + + builders.jointwo(main,0x21A6,ps("maps to piece"),.15,0x02192) -- \mapstochar\rightarrow + + local srm = ps("rule middle piece") + local srr = ps("rule right piece") + local srl = ps("rule left piece") + + local drm = ps("double rule middle piece") + local drr = ps("double rule right piece") + local drl = ps("double rule left piece") + + local sal = ps("arrow left piece") + local sar = ps("arrow right piece") + + local dal = ps("double arrow left piece") + local dar = ps("double arrow right piece") + + local rad = ps("radical bar extender") + + if characters[srm] then + + builders.jointwo(main,0x27F5,sak,joinrelfactor,srr) + builders.jointwo(main,0x27F6,srl,joinrelfactor,sar) + builders.jointwo(main,0x27F7,sak,joinrelfactor,sar) + builders.jointwo(main,0x27F8,dal,joinrelfactor,drr) + builders.jointwo(main,0x27F9,drl,joinrelfactor,dar) + builders.jointwo(main,0x27FA,dal,joinrelfactor,dar) + + builders.horibar(main,0x203E,srm,srl,srr,0x02212) -- overbar underbar fraction (we take 90/91/92 too!) + -- builders.horibar(main,0x203E,srm,srl,srr,0x0002D) -- overbar underbar fraction (we take 90/91/92 too!) + + builders.rootbar(main,ps("radical bar extender"),srm,srr,0x02212) -- radical + + else + + builders.jointwo(main,0x27F5,0x02190,joinrelfactor,0x0002D) -- \leftarrow\joinrel\relbar + builders.jointwo(main,0x27F6,0x0002D,joinrelfactor,0x02192) -- \relbar\joinrel\rightarrow + builders.jointwo(main,0x27F7,0x02190,joinrelfactor,0x02192) -- \leftarrow\joinrel\rightarrow + builders.jointwo(main,0x27F8,0x021D0,joinrelfactor,0x0003D) -- \Leftarrow\joinrel\Relbar + builders.jointwo(main,0x27F9,0x0003D,joinrelfactor,0x021D2) -- \Relbar\joinrel\Rightarrow + builders.jointwo(main,0x27FA,0x021D0,joinrelfactor,0x021D2) -- \Leftarrow\joinrel\Rightarrow + + builders.horibar(main,0x203E,0xFE073) -- overbar underbar + + end + + builders.jointwo(main,0x2016,0x007C,0.20,0x007C) + builders.jointwo(main,0x2980,0x007C,0.20,0x007C,0.20,0x007C) + + characters[0x007C].extensible = true + characters[0x007C].varianttemplate = 0x5B + characters[0x2016].extensible = true + characters[0x2016].varianttemplate = 0x5B + characters[0x2980].extensible = true + characters[0x2980].varianttemplate = 0x5B + + -- 21CB leftrightharpoon + -- 21CC rightleftharpoon + + builders.stack(main,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over= + + builders.jointwo(main,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3) + builders.jointwo(main,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel= + + builders.overlaytwo(main,0x2260,0x00338,notshiftfactor,0x0003D) -- \not\equal + builders.overlaytwo(main,0x2284,0x00338,notshiftfactor,0x02282) -- \not\subset + builders.overlaytwo(main,0x2285,0x00338,notshiftfactor,0x02283) -- \not\supset + builders.overlaytwo(main,0x2209,0x00338,notshiftfactor,0x02208) -- \not\in + + builders.jointwo(main,0x2254,0x03A,0,0x03D) -- := (≔) + + builders.repeated(main,0x222B,0x222B,1,1/2) + builders.repeated(main,0x222C,0x222B,2,1/2) + builders.repeated(main,0x222D,0x222B,3,1/2) + + characters[0x02B9] = characters[0x2032] -- we're nice + + end + } + } +} diff --git a/tex/context/fonts/mkiv/ebgaramond.lfg b/tex/context/fonts/mkiv/ebgaramond.lfg deleted file mode 100644 index 73676ce44..000000000 --- a/tex/context/fonts/mkiv/ebgaramond.lfg +++ /dev/null @@ -1,90 +0,0 @@ -return { - name = "ebgaramond", - version = "1.00", - comment = "Goodies that complement ebgaramond.", - author = "Hans Hagen & Mikael Sundqvist", - copyright = "ConTeXt development team", - mathematics = { - tweaks = { - aftercopying = { - { - tweak = "version", - expected = "Version 2019-08-16", - }, - { - tweak = "dimensions", - list = { - -- offset width italic - [0x00393] = { 0.05, 1.05, 0.075 }, -- \Gamma - -- [0x003A6] = { 0.05, 1.05, 0 }, -- \Phi difficult! - [0x003A8] = { 0.05, 1.05, 0.075 }, -- \Psi - [0x02113] = { 0, 1, 0.075 }, -- \ell - [0x1D436] = { 0, 1, 0.05 }, -- C - [0x1D43D] = { 0.3, 1.4, 0.1 }, -- J - [0x1D44B] = { 0, 1, 0.05 }, -- X - [0x1D450] = { 0, 1.1, 0 }, -- c - [0x1D451] = { 0, 1, 0.05 }, -- d - [0x1D452] = { 0, 1.1, 0.05 }, -- e - [0x1D453] = { 0.15, 1.15, 0.1 }, -- f - [0x1D454] = { 0.1, 1.2, 0.1 }, -- g - [0xF0276] = { 0, 1.1, 0 }, -- h - [0x1D457] = { 0.2, 1.25, 0.05 }, -- j - [0x1D459] = { 0, 1, 0.05 }, -- l - [0x1D45D] = { 0.15, 1.15, 0 }, -- p - [0x1D45E] = { 0, 1.05, 0 }, -- q - [0x1D45F] = { 0, 1.05, 0 }, -- r - [0x1D461] = { 0, 1, 0.1 }, -- t - [0x1D465] = { 0.05, 1.1, 0.05 }, -- x - [0x1D466] = { 0.2, 1.2, 0 }, -- y - [0x1D6FD] = { 0.05, 1.1, 0.05 }, -- \beta - [0x1D6FE] = { 0, 1.05, 0 }, -- \gamma - [0x1D6FF] = { 0, 1, 0.1 }, -- \delta - [0x1D716] = { 0, 1.1, 0 }, -- \epsilon - [0x1D700] = { 0, 1.1, 0 }, -- \varepsilon - [0x1D701] = { 0, 1, 0.15 }, -- \zeta - [0x1D703] = { 0, 1, 0.1 }, -- \theta - [0x1D705] = { 0, 1, 0.1 }, -- \kappa - [0x1D706] = { 0.05, 1.1, 0 }, -- \lambda - [0x1D707] = { 0.05, 1.05, 0 }, -- \mu - [0x1D708] = { 0, 1.1, 0 }, -- \nu - [0x1D709] = { 0, 1.1, 0 }, -- \xi - [0x1D70B] = { 0, 1.05, 0 }, -- \pi - [0x1D70C] = { 0.2, 1.2, 0 }, -- \rho - [0x1D70E] = { 0, 1, 0.1 }, -- \sigma - [0x1D70F] = { 0.05, 1.05, 0.1 }, -- \tau - [0x1D712] = { 0.15, 1.2, 0.05 }, -- \chi - [0x1D713] = { 0.05, 1.05, 0.05 }, -- \psi - }, - }, - { - tweak = "fixprimes", - scale = 0.75, - smaller = true, - factor = 0.8, - fake = 0.75, - }, - { - tweak = "checkspacing", - }, - { - tweak = "addscripts", - }, - }, - }, - alternates = { - partial = { feature = 'ss02', value = 1, comment = "Curved partial" }, - semibold = { feature = 'ss04', value = 1, comment = "Semibold" }, - extrabold = { feature = 'ss05', value = 1, comment = "Extrabold" }, - hbar = { feature = 'ss06', value = 1, comment = "Horizontal bar for h-bar" }, - integral = { feature = 'ss07', value = 1, comment = "A more slanted integral sign" }, - tilde = { feature = 'ss09', value = 1, comment = "A tilde variant" }, - outbendingh = { feature = 'ss10', value = 1, comment = "Out-bending h" }, - largeoperators = { feature = 'ss11', value = 1, comment = "Larger operators" }, - }, - bigslots = { - 1, 3, 5, 7 - }, - }, -} - - diff --git a/tex/context/fonts/mkiv/iwona-math.lfg b/tex/context/fonts/mkiv/iwona-math.lfg index bc402ea33..815b9e120 100644 --- a/tex/context/fonts/mkiv/iwona-math.lfg +++ b/tex/context/fonts/mkiv/iwona-math.lfg @@ -1,3 +1,6 @@ +local common = fonts.goodies.load("common-math-jmn.lfg") +local helpers = common.mathematics.helpers + local badones = { summationtext = .25, producttext = .25, @@ -19,6 +22,13 @@ local badones = { coproductdisplay = .25, } +local uglyones = { + -- braceleft = true, + -- braceright = true, + vextendsingle = true, + vextenddouble = true, +} + return { name = "iwona-math", version = "1.00", @@ -31,7 +41,7 @@ return { "iwona-mi.map", "iwona-sy.map", "iwona-ex.map", - "mkiv-base.map", + -- "mkiv-base.map", }, virtuals = { ["iwona-math"] = { @@ -43,7 +53,7 @@ return { { name = "mi-iwonami.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonam.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonarz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonar.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonar.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["iwona-light-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-iwona-light", main = true, parameters = false }, @@ -54,7 +64,7 @@ return { { name = "mi-iwonari.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonar.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonalz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonal.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonal.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["iwona-medium-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-iwona-medium", main = true, parameters = false }, @@ -65,7 +75,7 @@ return { { name = "mi-iwonabi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonab.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonamz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonam.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonam.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["iwona-heavy-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-iwona-heavy", main = true, parameters = false }, @@ -76,8 +86,9 @@ return { { name = "mi-iwonahi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-iwonah.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-iwonahz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-iwonah.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-iwonah.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, } }, + addmissing = helpers.addmissing, } } diff --git a/tex/context/fonts/mkiv/kurier-math.lfg b/tex/context/fonts/mkiv/kurier-math.lfg index bee2e08e4..221992518 100644 --- a/tex/context/fonts/mkiv/kurier-math.lfg +++ b/tex/context/fonts/mkiv/kurier-math.lfg @@ -1,3 +1,6 @@ +local common = fonts.goodies.load("common-math-jmn.lfg") +local helpers = common.mathematics.helpers + local badones = { summationtext = .25, producttext = .25, @@ -19,6 +22,13 @@ local badones = { coproductdisplay = .25, } +local uglyones = { + -- braceleft = true, + -- braceright = true, + vextendsingle = true, + vextenddouble = true, +} + return { name = "kurier-math", version = "1.00", @@ -31,7 +41,7 @@ return { "kurier-mi.map", "kurier-sy.map", "kurier-ex.map", - "mkiv-base.map", + -- "mkiv-base.map", }, virtuals = { ["kurier-math"] = { @@ -43,7 +53,7 @@ return { { name = "mi-kuriermi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierm.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kurierrz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierr.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierr.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["kurier-light-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-kurier-light", main = true, parameters = false }, @@ -54,7 +64,7 @@ return { { name = "mi-kurierri.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierr.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kurierlz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierl.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierl.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["kurier-medium-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-kurier-medium", main = true, parameters = false }, @@ -65,7 +75,7 @@ return { { name = "mi-kurierhi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierh.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kuriermz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierm.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierm.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, }, ["kurier-heavy-math"] = { { name = "file:LatinModern-Math", features = "virtualmath-kurier-heavy", main = true, parameters = false }, @@ -76,8 +86,9 @@ return { { name = "mi-kurierhi.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "rm-kurierh.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "sy-kurierhz.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, - { name = "ex-kurierh.tfm", vector = "tex-ex", extension = true, badones = badones }, + { name = "ex-kurierh.tfm", vector = "tex-ex", extension = true, badones = badones, ignore = uglyones }, } }, + addmissing = helpers.addmissing, } } diff --git a/tex/context/fonts/mkiv/lucida-math.lfg b/tex/context/fonts/mkiv/lucida-math.lfg index 31589f5b3..64f53dc33 100644 --- a/tex/context/fonts/mkiv/lucida-math.lfg +++ b/tex/context/fonts/mkiv/lucida-math.lfg @@ -26,7 +26,7 @@ return { aftercopying = { { tweak = "version", - expected = "Version 1.803", + expected = "Version 1.901", }, { tweak = "fixoldschool", diff --git a/tex/context/fonts/mkiv/type-imp-antykwa.mkiv b/tex/context/fonts/mkiv/type-imp-antykwa.mkiv index 6ad747307..f5e3158f4 100644 --- a/tex/context/fonts/mkiv/type-imp-antykwa.mkiv +++ b/tex/context/fonts/mkiv/type-imp-antykwa.mkiv @@ -13,12 +13,34 @@ \starttypescriptcollection[antykwa-torunska] - \definefontfeature[virtualmath-antykwa] [virtualmath][virtualweight=antykwa] - \definefontfeature[virtualmath-antykwa-cond] [virtualmath][virtualweight=antykwa-cond] - \definefontfeature[virtualmath-antykwa-light] [virtualmath][virtualweight=antykwa-light] - \definefontfeature[virtualmath-antykwa-lightcond][virtualmath][virtualweight=antykwa-lightcond] + \startsetups[antykwa] + % \setupmathfraction[\c!rule=\v!symbol,\c!middle="0203E]% + % \setupmathradical [\c!rule=\v!symbol,\c!top ="FE010]% + % \setupmathfence [\c!alternative=1]% + \letmathfractionparameter\c!rule\v!symbol + \setmathfractionparameter\c!middle{"203E}% + \letmathradicalparameter \c!rule\v!symbol + \setmathradicalparameter \c!top{\radicalbarextenderuc}% + \setmathfenceparameter \c!alternative{1}% + \stopsetups - \starttypescript [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-lightcond,antykwa-torunska-lightcond] + % cond => -cont as in iwona + + \startsetups[antykwa-light] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-cond] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-light-cond] \directsetup{antykwa}\stopsetups + % these long names are obsolete and will go away + \startsetups[antykwa-torunska] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-torunska-light] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-torunska-cond] \directsetup{antykwa}\stopsetups + \startsetups[antykwa-torunska-light-cond]\directsetup{antykwa}\stopsetups + + \definefontfeature[virtualmath-antykwa] [virtualmath][virtualweight=antykwa] + \definefontfeature[virtualmath-antykwa-cond] [virtualmath][virtualweight=antykwa-cond] + \definefontfeature[virtualmath-antykwa-light] [virtualmath][virtualweight=antykwa-light] + \definefontfeature[virtualmath-antykwa-light-cond][virtualmath][virtualweight=antykwa-light-cond] + + \starttypescript [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-light-cond,antykwa-torunska-light-cond] \definetypeface[\typescriptone][\s!rm][\s!serif][\typescriptone] [\s!default] \definetypeface[\typescriptone][\s!ss][\s!sans] [modern] [\s!default] [\s!rscale=1.05] \definetypeface[\typescriptone][\s!tt][\s!mono] [modern] [\s!default] [\s!rscale=1.05] @@ -26,23 +48,23 @@ \quittypescriptscanning \stoptypescript - \starttypescript [\s!serif] [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-lightcond,antykwa-torunska-lightcond] - \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-MediumItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default] - \definefontsynonym [AntykwaTorunska-CondMediumItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default] + \starttypescript [\s!serif] [antykwa,antykwa-torunska,antykwa-light,antykwa-torunska-light,antykwa-cond,antykwa-torunska-cond,antykwa-light-cond,antykwa-torunska-light-cond] + \definefontsynonym [AntykwaTorunska-Regular] [\s!file:AntykwaTorunska-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Italic] [\s!file:AntykwaTorunska-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Bold] [\s!file:AntykwaTorunska-Bold] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-BoldItalic] [\s!file:AntykwaTorunska-BoldItalic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Light] [\s!file:AntykwaTorunskaLight-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-LightItalic] [\s!file:AntykwaTorunskaLight-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-Medium] [\s!file:AntykwaTorunskaMed-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-MediumItalic] [\s!file:AntykwaTorunskaMed-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondRegular] [\s!file:AntykwaTorunskaCond-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondItalic] [\s!file:AntykwaTorunskaCond-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondBold] [\s!file:AntykwaTorunskaCond-Bold] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondBoldItalic] [\s!file:AntykwaTorunskaCond-BoldItalic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondLight] [\s!file:AntykwaTorunskaCondLight-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondLightItalic] [\s!file:AntykwaTorunskaCondLight-Italic] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondMedium] [\s!file:AntykwaTorunskaCondMed-Regular] [\s!features=\s!default] + \definefontsynonym [AntykwaTorunska-CondMediumItalic] [\s!file:AntykwaTorunskaCondMed-Italic] [\s!features=\s!default] \stoptypescript \starttypescript [\s!math][antykwa,antykwa-torunska][\s!all] @@ -60,45 +82,41 @@ \definefontsynonym[\s!MathRoman][antykwacondmath@antykwa-cond-math] \stoptypescript - \starttypescript [\s!math][antykwa-lightcond,antykwa-torunska-lightcond][\s!all] + \starttypescript [\s!math][antykwa-light-cond,antykwa-torunska-light-cond][\s!all] \loadfontgoodies[antykwa-math] - \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-lightcond-math] + \definefontsynonym[\s!MathRoman][antykwalightcondmath@antykwa-light-cond-math] \stoptypescript \starttypescript [\s!serif] [antykwa,antykwa-torunska] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-Regular] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Bold] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-Italic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-Italic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-BoldItalic] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-Regular] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Bold] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-Italic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-BoldItalic] \stoptypescript \starttypescript [\s!serif] [antykwa-light,antykwa-torunska-light] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-Light] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Medium] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-LightItalic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-LightItalic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MediumItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-MediumItalic] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-Light] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-Medium] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-LightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-MediumItalic] \stoptypescript \starttypescript [\s!serif] [antykwa-cond,antykwa-torunska-cond] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-CondRegular] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondBold] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondItalic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondItalic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondBoldItalic] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-CondRegular] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondBold] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondBoldItalic] \stoptypescript - \starttypescript [\s!serif] [antykwa-lightcond,antykwa-torunska-lightcond] [\s!name] - \definefontsynonym [\s!Serif] [AntykwaTorunska-CondLight] - \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondMedium] - \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [\s!SerifSlanted] [AntykwaTorunska-CondLightItalic] - \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMediumItalic] - \definefontsynonym [\s!SerifBoldSlanted] [AntykwaTorunska-CondMediumItalic] + \starttypescript [\s!serif] [antykwa-light-cond,antykwa-torunska-light-cond] [\s!name] + \setups[\s!font:\s!fallback:\s!serif] + \definefontsynonym [\s!Serif] [AntykwaTorunska-CondLight] + \definefontsynonym [\s!SerifBold] [AntykwaTorunska-CondMedium] + \definefontsynonym [\s!SerifItalic] [AntykwaTorunska-CondLightItalic] + \definefontsynonym [\s!SerifBoldItalic] [AntykwaTorunska-CondMediumItalic] \stoptypescript \stoptypescriptcollection diff --git a/tex/context/fonts/mkiv/type-imp-iwona.mkiv b/tex/context/fonts/mkiv/type-imp-iwona.mkiv index 8b67b7be9..f43731250 100644 --- a/tex/context/fonts/mkiv/type-imp-iwona.mkiv +++ b/tex/context/fonts/mkiv/type-imp-iwona.mkiv @@ -13,34 +13,52 @@ \starttypescriptcollection[iwona] + \startsetups[iwona] + % \setupmathfence [\c!alternative=1]% + \setmathfenceparameter \c!alternative{1}% +% \letmathfractionparameter\c!rule\v!symbol +% \setmathfractionparameter\c!middle{"203E}% +% \letmathradicalparameter \c!rule\v!symbol +% \setmathradicalparameter \c!top{\radicalbarextenderuc}% +% \setmathfenceparameter \c!alternative{1}% + \stopsetups + + \startsetups[iwona-light] \directsetup{antykwa}\stopsetups + \startsetups[iwona-medium] \directsetup{antykwa}\stopsetups + \startsetups[iwona-heavy] \directsetup{antykwa}\stopsetups + \startsetups[iwona-cond] \directsetup{antykwa}\stopsetups + \startsetups[iwona-light-cond] \directsetup{antykwa}\stopsetups + \startsetups[iwona-medium-cond]\directsetup{antykwa}\stopsetups + \startsetups[iwona-heavy-cond] \directsetup{antykwa}\stopsetups + \definefontfeature[virtualmath-iwona] [virtualmath][virtualweight=iwona] \definefontfeature[virtualmath-iwona-light] [virtualmath][virtualweight=iwona-light] \definefontfeature[virtualmath-iwona-medium][virtualmath][virtualweight=iwona-medium] \definefontfeature[virtualmath-iwona-heavy] [virtualmath][virtualweight=iwona-heavy] - \starttypescript [\s!sans] [iwona-light,iwona,iwona-medium,iwona-heavy,iwona-light-cond,iwona-cond,iwona-medium-cond,iwona-heavy-cond] - - \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default] - \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default] - \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default] - - \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default] - \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default] - \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default] - \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default] + \starttypescript [\s!sans] [iwona,iwona-light,iwona-medium,iwona-heavy,iwona-cond,iwona-light-cond,iwona-medium-cond,iwona-heavy-cond] + + \definefontsynonym [Iwona-Regular] [\s!file:Iwona-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Italic] [\s!file:Iwona-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Bold] [\s!file:Iwona-Bold] [\s!features=\s!default] + \definefontsynonym [Iwona-BoldItalic] [\s!file:Iwona-BoldItalic] [\s!features=\s!default] + \definefontsynonym [Iwona-Light-Regular] [\s!file:IwonaLight-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Light-Italic] [\s!file:IwonaLight-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Medium-Regular] [\s!file:IwonaMedium-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Medium-Italic] [\s!file:IwonaMedium-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-Heavy-Regular] [\s!file:IwonaHeavy-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-Heavy-Italic] [\s!file:IwonaHeavy-Italic] [\s!features=\s!default] + + \definefontsynonym [Iwona-CondRegular] [\s!file:IwonaCond-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondItalic] [\s!file:IwonaCond-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondBold] [\s!file:IwonaCond-Bold] [\s!features=\s!default] + \definefontsynonym [Iwona-CondBoldItalic] [\s!file:IwonaCond-BoldItalic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondLight-Regular] [\s!file:IwonaCondLight-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondLight-Italic] [\s!file:IwonaCondLight-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondMedium-Regular] [\s!file:IwonaCondMedium-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondMedium-Italic] [\s!file:IwonaCondMedium-Italic] [\s!features=\s!default] + \definefontsynonym [Iwona-CondHeavy-Regular] [\s!file:IwonaCondHeavy-Regular] [\s!features=\s!default] + \definefontsynonym [Iwona-CondHeavy-Italic] [\s!file:IwonaCondHeavy-Italic] [\s!features=\s!default] \stoptypescript @@ -65,59 +83,59 @@ \starttypescript [\s!sans] [iwona-light] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Light-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Light-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Medium-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-Medium-Italic] + \definefontsynonym [\s!Sans] [Iwona-Light-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Light-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Medium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Medium-Italic] \stoptypescript \starttypescript [\s!sans] [iwona] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Bold] - \definefontsynonym [\s!SansBoldItalic] [Iwona-BoldItalic] + \definefontsynonym [\s!Sans] [Iwona-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Bold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-BoldItalic] \stoptypescript \starttypescript [\s!sans] [iwona-medium] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Medium-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Medium-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!Sans] [Iwona-Medium-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Medium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] \stoptypescript \starttypescript [\s!sans] [iwona-heavy] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-Heavy-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-Heavy-Italic] - \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!Sans] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-Heavy-Italic] + \definefontsynonym [\s!SansBold] [Iwona-Heavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-Heavy-Italic] \stoptypescript \starttypescript [\s!sans] [iwona-light-cond] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-CondLight-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-CondLight-Italic] - \definefontsynonym [\s!SansBold] [Iwona-CondMedium-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-CondMedium-Italic] + \definefontsynonym [\s!Sans] [Iwona-CondLight-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CondLight-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CondMedium-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondMedium-Italic] \stoptypescript \starttypescript [\s!sans] [iwona-cond] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-CondRegular] - \definefontsynonym [\s!SansItalic] [Iwona-CondItalic] - \definefontsynonym [\s!SansBold] [Iwona-CondBold] - \definefontsynonym [\s!SansBoldItalic] [Iwona-CondBoldItalic] + \definefontsynonym [\s!Sans] [Iwona-CondRegular] + \definefontsynonym [\s!SansItalic] [Iwona-CondItalic] + \definefontsynonym [\s!SansBold] [Iwona-CondBold] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondBoldItalic] \stoptypescript \starttypescript [\s!sans] [iwona-medium-cond] [\s!name] \setups[\s!font:\s!fallback:\s!sans] - \definefontsynonym [\s!Sans] [Iwona-CondMedium-Regular] - \definefontsynonym [\s!SansItalic] [Iwona-CondMedium-Italic] - \definefontsynonym [\s!SansBold] [Iwona-CondHeavy-Regular] - \definefontsynonym [\s!SansBoldItalic] [Iwona-CondHeavy-Italic] + \definefontsynonym [\s!Sans] [Iwona-CondMedium-Regular] + \definefontsynonym [\s!SansItalic] [Iwona-CondMedium-Italic] + \definefontsynonym [\s!SansBold] [Iwona-CondHeavy-Regular] + \definefontsynonym [\s!SansBoldItalic] [Iwona-CondHeavy-Italic] \stoptypescript \starttypescript [iwona,iwona-light,iwona-heavy,iwona-medium] diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index aaf99ed45..b7d60eefb 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 : 2023-02-14 17:41 +-- merge date : 2023-02-23 21:23 do -- begin closure to overcome local limits and interference -- cgit v1.2.3