diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-05-28 19:47:52 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-05-28 19:47:52 +0200 |
commit | 1bcb61ec8c01b503740bfeb8cc9d5f62553b3f72 (patch) | |
tree | 3d10a64d3823a9a11b0a64f69ead32ace65c4ff4 | |
parent | ca9e3e4bd07d6d644818ffcfe746030923031afd (diff) | |
download | context-1bcb61ec8c01b503740bfeb8cc9d5f62553b3f72.tar.gz |
2023-05-28 18:57:00
32 files changed, 206 insertions, 93 deletions
diff --git a/context/data/scite/context/lexers/data/scite-context-data-tex.lua b/context/data/scite/context/lexers/data/scite-context-data-tex.lua index 5cec3520c..06457aace 100644 --- a/context/data/scite/context/lexers/data/scite-context-data-tex.lua +++ b/context/data/scite/context/lexers/data/scite-context-data-tex.lua @@ -1,7 +1,7 @@ return { ["aleph"]={ "Alephminorversion", "Alephrevision", "Alephversion" }, ["etex"]={ "botmarks", "clubpenalties", "currentgrouplevel", "currentgrouptype", "currentifbranch", "currentiflevel", "currentiftype", "detokenize", "dimexpr", "displaywidowpenalties", "everyeof", "firstmarks", "fontchardp", "fontcharht", "fontcharic", "fontcharwd", "glueexpr", "glueshrink", "glueshrinkorder", "gluestretch", "gluestretchorder", "gluetomu", "ifcsname", "ifdefined", "iffontchar", "interactionmode", "interlinepenalties", "lastlinefit", "lastnodetype", "marks", "muexpr", "mutoglue", "numexpr", "pagediscards", "parshapedimen", "parshapeindent", "parshapelength", "predisplaydirection", "protected", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "unexpanded", "unless", "widowpenalties" }, - ["luatex"]={ "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelimited", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaccentbasedepth", "Umathaccentbaseheight", "Umathaccentbottomovershoot", "Umathaccentbottomshiftdown", "Umathaccentextendmargin", "Umathaccentsuperscriptdrop", "Umathaccentsuperscriptpercent", "Umathaccenttopovershoot", "Umathaccenttopshiftup", "Umathaccentvariant", "Umathadapttoleft", "Umathadapttoright", "Umathaxis", "Umathbottomaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharslot", "Umathclass", "Umathcode", "Umathconnectoroverlapmin", "Umathdegreevariant", "Umathdelimiterextendmargin", "Umathdelimiterovervariant", "Umathdelimiterpercent", "Umathdelimitershortfall", "Umathdelimiterundervariant", "Umathdenominatorvariant", "Umathdict", "Umathdictdef", "Umathdiscretionary", "Umathextrasubpreshift", "Umathextrasubprespace", "Umathextrasubshift", "Umathextrasubspace", "Umathextrasuppreshift", "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", "Umathflattenedaccentbasedepth", "Umathflattenedaccentbaseheight", "Umathflattenedaccentbottomshiftdown", "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathlimits", "Umathnoaxis", "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervariant", "Umathoverdelimitervgap", "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", "Umathpresubshiftdistance", "Umathpresupshiftdistance", "Umathprimeraise", "Umathprimeraisecomposed", "Umathprimeshiftdrop", "Umathprimeshiftup", "Umathprimespaceafter", "Umathprimevariant", "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalextensibleafter", "Umathradicalextensiblebefore", "Umathradicalkern", "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", "Umathruledepth", "Umathruleheight", "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uprimescript", "Uradical", "Uright", "Uroot", "Urooted", "Ushiftedsubprescript", "Ushiftedsubscript", "Ushiftedsuperprescript", "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustartmathmode", "Ustopdisplaymath", "Ustopmath", "Ustopmathmode", "Ustretched", "Ustretchedwithdelims", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "advanceby", "afterassigned", "aftergrouped", "aliased", "aligncontent", "alignmark", "alignmentcellsource", "alignmentwrapsource", "aligntab", "allcrampedstyles", "alldisplaystyles", "allmainstyles", "allmathstyles", "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", "alluncrampedstyles", "allunsplitstyles", "amcode", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "autoparagraphmode", "begincsname", "beginlocalcontrol", "beginmathgroup", "beginsimplegroup", "boundary", "boxadapt", "boxanchor", "boxanchors", "boxattribute", "boxdirection", "boxfreeze", "boxgeometry", "boxorientation", "boxrepack", "boxshift", "boxsource", "boxtarget", "boxtotal", "boxvadjust", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "cdef", "cdefcsname", "cfcode", "clearmarks", "constant", "copymathatomrule", "copymathparent", "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csactive", "csstring", "currentloopiterator", "currentloopnesting", "currentmarks", "dbox", "defcsname", "deferred", "detokened", "detokenized", "dimensiondef", "dimexpression", "directlua", "divideby", "dpack", "dsplit", "edefcsname", "efcode", "endlocalcontrol", "endmathgroup", "endsimplegroup", "enforced", "etoks", "etoksapp", "etokspre", "eufactor", "everybeforepar", "everymathatom", "everytab", "exceptionpenalty", "expand", "expandactive", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandedafter", "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "float", "floatdef", "floatexpr", "flushmarks", "fontcharba", "fontcharta", "fontid", "fontmathcontrol", "fontspecdef", "fontspecid", "fontspecifiedname", "fontspecifiedsize", "fontspecscale", "fontspecxscale", "fontspecyscale", "fonttextcontrol", "formatname", "frozen", "futurecsname", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "glettonothing", "gluespecdef", "glyph", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphxscaled", "glyphyoffset", "glyphyscale", "glyphyscaled", "gtoksapp", "gtokspre", "hccode", "hjcode", "hmcode", "holdingmigrations", "hpack", "hpenalty", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsfloat", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchkdimension", "ifchknum", "ifchknumber", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimexpression", "ifdimval", "ifempty", "ifflags", "iffloat", "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifinsert", "ifintervaldim", "ifintervalfloat", "ifintervalnum", "ifmathparameter", "ifmathstyle", "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ifzerodim", "ifzerofloat", "ifzeronum", "ignorearguments", "ignoredepthcriterium", "ignorepars", "immediate", "immutable", "indexofcharacter", "indexofregister", "inherited", "initcatcodetable", "insertbox", "insertcopy", "insertdepth", "insertdistance", "insertheight", "insertheights", "insertlimit", "insertmaxdepth", "insertmode", "insertmultiplier", "insertpenalty", "insertprogress", "insertstorage", "insertstoring", "insertunbox", "insertuncopy", "insertwidth", "instance", "integerdef", "lastarguments", "lastatomclass", "lastboundary", "lastchkdim", "lastchknum", "lastleftclass", "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastpageextra", "lastparcontext", "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letmathatomrule", "letmathparent", "letmathspacing", "letprotected", "lettonothing", "linebreakcriterium", "linedirection", "localbrokenpenalty", "localcontrol", "localcontrolled", "localcontrolledloop", "localinterlinepenalty", "localleftbox", "localleftboxbox", "localmiddlebox", "localmiddleboxbox", "localrightbox", "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathaccent", "mathatom", "mathatomglue", "mathatomskip", "mathbackwardpenalties", "mathbeginclass", "mathbinary", "mathcheckfencesmode", "mathclose", "mathdictgroup", "mathdictproperties", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", "mathdoublescriptmode", "mathendclass", "matheqnogapstep", "mathfenced", "mathfontcontrol", "mathforwardpenalties", "mathfraction", "mathghost", "mathgluemode", "mathgroupingmode", "mathinner", "mathleftclass", "mathlimitsmode", "mathmainstyle", "mathmiddle", "mathnolimitsmode", "mathopen", "mathoperator", "mathordinary", "mathoverline", "mathpenaltiesmode", "mathpunctuation", "mathradical", "mathrelation", "mathrightclass", "mathrulesfam", "mathrulesmode", "mathscale", "mathscriptsmode", "mathslackmode", "mathspacingmode", "mathstackstyle", "mathstyle", "mathstylefontid", "mathsurroundmode", "mathsurroundskip", "maththreshold", "mathunderline", "meaningasis", "meaningful", "meaningfull", "meaningles", "meaningless", "mugluespecdef", "multiplyby", "mutable", "noaligned", "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", "normalizeparmode", "nospaces", "novrule", "numericscale", "numexpression", "orelse", "orphanpenalties", "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", "overshoot", "pageboundary", "pageextragoal", "pagevsize", "parametercount", "parametermark", "parattribute", "pardirection", "parfillleftskip", "parfillrightskip", "parinitleftskip", "parinitrightskip", "permanent", "pettymuskip", "positdef", "postexhyphenchar", "posthyphenchar", "postinlinepenalty", "postshortinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "preinlinepenalty", "prerelpenalty", "preshortinlinepenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", "scaledemwidth", "scaledexheight", "scaledextraspace", "scaledfontdimen", "scaledinterwordshrink", "scaledinterwordspace", "scaledinterwordstretch", "scaledmathstyle", "scaledslantperpoint", "scantextokens", "semiexpand", "semiexpanded", "semiprotected", "setdefaultmathcodes", "setfontid", "setmathatomrule", "setmathdisplaypostpenalty", "setmathdisplayprepenalty", "setmathignore", "setmathoptions", "setmathpostpenalty", "setmathprepenalty", "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", "snapshotpar", "srule", "supmarkmode", "swapcsvalues", "tabsize", "textdirection", "thewithoutunit", "tinymuskip", "todimension", "tohexadecimal", "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", "tomathstyle", "toscaled", "tosparsedimension", "tosparsescaled", "tpack", "tracingadjusts", "tracingalignments", "tracingexpressions", "tracingfonts", "tracingfullboxes", "tracinghyphenation", "tracinginserts", "tracinglevels", "tracinglists", "tracingmarks", "tracingmath", "tracingnodes", "tracingpenalties", "tsplit", "uleaders", "undent", "unexpandedloop", "unhpack", "unletfrozen", "unletprotected", "untraced", "unvpack", "variablefam", "virtualhrule", "virtualvrule", "vpack", "vpenalty", "wordboundary", "wrapuppar", "xdefcsname", "xtoks", "xtoksapp", "xtokspre" }, + ["luatex"]={ "Uabove", "Uabovewithdelims", "Uatop", "Uatopwithdelims", "Uchar", "Udelcode", "Udelimited", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Uleft", "Umathaccent", "Umathaccentbasedepth", "Umathaccentbaseheight", "Umathaccentbottomovershoot", "Umathaccentbottomshiftdown", "Umathaccentextendmargin", "Umathaccentsuperscriptdrop", "Umathaccentsuperscriptpercent", "Umathaccenttopovershoot", "Umathaccenttopshiftup", "Umathaccentvariant", "Umathadapttoleft", "Umathadapttoright", "Umathaxis", "Umathbottomaccentvariant", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharslot", "Umathclass", "Umathcode", "Umathconnectoroverlapmin", "Umathdegreevariant", "Umathdelimiterextendmargin", "Umathdelimiterovervariant", "Umathdelimiterpercent", "Umathdelimitershortfall", "Umathdelimiterundervariant", "Umathdenominatorvariant", "Umathdict", "Umathdictdef", "Umathdiscretionary", "Umathextrasubpreshift", "Umathextrasubprespace", "Umathextrasubshift", "Umathextrasubspace", "Umathextrasuppreshift", "Umathextrasupprespace", "Umathextrasupshift", "Umathextrasupspace", "Umathflattenedaccentbasedepth", "Umathflattenedaccentbaseheight", "Umathflattenedaccentbottomshiftdown", "Umathflattenedaccenttopshiftup", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathfractionvariant", "Umathhextensiblevariant", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathlimits", "Umathnoaxis", "Umathnolimits", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathnumeratorvariant", "Umathopenupdepth", "Umathopenupheight", "Umathoperatorsize", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervariant", "Umathoverdelimitervgap", "Umathoverlayaccentvariant", "Umathoverlinevariant", "Umathphantom", "Umathpresubshiftdistance", "Umathpresupshiftdistance", "Umathprimeraise", "Umathprimeraisecomposed", "Umathprimeshiftdrop", "Umathprimeshiftup", "Umathprimespaceafter", "Umathprimevariant", "Umathprimewidth", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalextensibleafter", "Umathradicalextensiblebefore", "Umathradicalkern", "Umathradicalrule", "Umathradicalvariant", "Umathradicalvgap", "Umathruledepth", "Umathruleheight", "Umathskeweddelimitertolerance", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathsource", "Umathspaceafterscript", "Umathspacebeforescript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvariant", "Umathstackvgap", "Umathsubscriptvariant", "Umathsubshiftdistance", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsuperscriptvariant", "Umathsupshiftdistance", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathtopaccentvariant", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervariant", "Umathunderdelimitervgap", "Umathunderlinevariant", "Umathuseaxis", "Umathvextensiblevariant", "Umathvoid", "Umathxscale", "Umathyscale", "Umiddle", "Unosubprescript", "Unosubscript", "Unosuperprescript", "Unosuperscript", "Uoperator", "Uover", "Uoverdelimiter", "Uoverwithdelims", "Uprimescript", "Uradical", "Uright", "Uroot", "Urooted", "Ushiftedsubprescript", "Ushiftedsubscript", "Ushiftedsuperprescript", "Ushiftedsuperscript", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustartmathmode", "Ustopdisplaymath", "Ustopmath", "Ustopmathmode", "Ustretched", "Ustretchedwithdelims", "Ustyle", "Usubprescript", "Usubscript", "Usuperprescript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "adjustspacingshrink", "adjustspacingstep", "adjustspacingstretch", "advanceby", "afterassigned", "aftergrouped", "aliased", "aligncontent", "alignmark", "alignmentcellsource", "alignmentwrapsource", "aligntab", "allcrampedstyles", "alldisplaystyles", "allmainstyles", "allmathstyles", "allscriptscriptstyles", "allscriptstyles", "allsplitstyles", "alltextstyles", "alluncrampedstyles", "allunsplitstyles", "amcode", "atendofgroup", "atendofgrouped", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenpenalty", "automigrationmode", "autoparagraphmode", "begincsname", "beginlocalcontrol", "beginmathgroup", "beginsimplegroup", "boundary", "boxadapt", "boxanchor", "boxanchors", "boxattribute", "boxdirection", "boxfreeze", "boxgeometry", "boxorientation", "boxrepack", "boxshift", "boxsource", "boxtarget", "boxtotal", "boxvadjust", "boxxmove", "boxxoffset", "boxymove", "boxyoffset", "catcodetable", "cdef", "cdefcsname", "cfcode", "clearmarks", "constant", "copymathatomrule", "copymathparent", "copymathspacing", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csactive", "csstring", "currentloopiterator", "currentloopnesting", "currentmarks", "dbox", "defcsname", "deferred", "detokened", "detokenized", "dimensiondef", "dimexpression", "directlua", "divideby", "dpack", "dsplit", "edefcsname", "efcode", "endlocalcontrol", "endmathgroup", "endsimplegroup", "enforced", "etoks", "etoksapp", "etokspre", "eufactor", "everybeforepar", "everymathatom", "everytab", "exceptionpenalty", "expand", "expandactive", "expandafterpars", "expandafterspaces", "expandcstoken", "expanded", "expandedafter", "expandedloop", "expandtoken", "explicitdiscretionary", "explicithyphenpenalty", "firstvalidlanguage", "float", "floatdef", "floatexpr", "flushmarks", "fontcharba", "fontcharta", "fontid", "fontmathcontrol", "fontspecdef", "fontspecid", "fontspecifiedname", "fontspecifiedsize", "fontspecscale", "fontspecxscale", "fontspecyscale", "fonttextcontrol", "formatname", "frozen", "futurecsname", "futuredef", "futureexpand", "futureexpandis", "futureexpandisap", "gdefcsname", "gleaders", "glet", "gletcsname", "glettonothing", "gluespecdef", "glyph", "glyphdatafield", "glyphoptions", "glyphscale", "glyphscriptfield", "glyphscriptscale", "glyphscriptscriptscale", "glyphstatefield", "glyphtextscale", "glyphxoffset", "glyphxscale", "glyphxscaled", "glyphyoffset", "glyphyscale", "glyphyscaled", "gtoksapp", "gtokspre", "hccode", "hjcode", "hmcode", "holdingmigrations", "hpack", "hpenalty", "hyphenationmin", "hyphenationmode", "ifabsdim", "ifabsfloat", "ifabsnum", "ifarguments", "ifboolean", "ifchkdim", "ifchkdimension", "ifchknum", "ifchknumber", "ifcmpdim", "ifcmpnum", "ifcondition", "ifcstok", "ifdimexpression", "ifdimval", "ifempty", "ifflags", "iffloat", "ifhaschar", "ifhastok", "ifhastoks", "ifhasxtoks", "ifincsname", "ifinsert", "ifintervaldim", "ifintervalfloat", "ifintervalnum", "ifmathparameter", "ifmathstyle", "ifnumexpression", "ifnumval", "ifparameter", "ifparameters", "ifrelax", "iftok", "ifzerodim", "ifzerofloat", "ifzeronum", "ignorearguments", "ignoredepthcriterium", "ignorepars", "immediate", "immutable", "indexofcharacter", "indexofregister", "inherited", "initcatcodetable", "insertbox", "insertcopy", "insertdepth", "insertdistance", "insertheight", "insertheights", "insertlimit", "insertmaxdepth", "insertmode", "insertmultiplier", "insertpenalty", "insertprogress", "insertstorage", "insertstoring", "insertunbox", "insertuncopy", "insertwidth", "instance", "integerdef", "lastarguments", "lastatomclass", "lastboundary", "lastchkdim", "lastchknum", "lastleftclass", "lastloopiterator", "lastnamedcs", "lastnodesubtype", "lastpageextra", "lastparcontext", "lastrightclass", "leftmarginkern", "letcharcode", "letcsname", "letfrozen", "letmathatomrule", "letmathparent", "letmathspacing", "letprotected", "lettonothing", "linebreakcriterium", "linedirection", "localbrokenpenalty", "localcontrol", "localcontrolled", "localcontrolledloop", "localinterlinepenalty", "localleftbox", "localleftboxbox", "localmiddlebox", "localmiddleboxbox", "localrightbox", "localrightboxbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathaccent", "mathatom", "mathatomglue", "mathatomskip", "mathbackwardpenalties", "mathbeginclass", "mathbinary", "mathcheckfencesmode", "mathclose", "mathdictgroup", "mathdictproperties", "mathdirection", "mathdisplaymode", "mathdisplayskipmode", "mathdoublescriptmode", "mathendclass", "matheqnogapstep", "mathfenced", "mathfontcontrol", "mathforwardpenalties", "mathfraction", "mathghost", "mathgluemode", "mathgroupingmode", "mathinner", "mathleftclass", "mathlimitsmode", "mathmainstyle", "mathmiddle", "mathnolimitsmode", "mathopen", "mathoperator", "mathordinary", "mathoverline", "mathpenaltiesmode", "mathpunctuation", "mathradical", "mathrelation", "mathrightclass", "mathrulesfam", "mathrulesmode", "mathscale", "mathscriptsmode", "mathslackmode", "mathspacingmode", "mathstackstyle", "mathstyle", "mathstylefontid", "mathsurroundmode", "mathsurroundskip", "maththreshold", "mathunderline", "meaningasis", "meaningful", "meaningfull", "meaningles", "meaningless", "mugluespecdef", "multiplyby", "mutable", "noaligned", "noatomruling", "noboundary", "nohrule", "norelax", "normalizelinemode", "normalizeparmode", "nospaces", "novrule", "numericscale", "numexpression", "orelse", "orphanpenalties", "orphanpenalty", "orunless", "outputbox", "overloaded", "overloadmode", "overshoot", "pageboundary", "pageextragoal", "pagevsize", "parametercount", "parametermark", "parattribute", "pardirection", "parfillleftskip", "parfillrightskip", "parinitleftskip", "parinitrightskip", "permanent", "pettymuskip", "positdef", "postexhyphenchar", "posthyphenchar", "postinlinepenalty", "postshortinlinepenalty", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "preinlinepenalty", "prerelpenalty", "preshortinlinepenalty", "protrudechars", "protrusionboundary", "pxdimen", "quitloop", "quitvmode", "resetmathspacing", "retokenized", "rightmarginkern", "rpcode", "savecatcodetable", "scaledemwidth", "scaledexheight", "scaledextraspace", "scaledfontdimen", "scaledinterwordshrink", "scaledinterwordspace", "scaledinterwordstretch", "scaledmathstyle", "scaledslantperpoint", "scantextokens", "semiexpand", "semiexpanded", "semiprotected", "setdefaultmathcodes", "setfontid", "setmathatomrule", "setmathdisplaypostpenalty", "setmathdisplayprepenalty", "setmathignore", "setmathoptions", "setmathpostpenalty", "setmathprepenalty", "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", "shortinlinemaththreshold", "snapshotpar", "srule", "supmarkmode", "swapcsvalues", "tabsize", "textdirection", "thewithoutunit", "tinymuskip", "todimension", "tohexadecimal", "tointeger", "tokenized", "toksapp", "tokspre", "tolerant", "tomathstyle", "toscaled", "tosparsedimension", "tosparsescaled", "tpack", "tracingadjusts", "tracingalignments", "tracingexpressions", "tracingfonts", "tracingfullboxes", "tracinghyphenation", "tracinginserts", "tracinglevels", "tracinglists", "tracingmarks", "tracingmath", "tracingnodes", "tracingpenalties", "tsplit", "uleaders", "undent", "unexpandedloop", "unhpack", "unletfrozen", "unletprotected", "untraced", "unvpack", "variablefam", "virtualhrule", "virtualvrule", "vpack", "vpenalty", "wordboundary", "wrapuppar", "xdefcsname", "xtoks", "xtoksapp", "xtokspre" }, ["omega"]={ "Omegaminorversion", "Omegarevision", "Omegaversion" }, ["pdftex"]={ "ifpdfabsdim", "ifpdfabsnum", "ifpdfprimitive", "pdfadjustspacing", "pdfannot", "pdfcatalog", "pdfcolorstack", "pdfcolorstackinit", "pdfcompresslevel", "pdfcopyfont", "pdfcreationdate", "pdfdecimaldigits", "pdfdest", "pdfdestmargin", "pdfdraftmode", "pdfeachlinedepth", "pdfeachlineheight", "pdfendlink", "pdfendthread", "pdffirstlineheight", "pdffontattr", "pdffontexpand", "pdffontname", "pdffontobjnum", "pdffontsize", "pdfgamma", "pdfgentounicode", "pdfglyphtounicode", "pdfhorigin", "pdfignoreddimen", "pdfignoreunknownimages", "pdfimageaddfilename", "pdfimageapplygamma", "pdfimagegamma", "pdfimagehicolor", "pdfimageresolution", "pdfincludechars", "pdfinclusioncopyfonts", "pdfinclusionerrorlevel", "pdfinfo", "pdfinfoomitdate", "pdfinsertht", "pdflastannot", "pdflastlinedepth", "pdflastlink", "pdflastobj", "pdflastxform", "pdflastximage", "pdflastximagepages", "pdflastxpos", "pdflastypos", "pdflinkmargin", "pdfliteral", "pdfmajorversion", "pdfmapfile", "pdfmapline", "pdfminorversion", "pdfnames", "pdfnoligatures", "pdfnormaldeviate", "pdfobj", "pdfobjcompresslevel", "pdfomitcharset", "pdfomitcidset", "pdfomitinfodict", "pdfoutline", "pdfoutput", "pdfpageattr", "pdfpagebox", "pdfpageheight", "pdfpageref", "pdfpageresources", "pdfpagesattr", "pdfpagewidth", "pdfpkfixeddpi", "pdfpkmode", "pdfpkresolution", "pdfprimitive", "pdfprotrudechars", "pdfpxdimen", "pdfrandomseed", "pdfrecompress", "pdfrefobj", "pdfrefxform", "pdfrefximage", "pdfreplacefont", "pdfrestore", "pdfretval", "pdfsave", "pdfsavepos", "pdfsetmatrix", "pdfsetrandomseed", "pdfstartlink", "pdfstartthread", "pdfsuppressoptionalinfo", "pdfsuppressptexinfo", "pdftexbanner", "pdftexrevision", "pdftexversion", "pdfthread", "pdfthreadmargin", "pdftracingfonts", "pdftrailer", "pdftrailerid", "pdfuniformdeviate", "pdfuniqueresname", "pdfvorigin", "pdfxform", "pdfxformattr", "pdfxformmargin", "pdfxformname", "pdfxformresources", "pdfximage" }, ["tex"]={ " ", "-", "/", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "discretionary", "displayindent", "displaylimits", "displaystyle", "displaywidowpenalty", "displaywidth", "divide", "doublehyphendemerits", "dp", "dump", "edef", "else", "emergencystretch", "end", "endcsname", "endgroup", "endinput", "endlinechar", "eqno", "errhelp", "errmessage", "errorcontextlines", "errorstopmode", "escapechar", "everycr", "everydisplay", "everyhbox", "everyjob", "everymath", "everypar", "everyvbox", "exhyphenchar", "exhyphenpenalty", "expandafter", "fam", "fi", "finalhyphendemerits", "firstmark", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hkern", "holdinginserts", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "indent", "input", "inputlineno", "insert", "insertpenalties", "interlinepenalty", "jobname", "kern", "language", "lastbox", "lastkern", "lastpenalty", "lastskip", "lccode", "leaders", "left", "lefthyphenmin", "leftskip", "leqno", "let", "limits", "linepenalty", "lineskip", "lineskiplimit", "long", "looseness", "lower", "lowercase", "mark", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathcode", "mathop", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "or", "outer", "output", "outputpenalty", "over", "overfullrule", "overline", "overwithdelims", "pagedepth", "pagefilllstretch", "pagefillstretch", "pagefilstretch", "pagegoal", "pageshrink", "pagestretch", "pagetotal", "par", "parfillskip", "parindent", "parshape", "parskip", "patterns", "pausing", "penalty", "postdisplaypenalty", "predisplaypenalty", "predisplaysize", "pretolerance", "prevdepth", "prevgraf", "radical", "raise", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "shownodedetails", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "unboundary", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "vkern", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "xdef", "xleaders", "xspaceskip", "year" }, diff --git a/context/data/scite/context/scite-context-data-tex.properties b/context/data/scite/context/scite-context-data-tex.properties index a6cec5877..2af71416f 100644 --- a/context/data/scite/context/scite-context-data-tex.properties +++ b/context/data/scite/context/scite-context-data-tex.properties @@ -135,17 +135,18 @@ scaledfontdimen scaledinterwordshrink scaledinterwordspace scaledinterwordstretc scaledslantperpoint scantextokens semiexpand semiexpanded semiprotected \ setdefaultmathcodes setfontid setmathatomrule setmathdisplaypostpenalty setmathdisplayprepenalty \ setmathignore setmathoptions setmathpostpenalty setmathprepenalty setmathspacing \ -shapingpenaltiesmode shapingpenalty snapshotpar srule supmarkmode \ -swapcsvalues tabsize textdirection thewithoutunit tinymuskip \ -todimension tohexadecimal tointeger tokenized toksapp \ -tokspre tolerant tomathstyle toscaled tosparsedimension \ -tosparsescaled tpack tracingadjusts tracingalignments tracingexpressions \ -tracingfonts tracingfullboxes tracinghyphenation tracinginserts tracinglevels \ -tracinglists tracingmarks tracingmath tracingnodes tracingpenalties \ -tsplit uleaders undent unexpandedloop unhpack \ -unletfrozen unletprotected untraced unvpack variablefam \ -virtualhrule virtualvrule vpack vpenalty wordboundary \ -wrapuppar xdefcsname xtoks xtoksapp xtokspre +shapingpenaltiesmode shapingpenalty shortinlinemaththreshold snapshotpar srule \ +supmarkmode swapcsvalues tabsize textdirection thewithoutunit \ +tinymuskip todimension tohexadecimal tointeger tokenized \ +toksapp tokspre tolerant tomathstyle toscaled \ +tosparsedimension tosparsescaled tpack tracingadjusts tracingalignments \ +tracingexpressions tracingfonts tracingfullboxes tracinghyphenation tracinginserts \ +tracinglevels tracinglists tracingmarks tracingmath tracingnodes \ +tracingpenalties tsplit uleaders undent unexpandedloop \ +unhpack unletfrozen unletprotected untraced unvpack \ +variablefam virtualhrule virtualvrule vpack vpenalty \ +wordboundary wrapuppar xdefcsname xtoks xtoksapp \ +xtokspre keywordclass.tex.omega=\ Omegaminorversion Omegarevision Omegaversion diff --git a/source/luametatex/source/lua/lmtnodelib.c b/source/luametatex/source/lua/lmtnodelib.c index ba2d0f0ba..c9ab9678c 100644 --- a/source/luametatex/source/lua/lmtnodelib.c +++ b/source/luametatex/source/lua/lmtnodelib.c @@ -4623,7 +4623,7 @@ static int nodelib_direct_dimensions(lua_State *L) { int top = lua_gettop(L); if (top > 0) { - scaledwhd siz = { 0, 0, 0, 0 }; + scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 }; glueratio g_mult = normal_glue_multiplier; int vertical = 0; int g_sign = normal_glue_sign; @@ -4654,7 +4654,8 @@ static int nodelib_direct_dimensions(lua_State *L) lua_pushinteger(L, siz.wd); lua_pushinteger(L, siz.ht); lua_pushinteger(L, siz.dp); - return 3; + lua_pushinteger(L, siz.ns); + return 4; } else { return luaL_error(L, "missing argument to 'dimensions' (direct node expected)"); } @@ -4664,7 +4665,7 @@ static int nodelib_direct_rangedimensions(lua_State *L) /* parent, first, last * { int top = lua_gettop(L); if (top > 1) { - scaledwhd siz = { 0, 0, 0, 0 }; + scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 }; int vertical = 0; halfword l = nodelib_valid_direct_from_index(L, 1); /* parent */ halfword n = nodelib_valid_direct_from_index(L, 2); /* first */ @@ -4685,7 +4686,8 @@ static int nodelib_direct_rangedimensions(lua_State *L) /* parent, first, last * lua_pushinteger(L, siz.wd); lua_pushinteger(L, siz.ht); lua_pushinteger(L, siz.dp); - return 3; + lua_pushinteger(L, siz.ns); + return 4; } else { return luaL_error(L, "missing argument to 'rangedimensions' (2 or more direct nodes expected)"); } @@ -9049,9 +9051,9 @@ static int nodelib_direct_isvalid(lua_State *L) /* getlinestuff : LS RS LH RH ID PF FIRST LAST */ -inline static halfword set_effective_width(halfword source, halfword sign, halfword order, double glue) +inline static scaled set_effective_width(halfword source, halfword sign, halfword order, double glue) { - halfword amount = glue_amount(source); + scaled amount = glue_amount(source); switch (sign) { case stretching_glue_sign: if (glue_stretch_order(source) == order) { @@ -9075,18 +9077,19 @@ static int nodelib_direct_getnormalizedline(lua_State *L) if (n && node_type(n) == hlist_node && node_subtype(n) == line_list) { halfword head = box_list(n); halfword tail = head; - halfword first = head; - halfword last = tail; + halfword first = head; /* the first special glue before the content */ + halfword last = tail; /* the first special glue after the content */ halfword current = head; - halfword ls = 0; - halfword rs = 0; - halfword is = 0; - halfword pr = 0; - halfword pl = 0; - halfword ir = 0; - halfword il = 0; - halfword lh = 0; - halfword rh = 0; + scaled ls = 0; + scaled rs = 0; + scaled is = 0; + scaled pr = 0; + scaled pl = 0; + scaled ir = 0; + scaled il = 0; + scaled lh = 0; + scaled rh = 0; + scaled cs = 0; halfword sign = box_glue_sign(n); halfword order = box_glue_order(n); double glue = box_glue_set(n); @@ -9094,19 +9097,21 @@ static int nodelib_direct_getnormalizedline(lua_State *L) tail = current ; if (node_type(current) == glue_node) { switch (node_subtype(current)) { - case left_skip_glue : ls = set_effective_width(current, sign, order, glue); break; - case right_skip_glue : rs = set_effective_width(current, sign, order, glue); break; - case par_fill_left_skip_glue : pl = set_effective_width(current, sign, order, glue); break; - case par_fill_right_skip_glue : pr = set_effective_width(current, sign, order, glue); break; - case par_init_left_skip_glue : il = set_effective_width(current, sign, order, glue); break; - case par_init_right_skip_glue : ir = set_effective_width(current, sign, order, glue); break; - case indent_skip_glue : is = set_effective_width(current, sign, order, glue); break; - case left_hang_skip_glue : lh = set_effective_width(current, sign, order, glue); break; - case right_hang_skip_glue : rh = set_effective_width(current, sign, order, glue); break; + case left_skip_glue : ls = set_effective_width(current, sign, order, glue); break; // first = current; break; + case right_skip_glue : rs = set_effective_width(current, sign, order, glue); break; // if (last == tail) { last = current; } break; + case par_fill_left_skip_glue : pl = set_effective_width(current, sign, order, glue); break; // first = current; break; + case par_fill_right_skip_glue : pr = set_effective_width(current, sign, order, glue); break; // if (last == tail) { last = current; } break; + case par_init_left_skip_glue : il = set_effective_width(current, sign, order, glue); break; // first = current; break; + case par_init_right_skip_glue : ir = set_effective_width(current, sign, order, glue); break; // if (last == tail) { last = current; } break; + case indent_skip_glue : is = set_effective_width(current, sign, order, glue); break; // first = current; break; + case left_hang_skip_glue : lh = set_effective_width(current, sign, order, glue); break; // first = current; break; + case right_hang_skip_glue : rh = set_effective_width(current, sign, order, glue); break; // if (last == tail) { last = current; } break; + case correction_skip_glue : cs = set_effective_width(current, sign, order, glue); break; // break; } } current = node_next(current); } + /* The next two loops can be integrated in the above but for now we keep this . */ current = head; while (current) { if (node_type(current) == glue_node) { @@ -9156,6 +9161,7 @@ static int nodelib_direct_getnormalizedline(lua_State *L) lua_push_integer_at_key(L, parfillrightskip, pr); lua_push_integer_at_key(L, parinitleftskip, il); lua_push_integer_at_key(L, parinitrightskip, ir); + lua_push_integer_at_key(L, correctionskip, cs); lua_push_integer_at_key(L, first, first); /* points to a skip */ lua_push_integer_at_key(L, last, last); /* points to a skip */ lua_push_integer_at_key(L, head, head); diff --git a/source/luametatex/source/luametatex.h b/source/luametatex/source/luametatex.h index 2a99867e8..f5b2f1984 100644 --- a/source/luametatex/source/luametatex.h +++ b/source/luametatex/source/luametatex.h @@ -92,7 +92,7 @@ # define luametatex_version 210 # define luametatex_revision 9 # define luametatex_version_string "2.10.09" -# define luametatex_development_id 20230525 +# define luametatex_development_id 20230528 # 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 ddc57f0bd..239394859 100644 --- a/source/luametatex/source/tex/texcommands.c +++ b/source/luametatex/source/tex/texcommands.c @@ -311,6 +311,7 @@ void tex_initialize_commands(void) tex_primitive(luatex_command, "tabsize", internal_dimen_cmd, tab_size_code, internal_dimen_base); tex_primitive(luatex_command, "pageextragoal", internal_dimen_cmd, page_extra_goal_code, internal_dimen_base); tex_primitive(luatex_command, "ignoredepthcriterium", internal_dimen_cmd, ignore_depth_criterium_code, internal_dimen_base); /* mostly for myself, tutorials etc */ + tex_primitive(luatex_command, "shortinlinemaththreshold", internal_dimen_cmd, short_inline_math_threshold_code, internal_dimen_base); /*tex Probably never used with \UNICODE\ omnipresent now: */ diff --git a/source/luametatex/source/tex/texdumpdata.h b/source/luametatex/source/tex/texdumpdata.h index be45c0045..c0a55c2fe 100644 --- a/source/luametatex/source/tex/texdumpdata.h +++ b/source/luametatex/source/tex/texdumpdata.h @@ -55,7 +55,7 @@ */ -# define luametatex_format_fingerprint 690 +# define luametatex_format_fingerprint 691 /* These end up in the string pool. */ diff --git a/source/luametatex/source/tex/texequivalents.h b/source/luametatex/source/tex/texequivalents.h index 5ecf73ee0..4aeb32a81 100644 --- a/source/luametatex/source/tex/texequivalents.h +++ b/source/luametatex/source/tex/texequivalents.h @@ -640,12 +640,13 @@ typedef enum dimen_codes { tab_size_code, page_extra_goal_code, ignore_depth_criterium_code, + short_inline_math_threshold_code, /*tex total number of dimension parameters */ number_dimen_pars, } dimen_codes; # define first_dimen_code par_indent_code -# define last_dimen_code tab_size_code +# define last_dimen_code short_inline_math_threshold_code typedef enum attribute_codes { /*tex total number of attribute parameters */ @@ -1395,6 +1396,7 @@ extern void tex_forced_word_define (int g, halfword p, singleword flag, halfword # define overfull_rule_par dimen_parameter(overfull_rule_code) # define box_max_depth_par dimen_parameter(box_max_depth_code) # define ignore_depth_criterium_par dimen_parameter(ignore_depth_criterium_code) +# define short_inline_math_threshold_par dimen_parameter(short_inline_math_threshold_code) # define top_skip_par glue_parameter(top_skip_code) # define split_top_skip_par glue_parameter(split_top_skip_code) diff --git a/source/luametatex/source/tex/texlinebreak.c b/source/luametatex/source/tex/texlinebreak.c index e009d3e50..821613c60 100644 --- a/source/luametatex/source/tex/texlinebreak.c +++ b/source/luametatex/source/tex/texlinebreak.c @@ -2573,9 +2573,10 @@ void tex_do_line_break(line_break_properties *properties) case explicit_kern_subtype: case italic_kern_subtype: { - /* there used to a ! is_char_node(node_next(cur_p)) test */ + /*tex There used to be a |! is_char_node(node_next(cur_p))| test here. */ + /*tex We catch |\emph{test} $\hat{x}$| aka |test\kern5pt\hskip10pt$\hat{x}$|. */ halfword nxt = node_next(cur_p); - if (nxt && node_type(nxt) == glue_node && ! tex_has_glue_option(nxt, glue_option_no_auto_break)) { + if (nxt && node_type(nxt) == glue_node && ! tex_aux_upcoming_penalty(nxt) && ! tex_has_glue_option(nxt, glue_option_no_auto_break)) { tex_aux_try_break(properties, 0, unhyphenated_node, first_p, cur_p, callback_id, pass); } } diff --git a/source/luametatex/source/tex/texmath.c b/source/luametatex/source/tex/texmath.c index a4ec71e5d..e2b4f9c39 100644 --- a/source/luametatex/source/tex/texmath.c +++ b/source/luametatex/source/tex/texmath.c @@ -4761,26 +4761,91 @@ static void tex_aux_finish_displayed_math(int atleft, halfword eqnumber, halfwor */ +/* make propper mappers (see 5967 in texmlist) */ + static inline int tex_aux_class_from_glyph(halfword n) { return node_subtype(n) - (node_subtype(n) > glyph_math_extra_subtype ? glyph_math_extra_subtype : glyph_math_ordinary_subtype); } +static inline int tex_aux_class_from_list(halfword n) { + switch (node_subtype(n)) { + case math_fraction_list: + return fraction_noad_subtype; + case math_accent_list: + return accent_noad_subtype; + case math_radical_list: + return radical_noad_subtype; + default: + return 0; + } +} + static int tex_aux_short_math(halfword m) { // tex_show_node_list(m,10000,10000); if (m) { - /* kern[] glyph[subtype -> class] vlist[scripts] kern[] */ - if (node_type(m) == kern_node) { - m = node_next(m); + /*tex + These are the cases we catch, the class option drives succes. + + \starttyping + kern[] glyph[subtype -> class] vlist[scripts] kern[] + hlist[subtype -> class] + vlist[subtype -> class] + \stoptyping + + */ + switch (node_type(m)) { + case kern_node: + /*tex Do we need to test for some size here? */ + m = node_next(m); + break; + case hlist_node: + case vlist_node: + /*tex + These are actually more extensive constructs that we don't want to analyze any + further (for being single characters). + */ + if (! node_next(m) && tex_math_has_class_option(tex_aux_class_from_list(m), short_inline_class_option)) { + scaled threshold = short_inline_math_threshold_par; + if (threshold > 0 && box_width(m) <= threshold) { + return 1; + } + } + return 0; } - if (m && node_type(m) == glyph_node && tex_math_has_class_option(tex_aux_class_from_glyph(m), short_inline_class_option)) { - m = node_next(m); + /*tex We don't have a list so we check for a list now. */ + if (m) { + switch (node_type(m)) { + case glyph_node: + if (tex_math_has_class_option(tex_aux_class_from_glyph(m), short_inline_class_option)) { + m = node_next(m); + break; + } else { + return 0; + } + default: + return 0; + } } else { return 0; } - if (m && node_type(m) == vlist_node && node_subtype(m) == math_scripts_list) { - m = node_next(m); + /*tex We accept optional sub, super or combined scripts. */ + if (m) { + switch (node_type(m)) { + case vlist_node: + case hlist_node: + switch (node_subtype(m)) { + case math_sup_list: /* in hlist */ + case math_sub_list: /* in hlist */ + case math_pre_post_list: /* in vlist */ + case math_scripts_list: /* in vlist */ + m = node_next(m); + break; + } + /* default */ + } } + /*tex We ignore trailing kerns (for now). We could test for size. */ if (m && node_type(m) == kern_node) { m = node_next(m); } diff --git a/source/luametatex/source/tex/texmlist.c b/source/luametatex/source/tex/texmlist.c index 69de1c8c6..1b9201172 100644 --- a/source/luametatex/source/tex/texmlist.c +++ b/source/luametatex/source/tex/texmlist.c @@ -5964,6 +5964,7 @@ static halfword tex_aux_check_nucleus_complexity(halfword target, scaled *italic /*tex We make a math glyph from an ordinary one. */ halfword glyph; quarterword subtype = 0; + /* todo: make this a mapper */ switch (node_subtype(nucleus)) { case ordinary_noad_subtype: subtype = glyph_math_ordinary_subtype; break; case operator_noad_subtype: subtype = glyph_math_operator_subtype; break; diff --git a/source/luametatex/source/tex/texnodes.c b/source/luametatex/source/tex/texnodes.c index 39dedb97f..650e0cee2 100644 --- a/source/luametatex/source/tex/texnodes.c +++ b/source/luametatex/source/tex/texnodes.c @@ -3485,11 +3485,11 @@ halfword tex_kern_dimension_ex(halfword p) scaledwhd tex_pack_dimensions(halfword p) { - scaledwhd whd = { 0, 0, 0, 0 }; - whd.ht = box_height(p); - whd.dp = box_depth(p); - whd.wd = box_width(p); - return whd; + scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 }; + siz.ht = box_height(p); + siz.dp = box_depth(p); + siz.wd = box_width(p); + return siz; } /*tex diff --git a/source/luametatex/source/tex/texnodes.h b/source/luametatex/source/tex/texnodes.h index 9e7d3ef13..80ab40f03 100644 --- a/source/luametatex/source/tex/texnodes.h +++ b/source/luametatex/source/tex/texnodes.h @@ -464,10 +464,10 @@ typedef enum glue_subtypes { space_skip_glue, xspace_skip_glue, zero_space_skip_glue, - par_fill_right_skip_glue, par_fill_left_skip_glue, - par_init_right_skip_glue, + par_fill_right_skip_glue, par_init_left_skip_glue, + par_init_right_skip_glue, indent_skip_glue, left_hang_skip_glue, right_hang_skip_glue, diff --git a/source/luametatex/source/tex/texpackaging.c b/source/luametatex/source/tex/texpackaging.c index dbc569246..185b80c1b 100644 --- a/source/luametatex/source/tex/texpackaging.c +++ b/source/luametatex/source/tex/texpackaging.c @@ -1617,7 +1617,7 @@ halfword tex_filtered_hpack(halfword p, halfword qt, scaled w, int m, int grp, h scaledwhd tex_natural_hsizes(halfword p, halfword pp, glueratio g_mult, int g_sign, int g_order) { - scaledwhd siz = { 0, 0, 0, 0 }; + scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 }; scaled gp = 0; scaled gm = 0; while (p && p != pp) { @@ -1758,6 +1758,7 @@ scaledwhd tex_natural_hsizes(halfword p, halfword pp, glueratio g_mult, int g_si } p = node_next(p); } + siz.ns = siz.wd; switch (g_sign) { case stretching_glue_sign: siz.wd += glueround((glueratio)(g_mult) * (glueratio)(gp)); @@ -1771,7 +1772,7 @@ scaledwhd tex_natural_hsizes(halfword p, halfword pp, glueratio g_mult, int g_si scaledwhd tex_natural_vsizes(halfword p, halfword pp, glueratio g_mult, int g_sign, int g_order) { - scaledwhd siz = { 0, 0, 0, 0 }; + scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 }; scaled gp = 0; scaled gm = 0; while (p && p != pp) { @@ -1851,6 +1852,7 @@ scaledwhd tex_natural_vsizes(halfword p, halfword pp, glueratio g_mult, int g_si } p = node_next(p); } + siz.ns = siz.ht; switch (g_sign) { case stretching_glue_sign: siz.ht += glueround((glueratio)(g_mult) * (glueratio)(gp)); @@ -1988,7 +1990,7 @@ halfword tex_natural_hsize(halfword p, halfword *correction) halfword tex_natural_vsize(halfword p) { - scaledwhd siz = { 0, 0, 0, 0 }; + scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 }; while (p) { switch (node_type(p)) { case hlist_node: diff --git a/source/luametatex/source/tex/textypes.h b/source/luametatex/source/tex/textypes.h index 1e83a975f..a3ceea681 100644 --- a/source/luametatex/source/tex/textypes.h +++ b/source/luametatex/source/tex/textypes.h @@ -121,7 +121,10 @@ typedef struct scaledwhd { scaled wd; scaled ht; scaled dp; - scaled ic; /* padding anyway */ + union { + scaled ic; /* padding anyway */ + scaled ns; /* natural size */ + }; } scaledwhd; extern halfword tex_badness( diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index e2f277db9..f46b8e473 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.05.27 23:23} +\newcontextversion{2023.05.28 18:55} %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 459078b2f..50f3e71b3 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.05.27 23:23} +\edef\contextversion{2023.05.28 18:55} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-fr.mkii b/tex/context/base/mkii/mult-fr.mkii index 6892458b6..fb98d0766 100644 --- a/tex/context/base/mkii/mult-fr.mkii +++ b/tex/context/base/mkii/mult-fr.mkii @@ -832,6 +832,7 @@ \setinterfaceconstant{exitoffset}{decalagesortie} \setinterfaceconstant{expansion}{expansion} \setinterfaceconstant{export}{exporter} +\setinterfaceconstant{extradata}{extradata} \setinterfaceconstant{extras}{extras} \setinterfaceconstant{factor}{facteur} \setinterfaceconstant{fallback}{repli} @@ -955,6 +956,7 @@ \setinterfaceconstant{lastpage}{dernierepage} \setinterfaceconstant{lastpagesep}{sepdernierepage} \setinterfaceconstant{lastpubsep}{sepdernierepub} +\setinterfaceconstant{lasttextseparator}{lasttextseparator} \setinterfaceconstant{layout}{miseenpage} \setinterfaceconstant{left}{gauche} \setinterfaceconstant{leftclass}{leftclass} diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index b3ef836ce..6c34ef17a 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.05.27 23:23} +\newcontextversion{2023.05.28 18:55} %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 c564ee74c..d5f5241b4 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.05.27 23:23} +\edef\contextversion{2023.05.28 18:55} %D Kind of special: diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index cf83244cf..260a61949 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -659,6 +659,7 @@ return { "setmathspacing", "shapingpenaltiesmode", "shapingpenalty", + "shortinlinemaththreshold", "snapshotpar", "srule", "supmarkmode", diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex a3b95216b..852d7997a 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 85a68d14d..6d9904ad2 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 81d56e507..4e2817bed 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.05.27 23:23} +\newcontextversion{2023.05.28 18:55} %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 74f8b3bfc..381453997 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.05.27 23:23} +\immutable\edef\contextversion{2023.05.28 18:55} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt index b0243719e..8fdd6ca5a 100644 --- a/tex/context/base/mkxl/math-act.lmt +++ b/tex/context/base/mkxl/math-act.lmt @@ -1190,6 +1190,21 @@ do end + +-- In TeX The Program we find in section 543 a remark about the second use of math +-- italic: it is always added to the width except with respect to the position of +-- the subscript. That paragraph also mentions that the number of different widths +-- is normally small so they can be shared (there is an eight bit index into a width +-- array). Actually the limits of at most 16 heights and depths has as side effect +-- that we get some snapping of sizes. Now, because many math characters have an +-- italic correction, the saving on shared widths is negated by the amount of (at +-- most 64) italics. So in practice there is no gain and the italic correction could +-- have served as bottom kern. We think that the following approach (that we actualy +-- came to by a different reasonsing: inconsistent open type fonts) is quite valid +-- and robust. It's just that the opentype math fonts should never have gone that +-- TeX italic route. Italic usage is more clear from section 543 than from the math +-- rendering code. + do local function wipe(whatever,target,original,parameters,field,move,integrals) diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index eb3801a9b..b8c69b78c 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -534,6 +534,14 @@ % \preinlinepenalty 23 \postinlinepenalty 56 x$xx$x\par x$x$x\par x$x^2$x\par x$!$x\par % \preshortinlinepenalty 123 \postshortinlinepenalty456 x$xx$x\par x$x$x\par x$x^2$x\par x$!$x\par +% \immutable\integerdef\defaultpreshortinlinepenalty 150 + +\preshortinlinepenalty 150 + +\appendtoks + \shortinlinemaththreshold\emwidth +\to \everybodyfont + \setmathoptions\mathordinarycode\numexpr \noitaliccorrectionclassoptioncode % +\checkligatureclassoptioncode @@ -638,6 +646,7 @@ +\carryoverrighttopkernclassoptioncode +\carryoverrightbottomkernclassoptioncode +\preferdelimiterdimensionsclassoptioncode + +\shortinlineclassoptioncode \relax \setmathoptions\mathradicalcode\numexpr @@ -648,11 +657,13 @@ +\carryoverrighttopkernclassoptioncode +\carryoverrightbottomkernclassoptioncode +\preferdelimiterdimensionsclassoptioncode + +\shortinlineclassoptioncode \relax \setmathoptions\mathaccentcode\numexpr \defaultmathclassoptions +\autoinjectclassoptioncode + +\shortinlineclassoptioncode \relax % ord spacing but with support for \m{m^2/x__3} diff --git a/tex/context/base/mkxl/math-spa.lmt b/tex/context/base/mkxl/math-spa.lmt index 6cd3b467e..d068ed8e9 100644 --- a/tex/context/base/mkxl/math-spa.lmt +++ b/tex/context/base/mkxl/math-spa.lmt @@ -37,7 +37,7 @@ local getlist = nuts.getlist local setglue = nuts.setglue local setwhd = nuts.setwhd local getdimensions = nuts.dimensions -local getnormalizedline = node.direct.getnormalizedline +local getnormalizedline = nuts.getnormalizedline local getbox = nuts.getbox local setoffsets = nuts.setoffsets local addxoffset = nuts.addxoffset diff --git a/tex/context/base/mkxl/spac-brk.lmt b/tex/context/base/mkxl/spac-brk.lmt index e534faa0e..fd32f7000 100644 --- a/tex/context/base/mkxl/spac-brk.lmt +++ b/tex/context/base/mkxl/spac-brk.lmt @@ -37,6 +37,7 @@ local nodecodes = nodes.nodecodes local penalty_code = nodecodes.penalty local glue_code = nodecodes.glue local disc_code = nodecodes.disc +local kern_code = nodecodes.kern local math_code = nodecodes.math local breakcodes = tex.breakcodes diff --git a/tex/context/base/mkxl/spac-brk.mkxl b/tex/context/base/mkxl/spac-brk.mkxl index 8926e1b4d..0ecff3577 100644 --- a/tex/context/base/mkxl/spac-brk.mkxl +++ b/tex/context/base/mkxl/spac-brk.mkxl @@ -19,25 +19,21 @@ \registerctxluafile{spac-brk}{} +\unprotect + %D This is a very experimental feature and a by product of improving inline math %D crossing lines. As it might evolve: use with care. -% \setuplayout[width=8cm] % \starttext % \setupalign[verytolerant] % \tracinglousiness1 % % \tracinglousiness2 -% \samplefile{ward} \blank -% % \ctxlua{typesetters.breakpoints.show("11=0")} \samplefile{ward} \blank -% % \ctxlua{typesetters.breakpoints.show{ [11] = 0 }} \samplefile{ward} \blank -% \lousiness 1 11 0 \samplefile{ward} \blank -% \silliness 11 \samplefile{ward} \blank -% {\tt \the\lousiness} +% \hsize8cm \lousiness 0 \samplefile{ward} \blank +% {\tt \the\lousiness} \blank +% \hsize8cm \lousiness 1 11 0 \samplefile{ward} \blank +% \hsize8cm \silliness 11 \samplefile{ward} \blank % \stoptext - -\unprotect - -% nothing hereyet +%D These macros are defined a the \LUA\ end. \protect \endinput diff --git a/tex/context/interface/mkii/keys-fr.xml b/tex/context/interface/mkii/keys-fr.xml index e9794ab0b..db5ac7f88 100644 --- a/tex/context/interface/mkii/keys-fr.xml +++ b/tex/context/interface/mkii/keys-fr.xml @@ -838,6 +838,7 @@ <cd:constant name='exitoffset' value='decalagesortie'/> <cd:constant name='expansion' value='expansion'/> <cd:constant name='export' value='exporter'/> + <cd:constant name='extradata' value='extradata'/> <cd:constant name='extras' value='extras'/> <cd:constant name='factor' value='facteur'/> <cd:constant name='fallback' value='repli'/> @@ -961,6 +962,7 @@ <cd:constant name='lastpage' value='dernierepage'/> <cd:constant name='lastpagesep' value='sepdernierepage'/> <cd:constant name='lastpubsep' value='sepdernierepub'/> + <cd:constant name='lasttextseparator' value='lasttextseparator'/> <cd:constant name='layout' value='miseenpage'/> <cd:constant name='left' value='gauche'/> <cd:constant name='leftclass' value='leftclass'/> diff --git a/tex/context/sample/math/math-knuth-dt.tex b/tex/context/sample/math/math-knuth-dt.tex index e32681437..7babcaf76 100644 --- a/tex/context/sample/math/math-knuth-dt.tex +++ b/tex/context/sample/math/math-knuth-dt.tex @@ -1,13 +1,16 @@ -{\bf 15.} (This procedure maintains four integers $(A, B, C, D)$ with the invariant meaning -that \quotation{our remaining job is to output the continued fraction for $(Ay + B)/(Cy + D)$, -where $y$ is the input yet to come.}) Initially set $j \leftarrow k \leftarrow 0$, $(A, B, C, D) \leftarrow (a, b, c, d)$; -then input $x_j$ and set $(A, B, C, D) \leftarrow (Ax_j + B, A, Cx_j + D, C)$, $j \leftarrow j + 1$, one or -more times until $C + D$ has the same sign as $C$. (When $j > 1$ and the input has not -terminated, we know that $1 < y < \infty$; and when $C + D$ has the same sign as $C$ we -know therefore that $(Ay + B)/(Cy + D)$ lies between $(A + B)/(C + D)$ and $A/C$.) -Now comes the general step: If no integer lies strictly between $(A + B)/(C + D)$ -and $A/C$, output $X_k \leftarrow \lfloor A/C \rfloor$, and set $(A, B, C, D) \leftarrow (C, D, A - X_ k C, B - X_k D)$, -$k \leftarrow k + 1$; otherwise input $x_j$ and set $(A, B,C, D) \leftarrow (Ax_j + B, A, Cx_j + D,C)$, -$j \leftarrow j + 1$. The general step is repeated ad infinitum. However, if at any time the -\emph{final} $x_j$ is input, the algorithm immediately switches gears: It outputs the continued -fraction for $(Ax_j + B)/(Cx_j + D)$, using Euclid's algorithm, and terminates. +{\bf 15.} (This procedure maintains four integers $(A, B, C, D)$ with the +invariant meaning that \quotation{our remaining job is to output the continued +fraction for $(Ay + B)/(Cy + D)$, where $y$ is the input yet to come.}) Initially +set $j \leftarrow k \leftarrow 0$, $(A, B, C, D) \leftarrow (a, b, c, d)$; then +input $x_j$ and set $(A, B, C, D) \leftarrow (Ax_j + B, A, Cx_j + D, C)$, $j +\leftarrow j + 1$, one or more times until $C + D$ has the same sign as $C$. +(When $j > 1$ and the input has not terminated, we know that $1 < y < \infty$; +and when $C + D$ has the same sign as $C$ we know therefore that $(Ay + B)/(Cy + +D)$ lies between $(A + B)/(C + D)$ and $A/C$.) Now comes the general step: If no +integer lies strictly between $(A + B)/(C + D)$ and $A/C$, output $X_k \leftarrow +\lfloor A/C \rfloor$, and set $(A, B, C, D) \leftarrow (C, D, A - X_ k C, B - X_k +D)$, $k \leftarrow k + 1$; otherwise input $x_j$ and set $(A, B,C, D) \leftarrow +(Ax_j + B, A, Cx_j + D,C)$, $j \leftarrow j + 1$. The general step is repeated ad +infinitum. However, if at any time the \emph{final} $x_j$ is input, the algorithm +immediately switches gears: It outputs the continued fraction for $(Ax_j + +B)/(Cx_j + D)$, using Euclid's algorithm, and terminates. diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 3dfd09687..6df432862 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-05-27 23:23 +-- merge date : 2023-05-28 18:55 do -- begin closure to overcome local limits and interference |