diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-07-16 22:42:53 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-07-16 22:42:53 +0200 |
commit | a92a8d40ce567ecf5b0baacd9a93a94aac9a4a2d (patch) | |
tree | 17f7038c1c3b353bc2130af87066676d49f87184 | |
parent | 4bc28891615011ed3581836e9259434720e25830 (diff) | |
download | context-a92a8d40ce567ecf5b0baacd9a93a94aac9a4a2d.tar.gz |
2019-07-16 18:30:00
76 files changed, 2477 insertions, 1494 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 a7ef2a617..72f1eb70d 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", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "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", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" }, - ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "endlocalcontrol", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fixupboxesmode", "fontid", "formatname", "futureexpand", "futureexpandis", "gleaders", "gtoksapp", "gtokspre", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifcondition", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "lateluafunction", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource", "xtoksapp", "xtokspre" }, + ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "endlocalcontrol", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fixupboxesmode", "fontid", "formatname", "frozen", "futureexpand", "futureexpandis", "gleaders", "gtoksapp", "gtokspre", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifcondition", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "lateluafunction", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource", "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", "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"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "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", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "glet", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "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", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "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", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "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 bbc87182f..9ced8b1c5 100644 --- a/context/data/scite/context/scite-context-data-tex.properties +++ b/context/data/scite/context/scite-context-data-tex.properties @@ -54,32 +54,33 @@ crampeddisplaystyle crampedscriptscriptstyle crampedscriptstyle crampedtextstyle draftmode dviextension dvifeedback dvivariable efcode \ endlocalcontrol etoksapp etokspre exceptionpenalty expanded \ expandglyphsinfont explicitdiscretionary explicithyphenpenalty fixupboxesmode fontid \ -formatname futureexpand futureexpandis gleaders gtoksapp \ -gtokspre hjcode hyphenationbounds hyphenationmin hyphenpenaltymode \ -ifabsdim ifabsnum ifcondition ifincsname ifprimitive \ -ignoreligaturesinfont immediateassigned immediateassignment initcatcodetable insertht \ -lastnamedcs lastsavedboxresourceindex lastsavedimageresourceindex lastsavedimageresourcepages lastxpos \ -lastypos latelua lateluafunction leftghost leftmarginkern \ -letcharcode letterspacefont linedir linedirection localbrokenpenalty \ -localinterlinepenalty localleftbox localrightbox lpcode luabytecode \ -luabytecodecall luacopyinputnodes luadef luaescapestring luafunction \ -luafunctioncall luatexbanner luatexrevision luatexversion mathdelimitersmode \ -mathdir mathdirection mathdisplayskipmode matheqnogapstep mathflattenmode \ -mathitalicsmode mathnolimitsmode mathoption mathpenaltiesmode mathrulesfam \ -mathrulesmode mathrulethicknessmode mathscriptboxmode mathscriptcharmode mathscriptsmode \ -mathstyle mathsurroundmode mathsurroundskip nohrule nokerns \ -noligs normaldeviate nospaces novrule outputbox \ -outputmode pagebottomoffset pagedir pagedirection pageheight \ -pageleftoffset pagerightoffset pagetopoffset pagewidth pardir \ -pardirection pdfextension pdffeedback pdfvariable postexhyphenchar \ -posthyphenchar prebinoppenalty predisplaygapfactor preexhyphenchar prehyphenchar \ -prerelpenalty primitive protrudechars pxdimen quitvmode \ -randomseed rightghost rightmarginkern rpcode saveboxresource \ -savecatcodetable saveimageresource savepos scantextokens setfontid \ -setrandomseed shapemode suppressfontnotfounderror suppressifcsnameerror suppresslongerror \ -suppressmathparerror suppressoutererror suppressprimitiveerror synctex tagcode \ -textdir textdirection toksapp tokspre tracingfonts \ -uniformdeviate useboxresource useimageresource xtoksapp xtokspre +formatname frozen futureexpand futureexpandis gleaders \ +gtoksapp gtokspre hjcode hyphenationbounds hyphenationmin \ +hyphenpenaltymode ifabsdim ifabsnum ifcondition ifincsname \ +ifprimitive ignoreligaturesinfont immediateassigned immediateassignment initcatcodetable \ +insertht lastnamedcs lastsavedboxresourceindex lastsavedimageresourceindex lastsavedimageresourcepages \ +lastxpos lastypos latelua lateluafunction leftghost \ +leftmarginkern letcharcode letterspacefont linedir linedirection \ +localbrokenpenalty localinterlinepenalty localleftbox localrightbox lpcode \ +luabytecode luabytecodecall luacopyinputnodes luadef luaescapestring \ +luafunction luafunctioncall luatexbanner luatexrevision luatexversion \ +mathdelimitersmode mathdir mathdirection mathdisplayskipmode matheqnogapstep \ +mathflattenmode mathitalicsmode mathnolimitsmode mathoption mathpenaltiesmode \ +mathrulesfam mathrulesmode mathrulethicknessmode mathscriptboxmode mathscriptcharmode \ +mathscriptsmode mathstyle mathsurroundmode mathsurroundskip nohrule \ +nokerns noligs normaldeviate nospaces novrule \ +outputbox outputmode pagebottomoffset pagedir pagedirection \ +pageheight pageleftoffset pagerightoffset pagetopoffset pagewidth \ +pardir pardirection pdfextension pdffeedback pdfvariable \ +postexhyphenchar posthyphenchar prebinoppenalty predisplaygapfactor preexhyphenchar \ +prehyphenchar prerelpenalty primitive protrudechars pxdimen \ +quitvmode randomseed rightghost rightmarginkern rpcode \ +saveboxresource savecatcodetable saveimageresource savepos scantextokens \ +setfontid setrandomseed shapemode suppressfontnotfounderror suppressifcsnameerror \ +suppresslongerror suppressmathparerror suppressoutererror suppressprimitiveerror synctex \ +tagcode textdir textdirection toksapp tokspre \ +tracingfonts uniformdeviate useboxresource useimageresource xtoksapp \ +xtokspre keywordclass.tex.omega=\ Omegaminorversion Omegarevision Omegaversion diff --git a/context/data/textadept/context/data/scite-context-data-tex.lua b/context/data/textadept/context/data/scite-context-data-tex.lua index a7ef2a617..72f1eb70d 100644 --- a/context/data/textadept/context/data/scite-context-data-tex.lua +++ b/context/data/textadept/context/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", "eTeXVersion", "eTeXminorversion", "eTeXrevision", "eTeXversion", "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", "readline", "savinghyphcodes", "savingvdiscards", "scantokens", "showgroups", "showifs", "showtokens", "splitbotmarks", "splitdiscards", "splitfirstmarks", "topmarks", "tracingassigns", "tracinggroups", "tracingifs", "tracingnesting", "tracingscantokens", "unexpanded", "unless", "widowpenalties" }, - ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "endlocalcontrol", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fixupboxesmode", "fontid", "formatname", "futureexpand", "futureexpandis", "gleaders", "gtoksapp", "gtokspre", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifcondition", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "lateluafunction", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource", "xtoksapp", "xtokspre" }, + ["luatex"]={ "Uchar", "Udelcode", "Udelcodenum", "Udelimiter", "Udelimiterover", "Udelimiterunder", "Uhextensible", "Umathaccent", "Umathaxis", "Umathbinbinspacing", "Umathbinclosespacing", "Umathbininnerspacing", "Umathbinopenspacing", "Umathbinopspacing", "Umathbinordspacing", "Umathbinpunctspacing", "Umathbinrelspacing", "Umathchar", "Umathcharclass", "Umathchardef", "Umathcharfam", "Umathcharnum", "Umathcharnumdef", "Umathcharslot", "Umathclosebinspacing", "Umathcloseclosespacing", "Umathcloseinnerspacing", "Umathcloseopenspacing", "Umathcloseopspacing", "Umathcloseordspacing", "Umathclosepunctspacing", "Umathcloserelspacing", "Umathcode", "Umathcodenum", "Umathconnectoroverlapmin", "Umathfractiondelsize", "Umathfractiondenomdown", "Umathfractiondenomvgap", "Umathfractionnumup", "Umathfractionnumvgap", "Umathfractionrule", "Umathinnerbinspacing", "Umathinnerclosespacing", "Umathinnerinnerspacing", "Umathinneropenspacing", "Umathinneropspacing", "Umathinnerordspacing", "Umathinnerpunctspacing", "Umathinnerrelspacing", "Umathlimitabovebgap", "Umathlimitabovekern", "Umathlimitabovevgap", "Umathlimitbelowbgap", "Umathlimitbelowkern", "Umathlimitbelowvgap", "Umathnolimitsubfactor", "Umathnolimitsupfactor", "Umathopbinspacing", "Umathopclosespacing", "Umathopenbinspacing", "Umathopenclosespacing", "Umathopeninnerspacing", "Umathopenopenspacing", "Umathopenopspacing", "Umathopenordspacing", "Umathopenpunctspacing", "Umathopenrelspacing", "Umathoperatorsize", "Umathopinnerspacing", "Umathopopenspacing", "Umathopopspacing", "Umathopordspacing", "Umathoppunctspacing", "Umathoprelspacing", "Umathordbinspacing", "Umathordclosespacing", "Umathordinnerspacing", "Umathordopenspacing", "Umathordopspacing", "Umathordordspacing", "Umathordpunctspacing", "Umathordrelspacing", "Umathoverbarkern", "Umathoverbarrule", "Umathoverbarvgap", "Umathoverdelimiterbgap", "Umathoverdelimitervgap", "Umathpunctbinspacing", "Umathpunctclosespacing", "Umathpunctinnerspacing", "Umathpunctopenspacing", "Umathpunctopspacing", "Umathpunctordspacing", "Umathpunctpunctspacing", "Umathpunctrelspacing", "Umathquad", "Umathradicaldegreeafter", "Umathradicaldegreebefore", "Umathradicaldegreeraise", "Umathradicalkern", "Umathradicalrule", "Umathradicalvgap", "Umathrelbinspacing", "Umathrelclosespacing", "Umathrelinnerspacing", "Umathrelopenspacing", "Umathrelopspacing", "Umathrelordspacing", "Umathrelpunctspacing", "Umathrelrelspacing", "Umathskewedfractionhgap", "Umathskewedfractionvgap", "Umathspaceafterscript", "Umathstackdenomdown", "Umathstacknumup", "Umathstackvgap", "Umathsubshiftdown", "Umathsubshiftdrop", "Umathsubsupshiftdown", "Umathsubsupvgap", "Umathsubtopmax", "Umathsupbottommin", "Umathsupshiftdrop", "Umathsupshiftup", "Umathsupsubbottommax", "Umathunderbarkern", "Umathunderbarrule", "Umathunderbarvgap", "Umathunderdelimiterbgap", "Umathunderdelimitervgap", "Unosubscript", "Unosuperscript", "Uoverdelimiter", "Uradical", "Uroot", "Uskewed", "Uskewedwithdelims", "Ustack", "Ustartdisplaymath", "Ustartmath", "Ustopdisplaymath", "Ustopmath", "Usubscript", "Usuperscript", "Uunderdelimiter", "Uvextensible", "adjustspacing", "alignmark", "aligntab", "attribute", "attributedef", "automaticdiscretionary", "automatichyphenmode", "automatichyphenpenalty", "begincsname", "bodydir", "bodydirection", "boxdir", "boxdirection", "breakafterdirmode", "catcodetable", "clearmarks", "compoundhyphenmode", "copyfont", "crampeddisplaystyle", "crampedscriptscriptstyle", "crampedscriptstyle", "crampedtextstyle", "csstring", "draftmode", "dviextension", "dvifeedback", "dvivariable", "efcode", "endlocalcontrol", "etoksapp", "etokspre", "exceptionpenalty", "expanded", "expandglyphsinfont", "explicitdiscretionary", "explicithyphenpenalty", "fixupboxesmode", "fontid", "formatname", "frozen", "futureexpand", "futureexpandis", "gleaders", "gtoksapp", "gtokspre", "hjcode", "hyphenationbounds", "hyphenationmin", "hyphenpenaltymode", "ifabsdim", "ifabsnum", "ifcondition", "ifincsname", "ifprimitive", "ignoreligaturesinfont", "immediateassigned", "immediateassignment", "initcatcodetable", "insertht", "lastnamedcs", "lastsavedboxresourceindex", "lastsavedimageresourceindex", "lastsavedimageresourcepages", "lastxpos", "lastypos", "latelua", "lateluafunction", "leftghost", "leftmarginkern", "letcharcode", "letterspacefont", "linedir", "linedirection", "localbrokenpenalty", "localinterlinepenalty", "localleftbox", "localrightbox", "lpcode", "luabytecode", "luabytecodecall", "luacopyinputnodes", "luadef", "luaescapestring", "luafunction", "luafunctioncall", "luatexbanner", "luatexrevision", "luatexversion", "mathdelimitersmode", "mathdir", "mathdirection", "mathdisplayskipmode", "matheqnogapstep", "mathflattenmode", "mathitalicsmode", "mathnolimitsmode", "mathoption", "mathpenaltiesmode", "mathrulesfam", "mathrulesmode", "mathrulethicknessmode", "mathscriptboxmode", "mathscriptcharmode", "mathscriptsmode", "mathstyle", "mathsurroundmode", "mathsurroundskip", "nohrule", "nokerns", "noligs", "normaldeviate", "nospaces", "novrule", "outputbox", "outputmode", "pagebottomoffset", "pagedir", "pagedirection", "pageheight", "pageleftoffset", "pagerightoffset", "pagetopoffset", "pagewidth", "pardir", "pardirection", "pdfextension", "pdffeedback", "pdfvariable", "postexhyphenchar", "posthyphenchar", "prebinoppenalty", "predisplaygapfactor", "preexhyphenchar", "prehyphenchar", "prerelpenalty", "primitive", "protrudechars", "pxdimen", "quitvmode", "randomseed", "rightghost", "rightmarginkern", "rpcode", "saveboxresource", "savecatcodetable", "saveimageresource", "savepos", "scantextokens", "setfontid", "setrandomseed", "shapemode", "suppressfontnotfounderror", "suppressifcsnameerror", "suppresslongerror", "suppressmathparerror", "suppressoutererror", "suppressprimitiveerror", "synctex", "tagcode", "textdir", "textdirection", "toksapp", "tokspre", "tracingfonts", "uniformdeviate", "useboxresource", "useimageresource", "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", "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"]={ " ", "-", "/", "Uleft", "Umiddle", "Uright", "above", "abovedisplayshortskip", "abovedisplayskip", "abovewithdelims", "accent", "adjdemerits", "advance", "afterassignment", "aftergroup", "atop", "atopwithdelims", "badness", "baselineskip", "batchmode", "begingroup", "belowdisplayshortskip", "belowdisplayskip", "binoppenalty", "botmark", "boundary", "box", "boxmaxdepth", "brokenpenalty", "catcode", "char", "chardef", "cleaders", "closein", "closeout", "clubpenalty", "copy", "count", "countdef", "cr", "crcr", "csname", "day", "deadcycles", "def", "defaulthyphenchar", "defaultskewchar", "delcode", "delimiter", "delimiterfactor", "delimitershortfall", "dimen", "dimendef", "directlua", "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", "firstvalidlanguage", "floatingpenalty", "font", "fontdimen", "fontname", "futurelet", "gdef", "glet", "global", "globaldefs", "halign", "hangafter", "hangindent", "hbadness", "hbox", "hfil", "hfill", "hfilneg", "hfuzz", "hoffset", "holdinginserts", "hpack", "hrule", "hsize", "hskip", "hss", "ht", "hyphenation", "hyphenchar", "hyphenpenalty", "if", "ifcase", "ifcat", "ifdim", "ifeof", "iffalse", "ifhbox", "ifhmode", "ifinner", "ifmmode", "ifnum", "ifodd", "iftrue", "ifvbox", "ifvmode", "ifvoid", "ifx", "ignorespaces", "immediate", "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", "mag", "mark", "mathaccent", "mathbin", "mathchar", "mathchardef", "mathchoice", "mathclose", "mathcode", "mathinner", "mathop", "mathopen", "mathord", "mathpunct", "mathrel", "mathsurround", "maxdeadcycles", "maxdepth", "meaning", "medmuskip", "message", "middle", "mkern", "month", "moveleft", "moveright", "mskip", "multiply", "muskip", "muskipdef", "newlinechar", "noalign", "noboundary", "noexpand", "noindent", "nolimits", "nonscript", "nonstopmode", "nulldelimiterspace", "nullfont", "number", "omit", "openin", "openout", "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", "protrusionboundary", "radical", "raise", "read", "relax", "relpenalty", "right", "righthyphenmin", "rightskip", "romannumeral", "scriptfont", "scriptscriptfont", "scriptscriptstyle", "scriptspace", "scriptstyle", "scrollmode", "setbox", "setlanguage", "sfcode", "shipout", "show", "showbox", "showboxbreadth", "showboxdepth", "showlists", "showthe", "skewchar", "skip", "skipdef", "spacefactor", "spaceskip", "span", "special", "splitbotmark", "splitfirstmark", "splitmaxdepth", "splittopskip", "string", "tabskip", "textfont", "textstyle", "the", "thickmuskip", "thinmuskip", "time", "toks", "toksdef", "tolerance", "topmark", "topskip", "tpack", "tracingcommands", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingpages", "tracingparagraphs", "tracingrestores", "tracingstats", "uccode", "uchyph", "underline", "unhbox", "unhcopy", "unkern", "unpenalty", "unskip", "unvbox", "unvcopy", "uppercase", "vadjust", "valign", "vbadness", "vbox", "vcenter", "vfil", "vfill", "vfilneg", "vfuzz", "voffset", "vpack", "vrule", "vsize", "vskip", "vsplit", "vss", "vtop", "wd", "widowpenalty", "wordboundary", "write", "xdef", "xleaders", "xspaceskip", "year" }, diff --git a/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json b/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json index c96ab831a..3b70051e7 100644 --- a/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json +++ b/context/data/vscode/extensions/context/syntaxes/context-syntax-tex.json @@ -215,7 +215,7 @@ ] }, "primitive" : { - "match" : "\u005C\u005C(year|xtokspre|xtoksapp|xspaceskip|xleaders|xdef|write|wordboundary|widowpenalty|widowpenalties|wd|vtop|vss|vsplit|vskip|vsize|vrule|vpack|voffset|vfuzz|vfilneg|vfill|vfil|vcenter|vbox|vbadness|valign|vadjust|useimageresource|useboxresource|uppercase|unvcopy|unvbox|unskip|unpenalty|unless|unkern|uniformdeviate|unhcopy|unhbox|underline|uchyph|uccode|tracingstats|tracingscantokens|tracingrestores|tracingparagraphs|tracingpages|tracingoutput|tracingonline|tracingnesting|tracingmacros|tracinglostchars|tracingifs|tracinggroups|tracingfonts|tracingcommands|tracingassigns|tpack|topskip|topmarks|topmark|tolerance|tokspre|toksdef|toksapp|toks|time|thinmuskip|thickmuskip|the|textstyle|textfont|textdirection|textdir|tagcode|tabskip|synctex|suppressprimitiveerror|suppressoutererror|suppressmathparerror|suppresslongerror|suppressifcsnameerror|suppressfontnotfounderror|string|splittopskip|splitmaxdepth|splitfirstmarks|splitfirstmark|splitdiscards|splitbotmarks|splitbotmark|special|span|spaceskip|spacefactor|skipdef|skip|skewchar|showtokens|showthe|showlists|showifs|showgroups|showboxdepth|showboxbreadth|showbox|show|shipout|shapemode|sfcode|setrandomseed|setlanguage|setfontid|setbox|scrollmode|scriptstyle|scriptspace|scriptscriptstyle|scriptscriptfont|scriptfont|scantokens|scantextokens|savingvdiscards|savinghyphcodes|savepos|saveimageresource|savecatcodetable|saveboxresource|rpcode|romannumeral|rightskip|rightmarginkern|righthyphenmin|rightghost|right|relpenalty|relax|readline|read|randomseed|raise|radical|quitvmode|pxdimen|protrusionboundary|protrudechars|primitive|prevgraf|prevdepth|pretolerance|prerelpenalty|prehyphenchar|preexhyphenchar|predisplaysize|predisplaypenalty|predisplaygapfactor|predisplaydirection|prebinoppenalty|posthyphenchar|postexhyphenchar|postdisplaypenalty|penalty|pdfximage|pdfxformresources|pdfxformname|pdfxformmargin|pdfxformattr|pdfxform|pdfvorigin|pdfvariable|pdfuniqueresname|pdfuniformdeviate|pdftrailerid|pdftrailer|pdftracingfonts|pdfthreadmargin|pdfthread|pdftexversion|pdftexrevision|pdftexbanner|pdfsuppressptexinfo|pdfsuppressoptionalinfo|pdfstartthread|pdfstartlink|pdfsetrandomseed|pdfsetmatrix|pdfsavepos|pdfsave|pdfretval|pdfrestore|pdfreplacefont|pdfrefximage|pdfrefxform|pdfrefobj|pdfrecompress|pdfrandomseed|pdfpxdimen|pdfprotrudechars|pdfprimitive|pdfpkresolution|pdfpkmode|pdfpkfixeddpi|pdfpagewidth|pdfpagesattr|pdfpageresources|pdfpageref|pdfpageheight|pdfpagebox|pdfpageattr|pdfoutput|pdfoutline|pdfomitcidset|pdfomitcharset|pdfobjcompresslevel|pdfobj|pdfnormaldeviate|pdfnoligatures|pdfnames|pdfminorversion|pdfmapline|pdfmapfile|pdfmajorversion|pdfliteral|pdflinkmargin|pdflastypos|pdflastxpos|pdflastximagepages|pdflastximage|pdflastxform|pdflastobj|pdflastlink|pdflastlinedepth|pdflastannot|pdfinsertht|pdfinfoomitdate|pdfinfo|pdfinclusionerrorlevel|pdfinclusioncopyfonts|pdfincludechars|pdfimageresolution|pdfimagehicolor|pdfimagegamma|pdfimageapplygamma|pdfimageaddfilename|pdfignoreunknownimages|pdfignoreddimen|pdfhorigin|pdfglyphtounicode|pdfgentounicode|pdfgamma|pdffontsize|pdffontobjnum|pdffontname|pdffontexpand|pdffontattr|pdffirstlineheight|pdffeedback|pdfextension|pdfendthread|pdfendlink|pdfeachlineheight|pdfeachlinedepth|pdfdraftmode|pdfdestmargin|pdfdest|pdfdecimaldigits|pdfcreationdate|pdfcopyfont|pdfcompresslevel|pdfcolorstackinit|pdfcolorstack|pdfcatalog|pdfannot|pdfadjustspacing|pausing|patterns|parskip|parshapelength|parshapeindent|parshapedimen|parshape|parindent|parfillskip|pardirection|pardir|par|pagewidth|pagetotal|pagetopoffset|pagestretch|pageshrink|pagerightoffset|pageleftoffset|pageheight|pagegoal|pagefilstretch|pagefillstretch|pagefilllstretch|pagediscards|pagedirection|pagedir|pagedepth|pagebottomoffset|overwithdelims|overline|overfullrule|over|outputpenalty|outputmode|outputbox|output|outer|or|openout|openin|omit|numexpr|number|nullfont|nulldelimiterspace|novrule|nospaces|normalyear|normalxtokspre|normalxtoksapp|normalxspaceskip|normalxleaders|normalxdef|normalwrite|normalwordboundary|normalwidowpenalty|normalwidowpenalties|normalwd|normalvtop|normalvss|normalvsplit|normalvskip|normalvsize|normalvrule|normalvpack|normalvoffset|normalvfuzz|normalvfilneg|normalvfill|normalvfil|normalvcenter|normalvbox|normalvbadness|normalvalign|normalvadjust|normaluseimageresource|normaluseboxresource|normaluppercase|normalunvcopy|normalunvbox|normalunskip|normalunpenalty|normalunless|normalunkern|normaluniformdeviate|normalunhcopy|normalunhbox|normalunexpanded|normalunderline|normaluchyph|normaluccode|normaltracingstats|normaltracingscantokens|normaltracingrestores|normaltracingparagraphs|normaltracingpages|normaltracingoutput|normaltracingonline|normaltracingnesting|normaltracingmacros|normaltracinglostchars|normaltracingifs|normaltracinggroups|normaltracingfonts|normaltracingcommands|normaltracingassigns|normaltpack|normaltopskip|normaltopmarks|normaltopmark|normaltolerance|normaltokspre|normaltoksdef|normaltoksapp|normaltoks|normaltime|normalthinmuskip|normalthickmuskip|normalthe|normaltextstyle|normaltextfont|normaltextdirection|normaltextdir|normaltagcode|normaltabskip|normalsynctex|normalsuppressprimitiveerror|normalsuppressoutererror|normalsuppressmathparerror|normalsuppresslongerror|normalsuppressifcsnameerror|normalsuppressfontnotfounderror|normalstring|normalsplittopskip|normalsplitmaxdepth|normalsplitfirstmarks|normalsplitfirstmark|normalsplitdiscards|normalsplitbotmarks|normalsplitbotmark|normalspecial|normalspan|normalspaceskip|normalspacefactor|normalskipdef|normalskip|normalskewchar|normalshowtokens|normalshowthe|normalshowlists|normalshowifs|normalshowgroups|normalshowboxdepth|normalshowboxbreadth|normalshowbox|normalshow|normalshipout|normalshapemode|normalsfcode|normalsetrandomseed|normalsetlanguage|normalsetfontid|normalsetbox|normalscrollmode|normalscriptstyle|normalscriptspace|normalscriptscriptstyle|normalscriptscriptfont|normalscriptfont|normalscantokens|normalscantextokens|normalsavingvdiscards|normalsavinghyphcodes|normalsavepos|normalsaveimageresource|normalsavecatcodetable|normalsaveboxresource|normalrpcode|normalromannumeral|normalrightskip|normalrightmarginkern|normalrighthyphenmin|normalrightghost|normalright|normalrelpenalty|normalrelax|normalreadline|normalread|normalrandomseed|normalraise|normalradical|normalquitvmode|normalpxdimen|normalprotrusionboundary|normalprotrudechars|normalprotected|normalprimitive|normalprevgraf|normalprevdepth|normalpretolerance|normalprerelpenalty|normalprehyphenchar|normalpreexhyphenchar|normalpredisplaysize|normalpredisplaypenalty|normalpredisplaygapfactor|normalpredisplaydirection|normalprebinoppenalty|normalposthyphenchar|normalpostexhyphenchar|normalpostdisplaypenalty|normalpenalty|normalpdfximage|normalpdfxformresources|normalpdfxformname|normalpdfxformmargin|normalpdfxformattr|normalpdfxform|normalpdfvorigin|normalpdfvariable|normalpdfuniqueresname|normalpdfuniformdeviate|normalpdftrailerid|normalpdftrailer|normalpdftracingfonts|normalpdfthreadmargin|normalpdfthread|normalpdftexversion|normalpdftexrevision|normalpdftexbanner|normalpdfsuppressptexinfo|normalpdfsuppressoptionalinfo|normalpdfstartthread|normalpdfstartlink|normalpdfsetrandomseed|normalpdfsetmatrix|normalpdfsavepos|normalpdfsave|normalpdfretval|normalpdfrestore|normalpdfreplacefont|normalpdfrefximage|normalpdfrefxform|normalpdfrefobj|normalpdfrecompress|normalpdfrandomseed|normalpdfpxdimen|normalpdfprotrudechars|normalpdfprimitive|normalpdfpkresolution|normalpdfpkmode|normalpdfpkfixeddpi|normalpdfpagewidth|normalpdfpagesattr|normalpdfpageresources|normalpdfpageref|normalpdfpageheight|normalpdfpagebox|normalpdfpageattr|normalpdfoutput|normalpdfoutline|normalpdfomitcidset|normalpdfomitcharset|normalpdfobjcompresslevel|normalpdfobj|normalpdfnormaldeviate|normalpdfnoligatures|normalpdfnames|normalpdfminorversion|normalpdfmapline|normalpdfmapfile|normalpdfmajorversion|normalpdfliteral|normalpdflinkmargin|normalpdflastypos|normalpdflastxpos|normalpdflastximagepages|normalpdflastximage|normalpdflastxform|normalpdflastobj|normalpdflastlink|normalpdflastlinedepth|normalpdflastannot|normalpdfinsertht|normalpdfinfoomitdate|normalpdfinfo|normalpdfinclusionerrorlevel|normalpdfinclusioncopyfonts|normalpdfincludechars|normalpdfimageresolution|normalpdfimagehicolor|normalpdfimagegamma|normalpdfimageapplygamma|normalpdfimageaddfilename|normalpdfignoreunknownimages|normalpdfignoreddimen|normalpdfhorigin|normalpdfglyphtounicode|normalpdfgentounicode|normalpdfgamma|normalpdffontsize|normalpdffontobjnum|normalpdffontname|normalpdffontexpand|normalpdffontattr|normalpdffirstlineheight|normalpdffeedback|normalpdfextension|normalpdfendthread|normalpdfendlink|normalpdfeachlineheight|normalpdfeachlinedepth|normalpdfdraftmode|normalpdfdestmargin|normalpdfdest|normalpdfdecimaldigits|normalpdfcreationdate|normalpdfcopyfont|normalpdfcompresslevel|normalpdfcolorstackinit|normalpdfcolorstack|normalpdfcatalog|normalpdfannot|normalpdfadjustspacing|normalpausing|normalpatterns|normalparskip|normalparshapelength|normalparshapeindent|normalparshapedimen|normalparshape|normalparindent|normalparfillskip|normalpardirection|normalpardir|normalpar|normalpagewidth|normalpagetotal|normalpagetopoffset|normalpagestretch|normalpageshrink|normalpagerightoffset|normalpageleftoffset|normalpageheight|normalpagegoal|normalpagefilstretch|normalpagefillstretch|normalpagefilllstretch|normalpagediscards|normalpagedirection|normalpagedir|normalpagedepth|normalpagebottomoffset|normaloverwithdelims|normaloverline|normaloverfullrule|normalover|normaloutputpenalty|normaloutputmode|normaloutputbox|normaloutput|normalouter|normalor|normalopenout|normalopenin|normalomit|normalnumexpr|normalnumber|normalnullfont|normalnulldelimiterspace|normalnovrule|normalnospaces|normalnormaldeviate|normalnonstopmode|normalnonscript|normalnolimits|normalnoligs|normalnokerns|normalnoindent|normalnohrule|normalnoexpand|normalnoboundary|normalnoalign|normalnewlinechar|normalmutoglue|normalmuskipdef|normalmuskip|normalmultiply|normalmuexpr|normalmskip|normalmoveright|normalmoveleft|normalmonth|normalmkern|normalmiddle|normalmessage|normalmedmuskip|normalmeaning|normalmaxdepth|normalmaxdeadcycles|normalmathsurroundskip|normalmathsurroundmode|normalmathsurround|normalmathstyle|normalmathscriptsmode|normalmathscriptcharmode|normalmathscriptboxmode|normalmathrulethicknessmode|normalmathrulesmode|normalmathrulesfam|normalmathrel|normalmathpunct|normalmathpenaltiesmode|normalmathord|normalmathoption|normalmathopen|normalmathop|normalmathnolimitsmode|normalmathitalicsmode|normalmathinner|normalmathflattenmode|normalmatheqnogapstep|normalmathdisplayskipmode|normalmathdirection|normalmathdir|normalmathdelimitersmode|normalmathcode|normalmathclose|normalmathchoice|normalmathchardef|normalmathchar|normalmathbin|normalmathaccent|normalmarks|normalmark|normalmag|normalluatexversion|normalluatexrevision|normalluatexbanner|normalluafunctioncall|normalluafunction|normalluaescapestring|normalluadef|normalluacopyinputnodes|normalluabytecodecall|normalluabytecode|normallpcode|normallowercase|normallower|normallooseness|normallong|normallocalrightbox|normallocalleftbox|normallocalinterlinepenalty|normallocalbrokenpenalty|normallinepenalty|normallinedirection|normallinedir|normallimits|normalletterspacefont|normalletcharcode|normallet|normalleqno|normalleftskip|normalleftmarginkern|normallefthyphenmin|normalleftghost|normalleft|normalleaders|normallccode|normallateluafunction|normallatelua|normallastypos|normallastxpos|normallastskip|normallastsavedimageresourcepages|normallastsavedimageresourceindex|normallastsavedboxresourceindex|normallastpenalty|normallastnodetype|normallastnamedcs|normallastlinefit|normallastkern|normallastbox|normallanguage|normalkern|normaljobname|normalinterlinepenalty|normalinterlinepenalties|normalinteractionmode|normalinsertpenalties|normalinsertht|normalinsert|normalinputlineno|normalinput|normalinitcatcodetable|normalindent|normalimmediateassignment|normalimmediateassigned|normalimmediate|normalignorespaces|normalignoreligaturesinfont|normalifx|normalifvoid|normalifvmode|normalifvbox|normaliftrue|normalifprimitive|normalifpdfprimitive|normalifpdfabsnum|normalifpdfabsdim|normalifodd|normalifnum|normalifmmode|normalifinner|normalifincsname|normalifhmode|normalifhbox|normaliffontchar|normaliffalse|normalifeof|normalifdim|normalifdefined|normalifcsname|normalifcondition|normalifcat|normalifcase|normalifabsnum|normalifabsdim|normalif|normalhyphenpenaltymode|normalhyphenpenalty|normalhyphenchar|normalhyphenationmin|normalhyphenationbounds|normalhyphenation|normalht|normalhss|normalhskip|normalhsize|normalhrule|normalhpack|normalholdinginserts|normalhoffset|normalhjcode|normalhfuzz|normalhfilneg|normalhfill|normalhfil|normalhbox|normalhbadness|normalhangindent|normalhangafter|normalhalign|normalgtokspre|normalgtoksapp|normalgluetomu|normalgluestretchorder|normalgluestretch|normalglueshrinkorder|normalglueshrink|normalglueexpr|normalglobaldefs|normalglobal|normalglet|normalgleaders|normalgdef|normalfuturelet|normalfutureexpandis|normalfutureexpand|normalformatname|normalfontname|normalfontid|normalfontdimen|normalfontcharwd|normalfontcharic|normalfontcharht|normalfontchardp|normalfont|normalfloatingpenalty|normalfixupboxesmode|normalfirstvalidlanguage|normalfirstmarks|normalfirstmark|normalfinalhyphendemerits|normalfi|normalfam|normalexplicithyphenpenalty|normalexplicitdiscretionary|normalexpandglyphsinfont|normalexpanded|normalexpandafter|normalexhyphenpenalty|normalexhyphenchar|normalexceptionpenalty|normaleveryvbox|normaleverypar|normaleverymath|normaleveryjob|normaleveryhbox|normaleveryeof|normaleverydisplay|normaleverycr|normaletokspre|normaletoksapp|normalescapechar|normalerrorstopmode|normalerrorcontextlines|normalerrmessage|normalerrhelp|normaleqno|normalendlocalcontrol|normalendlinechar|normalendinput|normalendgroup|normalendcsname|normalend|normalemergencystretch|normalelse|normalefcode|normaledef|normaleTeXversion|normaleTeXrevision|normaleTeXminorversion|normaleTeXVersion|normaldvivariable|normaldvifeedback|normaldviextension|normaldump|normaldraftmode|normaldp|normaldoublehyphendemerits|normaldivide|normaldisplaywidth|normaldisplaywidowpenalty|normaldisplaywidowpenalties|normaldisplaystyle|normaldisplaylimits|normaldisplayindent|normaldiscretionary|normaldirectlua|normaldimexpr|normaldimendef|normaldimen|normaldeviate|normaldetokenize|normaldelimitershortfall|normaldelimiterfactor|normaldelimiter|normaldelcode|normaldefaultskewchar|normaldefaulthyphenchar|normaldef|normaldeadcycles|normalday|normalcurrentiftype|normalcurrentiflevel|normalcurrentifbranch|normalcurrentgrouptype|normalcurrentgrouplevel|normalcsstring|normalcsname|normalcrcr|normalcrampedtextstyle|normalcrampedscriptstyle|normalcrampedscriptscriptstyle|normalcrampeddisplaystyle|normalcr|normalcountdef|normalcount|normalcopyfont|normalcopy|normalcompoundhyphenmode|normalclubpenalty|normalclubpenalties|normalcloseout|normalclosein|normalclearmarks|normalcleaders|normalchardef|normalchar|normalcatcodetable|normalcatcode|normalbrokenpenalty|normalbreakafterdirmode|normalboxmaxdepth|normalboxdirection|normalboxdir|normalbox|normalboundary|normalbotmarks|normalbotmark|normalbodydirection|normalbodydir|normalbinoppenalty|normalbelowdisplayskip|normalbelowdisplayshortskip|normalbegingroup|normalbegincsname|normalbatchmode|normalbadness|normalautomatichyphenpenalty|normalautomatichyphenmode|normalautomaticdiscretionary|normalattributedef|normalattribute|normalatopwithdelims|normalatop|normalaligntab|normalalignmark|normalaftergroup|normalafterassignment|normaladvance|normaladjustspacing|normaladjdemerits|normalaccent|normalabovewithdelims|normalabovedisplayskip|normalabovedisplayshortskip|normalabove|normalXeTeXversion|normalUvextensible|normalUunderdelimiter|normalUsuperscript|normalUsubscript|normalUstopmath|normalUstopdisplaymath|normalUstartmath|normalUstartdisplaymath|normalUstack|normalUskewedwithdelims|normalUskewed|normalUroot|normalUright|normalUradical|normalUoverdelimiter|normalUnosuperscript|normalUnosubscript|normalUmiddle|normalUmathunderdelimitervgap|normalUmathunderdelimiterbgap|normalUmathunderbarvgap|normalUmathunderbarrule|normalUmathunderbarkern|normalUmathsupsubbottommax|normalUmathsupshiftup|normalUmathsupshiftdrop|normalUmathsupbottommin|normalUmathsubtopmax|normalUmathsubsupvgap|normalUmathsubsupshiftdown|normalUmathsubshiftdrop|normalUmathsubshiftdown|normalUmathstackvgap|normalUmathstacknumup|normalUmathstackdenomdown|normalUmathspaceafterscript|normalUmathskewedfractionvgap|normalUmathskewedfractionhgap|normalUmathrelrelspacing|normalUmathrelpunctspacing|normalUmathrelordspacing|normalUmathrelopspacing|normalUmathrelopenspacing|normalUmathrelinnerspacing|normalUmathrelclosespacing|normalUmathrelbinspacing|normalUmathradicalvgap|normalUmathradicalrule|normalUmathradicalkern|normalUmathradicaldegreeraise|normalUmathradicaldegreebefore|normalUmathradicaldegreeafter|normalUmathquad|normalUmathpunctrelspacing|normalUmathpunctpunctspacing|normalUmathpunctordspacing|normalUmathpunctopspacing|normalUmathpunctopenspacing|normalUmathpunctinnerspacing|normalUmathpunctclosespacing|normalUmathpunctbinspacing|normalUmathoverdelimitervgap|normalUmathoverdelimiterbgap|normalUmathoverbarvgap|normalUmathoverbarrule|normalUmathoverbarkern|normalUmathordrelspacing|normalUmathordpunctspacing|normalUmathordordspacing|normalUmathordopspacing|normalUmathordopenspacing|normalUmathordinnerspacing|normalUmathordclosespacing|normalUmathordbinspacing|normalUmathoprelspacing|normalUmathoppunctspacing|normalUmathopordspacing|normalUmathopopspacing|normalUmathopopenspacing|normalUmathopinnerspacing|normalUmathoperatorsize|normalUmathopenrelspacing|normalUmathopenpunctspacing|normalUmathopenordspacing|normalUmathopenopspacing|normalUmathopenopenspacing|normalUmathopeninnerspacing|normalUmathopenclosespacing|normalUmathopenbinspacing|normalUmathopclosespacing|normalUmathopbinspacing|normalUmathnolimitsupfactor|normalUmathnolimitsubfactor|normalUmathlimitbelowvgap|normalUmathlimitbelowkern|normalUmathlimitbelowbgap|normalUmathlimitabovevgap|normalUmathlimitabovekern|normalUmathlimitabovebgap|normalUmathinnerrelspacing|normalUmathinnerpunctspacing|normalUmathinnerordspacing|normalUmathinneropspacing|normalUmathinneropenspacing|normalUmathinnerinnerspacing|normalUmathinnerclosespacing|normalUmathinnerbinspacing|normalUmathfractionrule|normalUmathfractionnumvgap|normalUmathfractionnumup|normalUmathfractiondenomvgap|normalUmathfractiondenomdown|normalUmathfractiondelsize|normalUmathconnectoroverlapmin|normalUmathcodenum|normalUmathcode|normalUmathcloserelspacing|normalUmathclosepunctspacing|normalUmathcloseordspacing|normalUmathcloseopspacing|normalUmathcloseopenspacing|normalUmathcloseinnerspacing|normalUmathcloseclosespacing|normalUmathclosebinspacing|normalUmathcharslot|normalUmathcharnumdef|normalUmathcharnum|normalUmathcharfam|normalUmathchardef|normalUmathcharclass|normalUmathchar|normalUmathbinrelspacing|normalUmathbinpunctspacing|normalUmathbinordspacing|normalUmathbinopspacing|normalUmathbinopenspacing|normalUmathbininnerspacing|normalUmathbinclosespacing|normalUmathbinbinspacing|normalUmathaxis|normalUmathaccent|normalUleft|normalUhextensible|normalUdelimiterunder|normalUdelimiterover|normalUdelimiter|normalUdelcodenum|normalUdelcode|normalUchar|normalOmegaversion|normalOmegarevision|normalOmegaminorversion|normalAlephversion|normalAlephrevision|normalAlephminorversion|normal |nonstopmode|nonscript|nolimits|noligs|nokerns|noindent|nohrule|noexpand|noboundary|noalign|newlinechar|mutoglue|muskipdef|muskip|multiply|muexpr|mskip|moveright|moveleft|month|mkern|middle|message|medmuskip|meaning|maxdepth|maxdeadcycles|mathsurroundskip|mathsurroundmode|mathsurround|mathstyle|mathscriptsmode|mathscriptcharmode|mathscriptboxmode|mathrulethicknessmode|mathrulesmode|mathrulesfam|mathrel|mathpunct|mathpenaltiesmode|mathord|mathoption|mathopen|mathop|mathnolimitsmode|mathitalicsmode|mathinner|mathflattenmode|matheqnogapstep|mathdisplayskipmode|mathdirection|mathdir|mathdelimitersmode|mathcode|mathclose|mathchoice|mathchardef|mathchar|mathbin|mathaccent|marks|mark|mag|luatexversion|luatexrevision|luatexbanner|luafunctioncall|luafunction|luaescapestring|luadef|luacopyinputnodes|luabytecodecall|luabytecode|lpcode|lowercase|lower|looseness|long|localrightbox|localleftbox|localinterlinepenalty|localbrokenpenalty|lineskiplimit|lineskip|linepenalty|linedirection|linedir|limits|letterspacefont|letcharcode|let|leqno|leftskip|leftmarginkern|lefthyphenmin|leftghost|left|leaders|lccode|lateluafunction|latelua|lastypos|lastxpos|lastskip|lastsavedimageresourcepages|lastsavedimageresourceindex|lastsavedboxresourceindex|lastpenalty|lastnodetype|lastnamedcs|lastlinefit|lastkern|lastbox|language|kern|jobname|interlinepenalty|interlinepenalties|interactionmode|insertpenalties|insertht|insert|inputlineno|input|initcatcodetable|indent|immediateassignment|immediateassigned|immediate|ignorespaces|ignoreligaturesinfont|ifx|ifvoid|ifvmode|ifvbox|iftrue|ifprimitive|ifpdfprimitive|ifpdfabsnum|ifpdfabsdim|ifodd|ifnum|ifmmode|ifinner|ifincsname|ifhmode|ifhbox|iffontchar|iffalse|ifeof|ifdim|ifdefined|ifcsname|ifcondition|ifcat|ifcase|ifabsnum|ifabsdim|if|hyphenpenaltymode|hyphenpenalty|hyphenchar|hyphenationmin|hyphenationbounds|hyphenation|ht|hss|hskip|hsize|hrule|hpack|holdinginserts|hoffset|hjcode|hfuzz|hfilneg|hfill|hfil|hbox|hbadness|hangindent|hangafter|halign|gtokspre|gtoksapp|gluetomu|gluestretchorder|gluestretch|glueshrinkorder|glueshrink|glueexpr|globaldefs|global|gleaders|gdef|futurelet|futureexpandis|futureexpand|formatname|fontname|fontid|fontdimen|fontcharwd|fontcharic|fontcharht|fontchardp|font|floatingpenalty|fixupboxesmode|firstvalidlanguage|firstmarks|firstmark|finalhyphendemerits|fi|fam|explicithyphenpenalty|explicitdiscretionary|expandglyphsinfont|expandafter|exhyphenpenalty|exhyphenchar|exceptionpenalty|everyvbox|everypar|everymath|everyjob|everyhbox|everyeof|everydisplay|everycr|etokspre|etoksapp|escapechar|errorstopmode|errorcontextlines|errmessage|errhelp|eqno|endlocalcontrol|endlinechar|endinput|endgroup|endcsname|end|emergencystretch|else|efcode|edef|eTeXversion|eTeXrevision|eTeXminorversion|eTeXVersion|dvivariable|dvifeedback|dviextension|dump|draftmode|dp|doublehyphendemerits|divide|displaywidth|displaywidowpenalty|displaywidowpenalties|displaystyle|displaylimits|displayindent|discretionary|directlua|dimexpr|dimendef|dimen|detokenize|delimitershortfall|delimiterfactor|delimiter|delcode|defaultskewchar|defaulthyphenchar|def|deadcycles|day|currentiftype|currentiflevel|currentifbranch|currentgrouptype|currentgrouplevel|csstring|csname|crcr|crampedtextstyle|crampedscriptstyle|crampedscriptscriptstyle|crampeddisplaystyle|cr|countdef|count|copyfont|copy|compoundhyphenmode|clubpenalty|clubpenalties|closeout|closein|clearmarks|cleaders|chardef|char|catcodetable|catcode|brokenpenalty|breakafterdirmode|boxmaxdepth|boxdirection|boxdir|box|boundary|botmarks|botmark|bodydirection|bodydir|binoppenalty|belowdisplayskip|belowdisplayshortskip|begingroup|begincsname|batchmode|baselineskip|badness|automatichyphenpenalty|automatichyphenmode|automaticdiscretionary|attributedef|attribute|atopwithdelims|atop|aligntab|alignmark|aftergroup|afterassignment|advance|adjustspacing|adjdemerits|accent|abovewithdelims|abovedisplayskip|abovedisplayshortskip|above|XeTeXversion|Uvextensible|Uunderdelimiter|Usuperscript|Usubscript|Ustopmath|Ustopdisplaymath|Ustartmath|Ustartdisplaymath|Ustack|Uskewedwithdelims|Uskewed|Uroot|Uright|Uradical|Uoverdelimiter|Unosuperscript|Unosubscript|Umiddle|Umathunderdelimitervgap|Umathunderdelimiterbgap|Umathunderbarvgap|Umathunderbarrule|Umathunderbarkern|Umathsupsubbottommax|Umathsupshiftup|Umathsupshiftdrop|Umathsupbottommin|Umathsubtopmax|Umathsubsupvgap|Umathsubsupshiftdown|Umathsubshiftdrop|Umathsubshiftdown|Umathstackvgap|Umathstacknumup|Umathstackdenomdown|Umathspaceafterscript|Umathskewedfractionvgap|Umathskewedfractionhgap|Umathrelrelspacing|Umathrelpunctspacing|Umathrelordspacing|Umathrelopspacing|Umathrelopenspacing|Umathrelinnerspacing|Umathrelclosespacing|Umathrelbinspacing|Umathradicalvgap|Umathradicalrule|Umathradicalkern|Umathradicaldegreeraise|Umathradicaldegreebefore|Umathradicaldegreeafter|Umathquad|Umathpunctrelspacing|Umathpunctpunctspacing|Umathpunctordspacing|Umathpunctopspacing|Umathpunctopenspacing|Umathpunctinnerspacing|Umathpunctclosespacing|Umathpunctbinspacing|Umathoverdelimitervgap|Umathoverdelimiterbgap|Umathoverbarvgap|Umathoverbarrule|Umathoverbarkern|Umathordrelspacing|Umathordpunctspacing|Umathordordspacing|Umathordopspacing|Umathordopenspacing|Umathordinnerspacing|Umathordclosespacing|Umathordbinspacing|Umathoprelspacing|Umathoppunctspacing|Umathopordspacing|Umathopopspacing|Umathopopenspacing|Umathopinnerspacing|Umathoperatorsize|Umathopenrelspacing|Umathopenpunctspacing|Umathopenordspacing|Umathopenopspacing|Umathopenopenspacing|Umathopeninnerspacing|Umathopenclosespacing|Umathopenbinspacing|Umathopclosespacing|Umathopbinspacing|Umathnolimitsupfactor|Umathnolimitsubfactor|Umathlimitbelowvgap|Umathlimitbelowkern|Umathlimitbelowbgap|Umathlimitabovevgap|Umathlimitabovekern|Umathlimitabovebgap|Umathinnerrelspacing|Umathinnerpunctspacing|Umathinnerordspacing|Umathinneropspacing|Umathinneropenspacing|Umathinnerinnerspacing|Umathinnerclosespacing|Umathinnerbinspacing|Umathfractionrule|Umathfractionnumvgap|Umathfractionnumup|Umathfractiondenomvgap|Umathfractiondenomdown|Umathfractiondelsize|Umathconnectoroverlapmin|Umathcodenum|Umathcode|Umathcloserelspacing|Umathclosepunctspacing|Umathcloseordspacing|Umathcloseopspacing|Umathcloseopenspacing|Umathcloseinnerspacing|Umathcloseclosespacing|Umathclosebinspacing|Umathcharslot|Umathcharnumdef|Umathcharnum|Umathcharfam|Umathchardef|Umathcharclass|Umathchar|Umathbinrelspacing|Umathbinpunctspacing|Umathbinordspacing|Umathbinopspacing|Umathbinopenspacing|Umathbininnerspacing|Umathbinclosespacing|Umathbinbinspacing|Umathaxis|Umathaccent|Uleft|Uhextensible|Udelimiterunder|Udelimiterover|Udelimiter|Udelcodenum|Udelcode|Uchar|Omegaversion|Omegarevision|Omegaminorversion|Alephversion|Alephrevision|Alephminorversion| )(?=[^a-zA-Z])", + "match" : "\u005C\u005C(year|xtokspre|xtoksapp|xspaceskip|xleaders|xdef|write|wordboundary|widowpenalty|widowpenalties|wd|vtop|vss|vsplit|vskip|vsize|vrule|vpack|voffset|vfuzz|vfilneg|vfill|vfil|vcenter|vbox|vbadness|valign|vadjust|useimageresource|useboxresource|uppercase|unvcopy|unvbox|unskip|unpenalty|unless|unkern|uniformdeviate|unhcopy|unhbox|underline|uchyph|uccode|tracingstats|tracingscantokens|tracingrestores|tracingparagraphs|tracingpages|tracingoutput|tracingonline|tracingnesting|tracingmacros|tracinglostchars|tracingifs|tracinggroups|tracingfonts|tracingcommands|tracingassigns|tpack|topskip|topmarks|topmark|tolerance|tokspre|toksdef|toksapp|toks|time|thinmuskip|thickmuskip|the|textstyle|textfont|textdirection|textdir|tagcode|tabskip|synctex|suppressprimitiveerror|suppressoutererror|suppressmathparerror|suppresslongerror|suppressifcsnameerror|suppressfontnotfounderror|string|splittopskip|splitmaxdepth|splitfirstmarks|splitfirstmark|splitdiscards|splitbotmarks|splitbotmark|special|span|spaceskip|spacefactor|skipdef|skip|skewchar|showtokens|showthe|showlists|showifs|showgroups|showboxdepth|showboxbreadth|showbox|show|shipout|shapemode|sfcode|setrandomseed|setlanguage|setfontid|setbox|scrollmode|scriptstyle|scriptspace|scriptscriptstyle|scriptscriptfont|scriptfont|scantokens|scantextokens|savingvdiscards|savinghyphcodes|savepos|saveimageresource|savecatcodetable|saveboxresource|rpcode|romannumeral|rightskip|rightmarginkern|righthyphenmin|rightghost|right|relpenalty|relax|readline|read|randomseed|raise|radical|quitvmode|pxdimen|protrusionboundary|protrudechars|primitive|prevgraf|prevdepth|pretolerance|prerelpenalty|prehyphenchar|preexhyphenchar|predisplaysize|predisplaypenalty|predisplaygapfactor|predisplaydirection|prebinoppenalty|posthyphenchar|postexhyphenchar|postdisplaypenalty|penalty|pdfximage|pdfxformresources|pdfxformname|pdfxformmargin|pdfxformattr|pdfxform|pdfvorigin|pdfvariable|pdfuniqueresname|pdfuniformdeviate|pdftrailerid|pdftrailer|pdftracingfonts|pdfthreadmargin|pdfthread|pdftexversion|pdftexrevision|pdftexbanner|pdfsuppressptexinfo|pdfsuppressoptionalinfo|pdfstartthread|pdfstartlink|pdfsetrandomseed|pdfsetmatrix|pdfsavepos|pdfsave|pdfretval|pdfrestore|pdfreplacefont|pdfrefximage|pdfrefxform|pdfrefobj|pdfrecompress|pdfrandomseed|pdfpxdimen|pdfprotrudechars|pdfprimitive|pdfpkresolution|pdfpkmode|pdfpkfixeddpi|pdfpagewidth|pdfpagesattr|pdfpageresources|pdfpageref|pdfpageheight|pdfpagebox|pdfpageattr|pdfoutput|pdfoutline|pdfomitcidset|pdfomitcharset|pdfobjcompresslevel|pdfobj|pdfnormaldeviate|pdfnoligatures|pdfnames|pdfminorversion|pdfmapline|pdfmapfile|pdfmajorversion|pdfliteral|pdflinkmargin|pdflastypos|pdflastxpos|pdflastximagepages|pdflastximage|pdflastxform|pdflastobj|pdflastlink|pdflastlinedepth|pdflastannot|pdfinsertht|pdfinfoomitdate|pdfinfo|pdfinclusionerrorlevel|pdfinclusioncopyfonts|pdfincludechars|pdfimageresolution|pdfimagehicolor|pdfimagegamma|pdfimageapplygamma|pdfimageaddfilename|pdfignoreunknownimages|pdfignoreddimen|pdfhorigin|pdfglyphtounicode|pdfgentounicode|pdfgamma|pdffontsize|pdffontobjnum|pdffontname|pdffontexpand|pdffontattr|pdffirstlineheight|pdffeedback|pdfextension|pdfendthread|pdfendlink|pdfeachlineheight|pdfeachlinedepth|pdfdraftmode|pdfdestmargin|pdfdest|pdfdecimaldigits|pdfcreationdate|pdfcopyfont|pdfcompresslevel|pdfcolorstackinit|pdfcolorstack|pdfcatalog|pdfannot|pdfadjustspacing|pausing|patterns|parskip|parshapelength|parshapeindent|parshapedimen|parshape|parindent|parfillskip|pardirection|pardir|par|pagewidth|pagetotal|pagetopoffset|pagestretch|pageshrink|pagerightoffset|pageleftoffset|pageheight|pagegoal|pagefilstretch|pagefillstretch|pagefilllstretch|pagediscards|pagedirection|pagedir|pagedepth|pagebottomoffset|overwithdelims|overline|overfullrule|over|outputpenalty|outputmode|outputbox|output|outer|or|openout|openin|omit|numexpr|number|nullfont|nulldelimiterspace|novrule|nospaces|normalyear|normalxtokspre|normalxtoksapp|normalxspaceskip|normalxleaders|normalxdef|normalwrite|normalwordboundary|normalwidowpenalty|normalwidowpenalties|normalwd|normalvtop|normalvss|normalvsplit|normalvskip|normalvsize|normalvrule|normalvpack|normalvoffset|normalvfuzz|normalvfilneg|normalvfill|normalvfil|normalvcenter|normalvbox|normalvbadness|normalvalign|normalvadjust|normaluseimageresource|normaluseboxresource|normaluppercase|normalunvcopy|normalunvbox|normalunskip|normalunpenalty|normalunless|normalunkern|normaluniformdeviate|normalunhcopy|normalunhbox|normalunexpanded|normalunderline|normaluchyph|normaluccode|normaltracingstats|normaltracingscantokens|normaltracingrestores|normaltracingparagraphs|normaltracingpages|normaltracingoutput|normaltracingonline|normaltracingnesting|normaltracingmacros|normaltracinglostchars|normaltracingifs|normaltracinggroups|normaltracingfonts|normaltracingcommands|normaltracingassigns|normaltpack|normaltopskip|normaltopmarks|normaltopmark|normaltolerance|normaltokspre|normaltoksdef|normaltoksapp|normaltoks|normaltime|normalthinmuskip|normalthickmuskip|normalthe|normaltextstyle|normaltextfont|normaltextdirection|normaltextdir|normaltagcode|normaltabskip|normalsynctex|normalsuppressprimitiveerror|normalsuppressoutererror|normalsuppressmathparerror|normalsuppresslongerror|normalsuppressifcsnameerror|normalsuppressfontnotfounderror|normalstring|normalsplittopskip|normalsplitmaxdepth|normalsplitfirstmarks|normalsplitfirstmark|normalsplitdiscards|normalsplitbotmarks|normalsplitbotmark|normalspecial|normalspan|normalspaceskip|normalspacefactor|normalskipdef|normalskip|normalskewchar|normalshowtokens|normalshowthe|normalshowlists|normalshowifs|normalshowgroups|normalshowboxdepth|normalshowboxbreadth|normalshowbox|normalshow|normalshipout|normalshapemode|normalsfcode|normalsetrandomseed|normalsetlanguage|normalsetfontid|normalsetbox|normalscrollmode|normalscriptstyle|normalscriptspace|normalscriptscriptstyle|normalscriptscriptfont|normalscriptfont|normalscantokens|normalscantextokens|normalsavingvdiscards|normalsavinghyphcodes|normalsavepos|normalsaveimageresource|normalsavecatcodetable|normalsaveboxresource|normalrpcode|normalromannumeral|normalrightskip|normalrightmarginkern|normalrighthyphenmin|normalrightghost|normalright|normalrelpenalty|normalrelax|normalreadline|normalread|normalrandomseed|normalraise|normalradical|normalquitvmode|normalpxdimen|normalprotrusionboundary|normalprotrudechars|normalprotected|normalprimitive|normalprevgraf|normalprevdepth|normalpretolerance|normalprerelpenalty|normalprehyphenchar|normalpreexhyphenchar|normalpredisplaysize|normalpredisplaypenalty|normalpredisplaygapfactor|normalpredisplaydirection|normalprebinoppenalty|normalposthyphenchar|normalpostexhyphenchar|normalpostdisplaypenalty|normalpenalty|normalpdfximage|normalpdfxformresources|normalpdfxformname|normalpdfxformmargin|normalpdfxformattr|normalpdfxform|normalpdfvorigin|normalpdfvariable|normalpdfuniqueresname|normalpdfuniformdeviate|normalpdftrailerid|normalpdftrailer|normalpdftracingfonts|normalpdfthreadmargin|normalpdfthread|normalpdftexversion|normalpdftexrevision|normalpdftexbanner|normalpdfsuppressptexinfo|normalpdfsuppressoptionalinfo|normalpdfstartthread|normalpdfstartlink|normalpdfsetrandomseed|normalpdfsetmatrix|normalpdfsavepos|normalpdfsave|normalpdfretval|normalpdfrestore|normalpdfreplacefont|normalpdfrefximage|normalpdfrefxform|normalpdfrefobj|normalpdfrecompress|normalpdfrandomseed|normalpdfpxdimen|normalpdfprotrudechars|normalpdfprimitive|normalpdfpkresolution|normalpdfpkmode|normalpdfpkfixeddpi|normalpdfpagewidth|normalpdfpagesattr|normalpdfpageresources|normalpdfpageref|normalpdfpageheight|normalpdfpagebox|normalpdfpageattr|normalpdfoutput|normalpdfoutline|normalpdfomitcidset|normalpdfomitcharset|normalpdfobjcompresslevel|normalpdfobj|normalpdfnormaldeviate|normalpdfnoligatures|normalpdfnames|normalpdfminorversion|normalpdfmapline|normalpdfmapfile|normalpdfmajorversion|normalpdfliteral|normalpdflinkmargin|normalpdflastypos|normalpdflastxpos|normalpdflastximagepages|normalpdflastximage|normalpdflastxform|normalpdflastobj|normalpdflastlink|normalpdflastlinedepth|normalpdflastannot|normalpdfinsertht|normalpdfinfoomitdate|normalpdfinfo|normalpdfinclusionerrorlevel|normalpdfinclusioncopyfonts|normalpdfincludechars|normalpdfimageresolution|normalpdfimagehicolor|normalpdfimagegamma|normalpdfimageapplygamma|normalpdfimageaddfilename|normalpdfignoreunknownimages|normalpdfignoreddimen|normalpdfhorigin|normalpdfglyphtounicode|normalpdfgentounicode|normalpdfgamma|normalpdffontsize|normalpdffontobjnum|normalpdffontname|normalpdffontexpand|normalpdffontattr|normalpdffirstlineheight|normalpdffeedback|normalpdfextension|normalpdfendthread|normalpdfendlink|normalpdfeachlineheight|normalpdfeachlinedepth|normalpdfdraftmode|normalpdfdestmargin|normalpdfdest|normalpdfdecimaldigits|normalpdfcreationdate|normalpdfcopyfont|normalpdfcompresslevel|normalpdfcolorstackinit|normalpdfcolorstack|normalpdfcatalog|normalpdfannot|normalpdfadjustspacing|normalpausing|normalpatterns|normalparskip|normalparshapelength|normalparshapeindent|normalparshapedimen|normalparshape|normalparindent|normalparfillskip|normalpardirection|normalpardir|normalpar|normalpagewidth|normalpagetotal|normalpagetopoffset|normalpagestretch|normalpageshrink|normalpagerightoffset|normalpageleftoffset|normalpageheight|normalpagegoal|normalpagefilstretch|normalpagefillstretch|normalpagefilllstretch|normalpagediscards|normalpagedirection|normalpagedir|normalpagedepth|normalpagebottomoffset|normaloverwithdelims|normaloverline|normaloverfullrule|normalover|normaloutputpenalty|normaloutputmode|normaloutputbox|normaloutput|normalouter|normalor|normalopenout|normalopenin|normalomit|normalnumexpr|normalnumber|normalnullfont|normalnulldelimiterspace|normalnovrule|normalnospaces|normalnormaldeviate|normalnonstopmode|normalnonscript|normalnolimits|normalnoligs|normalnokerns|normalnoindent|normalnohrule|normalnoexpand|normalnoboundary|normalnoalign|normalnewlinechar|normalmutoglue|normalmuskipdef|normalmuskip|normalmultiply|normalmuexpr|normalmskip|normalmoveright|normalmoveleft|normalmonth|normalmkern|normalmiddle|normalmessage|normalmedmuskip|normalmeaning|normalmaxdepth|normalmaxdeadcycles|normalmathsurroundskip|normalmathsurroundmode|normalmathsurround|normalmathstyle|normalmathscriptsmode|normalmathscriptcharmode|normalmathscriptboxmode|normalmathrulethicknessmode|normalmathrulesmode|normalmathrulesfam|normalmathrel|normalmathpunct|normalmathpenaltiesmode|normalmathord|normalmathoption|normalmathopen|normalmathop|normalmathnolimitsmode|normalmathitalicsmode|normalmathinner|normalmathflattenmode|normalmatheqnogapstep|normalmathdisplayskipmode|normalmathdirection|normalmathdir|normalmathdelimitersmode|normalmathcode|normalmathclose|normalmathchoice|normalmathchardef|normalmathchar|normalmathbin|normalmathaccent|normalmarks|normalmark|normalmag|normalluatexversion|normalluatexrevision|normalluatexbanner|normalluafunctioncall|normalluafunction|normalluaescapestring|normalluadef|normalluacopyinputnodes|normalluabytecodecall|normalluabytecode|normallpcode|normallowercase|normallower|normallooseness|normallong|normallocalrightbox|normallocalleftbox|normallocalinterlinepenalty|normallocalbrokenpenalty|normallinepenalty|normallinedirection|normallinedir|normallimits|normalletterspacefont|normalletcharcode|normallet|normalleqno|normalleftskip|normalleftmarginkern|normallefthyphenmin|normalleftghost|normalleft|normalleaders|normallccode|normallateluafunction|normallatelua|normallastypos|normallastxpos|normallastskip|normallastsavedimageresourcepages|normallastsavedimageresourceindex|normallastsavedboxresourceindex|normallastpenalty|normallastnodetype|normallastnamedcs|normallastlinefit|normallastkern|normallastbox|normallanguage|normalkern|normaljobname|normalinterlinepenalty|normalinterlinepenalties|normalinteractionmode|normalinsertpenalties|normalinsertht|normalinsert|normalinputlineno|normalinput|normalinitcatcodetable|normalindent|normalimmediateassignment|normalimmediateassigned|normalimmediate|normalignorespaces|normalignoreligaturesinfont|normalifx|normalifvoid|normalifvmode|normalifvbox|normaliftrue|normalifprimitive|normalifpdfprimitive|normalifpdfabsnum|normalifpdfabsdim|normalifodd|normalifnum|normalifmmode|normalifinner|normalifincsname|normalifhmode|normalifhbox|normaliffontchar|normaliffalse|normalifeof|normalifdim|normalifdefined|normalifcsname|normalifcondition|normalifcat|normalifcase|normalifabsnum|normalifabsdim|normalif|normalhyphenpenaltymode|normalhyphenpenalty|normalhyphenchar|normalhyphenationmin|normalhyphenationbounds|normalhyphenation|normalht|normalhss|normalhskip|normalhsize|normalhrule|normalhpack|normalholdinginserts|normalhoffset|normalhjcode|normalhfuzz|normalhfilneg|normalhfill|normalhfil|normalhbox|normalhbadness|normalhangindent|normalhangafter|normalhalign|normalgtokspre|normalgtoksapp|normalgluetomu|normalgluestretchorder|normalgluestretch|normalglueshrinkorder|normalglueshrink|normalglueexpr|normalglobaldefs|normalglobal|normalglet|normalgleaders|normalgdef|normalfuturelet|normalfutureexpandis|normalfutureexpand|normalfrozen|normalformatname|normalfontname|normalfontid|normalfontdimen|normalfontcharwd|normalfontcharic|normalfontcharht|normalfontchardp|normalfont|normalfloatingpenalty|normalfixupboxesmode|normalfirstvalidlanguage|normalfirstmarks|normalfirstmark|normalfinalhyphendemerits|normalfi|normalfam|normalexplicithyphenpenalty|normalexplicitdiscretionary|normalexpandglyphsinfont|normalexpanded|normalexpandafter|normalexhyphenpenalty|normalexhyphenchar|normalexceptionpenalty|normaleveryvbox|normaleverypar|normaleverymath|normaleveryjob|normaleveryhbox|normaleveryeof|normaleverydisplay|normaleverycr|normaletokspre|normaletoksapp|normalescapechar|normalerrorstopmode|normalerrorcontextlines|normalerrmessage|normalerrhelp|normaleqno|normalendlocalcontrol|normalendlinechar|normalendinput|normalendgroup|normalendcsname|normalend|normalemergencystretch|normalelse|normalefcode|normaledef|normaleTeXversion|normaleTeXrevision|normaleTeXminorversion|normaleTeXVersion|normaldvivariable|normaldvifeedback|normaldviextension|normaldump|normaldraftmode|normaldp|normaldoublehyphendemerits|normaldivide|normaldisplaywidth|normaldisplaywidowpenalty|normaldisplaywidowpenalties|normaldisplaystyle|normaldisplaylimits|normaldisplayindent|normaldiscretionary|normaldirectlua|normaldimexpr|normaldimendef|normaldimen|normaldeviate|normaldetokenize|normaldelimitershortfall|normaldelimiterfactor|normaldelimiter|normaldelcode|normaldefaultskewchar|normaldefaulthyphenchar|normaldef|normaldeadcycles|normalday|normalcurrentiftype|normalcurrentiflevel|normalcurrentifbranch|normalcurrentgrouptype|normalcurrentgrouplevel|normalcsstring|normalcsname|normalcrcr|normalcrampedtextstyle|normalcrampedscriptstyle|normalcrampedscriptscriptstyle|normalcrampeddisplaystyle|normalcr|normalcountdef|normalcount|normalcopyfont|normalcopy|normalcompoundhyphenmode|normalclubpenalty|normalclubpenalties|normalcloseout|normalclosein|normalclearmarks|normalcleaders|normalchardef|normalchar|normalcatcodetable|normalcatcode|normalbrokenpenalty|normalbreakafterdirmode|normalboxmaxdepth|normalboxdirection|normalboxdir|normalbox|normalboundary|normalbotmarks|normalbotmark|normalbodydirection|normalbodydir|normalbinoppenalty|normalbelowdisplayskip|normalbelowdisplayshortskip|normalbegingroup|normalbegincsname|normalbatchmode|normalbadness|normalautomatichyphenpenalty|normalautomatichyphenmode|normalautomaticdiscretionary|normalattributedef|normalattribute|normalatopwithdelims|normalatop|normalaligntab|normalalignmark|normalaftergroup|normalafterassignment|normaladvance|normaladjustspacing|normaladjdemerits|normalaccent|normalabovewithdelims|normalabovedisplayskip|normalabovedisplayshortskip|normalabove|normalXeTeXversion|normalUvextensible|normalUunderdelimiter|normalUsuperscript|normalUsubscript|normalUstopmath|normalUstopdisplaymath|normalUstartmath|normalUstartdisplaymath|normalUstack|normalUskewedwithdelims|normalUskewed|normalUroot|normalUright|normalUradical|normalUoverdelimiter|normalUnosuperscript|normalUnosubscript|normalUmiddle|normalUmathunderdelimitervgap|normalUmathunderdelimiterbgap|normalUmathunderbarvgap|normalUmathunderbarrule|normalUmathunderbarkern|normalUmathsupsubbottommax|normalUmathsupshiftup|normalUmathsupshiftdrop|normalUmathsupbottommin|normalUmathsubtopmax|normalUmathsubsupvgap|normalUmathsubsupshiftdown|normalUmathsubshiftdrop|normalUmathsubshiftdown|normalUmathstackvgap|normalUmathstacknumup|normalUmathstackdenomdown|normalUmathspaceafterscript|normalUmathskewedfractionvgap|normalUmathskewedfractionhgap|normalUmathrelrelspacing|normalUmathrelpunctspacing|normalUmathrelordspacing|normalUmathrelopspacing|normalUmathrelopenspacing|normalUmathrelinnerspacing|normalUmathrelclosespacing|normalUmathrelbinspacing|normalUmathradicalvgap|normalUmathradicalrule|normalUmathradicalkern|normalUmathradicaldegreeraise|normalUmathradicaldegreebefore|normalUmathradicaldegreeafter|normalUmathquad|normalUmathpunctrelspacing|normalUmathpunctpunctspacing|normalUmathpunctordspacing|normalUmathpunctopspacing|normalUmathpunctopenspacing|normalUmathpunctinnerspacing|normalUmathpunctclosespacing|normalUmathpunctbinspacing|normalUmathoverdelimitervgap|normalUmathoverdelimiterbgap|normalUmathoverbarvgap|normalUmathoverbarrule|normalUmathoverbarkern|normalUmathordrelspacing|normalUmathordpunctspacing|normalUmathordordspacing|normalUmathordopspacing|normalUmathordopenspacing|normalUmathordinnerspacing|normalUmathordclosespacing|normalUmathordbinspacing|normalUmathoprelspacing|normalUmathoppunctspacing|normalUmathopordspacing|normalUmathopopspacing|normalUmathopopenspacing|normalUmathopinnerspacing|normalUmathoperatorsize|normalUmathopenrelspacing|normalUmathopenpunctspacing|normalUmathopenordspacing|normalUmathopenopspacing|normalUmathopenopenspacing|normalUmathopeninnerspacing|normalUmathopenclosespacing|normalUmathopenbinspacing|normalUmathopclosespacing|normalUmathopbinspacing|normalUmathnolimitsupfactor|normalUmathnolimitsubfactor|normalUmathlimitbelowvgap|normalUmathlimitbelowkern|normalUmathlimitbelowbgap|normalUmathlimitabovevgap|normalUmathlimitabovekern|normalUmathlimitabovebgap|normalUmathinnerrelspacing|normalUmathinnerpunctspacing|normalUmathinnerordspacing|normalUmathinneropspacing|normalUmathinneropenspacing|normalUmathinnerinnerspacing|normalUmathinnerclosespacing|normalUmathinnerbinspacing|normalUmathfractionrule|normalUmathfractionnumvgap|normalUmathfractionnumup|normalUmathfractiondenomvgap|normalUmathfractiondenomdown|normalUmathfractiondelsize|normalUmathconnectoroverlapmin|normalUmathcodenum|normalUmathcode|normalUmathcloserelspacing|normalUmathclosepunctspacing|normalUmathcloseordspacing|normalUmathcloseopspacing|normalUmathcloseopenspacing|normalUmathcloseinnerspacing|normalUmathcloseclosespacing|normalUmathclosebinspacing|normalUmathcharslot|normalUmathcharnumdef|normalUmathcharnum|normalUmathcharfam|normalUmathchardef|normalUmathcharclass|normalUmathchar|normalUmathbinrelspacing|normalUmathbinpunctspacing|normalUmathbinordspacing|normalUmathbinopspacing|normalUmathbinopenspacing|normalUmathbininnerspacing|normalUmathbinclosespacing|normalUmathbinbinspacing|normalUmathaxis|normalUmathaccent|normalUleft|normalUhextensible|normalUdelimiterunder|normalUdelimiterover|normalUdelimiter|normalUdelcodenum|normalUdelcode|normalUchar|normalOmegaversion|normalOmegarevision|normalOmegaminorversion|normalAlephversion|normalAlephrevision|normalAlephminorversion|normal |nonstopmode|nonscript|nolimits|noligs|nokerns|noindent|nohrule|noexpand|noboundary|noalign|newlinechar|mutoglue|muskipdef|muskip|multiply|muexpr|mskip|moveright|moveleft|month|mkern|middle|message|medmuskip|meaning|maxdepth|maxdeadcycles|mathsurroundskip|mathsurroundmode|mathsurround|mathstyle|mathscriptsmode|mathscriptcharmode|mathscriptboxmode|mathrulethicknessmode|mathrulesmode|mathrulesfam|mathrel|mathpunct|mathpenaltiesmode|mathord|mathoption|mathopen|mathop|mathnolimitsmode|mathitalicsmode|mathinner|mathflattenmode|matheqnogapstep|mathdisplayskipmode|mathdirection|mathdir|mathdelimitersmode|mathcode|mathclose|mathchoice|mathchardef|mathchar|mathbin|mathaccent|marks|mark|mag|luatexversion|luatexrevision|luatexbanner|luafunctioncall|luafunction|luaescapestring|luadef|luacopyinputnodes|luabytecodecall|luabytecode|lpcode|lowercase|lower|looseness|long|localrightbox|localleftbox|localinterlinepenalty|localbrokenpenalty|lineskiplimit|lineskip|linepenalty|linedirection|linedir|limits|letterspacefont|letcharcode|let|leqno|leftskip|leftmarginkern|lefthyphenmin|leftghost|left|leaders|lccode|lateluafunction|latelua|lastypos|lastxpos|lastskip|lastsavedimageresourcepages|lastsavedimageresourceindex|lastsavedboxresourceindex|lastpenalty|lastnodetype|lastnamedcs|lastlinefit|lastkern|lastbox|language|kern|jobname|interlinepenalty|interlinepenalties|interactionmode|insertpenalties|insertht|insert|inputlineno|input|initcatcodetable|indent|immediateassignment|immediateassigned|immediate|ignorespaces|ignoreligaturesinfont|ifx|ifvoid|ifvmode|ifvbox|iftrue|ifprimitive|ifpdfprimitive|ifpdfabsnum|ifpdfabsdim|ifodd|ifnum|ifmmode|ifinner|ifincsname|ifhmode|ifhbox|iffontchar|iffalse|ifeof|ifdim|ifdefined|ifcsname|ifcondition|ifcat|ifcase|ifabsnum|ifabsdim|if|hyphenpenaltymode|hyphenpenalty|hyphenchar|hyphenationmin|hyphenationbounds|hyphenation|ht|hss|hskip|hsize|hrule|hpack|holdinginserts|hoffset|hjcode|hfuzz|hfilneg|hfill|hfil|hbox|hbadness|hangindent|hangafter|halign|gtokspre|gtoksapp|gluetomu|gluestretchorder|gluestretch|glueshrinkorder|glueshrink|glueexpr|globaldefs|global|gleaders|gdef|futurelet|futureexpandis|futureexpand|frozen|formatname|fontname|fontid|fontdimen|fontcharwd|fontcharic|fontcharht|fontchardp|font|floatingpenalty|fixupboxesmode|firstvalidlanguage|firstmarks|firstmark|finalhyphendemerits|fi|fam|explicithyphenpenalty|explicitdiscretionary|expandglyphsinfont|expandafter|exhyphenpenalty|exhyphenchar|exceptionpenalty|everyvbox|everypar|everymath|everyjob|everyhbox|everyeof|everydisplay|everycr|etokspre|etoksapp|escapechar|errorstopmode|errorcontextlines|errmessage|errhelp|eqno|endlocalcontrol|endlinechar|endinput|endgroup|endcsname|end|emergencystretch|else|efcode|edef|eTeXversion|eTeXrevision|eTeXminorversion|eTeXVersion|dvivariable|dvifeedback|dviextension|dump|draftmode|dp|doublehyphendemerits|divide|displaywidth|displaywidowpenalty|displaywidowpenalties|displaystyle|displaylimits|displayindent|discretionary|directlua|dimexpr|dimendef|dimen|detokenize|delimitershortfall|delimiterfactor|delimiter|delcode|defaultskewchar|defaulthyphenchar|def|deadcycles|day|currentiftype|currentiflevel|currentifbranch|currentgrouptype|currentgrouplevel|csstring|csname|crcr|crampedtextstyle|crampedscriptstyle|crampedscriptscriptstyle|crampeddisplaystyle|cr|countdef|count|copyfont|copy|compoundhyphenmode|clubpenalty|clubpenalties|closeout|closein|clearmarks|cleaders|chardef|char|catcodetable|catcode|brokenpenalty|breakafterdirmode|boxmaxdepth|boxdirection|boxdir|box|boundary|botmarks|botmark|bodydirection|bodydir|binoppenalty|belowdisplayskip|belowdisplayshortskip|begingroup|begincsname|batchmode|baselineskip|badness|automatichyphenpenalty|automatichyphenmode|automaticdiscretionary|attributedef|attribute|atopwithdelims|atop|aligntab|alignmark|aftergroup|afterassignment|advance|adjustspacing|adjdemerits|accent|abovewithdelims|abovedisplayskip|abovedisplayshortskip|above|XeTeXversion|Uvextensible|Uunderdelimiter|Usuperscript|Usubscript|Ustopmath|Ustopdisplaymath|Ustartmath|Ustartdisplaymath|Ustack|Uskewedwithdelims|Uskewed|Uroot|Uright|Uradical|Uoverdelimiter|Unosuperscript|Unosubscript|Umiddle|Umathunderdelimitervgap|Umathunderdelimiterbgap|Umathunderbarvgap|Umathunderbarrule|Umathunderbarkern|Umathsupsubbottommax|Umathsupshiftup|Umathsupshiftdrop|Umathsupbottommin|Umathsubtopmax|Umathsubsupvgap|Umathsubsupshiftdown|Umathsubshiftdrop|Umathsubshiftdown|Umathstackvgap|Umathstacknumup|Umathstackdenomdown|Umathspaceafterscript|Umathskewedfractionvgap|Umathskewedfractionhgap|Umathrelrelspacing|Umathrelpunctspacing|Umathrelordspacing|Umathrelopspacing|Umathrelopenspacing|Umathrelinnerspacing|Umathrelclosespacing|Umathrelbinspacing|Umathradicalvgap|Umathradicalrule|Umathradicalkern|Umathradicaldegreeraise|Umathradicaldegreebefore|Umathradicaldegreeafter|Umathquad|Umathpunctrelspacing|Umathpunctpunctspacing|Umathpunctordspacing|Umathpunctopspacing|Umathpunctopenspacing|Umathpunctinnerspacing|Umathpunctclosespacing|Umathpunctbinspacing|Umathoverdelimitervgap|Umathoverdelimiterbgap|Umathoverbarvgap|Umathoverbarrule|Umathoverbarkern|Umathordrelspacing|Umathordpunctspacing|Umathordordspacing|Umathordopspacing|Umathordopenspacing|Umathordinnerspacing|Umathordclosespacing|Umathordbinspacing|Umathoprelspacing|Umathoppunctspacing|Umathopordspacing|Umathopopspacing|Umathopopenspacing|Umathopinnerspacing|Umathoperatorsize|Umathopenrelspacing|Umathopenpunctspacing|Umathopenordspacing|Umathopenopspacing|Umathopenopenspacing|Umathopeninnerspacing|Umathopenclosespacing|Umathopenbinspacing|Umathopclosespacing|Umathopbinspacing|Umathnolimitsupfactor|Umathnolimitsubfactor|Umathlimitbelowvgap|Umathlimitbelowkern|Umathlimitbelowbgap|Umathlimitabovevgap|Umathlimitabovekern|Umathlimitabovebgap|Umathinnerrelspacing|Umathinnerpunctspacing|Umathinnerordspacing|Umathinneropspacing|Umathinneropenspacing|Umathinnerinnerspacing|Umathinnerclosespacing|Umathinnerbinspacing|Umathfractionrule|Umathfractionnumvgap|Umathfractionnumup|Umathfractiondenomvgap|Umathfractiondenomdown|Umathfractiondelsize|Umathconnectoroverlapmin|Umathcodenum|Umathcode|Umathcloserelspacing|Umathclosepunctspacing|Umathcloseordspacing|Umathcloseopspacing|Umathcloseopenspacing|Umathcloseinnerspacing|Umathcloseclosespacing|Umathclosebinspacing|Umathcharslot|Umathcharnumdef|Umathcharnum|Umathcharfam|Umathchardef|Umathcharclass|Umathchar|Umathbinrelspacing|Umathbinpunctspacing|Umathbinordspacing|Umathbinopspacing|Umathbinopenspacing|Umathbininnerspacing|Umathbinclosespacing|Umathbinbinspacing|Umathaxis|Umathaccent|Uleft|Uhextensible|Udelimiterunder|Udelimiterover|Udelimiter|Udelcodenum|Udelcode|Uchar|Omegaversion|Omegarevision|Omegaminorversion|Alephversion|Alephrevision|Alephminorversion| )(?=[^a-zA-Z])", "name" : "context.primitive.commands.primitive.tex" }, "reserved" : { diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf Binary files differindex 50429afa6..3f31d4c77 100644 --- a/doc/context/documents/general/qrcs/setup-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf Binary files differindex 4852eb2a4..77e5586a3 100644 --- a/doc/context/documents/general/qrcs/setup-de.pdf +++ b/doc/context/documents/general/qrcs/setup-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf Binary files differindex 97b13f0d0..7d7f5f10e 100644 --- a/doc/context/documents/general/qrcs/setup-en.pdf +++ b/doc/context/documents/general/qrcs/setup-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf Binary files differindex 7b7f180cc..e68e18379 100644 --- a/doc/context/documents/general/qrcs/setup-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf Binary files differindex 3769f1385..106193fac 100644 --- a/doc/context/documents/general/qrcs/setup-it.pdf +++ b/doc/context/documents/general/qrcs/setup-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf Binary files differindex fb53b7470..9bb44b496 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf Binary files differindex 330403d71..2d9575423 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf Binary files differindex a2d76bcec..8b0a9485f 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf Binary files differindex 49824dd90..d3d23fecf 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf Binary files differindex 90a16e638..09fa8cdf8 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf Binary files differindex a3af97a7b..bd2985690 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf Binary files differindex 3ec45c3b3..75badbf92 100644 --- a/doc/context/documents/general/qrcs/setup-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf Binary files differindex 7d7f87273..fd09b32ea 100644 --- a/doc/context/documents/general/qrcs/setup-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-ro.pdf diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex b/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex index 5c68b3123..b5e56ab63 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex @@ -31,41 +31,49 @@ The \LUAMETATEX\ engine is, as said, a lightweight version of \LUATEX, that for now targets \CONTEXT. We will use it for possibly drastic experiments but without affecting \LUATEX. As we can easily adapt \CONTEXT\ to support both, no other macro package will be harmed when (for instance) interfaces change as part of an -experiment. Of course, when we consider something to be useful, it can be back -ported to \LUATEX, but only when there are good reasons for doing so. When -considering this follow up one consideration was that a lean and mean version -with an extension mechanism is a bit closer to original \TEX. Of course, because -we have new primitives, this is not entirely true. +experiment. Of course, when we consider something to be useful, it can be ported +back to \LUATEX, but only when there are good reasons for doing so and when no +compatibility issues are involved. When considering this follow up one +consideration was that a lean and mean version with an extension mechanism is a +bit closer to original \TEX. Of course, because we also have new primitives, this +is not entirely true. The move to \LUA\ already meant that some aspects, +especially system dependent ones, no longer made sense and therefore had +consequences for the interface at the system level. This manual currently has quite a bit of overlap with the \LUATEX\ manual but -some chapters are removed, others added and the rest has been adapted. We also -discusses the (main) differences. Some of the new primitives or functions that -show up in \LUAMETATEX\ might show up in \LUATEX\ at some point, others might -not. For now it is an experimental engine in which we can change things at will -but with \CONTEXT\ in tandem so it will keep working. +some chapters are removed, others added and the rest has been (and will be +further) adapted. We also discusses the (main) differences. Some of the new +primitives or functions that show up in \LUAMETATEX\ might show up in \LUATEX\ at +some point, others might not, so don't take this manual as reference for \LUATEX +! For now it is an experimental engine in which we can change things at will but +with \CONTEXT\ in tandem so that this macro package will keep working. For \CONTEXT\ users the \LUAMETATEX\ engine will become the default. Because we can keep both \LUAMETATEX\ and \CONTEXT\ in sync. The \CONTEXT\ variant is tagged \LMTX. The pair can be used in production, just as with \LUATEX\ and \MKIV. In -fact, most users will probably not really notice the difference. +fact, most users will probably not really notice the difference. In some cases +there will be a drop in performance, due to more work being delegated to \LUA, +but on the average performance will be better, also due to some changes below the +hood of the engine. As this follow up is closely related to \CONTEXT\ development, and because we expect stock \LUATEX\ to be used outside the \CONTEXT\ proper, there will be no -special mailing list nor coverage (or polution) on the \LUATEX\ related mailing +special mailing list nor coverage (or pollution) on the \LUATEX\ related mailing lists. We have the \CONTEXT\ mailing lists for that. In due time the source code will be part of the regular \CONTEXT\ distribution. % \testpage[8] -This manual refers to \LUATEX, when we talk of features common to both engine, as -well as \LUAMETATEX, when it is more specific to the follow up. +This manual sometimes refers to \LUATEX, especially when we talk of features +common to both engine, as well as to \LUAMETATEX, when it is more specific to the +follow up. A substantial amount of time went into the transition and more will go +in, so if you want to complain about \LUAMETATEX, don't bother me. \blank[big] Hans Hagen -% \blank[2*big] -\page +\blank[2*big] \starttabulate[|||] \NC Version \EQ \currentdate \NC \NR diff --git a/doc/context/sources/general/manuals/onandon/onandon-53.tex b/doc/context/sources/general/manuals/onandon/onandon-53.tex index 46eac3510..c724bf810 100644 --- a/doc/context/sources/general/manuals/onandon/onandon-53.tex +++ b/doc/context/sources/general/manuals/onandon/onandon-53.tex @@ -2,49 +2,55 @@ \startcomponent onandon-53 +% copy-edited by Alan Braslau + \environment onandon-environment \startchapter[title={From \LUA\ 5.2 to 5.3}] -When we started with \LUATEX\ we used \LUA\ 5.1 and moved to 5.2 when that became -available. We didn't run into issues then because there were no fundamental -changes that could not be dealt with. However, when \LUA\ 5.3 was announced in -2015 we were not sure if we should make the move. The main reason was that we'd -chosen \LUA\ because of its clean design which meant that we had only one number -type: double. In 5.3 on the other hand, deep down a number can be either an -integer or a floating point quantity. - -Internally \TEX\ is mostly (up to) 32-bit integers and when we go from \LUA\ to -\TEX\ we round numbers. Nonetheless one can expect some benefits in using -integers. Performance|-|wise we didn't expect much, and memory consumption would -be the same too. So, the main question then was: can we get the same output and -not run into trouble due to possible differences in serializing numbers; after -all \TEX\ is about stability. The serialization aspect is for instance important -when we compare quantities and|/|or use numbers in hashes. - -Apart from this change in number model, which comes with a few extra helpers, -another extension in 5.3 was that bit|-|wise operations are now part of the -language. The lpeg library is still not part of stock \LUA. There is some minimal -\UTF8 support, but less than we provide in \LUATEX\ already. So, looking at these -changes, we were not in a hurry to update. Also, it made sense to wait till this -important number|-|related change was stable. - -But, a few years later, we still had it on our agenda to test, and after the -\CONTEXT\ 2017 meeting we decided to give it a try; here are some observations. A -quick test was just dropping in the new \LUA\ code and seeing if we could make a -\CONTEXT\ format. Indeed that was no big deal but a test run failed because at -some point a (for instance) \type {1} became a \type {1.0}. It turned out that -serializing has some side effects. And with some ad hoc prints for tracing (in -the \LUATEX\ source) I could figure out what went on. How numbers are seen can -(to some extent) be deduced from the \type {string.format} function, which is in -\LUA\ a combination of parsing, splitting and concatenation combined with piping -to the \CCODE\ \type {sprintf} function. \footnote {Actually, at some point I -decided to write my own formatter on top of \type {format} and I ended up with -splitting as well. It's only now that I realize why this is working out so well -(in terms of performance): simple format (single items) are passed more or less -directly to \type {sprintf} and as \LUA\ itself is fast, due to some caching, the -overhead is small compared to the built|-|in splitter method. And the \CONTEXT\ -formatter has many more options and is extensible.} +When we started with \LUATEX\ we used \LUA\ 5.1 and then moved seamlessly to 5.2 +when that became available. We didn't run into issues with this language version +change because there were no fundamental differences that could not be easily +dealt with. However, when \LUA\ 5.3 was announced in 2015 we were not sure if we +should make the move. The main reason was that we'd chosen \LUA\ because of its +clean design part of which meant that we had only one number type: double. In 5.3 +on the other hand, deep down a number can be either an integer or a floating +point quantity. + +Internally \TEX\ is mostly (up to) 32-bit integers so when we go from \LUA\ to +\TEX\ we are forced to round numbers. Nonetheless, or perhaps because of this, +one can expect some benefits in using integers in \LUA. Performance|-|wise we +didn't expect much, and memory consumption would be the same too. So the main +question then was: can we get the same output and not run into trouble due to +possible differences in serializing numbers? After all \TEX\ is about stability. +The serialization aspect is for instance important when we compare quantities +and|/|or use numbers in hashes, so one must be careful. + +Apart from this change in the number model (which comes with a few extra +helpers), another interesting extension in 5.3 was that bit|-|wise operations are +now part of the language. However, the lpeg library is still not part of stock +\LUA. There is also added some minimal \UTF8 support, but less than we provide in +\LUATEX\ already. So, considering these changes, we were not in a big hurry to +update. Also, it made sense to wait until this important number|-|related change +became stable. + +But, a few years later, we still had it on our agenda to test the new version of +\LUA, and after the \CONTEXT\ 2017 meeting we decided to give it a try; here are +some observations. A quick test involved just dropping in the new \LUA\ code and +seeing if with this we could still compile a \CONTEXT\ format. Indeed that was no +big deal but the test run failed because at some point a (for instance) \type {1} +became a \type {1.0}. It turned out that serializing has some side effects, and +with some ad hoc prints for tracing (in the \LUATEX\ source) I could figure out +what was going on. How numbers are seen can (to some extent) be deduced from the +\type {string.format} function, which is in \LUA\ a combination of parsing, +splitting and concatenation combined with piping to the \CCODE\ \type {sprintf} +function: \footnote {Actually, at some point I decided to write my own formatter +on top of \type {format} and I ended up with splitting as well. It's only now +that I realize why this is working out so well (in terms of performance): simple +format (single items) are passed more or less directly to \type {sprintf} and as +\LUA\ itself is fast, due to some caching, the overhead is small compared to the +built|-|in splitter method. An advantage is that the \CONTEXT\ formatter has many +more options and is also extensible.} \starttyping local a = 2 * (1/2) print(string.format("%s", a),math.type(x)) @@ -76,10 +82,10 @@ This gives the following results: \BC k \NC -2 \NC .0f \NC 2 \NC integer \NC \NR \stoptabulate -This demonstrates that we have to be careful when we need these numbers -represented as strings. In \CONTEXT\ the number of places where we had to check -for that was not that large; in fact, only some hashing related to font sizes had -to be done using explicit rounding. +This demonstrates that we have to be careful when we need numbers represented as +strings. In \CONTEXT\ the places where we had to check for this was not that +many: in fact, only some hashing related to font sizes had to be done using +explicit rounding. Another surprising side effect is the following. Instead of: @@ -103,22 +109,23 @@ because we don't want this to be serialized to \type {64.0} which is due to the fact that a power results in a float. One can wonder if this makes sense when we apply it to an integer. -At any rate, once we could process a file, two documents were chosen for a -performance test. Some experiments with loops and casts had demonstrated that we -could expect a small performance hit and indeed, this was the case. Processing -the \LUATEX\ manual takes 10.7 seconds with 5.2 on my 5-year-old laptop and 11.6 -seconds with 5.3. If we consider that \CONTEXT\ spends 50\% of its time in \LUA, -then we see a 20\% performance penalty. Processing the \METAFUN\ manual (which -has lots of \METAPOST\ images) went from less than 20 seconds (\LUAJITTEX\ does -it in 16 seconds) up to more than 27 seconds. So there we lose more than 50\% on -the \LUA\ end. When we observed these kinds of differences, Luigi and I -immediately got into debugging mode, partly out of curiosity, but also because -consistent performance is important to~us. - -Because these numbers made no sense, we traced different sub-mechanisms and -eventually it became clear that the reason for the speed penalty was that the +At any rate, once we were able to process a file, two standard documents were +chosen for a performance test. Some experiments with loops and casts had +demonstrated that we could expect a small performance hit and indeed, this was +the case. Processing the \LUATEX\ manual takes 10.7 seconds with 5.2 on my +5-year-old laptop and 11.6 seconds with 5.3. If we consider that \CONTEXT\ spends +about 50\% of its time in \LUA, then we find here a 20\% performance penalty +using the later version of \LUA. Processing the \METAFUN\ manual (which has lots +of \METAPOST\ images) went from less than 20 seconds (and \LUAJITTEX\ does it in +16 seconds) to up to more than 27 seconds. So there we lose more than 50\% on the +\LUA\ end. When we observed these kinds of differences, Luigi and I immediately +got into debugging mode, partly out of curiosity but also because consistent +performance is always important to us. + +As these results made no sense, we traced different sub-mechanisms and eventually +it became clear that the reason behind the speed penalty was in fact that the core \typ {string.format} function was behaving quite badly in the \type {mingw} -cross-compiled binary, as seen by this test: +cross|-|compiled binary, as can be seen by this test: \starttyping local t = os.clock() @@ -137,13 +144,13 @@ print(os.clock()-t) \BC c \NC 0.26 \NC 0.68 \NC 3.67 (0.29) \NC 0.66 \NC \NR \stoptabulate -The 5.2 binaries perform the same but the 5.3 Lua binary greatly outperforms -\LUATEX, and so we had to figure out why. After all, all this integer -optimization could bring some gain! It took us a while to figure this out. The -numbers in parentheses are the results after fixing this. +Both 5.2 binaries perform the same but the 5.3 \LUA\ binary greatly outperforms +the \LUATEX binary so we had to figure out why. After all, the integer +optimization should bring some gain! It took us a while to figure out what was +going wrong, and the numbers in parentheses are the results after fixing \LUATEX. Because font internals are specified in integers one would expect a gain -in running: +in running the command: \starttyping mtxrun --script font --reload force @@ -151,8 +158,10 @@ mtxrun --script font --reload force and indeed that is the case. On my machine a scan results in 2561 registered fonts from 4906 read files and with 5.2 that takes 9.1 seconds while 5.3 needs a -bit less: 8.6 seconds (with the bad format performance) and even less once that -was fixed. For a test: +bit less: 8.6 seconds (with the bad cross|-|compiled format performance) and even +less once that was fixed. + +For a test: \starttyping \setupbodyfont[modern] \tf \bf \it \bs @@ -163,21 +172,23 @@ was fixed. For a test: \starttext \stoptext \stoptyping -This code needs 30\% more runtime so the question is: how often do we call \type -{string.format} there? A first run (when we wipe the font cache) needs some -715,000 calls while successive runs need 115,000 calls so that slow down -definitely comes from the bad handling of \type {string.format}. When we drop in -a \LUA\ update or whatever other dependency we don't want this kind of impact. In -fact, when one uses external libraries that are or can be compiled under the -\TEX\ Live infrastructure and the impact would be such, it's bad advertising, -especially when one considers the occasional complaint about \LUATEX\ being -slower than other engines. +This code needs 30\% more runtime using the newer version of \LUA\ so the +question is: how often do we call \type {string.format} there? A first run (when +we wipe the font cache) needs some 715\,000 calls while successive runs need +115\,000 calls so the slow down definitely comes from the bad handling of \type +{string.format}. + +When we drop in a \LUA\ or whatever other dependency update we don't want this +kind of impact. In fact, when one uses external libraries that are or can be +compiled under the \TEX\ Live infrastructure and the impact would be so dramatic, +this would be very bad advertising, especially when one considers the occasional +complaint about \LUATEX\ being slower than other engines. The good news is that eventually Luigi was able to nail down this issue and we got a binary that performed well. It looks like \LUA\ 5.3.4 (cross|)|compiles -badly with \GCC\ 5.3.0 and 6.3.0. +badly under both \GCC\ 5.3.0 and 6.3.0. -So in the end caching the fonts takes: +So in the end loading the fonts takes: \starttabulate[||c|c|] \BC \BC caching \BC running \NC \NR @@ -186,18 +197,20 @@ So in the end caching the fonts takes: \BC 5.3 fixed \NC 6.3 \NC 1.0 \NC \NR \stoptabulate -So indeed it looks like 5.3 is able to speed up \LUATEX\ a bit, given that one -integrates it in the right way! Using a recent compiler is needed too, although -one can wonder when a bad case will show up again. One can also wonder why such a -slow down can mostly go unnoticed, because for sure \LUATEX\ is not the only -compiled program. +So indeed after an initial scare it looks like 5.3 is able to speed up \LUATEX\ a +bit, given that one integrates it in the right way! The use of a recent compiler +is needed here, although one can wonder when another bad case will show up again. +One can also wonder why such a slow down can mostly go unnoticed, because for +sure \LUATEX\ is not the only compiled program integrating the \LUA\ language. +\footnote{We can only speculate that others do not pay such close attention to +performance.} The next examples are some edge cases that show you need to be aware that \startitemize[n,text,nostopper] \startitem an integer has its limits, \stopitem - \startitem that hexadecimal numbers are integers and \stopitem - \startitem that \LUA\ and \LUAJIT\ can be different in details. \stopitem + \startitem that hexadecimal numbers are integers, and \stopitem + \startitem that \LUA\ 5.2 and \LUAJIT\ can differ in small details: \stopitem \stopitemize \starttabulate[||T|T|] @@ -208,47 +221,53 @@ that \BC lua 53 \NC -1 \NC 9223372036854775807 \NC \NR \stoptabulate -So, to summarize the process. A quick test was relatively easy: move 5.3 into the -code base, adapt a little bit of internals (there were some \LUATEX\ interfacing -bits where explicit rounding was needed), run tests and eventually fix some -issues related to the Makefile (compatibility) and \CCODE\ obscurities (the slow -\type {sprintf}). Adapting \CONTEXT\ was also not much work, and the test suite -uncovered some nasty side effects. For instance, the valid 5.2 solution: +We see here that \LUA\ 5.3 clearly represents some progress. + +So, to summarize the migration, a quick test was relatively easy: move 5.3 into +the code base, make slight adaptations to the internals (there were a few +\LUATEX\ interfacing bits where explicit rounding was needed), run tests, and +eventually fix some issues related to the Makefile (compatibility) and \CCODE\ +obscurities (the very slow \type {sprintf}). \footnote{This demonstrates the +importance of compilers, or rather how one writes code with respect to each +compiler.} + +Adapting \CONTEXT\ was also not much work, but the test suite uncovered some +nasty side effects. For instance, the valid 5.2 solution: \starttyping local s = string.format("02X",u/1024) local s = string.char (u/1024) \stoptyping -now has to become (both 5.2 and 5.3): +now has to become (works with both 5.2 and 5.3): \starttyping local s = string.format("02X",math.floor(u/1024)) local s = string.char (math.floor(u/1024)) \stoptyping -or (both 5.2 and (emulated or real) 5.3): +or (with 5.2 and emulated or real 5.3): \starttyping local s = string.format("02X",bit32.rshift(u,10)) local s = string.char (bit32.rshift(u,10)) \stoptyping -or (only 5.3): +or (5.3 only): \starttyping local s = string.format("02X",u >> 10)) local s = string.char (u >> 10) \stoptyping -or (only 5.3): +or (5.3 only): \starttyping local s = string.format("02X",u//1024) local s = string.char (u//1024) \stoptyping -A conditional section like: +Unfortunately, adapting a conditional section like: \starttyping if LUAVERSION >= 5.3 then @@ -260,53 +279,61 @@ else end \stoptyping -will fail because (of course) the 5.2 parser doesn't like that. In \CONTEXT\ we -have some experimental solutions for that but that is beyond this summary. +will fail because (of course) the 5.2 parser doesn't like the 5.3 syntax +elements. In \CONTEXT\ we have some experimental solutions for this but it is +beyond the scope of this summary. -In the process a few \UTF\ helpers were added to the string library so that we -have a common set for \LUAJIT\ and \LUA\ (the \type {utf8} library that was added -to 5.3 is not that important for \LUATEX). For now we keep the \type {bit32} -library on board. Of course we'll not mention all the details here. +In the process of this update a few \UTF\ helpers were added to the string +library so that we have a common set for both \LUAJIT\ and \LUA\ (the \type +{utf8} library that was added to 5.3 is not very useful for \LUATEX). For now we +also keep the \type {bit32} library on board, of course, we'll not mention all +the details here. -When we consider a gain in speed of 5-10\% with 5.3 that also means that the gain -of \LUAJITTEX\ compared to 5.2 becomes less. For instance in font processing both -engines now perform closer to the same. +When we consider a gain in speed of 5–10\% with 5.3 that also means that the gain +obtained using \LUAJITTEX\ compared to \LUA\ 5.2 becomes less important. For +instance in font processing both engines (\LUA\ 5.3 and \LUAJIT) now perform +roughly to the same. As I write this, we've just entered 2018 and after a few months of testing \LUATEX\ with \LUA\ 5.3 we're confident that we can move the code to the experimental branch. This means that we will use this version in the \CONTEXT\ -distribution and likely will ship this version as 1.10 in 2019, where it becomes +distribution and likely will ship this as 1.10 in 2019 where \LUA\ 5.3 becomes the default. The 2018 version of \TEX~Live will have 1.07 with \LUA\ 5.2 while intermediate versions of the \LUA\ 5.3 binary will end up on the \CONTEXT\ garden, probably with number 1.08 and 1.09 (who knows what else we will add or change in the meantime). -\subsubject{addendum} - -Around the 2018 meeting I started with what is to become the next major upgrade -of \CONTEXT, this time using \LUAMETATEX. When working on that I decided to try -\LUA\ 5.4 and see what consequences that would have for us. There are no real -conceptual changes, as with the number model in 5.3, so the tests didn't reveal -any issues. But as an additional step towards a bit cleaner distinction between -strings and numbers, I disabled the casting so that mixing them in expression for -instance is no longer permitted. If I remember right only in one place I had to -adapt the source (and in the meantime we're talking of a pretty large code base). - -There is a new mechanism for freezing constants but I'm not yet sure if it makes -much sense to use it. It goes along with some other restrictions, like the -possibility to adapt loop counters inside the loop. Inside the body of a loop one -could always adapt such a variable, which (I can imagine) can come in handy. I -didn't check yet the source code for that, but probably I don't do that. - -Another new features is an alternative garbage collector which seems to perform -better when there are many variables with s short live span. For now I decided -to default to this variant in future releases. +\subsubject{Addendum} + +Around the 2018 meeting I also started what is to become the next major upgrade +of \CONTEXT, this time using a new engine \LUAMETATEX. In working on that I +decided to try \LUA\ 5.4 to see what consequences this new version would have for +us. There are no real conceptual changes as were found with the number model in +5.3, so the tests didn't reveal any real issues. But as an additional step +towards a bit cleaner distinction between strings and numbers, I decided to +disable the automatic casting so that mixing strings and numbers in expression +for instance is no longer permitted. If I remember correctly, there was only in +one place I had to adapt the source (and we're talking about a pretty large \LUA\ +code base). + +There is a new mechanism in \LUA\ for freezing constants but I'm not yet sure if +it makes much sense to use it, although one of the intentions is to produce more +efficient bytecode. \footnote {Mid July 2019 some quick tests indeed show a +performance boost with the experimental code base, but if we want to benefit from +using constants, the \CONTEXT\ codebase has to be adapted, which means that those +parts no longer will work with stock \LUATEX.} It's use goes along with some +other restrictions, like the possibility to adapt loop counters inside the loop. +Inside the body of a loop one could always adapt such a variable, which (I can +imagine) can come in handy. I haven't checked the source code for that, but +probably I don't do this anywhere. + +Another new feature is an alternative garbage collector which seems to perform +better when there are many variables with a short life spans. At least for now I +have decided to default to this variant in future releases. Overall the performance of \LUA\ 5.4 is better than its predecessors which means -that the gape between \LUATEX\ and \LUAJITTEX\ is closing. This is good because -in \LUAMETATEX\ I will not support that variant. - -\stopchapter +that the gap between \LUATEX\ and \LUAJITTEX\ is closed or is closing. This is +good because I have chosen not to support \LUAJIT\ in \LUAMETATEX. \stopcomponent diff --git a/metapost/context/base/mpiv/mp-chem.mpiv b/metapost/context/base/mpiv/mp-chem.mpiv index 4ed9eaa8f..c5f79a88c 100644 --- a/metapost/context/base/mpiv/mp-chem.mpiv +++ b/metapost/context/base/mpiv/mp-chem.mpiv @@ -513,10 +513,21 @@ def chem_transformed (suffix $) = % not vardef! fi enddef ; +% vardef chem_draw (expr what, r, c) (text extra) = +% draw what +% withpen pencircle scaled r +% withcolor c +% extra ; +% enddef ; + vardef chem_draw (expr what, r, c) (text extra) = draw what withpen pencircle scaled r - withcolor c + if string c : + if c <> "" : withcolor c fi + else : + withcolor c + fi extra ; enddef ; diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv index cabdf9ab2..f1f31e5f0 100644 --- a/metapost/context/base/mpiv/mp-tool.mpiv +++ b/metapost/context/base/mpiv/mp-tool.mpiv @@ -895,9 +895,36 @@ enddef ; let normalwithcolor = withcolor ; def withcolor expr c = - normalwithcolor if string c : resolvedcolor(c) else : c fi + normalwithcolor if string c : resolvedcolor(c) else : c fi enddef ; +% I don't want a "withcolor black" in case of an empty string ... who knows +% how that can interfere with outer colors. Somehow the next one doesn't +% always work out ok, but why ... must be some parsing issue. Anyway, when +% we cannot do that, we need to fix some chem macros instead as empty strings +% now lead to black while everywhere else in context empty means: leave color +% untouched. + +% def withcolor expr c = +% if not string c : +% normalwithcolor c +% elseif c <> "" : +% normalwithcolor resolvedcolor(c) +% fi +% enddef ; + +% So why does this work better than the above: +% +% def withcolor expr c = +% if string c : +% if c <> "" : +% normalwithcolor resolvedcolor(c) +% fi +% else : +% normalwithcolor c +% fi +% enddef ; + vardef colortype expr c = if cmykcolor c : cmykcolor elseif rgbcolor c : rgbcolor diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index bec9e23ec..73cc4a9be 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -13683,7 +13683,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-inf"] = package.loaded["trac-inf"] or true --- original size: 9777, stripped down to: 6605 +-- original size: 9904, stripped down to: 6712 if not modules then modules={} end modules ['trac-inf']={ version=1.001, @@ -13875,7 +13875,11 @@ function statistics.show() end function statistics.memused() local round=math.round or math.floor - return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000),round(status.luastate_bytes/1000000)) + return format("%s MB, ctx: %s MB, max: %s MB)", + round(collectgarbage("count")/1000), + round(status.luastate_bytes/1000000), + status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown" + ) end starttiming(statistics) function statistics.formatruntime(runtime) @@ -25650,8 +25654,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1023045 --- stripped bytes : 405206 +-- original bytes : 1023172 +-- stripped bytes : 405226 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index bec9e23ec..73cc4a9be 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -13683,7 +13683,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-inf"] = package.loaded["trac-inf"] or true --- original size: 9777, stripped down to: 6605 +-- original size: 9904, stripped down to: 6712 if not modules then modules={} end modules ['trac-inf']={ version=1.001, @@ -13875,7 +13875,11 @@ function statistics.show() end function statistics.memused() local round=math.round or math.floor - return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000),round(status.luastate_bytes/1000000)) + return format("%s MB, ctx: %s MB, max: %s MB)", + round(collectgarbage("count")/1000), + round(status.luastate_bytes/1000000), + status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown" + ) end starttiming(statistics) function statistics.formatruntime(runtime) @@ -25650,8 +25654,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1023045 --- stripped bytes : 405206 +-- original bytes : 1023172 +-- stripped bytes : 405226 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index bec9e23ec..73cc4a9be 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -13683,7 +13683,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-inf"] = package.loaded["trac-inf"] or true --- original size: 9777, stripped down to: 6605 +-- original size: 9904, stripped down to: 6712 if not modules then modules={} end modules ['trac-inf']={ version=1.001, @@ -13875,7 +13875,11 @@ function statistics.show() end function statistics.memused() local round=math.round or math.floor - return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000),round(status.luastate_bytes/1000000)) + return format("%s MB, ctx: %s MB, max: %s MB)", + round(collectgarbage("count")/1000), + round(status.luastate_bytes/1000000), + status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown" + ) end starttiming(statistics) function statistics.formatruntime(runtime) @@ -25650,8 +25654,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1023045 --- stripped bytes : 405206 +-- original bytes : 1023172 +-- stripped bytes : 405226 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index bec9e23ec..73cc4a9be 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -13683,7 +13683,7 @@ do -- create closure to overcome 200 locals limit package.loaded["trac-inf"] = package.loaded["trac-inf"] or true --- original size: 9777, stripped down to: 6605 +-- original size: 9904, stripped down to: 6712 if not modules then modules={} end modules ['trac-inf']={ version=1.001, @@ -13875,7 +13875,11 @@ function statistics.show() end function statistics.memused() local round=math.round or math.floor - return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000),round(status.luastate_bytes/1000000)) + return format("%s MB, ctx: %s MB, max: %s MB)", + round(collectgarbage("count")/1000), + round(status.luastate_bytes/1000000), + status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown" + ) end starttiming(statistics) function statistics.formatruntime(runtime) @@ -25650,8 +25654,8 @@ end -- of closure -- used libraries : l-bit32.lua l-lua.lua l-macro.lua l-sandbox.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-sha.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua util-soc-imp-reset.lua util-soc-imp-socket.lua util-soc-imp-copas.lua util-soc-imp-ltn12.lua util-soc-imp-mime.lua util-soc-imp-url.lua util-soc-imp-headers.lua util-soc-imp-tp.lua util-soc-imp-http.lua util-soc-imp-ftp.lua util-soc-imp-smtp.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-tpl.lua util-sbx.lua util-mrg.lua util-env.lua luat-env.lua util-zip.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 1023045 --- stripped bytes : 405206 +-- original bytes : 1023172 +-- stripped bytes : 405226 -- end library merge diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index ba4e48db1..27bc7c7b5 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{2019.07.04 12:29} +\newcontextversion{2019.07.16 18: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 0caeb26a7..2fe0e7bd3 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{2019.07.04 12:29} +\edef\contextversion{2019.07.16 18:23} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-de.mkii b/tex/context/base/mkii/mult-de.mkii index d52003728..6b2995517 100644 --- a/tex/context/base/mkii/mult-de.mkii +++ b/tex/context/base/mkii/mult-de.mkii @@ -147,6 +147,7 @@ \setinterfacevariable{comment}{kommentar} \setinterfacevariable{component}{komponente} \setinterfacevariable{compressseparator}{compressseparator} +\setinterfacevariable{compressstopper}{compressstopper} \setinterfacevariable{concept}{konzept} \setinterfacevariable{construction}{construction} \setinterfacevariable{content}{inhalt} @@ -477,6 +478,7 @@ \setinterfacevariable{sectionnumber}{abschnittsnummer} \setinterfacevariable{see}{sieh} \setinterfacevariable{selectfont}{selectfont} +\setinterfacevariable{separator}{separator} \setinterfacevariable{september}{september} \setinterfacevariable{serif}{serif} \setinterfacevariable{serifbold}{serifbold} @@ -732,7 +734,9 @@ \setinterfaceconstant{compoundhyphen}{compoundhyphen} \setinterfaceconstant{compress}{compress} \setinterfaceconstant{compressdistance}{compressdistance} +\setinterfaceconstant{compressmethod}{compressmethod} \setinterfaceconstant{compressseparator}{compressseparator} +\setinterfaceconstant{compressstopper}{compressstopper} \setinterfaceconstant{concerns}{concerns} \setinterfaceconstant{connector}{connector} \setinterfaceconstant{continue}{fortsetzen} diff --git a/tex/context/base/mkii/mult-nl.mkii b/tex/context/base/mkii/mult-nl.mkii index 6376b158a..0043934b3 100644 --- a/tex/context/base/mkii/mult-nl.mkii +++ b/tex/context/base/mkii/mult-nl.mkii @@ -147,6 +147,7 @@ \setinterfacevariable{comment}{commentaar} \setinterfacevariable{component}{onderdeel} \setinterfacevariable{compressseparator}{compressseparator} +\setinterfacevariable{compressstopper}{compressstopper} \setinterfacevariable{concept}{concept} \setinterfacevariable{construction}{construction} \setinterfacevariable{content}{inhoud} @@ -373,6 +374,7 @@ \setinterfacevariable{nohz}{geenhz} \setinterfacevariable{noline}{noline} \setinterfacevariable{nomarking}{geenmarkering} +\setinterfacevariable{nomenubar}{geenmenubalk} \setinterfacevariable{none}{geen} \setinterfacevariable{nonumber}{geennummer} \setinterfacevariable{norepeat}{norepeat} @@ -476,6 +478,7 @@ \setinterfacevariable{sectionnumber}{sectienummer} \setinterfacevariable{see}{zie} \setinterfacevariable{selectfont}{selectfont} +\setinterfacevariable{separator}{scheider} \setinterfacevariable{september}{september} \setinterfacevariable{serif}{serif} \setinterfacevariable{serifbold}{serifbold} @@ -569,6 +572,7 @@ \setinterfacevariable{temporary}{voorlopig} \setinterfacevariable{test}{test} \setinterfacevariable{text}{tekst} +\setinterfacevariable{textnote}{tekstnoot} \setinterfacevariable{three}{drie} \setinterfacevariable{thursday}{donderdag} \setinterfacevariable{tight}{krap} @@ -729,7 +733,10 @@ \setinterfaceconstant{component}{component} \setinterfaceconstant{compoundhyphen}{koppelteken} \setinterfaceconstant{compress}{comprimeren} +\setinterfaceconstant{compressdistance}{compressdistance} +\setinterfaceconstant{compressmethod}{compressmethod} \setinterfaceconstant{compressseparator}{compressseparator} +\setinterfaceconstant{compressstopper}{compressstopper} \setinterfaceconstant{concerns}{betreft} \setinterfaceconstant{connector}{connector} \setinterfaceconstant{continue}{doorgaan} diff --git a/tex/context/base/mkii/mult-pe.mkii b/tex/context/base/mkii/mult-pe.mkii index 0b121d288..d07d9dbdd 100644 --- a/tex/context/base/mkii/mult-pe.mkii +++ b/tex/context/base/mkii/mult-pe.mkii @@ -147,6 +147,7 @@ \setinterfacevariable{comment}{توضیح} \setinterfacevariable{component}{مولفه} \setinterfacevariable{compressseparator}{compressseparator} +\setinterfacevariable{compressstopper}{compressstopper} \setinterfacevariable{concept}{مفهوم} \setinterfacevariable{construction}{construction} \setinterfacevariable{content}{محتوا} @@ -477,6 +478,7 @@ \setinterfacevariable{sectionnumber}{شمارهبخش} \setinterfacevariable{see}{ببینید} \setinterfacevariable{selectfont}{selectfont} +\setinterfacevariable{separator}{separator} \setinterfacevariable{september}{سپتامبر} \setinterfacevariable{serif}{سریف} \setinterfacevariable{serifbold}{serifbold} @@ -732,7 +734,9 @@ \setinterfaceconstant{compoundhyphen}{compoundhyphen} \setinterfaceconstant{compress}{فشردن} \setinterfaceconstant{compressdistance}{compressdistance} +\setinterfaceconstant{compressmethod}{compressmethod} \setinterfaceconstant{compressseparator}{compressseparator} +\setinterfaceconstant{compressstopper}{compressstopper} \setinterfaceconstant{concerns}{concerns} \setinterfaceconstant{connector}{connector} \setinterfaceconstant{continue}{ادامه} diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii index b450e464e..302bc3fa3 100644 --- a/tex/context/base/mkii/mult-ro.mkii +++ b/tex/context/base/mkii/mult-ro.mkii @@ -147,6 +147,7 @@ \setinterfacevariable{comment}{comentariu} \setinterfacevariable{component}{componenta} \setinterfacevariable{compressseparator}{compressseparator} +\setinterfacevariable{compressstopper}{compressstopper} \setinterfacevariable{concept}{concept} \setinterfacevariable{construction}{construction} \setinterfacevariable{content}{cuprins} @@ -477,6 +478,7 @@ \setinterfacevariable{sectionnumber}{numarsetiune} \setinterfacevariable{see}{vezi} \setinterfacevariable{selectfont}{selectfont} +\setinterfacevariable{separator}{separator} \setinterfacevariable{september}{septembrie} \setinterfacevariable{serif}{serif} \setinterfacevariable{serifbold}{serifbold} @@ -732,7 +734,9 @@ \setinterfaceconstant{compoundhyphen}{compoundhyphen} \setinterfaceconstant{compress}{compress} \setinterfaceconstant{compressdistance}{compressdistance} +\setinterfaceconstant{compressmethod}{compressmethod} \setinterfaceconstant{compressseparator}{compressseparator} +\setinterfaceconstant{compressstopper}{compressstopper} \setinterfaceconstant{concerns}{concerns} \setinterfaceconstant{connector}{connector} \setinterfaceconstant{continue}{continua} diff --git a/tex/context/base/mkiv/attr-ini.lua b/tex/context/base/mkiv/attr-ini.lua index dd971afc1..5d35d6ab5 100644 --- a/tex/context/base/mkiv/attr-ini.lua +++ b/tex/context/base/mkiv/attr-ini.lua @@ -34,6 +34,8 @@ attributes.states = attributes.states or { } attributes.handlers = attributes.handlers or { } attributes.unsetvalue = -0x7FFFFFFF +local currentfont = font.current + local names = attributes.names local numbers = attributes.numbers local list = attributes.list @@ -146,7 +148,7 @@ function attributes.save(name) end store[name] = { attr = t, - font = font.current(), + font = currentfont(), } end @@ -163,7 +165,8 @@ function attributes.restore(name) end if font then -- tex.font = font - context.getvalue(fonts.hashes.csnames[font]) -- we don't have a direct way yet (will discuss it with taco) + -- context.getvalue(fonts.hashes.csnames[font]) + currentfont(font) end end -- store[name] = nil diff --git a/tex/context/base/mkiv/back-ini.mkiv b/tex/context/base/mkiv/back-ini.mkiv index ff19d0229..007f80d1a 100644 --- a/tex/context/base/mkiv/back-ini.mkiv +++ b/tex/context/base/mkiv/back-ini.mkiv @@ -64,8 +64,27 @@ \fi \to \everysetupbackend -%D For older styles: +%D For the moment this is an experiment (defauls is pdf, but we also +%D have lua, json and mps). +%D +%D \starttyping +%D % \setupoutput[lua] +%D % \setupoutput[json] +%D % \setupoutput[mps] +%D % \setupoutput[none] % for testing only +%D % \setupoutput[empty] % for testing only +%D +%D \starttext +%D \dorecurse{1000}{ +%D {\tf \red \samplefile{tufte}} \par +%D {\bf \green \samplefile {ward}} \par +%D {\sl \blue \samplefile{davis}} \par +%D } +%D \stoptext +%D \stoptyping + +\unexpanded\def\setupoutput[#1]% + {\clf_enabledriver{#1}} -\let\setupoutput\gobbleoneoptional \protect \endinput diff --git a/tex/context/base/mkiv/back-lua.lua b/tex/context/base/mkiv/back-lua.lua index 257fda0a2..4e95d37e3 100644 --- a/tex/context/base/mkiv/back-lua.lua +++ b/tex/context/base/mkiv/back-lua.lua @@ -6,47 +6,349 @@ if not modules then modules = { } end modules ['back-lua'] = { license = "see context related readme files" } -local buffer = { } -local b = 0 +-- we can remap fonts + +local fontproperties = fonts.hashes.properties +local fontparameters = fonts.hashes.parameters +local fontshapes = fonts.hashes.shapes + +local starttiming = statistics.starttiming +local stoptiming = statistics.stoptiming + +local bpfactor = number.dimenfactors.bp +local texgetbox = tex.getbox + +local rulecodes = nodes.rulecodes +local normalrule_code = rulecodes.normal +----- boxrule_code = rulecodes.box +----- imagerule_code = rulecodes.image +----- emptyrule_code = rulecodes.empty +----- userrule_code = rulecodes.user +----- overrule_code = rulecodes.over +----- underrule_code = rulecodes.under +----- fractionrule_code = rulecodes.fraction +----- radicalrule_code = rulecodes.radical +local outlinerule_code = rulecodes.outline + +-- todo : per instance + +local pages = { } +local fonts = { } +local names = { } +local mapping = { } +local used = { } +local shapes = { } +local glyphs = { } +local buffer = { } +local b = 0 +local converter = nil + +local compact = false -- true +local shapestoo = true + +local x, y, d, f, c, w, h, t, r, o local function reset() buffer = { } b = 0 + t = nil + x = nil + y = nil + d = nil + f = nil + c = nil + w = nil + h = nil + r = nil + o = nil +end + +local function result() + -- todo: we're now still in the pdf backend but need different codeinjections + local codeinjections = backends.pdf.codeinjections + local getvariable = codeinjections.getidentityvariable or function() end + local jobname = environment.jobname or tex.jobname or "unknown" + return { + metadata = { + unit = "bp", + jobname = jobname, + title = getvariable("title") or jobname, + subject = getvariable("subject"), + author = getvariable("author"), + keywords = getvariable("keywords"), + time = os.date("%Y-%m-%d %H:%M"), + engine = environment.luatexengine .. " " .. environment.luatexversion, + context = environment.version, + }, + fonts = fonts, + pages = pages, + shapes = shapes, + } +end + +-- actions + +local function outputfilename(driver) + return tex.jobname .. "-output.lua" +end + +local function save() -- might become a driver function that already is plugged into stopactions + local filename = outputfilename() + drivers.report("saving result in %a",filename) + starttiming(drivers) + local data = result() + if data then + io.savedata(filename,table.serialize(data)) + end + stoptiming(drivers) end -local function initialize(specification) +local function prepare(driver) + converter = drivers.converters.lmtx + luatex.registerstopactions(1,function() + save() + end) +end + +local function initialize(driver,details) reset() end -local function finalize() +local function finalize(driver,details) + local n = details.pagenumber + local b = details.boundingbox + pages[n] = { + number = n, + content = buffer, + boundingbox = { + b[1] * bpfactor, + b[2] * bpfactor, + b[3] * bpfactor, + b[4] * bpfactor, + }, + } +end + +local function wrapup(driver) end -local function fetch() - local saved = buffer +local function cleanup(driver) reset() - return saved end -local function flushcharacter(current, pos_h, pos_v, pod_r, font, char) - b = b + 1 ; buffer[b] = { "glyph", font, char, pos_h, pos_v, pos_r } +local function convert(driver,boxnumber,pagenumber) + converter(driver,texgetbox(boxnumber),"page",pagenumber) +end + +-- flushers + +local function updatefontstate(id) + if not mapping[id] then + local fn = #fonts + 1 + mapping[id] = fn + local properties = fontproperties[id] + local parameters = fontparameters[id] + local filename = file.basename(properties.filename) + local fontname = properties.fullname or properties.fontname + if shapestoo then + if not names[fontname] then + local sn = #shapes+1 + names[fontname] = sn + shapes[sn] = { } + glyphs[sn] = fontshapes[id].glyphs + end + end + fonts[fn] = { + filename = filename, + name = fontname, + size = parameters.size * bpfactor, + shapes = shapestoo and names[fontname] or nil, + } + end +end + +local function flushcharacter(current, pos_h, pos_v, pos_r, font, char) + local fnt = mapping[font] + b = b + 1 + buffer[b] = { + t = "glyph" ~= t and "glyph" or nil, + f = font ~= f and fnt or nil, + c = char ~= c and char or nil, + x = pos_h ~= x and (pos_h * bpfactor) or nil, + y = pos_v ~= y and (pos_v * bpfactor) or nil, + d = pos_r ~= d and (pos_r == 1 and "r2l" or "l2r") or nil, + } + t = "glyph" + f = font + c = char + x = pos_h + y = pos_v + d = pos_r + if shapestoo then + -- can be sped up if needed + local sn = fonts[fnt].shapes + local shp = shapes[sn] + if not shp[char] then + shp[char] = glyphs[sn][char] + end + end +end + +local function rule(pos_h, pos_v, pos_r, size_h, size_v, rule_s, rule_o) + b = b + 1 + buffer[b] = { + t = "rule" ~= t and "rule" or nil, + r = rule_s ~= r and rule_s or nil, + o = rule_s == "outline" and rule_o ~= o and (rule_o * bpfactor) or nil, + w = size_h ~= w and (size_h * bpfactor) or nil, + h = size_v ~= h and (size_v * bpfactor) or nil, + x = pos_h ~= x and (pos_h * bpfactor) or nil, + y = pos_v ~= y and (pos_v * bpfactor) or nil, + d = pos_r ~= d and (pos_r == 1 and "r2l" or "l2r") or nil, + } + t = "rule" + w = size_h + h = size_v + x = pos_h + y = pos_v + d = pos_r +end + +local function flushrule(current, pos_h, pos_v, pos_r, size_h, size_v, subtype) + local rule_s, rule_o + if subtype == normalrule_code then + rule_s = "normal" + elseif subtype == outlinerule_code then + rule_s = "outline" + rule_o = getdata(current) + else + return + end + return rule(pos_h, pos_v, pos_r, size_h, size_v, rule_s, rule_o) end -local function flushrule(current, pos_h, pos_v, pos_r, size_h, size_v) - b = b + 1 ; buffer[b] = { "rule", size_h, size_v, pos_h, pos_v, pos_r } +local function flushsimplerule(current, pos_h, pos_v, pos_r, size_h, size_v) + return rule(pos_h, pos_v, pos_r, size_h, size_v, "normal", nil) end -- file stuff too +-- todo: default flushers +-- also color (via hash) + +-- installer drivers.install { name = "lua", actions = { - initialize = initialize, - finalize = finalize, - fetch = fetch, - reset = reset, + prepare = prepare, + initialize = initialize, + finalize = finalize, + wrapup = wrapup, + cleanup = cleanup, + convert = convert, + outputfilename = outputfilename, + }, + flushers = { + updatefontstate = updatefontstate, + character = flushcharacter, + rule = flushrule, + } +} + +-- actions + +local function outputfilename(driver) + return tex.jobname .. "-output.json" +end + +local function save() -- might become a driver function that already is plugged into stopactions + local filename = outputfilename() + drivers.report("saving result in %a",filename) + starttiming(drivers) + local data = result() + if data then + if not utilities.json then + require("util-jsn") + end + io.savedata(filename,utilities.json.tostring(data,not compact)) + end + stoptiming(drivers) +end + +local function prepare(driver) + converter = drivers.converters.lmtx + luatex.registerstopactions(1,function() + save() + end) +end + +-- installer + +drivers.install { + name = "json", + actions = { + prepare = prepare, + initialize = initialize, + finalize = finalize, + wrapup = wrapup, + cleanup = cleanup, + convert = convert, + outputfilename = outputfilename, + }, + flushers = { + updatefontstate = updatefontstate, + character = flushcharacter, + rule = flushrule, + } +} + +-- actions + +local function outputfilename(driver) + return tex.jobname .. "-output.js" +end + +local function save() -- might become a driver function that already is plugged into stopactions + local filename = outputfilename() + drivers.report("saving result in %a",filename) + starttiming(drivers) + local data = result() + if data then + if not utilities.json then + require("util-jsn") + end + io.savedata(filename, + "const JSON_CONTEXT = JSON.parse ( `" .. + utilities.json.tostring(data,not compact) .. + "` ) ;\n" + ) + end + stoptiming(drivers) +end + +local function prepare(driver) + converter = drivers.converters.lmtx + luatex.registerstopactions(1,function() + save() + end) +end + +-- installer + +drivers.install { + name = "js", + actions = { + prepare = prepare, + initialize = initialize, + finalize = finalize, + wrapup = wrapup, + cleanup = cleanup, + convert = convert, + outputfilename = outputfilename, }, flushers = { - character = flushcharacter, - rule = flushrule, + updatefontstate = updatefontstate, + character = flushcharacter, + rule = flushrule, } } diff --git a/tex/context/base/mkiv/back-mps.lua b/tex/context/base/mkiv/back-mps.lua index 380fb7a35..96c850ed6 100644 --- a/tex/context/base/mkiv/back-mps.lua +++ b/tex/context/base/mkiv/back-mps.lua @@ -6,89 +6,200 @@ if not modules then modules = { } end modules ['back-mps'] = { license = "see context related readme files" } --- The basics are the same as the lua variant. - -local formatters = string.formatters -local bpfactor = number.dimenfactors.bp - -local buffer = { } -local b = 0 +local fontproperties = fonts.hashes.properties +local fontparameters = fonts.hashes.parameters + +local starttiming = statistics.starttiming +local stoptiming = statistics.stoptiming + +local bpfactor = number.dimenfactors.bp +local texgetbox = tex.getbox +local formatters = string.formatters + +local rulecodes = nodes.rulecodes +local normalrule_code = rulecodes.normal +----- boxrule_code = rulecodes.box +----- imagerule_code = rulecodes.image +----- emptyrule_code = rulecodes.empty +----- userrule_code = rulecodes.user +----- overrule_code = rulecodes.over +----- underrule_code = rulecodes.under +----- fractionrule_code = rulecodes.fraction +----- radicalrule_code = rulecodes.radical +local outlinerule_code = rulecodes.outline + +local fonts = { } +local pages = { } +local buffer = { } +local b = 0 +local converter = nil local function reset() buffer = { } b = 0 end -local function initialize(specification) - reset() +local f_font = formatters[ "\\definefont[%s][file:%s*none @ %sbp]\n" ] + +local f_glyph = formatters[ [[draw textext.drt("\%s\char%i\relax") shifted (%N,%N);]] ] +local f_rule = formatters[ [[fill unitsquare xscaled %N yscaled %N shifted (%N,%N);]] ] +local f_outline = formatters[ [[draw unitsquare xscaled %N yscaled %N shifted (%N,%N);]] ] + +-- actions + +local function outputfilename(driver) + return tex.jobname .. "-output.tex" end -local function finalize() +local function save() -- might become a driver function that already is plugged into stopactions + starttiming(drivers) + if #pages > 0 then + local filename = outputfilename() + drivers.report("saving result in %a",filename) + reset() + b = b + 1 + buffer[b] = "\\starttext\n" + for k, v in table.sortedhash(fonts) do + b = b + 1 + buffer[b] = f_font(v.name,v.filename,v.size) + end + for i=1,#pages do + b = b + 1 + buffer[b] = pages[i] + end + b = b + 1 + buffer[b] = "\\stoptext\n" + io.savedata(filename,table.concat(buffer,"",1,b)) + end + stoptiming(drivers) end -local function fetch() - local saved = buffer - reset() - return saved +local function prepare(driver) + converter = drivers.converters.lmtx + luatex.registerstopactions(1,function() + save() + end) end -local function flushcharacter(current, pos_h, pos_v, pod_r, font, char) - b = b + 1 ; buffer[b] = { "glyph", font, char, pos_h, pos_v, pos_r } +local function initialize(driver,details) + reset() + b = b + 1 + buffer[b] = "\n\\startMPpage" end -local function flushrule(current, pos_h, pos_v, pod_r, size_h, size_v) - b = b + 1 ; buffer[b] = { "rule", size_h, size_v, pos_h, pos_v, pos_r } +local function finalize(driver,details) + b = b + 1 + buffer[b] = "\\stopMPpage\n" + pages[details.pagenumber] = table.concat(buffer,"\n",1,b) end -drivers.install { - name = "mps", - actions = { - initialize = initialize, - finalize = finalize, - fetch = fetch, - reset = reset, - }, - flushers = { - character = flushcharacter, - rule = flushrule, - } -} +local function wrapup(driver) +end -if not mp then - return +local function cleanup(driver) + reset() end -local mpprint = mp.print +local function convert(driver,boxnumber,pagenumber) + converter(driver,texgetbox(boxnumber),"page",pagenumber) +end -local f_glyph = formatters[ [[draw textext.drt("\setfontid%i\relax\char%i\relax") shifted (%N,%N);]] ] -local f_rule = formatters[ [[fill unitsquare xscaled %N yscaled %N shifted (%N,%N);]] ] +-- flushers -local current = nil -local size = 0 +local last -function mp.place_buffermake(box) - drivers.convert("mps",box) - current = drivers.action("mps","fetch") - size = #current +local function updatefontstate(id) + if fonts[id] then + last = fonts[id].name + else + last = "MPSfont" .. converters.Characters(id) + fonts[id] = { + filename = file.basename(fontproperties[id].filename), + size = fontparameters[id].size * bpfactor, + name = last, + } + end end -function mp.place_buffersize() - mpprint(size) +local function flushcharacter(current, pos_h, pos_v, pod_r, font, char) + b = b + 1 + buffer[b] = f_glyph(last,char,pos_h*bpfactor,pos_v*bpfactor) end -function mp.place_bufferslot(i) - if i > 0 and i <= size then - local b = buffer[i] - local t = b[1] - if t == "glyph" then - mpprint(f_glyph(b[2],b[3],b[4]*bpfactor,b[5]*bpfactor)) - elseif t == "rule" then - mpprint(f_rule(b[2]*bpfactor,b[3]*bpfactor,b[4]*bpfactor,b[5]*bpfactor)) - end +local function flushrule(current, pos_h, pos_v, pod_r, size_h, size_v, subtype) + if subtype == normalrule_code then + b = b + 1 + buffer[b] = f_rule(size_h*bpfactor,size_v*bpfactor,pos_h*bpfactor,pos_v*bpfactor) + elseif subtype == outlinerule_code then + b = b + 1 + buffer[b] = f_outline(size_h*bpfactor,size_v*bpfactor,pos_h*bpfactor,pos_v*bpfactor) end end -function mp.place_bufferwipe() - current = nil - size = 0 +local function flushsimplerule(current, pos_h, pos_v, pod_r, size_h, size_v) + b = b + 1 + buffer[b] = f_rule(size_h*bpfactor,size_v*bpfactor,pos_h*bpfactor,pos_v*bpfactor) end + +-- installer + +drivers.install { + name = "mps", + actions = { + prepare = prepare, + initialize = initialize, + finalize = finalize, + wrapup = wrapup, + cleanup = cleanup, + convert = convert, + outputfilename = outputfilename, + }, + flushers = { + updatefontstate = updatefontstate, + character = flushcharacter, + rule = flushrule, + simplerule = flushsimplerule, + } +} + +-- extras + +-- if not mp then +-- return +-- end +-- +-- local mpprint = mp.print +-- local formatters = string.formatters +-- +-- local f_glyph = formatters[ [[draw textext.drt("\setfontid%i\relax\char%i\relax") shifted (%N,%N);]] ] +-- local f_rule = formatters[ [[fill unitsquare xscaled %N yscaled %N shifted (%N,%N);]] ] +-- +-- local current = nil +-- local size = 0 +-- +-- function mp.place_buffermake(box) +-- drivers.convert("mps",box) +-- current = drivers.action("mps","fetch") +-- size = #current +-- end +-- +-- function mp.place_buffersize() +-- mpprint(size) +-- end +-- +-- function mp.place_bufferslot(i) +-- if i > 0 and i <= size then +-- local b = buffer[i] +-- local t = b[1] +-- if t == "glyph" then +-- mpprint(f_glyph(b[2],b[3],b[4]*bpfactor,b[5]*bpfactor)) +-- elseif t == "rule" then +-- mpprint(f_rule(b[2]*bpfactor,b[3]*bpfactor,b[4]*bpfactor,b[5]*bpfactor)) +-- end +-- end +-- end +-- +-- function mp.place_bufferwipe() +-- current = nil +-- size = 0 +-- end diff --git a/tex/context/base/mkiv/back-trf.lua b/tex/context/base/mkiv/back-trf.lua index 721c856a9..1586bc440 100644 --- a/tex/context/base/mkiv/back-trf.lua +++ b/tex/context/base/mkiv/back-trf.lua @@ -141,14 +141,23 @@ implement { name = "stopmirroring", actions = startmirroring } -- not: stopsome -- this could also run on top of pack-rul ... todo +-- local function startclipping() +-- -- context(savenode()) +-- context(literalnode("origin",formatters["q 0 w %s W n"](scanstring()))) +-- end +-- +-- local function stopclipping() +-- -- context(restorenode()) +-- context(literalnode("Q")) +-- end + local function startclipping() - -- context(savenode()) - context(literalnode("origin",formatters["q 0 w %s W n"](scanstring()))) + context(savenode()) + context(literalnode("origin",formatters["0 w %s W n"](scanstring()))) end local function stopclipping() - -- context(restorenode()) - context(literalnode("Q")) + context(restorenode()) end implement { name = "startclipping", actions = startclipping } diff --git a/tex/context/base/mkiv/cldf-int.lua b/tex/context/base/mkiv/cldf-int.lua index 52cfea8d0..937e1da60 100644 --- a/tex/context/base/mkiv/cldf-int.lua +++ b/tex/context/base/mkiv/cldf-int.lua @@ -11,8 +11,9 @@ if not modules then modules = { } end modules ['cldf-int'] = { -- needs checking -- todo: multilingual -local format, insert, remove, concat = string.format, table.insert, table.remove, table.concat -local unpack = unpack or table.unpack +local format, byte = string.format, string.byte +local insert, remove, concat = table.insert, table.remove, table.concat +local unpack, type = unpack or table.unpack, type local catcodenumbers = catcodes.numbers @@ -24,140 +25,282 @@ local contextsprint = context.sprint local trace_define = false trackers.register("context.define", function(v) trace_define = v end) -interfaces = interfaces or { } +interfaces = interfaces or { } +local implement = interfaces.implement +local estart = interfaces.elements.start +local estop = interfaces.elements.stop -_clmh_ = utilities.parsers.settings_to_hash -_clma_ = utilities.parsers.settings_to_array +if CONTEXTLMTXMODE > 0 then -local starters, stoppers, macros, stack = { }, { }, { }, { } + local scanners = tokens.scanners + local shortcuts = tokens.shortcuts -local checkers = { - [0] = "", - "\\dosingleempty", - "\\dodoubleempty", - "\\dotripleempty", - "\\doquadrupleempty", - "\\doquintupleempty", - "\\dosixtupleempty", -} + local scanpeek = scanners.peek + local scankey = scanners.key + local scanvalue = scanners.value + local scanskip = scanners.skip -function _clmm_(name,...) - macros[name](...) -end + local open = byte('[') + local close = byte(']') + local equal = byte('=') + local comma = byte(',') -function _clmb_(name,...) - local sn = stack[name] - insert(sn,{...}) - starters[name](...) -end - -function _clme_(name) - local sn = stack[name] - local sv = remove(sn) - if sv then - stoppers[name](unpack(sv)) - else - -- nesting error + function scanhash(t) + if scanpeek() == open then + local data = { } + scanskip() + while true do + local c = scanpeek() + if c == comma then + scanskip() + elseif c == close then + scanskip() + break + else + local key = scankey(equal) + if key then + if scanpeek() == equal then + scanskip() + data[key] = scanvalue(comma,close) or "" + else + break + end + else + break + end + end + end + return data + end end -end -_clmn_ = tonumber + function scanarray(t) + if scanpeek() == open then + local data = { } + local d = 0 + scanskip() + while true do + local c = scanpeek() + if c == comma then + scanskip() + elseif c == close then + scanskip() + break + else + local v = scanvalue(comma,close) or "" + d = d + 1 + data[d] = v + end + end + return data + end + end -local estart = interfaces.elements.start -local estop = interfaces.elements.stop + shortcuts.scanhash = scanhash + shortcuts.scanarray = scanarray --- this is a bit old definition ... needs to be modernized + scanners.hash = scanhash + scanners.array = scanarray -function interfaces.definecommand(name,specification) -- name is optional - if type(name) == "table" then - specification = name - name = specification.name + local function remap(arguments) + -- backward compatibility + if type(arguments) == "table" then + for i=1,#arguments do + local a = arguments[i] + if type(a) == "table" then + local t = a[2] + arguments[i] = t == "list" and "array" or t + end + end + return arguments + end end - if name and specification then - local arguments = specification.arguments - local na = (arguments and #arguments) or 0 - local environment = specification.environment - if na == 0 then + + function interfaces.definecommand(name,specification) -- name is optional + if type(name) == "table" then + specification = name + name = specification.name + end + if name and specification then + local environment = specification.environment + local arguments = remap(specification.arguments) if environment then - contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{\\ctxlua{_clmb_('",name,"')}}") - contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}") + local starter = specification.starter + local stopper = specification.stopper + if starter and stopper then + implement { + name = estart .. name, + arguments = arguments, + public = true, + protected = true, + actions = starter, + } + implement { + name = estop .. name, + public = true, + protected = true, + actions = stopper, + } + else + -- message + end end if not environment or environment == "both" then - contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{\\ctxlua{_clmm_('",name,"')}}") - end - else - -- we could flush immediate but tracing is bad then - stack[name] = { } - local opt = 0 - local done = false - local snippets = { } -- we can reuse it - local mkivdo = "\\mkivdo" .. name -- maybe clddo - snippets[#snippets+1] = "\\def" - snippets[#snippets+1] = mkivdo - for i=1,na do - local a = arguments[i] - local variant = a[1] - if variant == "option" then - snippets[#snippets+1] = "[#" - snippets[#snippets+1] = i - snippets[#snippets+1] = "]" - if not done then - opt = opt + 1 - end + local macro = specification.macro + if macro then + implement { + name = name, + arguments = arguments, + public = true, + protected = true, + actions = macro, + } else - done = true -- no more optional checking after this - snippets[#snippets+1] = "#" - snippets[#snippets+1] = i + -- message end end - if environment then - snippets[#snippets+1] = "{\\ctxlua{_clmb_('" - snippets[#snippets+1] = name - snippets[#snippets+1] = "'" + else + -- message + end + end + + +else + + _clmh_ = utilities.parsers.settings_to_hash + _clma_ = utilities.parsers.settings_to_array + + local starters, stoppers, macros, stack = { }, { }, { }, { } + + local checkers = { + [0] = "", + "\\dosingleempty", + "\\dodoubleempty", + "\\dotripleempty", + "\\doquadrupleempty", + "\\doquintupleempty", + "\\dosixtupleempty", + } + + function _clmm_(name,...) + macros[name](...) + end + + function _clmb_(name,...) + local sn = stack[name] + insert(sn,{...}) + starters[name](...) + end + + function _clme_(name) + local sn = stack[name] + local sv = remove(sn) + if sv then + stoppers[name](unpack(sv)) + else + -- nesting error + end + end + + _clmn_ = tonumber + + local estart = interfaces.elements.start + local estop = interfaces.elements.stop + + -- this is a bit old definition ... needs to be modernized + + function interfaces.definecommand(name,specification) -- name is optional + if type(name) == "table" then + specification = name + name = specification.name + end + if name and specification then + local arguments = specification.arguments + local na = (arguments and #arguments) or 0 + local environment = specification.environment + if na == 0 then + if environment then + contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{\\ctxlua{_clmb_('",name,"')}}") + contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}") + end + if not environment or environment == "both" then + contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{\\ctxlua{_clmm_('",name,"')}}") + end else - snippets[#snippets+1] = "{\\ctxlua{_clmm_('" - snippets[#snippets+1] = name - snippets[#snippets+1] = "'" - end - for i=1,na do - local a = arguments[i] - local variant = a[2] - if variant == "list" then - snippets[#snippets+1] = ",_clma_([[#" - snippets[#snippets+1] = i - snippets[#snippets+1] = "]])" - elseif variant == "hash" then - snippets[#snippets+1] = ",_clmh_([[#" - snippets[#snippets+1] = i - snippets[#snippets+1] = "]])" - elseif variant == "number" then - snippets[#snippets+1] = ",_clmn_([[#" - snippets[#snippets+1] = i - snippets[#snippets+1] = "]])" + -- we could flush immediate but tracing is bad then + stack[name] = { } + local opt = 0 + local done = false + local snippets = { } -- we can reuse it + local mkivdo = "\\mkivdo" .. name -- maybe clddo + snippets[#snippets+1] = "\\def" + snippets[#snippets+1] = mkivdo + for i=1,na do + local a = arguments[i] + local variant = a[1] + if variant == "option" then + snippets[#snippets+1] = "[#" + snippets[#snippets+1] = i + snippets[#snippets+1] = "]" + if not done then + opt = opt + 1 + end + else + done = true -- no more optional checking after this + snippets[#snippets+1] = "#" + snippets[#snippets+1] = i + end + end + if environment then + snippets[#snippets+1] = "{\\ctxlua{_clmb_('" + snippets[#snippets+1] = name + snippets[#snippets+1] = "'" else - snippets[#snippets+1] = ",[[#" - snippets[#snippets+1] = i - snippets[#snippets+1] = "]]" + snippets[#snippets+1] = "{\\ctxlua{_clmm_('" + snippets[#snippets+1] = name + snippets[#snippets+1] = "'" + end + for i=1,na do + local a = arguments[i] + local variant = a[2] + if variant == "list" then + snippets[#snippets+1] = ",_clma_([==[#" + snippets[#snippets+1] = i + snippets[#snippets+1] = "]==])" + elseif variant == "hash" then + snippets[#snippets+1] = ",_clmh_([==[#" + snippets[#snippets+1] = i + snippets[#snippets+1] = "]==])" + elseif variant == "number" then + snippets[#snippets+1] = ",_clmn_([==[#" + snippets[#snippets+1] = i + snippets[#snippets+1] = "]==])" + else + snippets[#snippets+1] = ",[==[#" + snippets[#snippets+1] = i + snippets[#snippets+1] = "]==]" + end + end + snippets[#snippets+1] = ")}}" + contextsprint(ctxcatcodes,unpack(snippets)) + if environment then + -- needs checking + contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{",checkers[opt],mkivdo,"}") + contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}") + end + if not environment or environment == "both" then + contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{",checkers[opt],mkivdo,"}") end end - snippets[#snippets+1] = ")}}" - contextsprint(ctxcatcodes,unpack(snippets)) if environment then - -- needs checking - contextsprint(ctxcatcodes,"\\setuvalue{",estart,name,"}{",checkers[opt],mkivdo,"}") - contextsprint(ctxcatcodes,"\\setuvalue{",estop, name,"}{\\ctxlua{_clme_('",name,"')}}") - end - if not environment or environment == "both" then - contextsprint(ctxcatcodes,"\\setuvalue{", name,"}{",checkers[opt],mkivdo,"}") + starters[name] = specification.starter + stoppers[name] = specification.stopper + else + macros[name] = specification.macro end end - if environment then - starters[name] = specification.starter - stoppers[name] = specification.stopper - else - macros[name] = specification.macro - end end + end function interfaces.tolist(t) @@ -223,3 +366,20 @@ end -- \stopluacode -- -- more: \startmore[1] one \startmore[2] two \stopmore one \stopmore +-- +-- More modern (no need for option or content): +-- +-- \startluacode +-- interfaces.definecommand { +-- name = "test", +-- arguments = { +-- "array", -- or list +-- "hash", +-- "string", +-- "number", +-- }, +-- macro = test, +-- } +-- \stopluacode +-- + diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 428ff4f95..bd131ddaf 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{2019.07.04 12:29} +\newcontextversion{2019.07.16 18:23} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 26a46a8bc..bc9549d01 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -45,7 +45,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2019.07.04 12:29} +\edef\contextversion{2019.07.16 18:23} \edef\contextkind {beta} %D Kind of special: diff --git a/tex/context/base/mkiv/driv-ini.lua b/tex/context/base/mkiv/driv-ini.lua index f3d62c778..a19ebb359 100644 --- a/tex/context/base/mkiv/driv-ini.lua +++ b/tex/context/base/mkiv/driv-ini.lua @@ -19,10 +19,20 @@ local report = logs.reporter("drivers") local instances = { } local helpers = { } +local converters = { } local prepared = { } local wrappedup = { } local cleanedup = { } local currentdriver = "default" +local currentinstance = nil + +local shipout = tex.shipout +local texgetbox = tex.getbox +local texgetcount = tex.getcount + +function converters.engine(driver,boxnumber,mode,number,specification) + return shipout(boxnumber) +end local prepare = nil local convert = nil @@ -33,7 +43,9 @@ local outputfilename = nil drivers = drivers or { instances = instances, helpers = helpers, + converters = converters, lmtxversion = 0.10, + report = report, } local dummy = function() end @@ -65,26 +77,32 @@ function drivers.install(specification) report("no flushers for driver %a",name) return end - setmetatableindex(actions,defaulthandlers) + -- report("driver %a is installed",name) + setmetatableindex(actions, defaulthandlers) + setmetatableindex(flushers, function() return dummy end) instances[name] = specification end function drivers.convert(boxnumber) - callbacks.functions.start_page_number() - starttiming(drivers) - convert(boxnumber) - stoptiming(drivers) - callbacks.functions.stop_page_number() + if currentinstance then + callbacks.functions.start_page_number() + starttiming(drivers) + convert(currentinstance,boxnumber,texgetcount("realpageno")) + stoptiming(drivers) + callbacks.functions.stop_page_number() + end end function drivers.outputfilename() - return outputfilename() + if currentinstance then + return outputfilename(currentinstance) + end end luatex.wrapup(function() - if wrapup and not wrappedup[currentdriver] then + if currentinstance and wrapup and not wrappedup[currentdriver] then starttiming(drivers) - wrapup() + wrapup(currentinstance) stoptiming(drivers) wrappedup[currentdriver] = true cleanedup[currentdriver] = true @@ -92,9 +110,9 @@ luatex.wrapup(function() end) luatex.cleanup(function() - if cleanup and not cleanedup[currentdriver] then + if currentinstance and cleanup and not cleanedup[currentdriver] then starttiming(drivers) - cleanup() + cleanup(currentinstance) stoptiming(drivers) wrappedup[currentdriver] = true cleanedup[currentdriver] = true @@ -102,19 +120,31 @@ luatex.cleanup(function() end) function drivers.enable(name) - currentdriver = name or "default" - local actions = instances[currentdriver].actions - prepare = actions.prepare - wrapup = actions.wrapup - cleanup = actions.cleanup - convert = actions.convert - outputfilename = actions.outputfilename - -- - if prepare and not prepared[currentdriver] then - starttiming(drivers) - prepare() - stoptiming(drivers) - prepared[currentdriver] = true + if name ~= currentdriver then + if currentinstance then + starttiming(drivers) + cleanup(currentinstance) + stoptiming(drivers) + end + currentdriver = name or "default" + currentinstance = instances[currentdriver] + if currentinstance then + local actions = currentinstance.actions + prepare = actions.prepare + wrapup = actions.wrapup + cleanup = actions.cleanup + convert = actions.convert + outputfilename = actions.outputfilename + -- + if prepare and not prepared[currentdriver] then + starttiming(drivers) + prepare(currentinstance) + stoptiming(drivers) + prepared[currentdriver] = true + end + else + report("bad driver") + end end end @@ -143,8 +173,8 @@ do drivers.install { name = "default", actions = { - convert = tex.shipout, - outputfilename = function() + convert = drivers.converters.engine, + outputfilename = function(driver) if not filename then filename = addsuffix(tex.jobname,"pdf") end @@ -158,6 +188,41 @@ do end +-- No driver: + +do + + drivers.install { + name = "none", + actions = { }, + flushers = { }, + } + +end + +do + + local function prepare(driver) + converter = drivers.converters.lmtx + end + + local function convert(driver,boxnumber,pagenumber) + converter(driver,texgetbox(boxnumber),"page",pagenumber) + end + + drivers.install { + name = "empty", + actions = { + prepare = prepare, + convert = convert, + }, + flushers = { }, + } + +end + +-- + setmetatableindex(instances,function() return instances.default end) -- for now: diff --git a/tex/context/base/mkiv/driv-shp.lua b/tex/context/base/mkiv/driv-shp.lua index 19bc75f2a..980dda357 100644 --- a/tex/context/base/mkiv/driv-shp.lua +++ b/tex/context/base/mkiv/driv-shp.lua @@ -9,109 +9,111 @@ if not modules then modules = { } end modules ['driv-shp'] = { local type, next = type, next local round = math.round -local setmetatableindex = table.setmetatableindex -local formatters = string.formatters -local concat = table.concat -local keys = table.keys -local sortedhash = table.sortedhash -local splitstring = string.split -local idiv = number.idiv -local extract = bit32.extract -local nuts = nodes.nuts - -local tonut = nodes.tonut -local tonode = nodes.tonode - -local getdirection = nuts.getdirection -local getlist = nuts.getlist -local getoffsets = nuts.getoffsets -local getorientation = nuts.getorientation -local getfield = nuts.getfield -local getwhd = nuts.getwhd -local getkern = nuts.getkern -local getheight = nuts.getheight -local getdepth = nuts.getdepth -local getwidth = nuts.getwidth -local getnext = nuts.getnext -local getsubtype = nuts.getsubtype -local getid = nuts.getid -local getleader = nuts.getleader -local getglue = nuts.getglue -local getshift = nuts.getshift -local getdata = nuts.getdata -local getboxglue = nuts.getboxglue -local getexpansion = nuts.getexpansion - ------ getall = node.direct.getall - -local setdirection = nuts.setdirection -local setfield = nuts.setfield -local setlink = nuts.setlink - -local isglyph = nuts.isglyph -local findtail = nuts.tail -local nextdir = nuts.traversers.dir -local nextnode = nuts.traversers.node - -local rangedimensions = nuts.rangedimensions -local effectiveglue = nuts.effective_glue - -local nodecodes = nodes.nodecodes -local whatsitcodes = nodes.whatsitcodes -local leadercodes = nodes.leadercodes -local subtypes = nodes.subtypes - -local dircodes = nodes.dircodes -local normaldir_code = dircodes.normal - -local dirvalues = nodes.dirvalues -local lefttoright_code = dirvalues.lefttoright -local righttoleft_code = dirvalues.righttoleft - -local glyph_code = nodecodes.glyph -local kern_code = nodecodes.kern -local glue_code = nodecodes.glue -local hlist_code = nodecodes.hlist -local vlist_code = nodecodes.vlist -local dir_code = nodecodes.dir -local disc_code = nodecodes.disc -local math_code = nodecodes.math -local rule_code = nodecodes.rule -local marginkern_code = nodecodes.marginkern -local whatsit_code = nodecodes.whatsit - -local leader_code = leadercodes.leader -local cleader_code = leadercodes.cleader -local xleader_code = leadercodes.xleader -local gleader_code = leadercodes.gleader - -local saveposwhatsit_code = whatsitcodes.savepos -local userdefinedwhatsit_code = whatsitcodes.userdefined -local openwhatsit_code = whatsitcodes.open -local writewhatsit_code = whatsitcodes.write -local closewhatsit_code = whatsitcodes.close -local lateluawhatsit_code = whatsitcodes.latelua -local literalwhatsit_code = whatsitcodes.literal -local setmatrixwhatsit_code = whatsitcodes.setmatrix -local savewhatsit_code = whatsitcodes.save -local restorewhatsit_code = whatsitcodes.restore - -local texget = tex.get - -local fonthashes = fonts.hashes -local fontdata = fonthashes.identifiers -local characters = fonthashes.characters -local parameters = fonthashes.parameters - -local report = logs.reporter("drivers") +local setmetatableindex = table.setmetatableindex +local formatters = string.formatters +local concat = table.concat +local keys = table.keys +local sortedhash = table.sortedhash +local splitstring = string.split +local idiv = number.idiv +local extract = bit32.extract +local nuts = nodes.nuts + +local tonut = nodes.tonut +local tonode = nodes.tonode + +local getdirection = nuts.getdirection +local getlist = nuts.getlist +local getoffsets = nuts.getoffsets +local getorientation = nuts.getorientation +local getfield = nuts.getfield +local getwhd = nuts.getwhd +local getkern = nuts.getkern +local getheight = nuts.getheight +local getdepth = nuts.getdepth +local getwidth = nuts.getwidth +local getnext = nuts.getnext +local getsubtype = nuts.getsubtype +local getid = nuts.getid +local getleader = nuts.getleader +local getglue = nuts.getglue +local getshift = nuts.getshift +local getdata = nuts.getdata +local getboxglue = nuts.getboxglue +local getexpansion = nuts.getexpansion +local getreplace = nuts.getreplace +local setreplace = nuts.setreplace + +local setdirection = nuts.setdirection +local setfield = nuts.setfield +local setlink = nuts.setlink + +local isglyph = nuts.isglyph +local findtail = nuts.tail +local nextdir = nuts.traversers.dir +local nextnode = nuts.traversers.node + +local rangedimensions = node.direct.naturalwidth or nuts.rangedimensions +local effectiveglue = nuts.effective_glue + +local texget = tex.get + +local fonthashes = fonts.hashes +local fontdata = fonthashes.identifiers +local characters = fonthashes.characters +local parameters = fonthashes.parameters + +local nodecodes = nodes.nodecodes +local whatsitcodes = nodes.whatsitcodes +local leadercodes = nodes.leadercodes +local dircodes = nodes.dircodes +local dirvalues = nodes.dirvalues +local subtypes = nodes.subtypes + +local <const> normaldir_code = dircodes.normal + +local <const> lefttoright_code = dirvalues.lefttoright +local <const> righttoleft_code = dirvalues.righttoleft + +local <const> glyph_code = nodecodes.glyph +local <const> kern_code = nodecodes.kern +local <const> glue_code = nodecodes.glue +local <const> hlist_code = nodecodes.hlist +local <const> vlist_code = nodecodes.vlist +local <const> dir_code = nodecodes.dir +local <const> disc_code = nodecodes.disc +local <const> math_code = nodecodes.math +local <const> rule_code = nodecodes.rule +local <const> marginkern_code = nodecodes.marginkern +local <const> whatsit_code = nodecodes.whatsit +----- <const> penalty_code = nodecodes.penalty +----- <const> boundary_code = nodecodes.boundary + +local <const> leaders_code = leadercodes.leaders +local <const> cleaders_code = leadercodes.cleaders +local <const> xleaders_code = leadercodes.xleaders +local <const> gleaders_code = leadercodes.gleaders + +local <const> saveposwhatsit_code = whatsitcodes.savepos +local <const> userdefinedwhatsit_code = whatsitcodes.userdefined +local <const> openwhatsit_code = whatsitcodes.open +local <const> writewhatsit_code = whatsitcodes.write +local <const> closewhatsit_code = whatsitcodes.close +local <const> lateluawhatsit_code = whatsitcodes.latelua +local <const> literalwhatsit_code = whatsitcodes.literal +local <const> setmatrixwhatsit_code = whatsitcodes.setmatrix +local <const> savewhatsit_code = whatsitcodes.save +local <const> restorewhatsit_code = whatsitcodes.restore local getpagedimensions getpagedimensions = function() getpagedimensions = backends.codeinjections.getpagedimensions return getpagedimensions() end -local drivers = drivers -local instances = drivers.instances +local drivers = drivers +local instances = drivers.instances + +local report = logs.reporter("drivers") --------------------------------------------------------------------------------------- @@ -145,12 +147,12 @@ local pushorientation local poporientation local flushcharacter local flushrule -local flushpdfliteral -local flushpdfsetmatrix -local flushpdfsave -local flushpdfrestore +local flushliteral +local flushsetmatrix +local flushsave +local flushrestore local flushspecial ------ flushpdfimage +----- flushimage -- make local @@ -158,15 +160,6 @@ function drivers.getpos () return round(pos_h), round(pos_v) end function drivers.gethpos() return round(pos_h) end function drivers.getvpos() return round(pos_v) end --- local function synch_pos_with_cur(ref_h, ref_v, h, v) --- if pos_r == righttoleft_code then --- pos_h = ref_h - h --- else --- pos_h = ref_h + h --- end --- pos_v = ref_v - v --- end - -- characters local flush_character @@ -261,7 +254,7 @@ local function flush_vf_packet(pos_h,pos_v,pos_r,font,char,data,factor,vfcommand level = level - 1 end elseif command == "pdf" then - flushpdfliteral(false,pos_h,pos_v,packet[2],packet[3]) + flushliteral(false,pos_h,pos_v,packet[2],packet[3]) elseif command == "rule" then local size_v = packet[2] local size_h = packet[3] @@ -308,7 +301,6 @@ local function flush_vf_packet(pos_h,pos_v,pos_r,font,char,data,factor,vfcommand pos_v = saved_v pos_r = saved_r - -- synch_pos_with_cur(ref_h, ref_v, pos_h,pos_v) nesting = nesting - 1 end @@ -436,34 +428,6 @@ end local hlist_out, vlist_out do - -- effective_glue : - -- - -- local cur_g = 0 - -- local cur_glue = 0.0 - -- - -- local width, stretch, shrink, stretch_order, shrink_order = getglue(current) - -- if g_sign == 1 then -- stretching - -- if stretch_order == g_order then - -- -- rule_wd = width - cur_g - -- -- cur_glue = cur_glue + stretch - -- -- cur_g = g_set * cur_glue - -- -- rule_wd = rule_wd + cur_g - -- rule_ht = width + g_set * stretch - -- else - -- rule_wd = width - -- end - -- else - -- if shrink_order == g_order then - -- -- rule_wd = width - cur_g - -- -- cur_glue = cur_glue - shrink - -- -- cur_g = g_set * cur_glue - -- -- rule_wd = rule_wd + cur_g - -- rule_ht = width - g_set * shrink - -- else - -- rule_wd = width - -- end - -- end - local function applyanchor(orientation,x,y,width,height,depth,woffset,hoffset,doffset,xoffset,yoffset) local ot = extract(orientation, 0,4) local ay = extract(orientation, 4,4) @@ -508,8 +472,6 @@ local hlist_out, vlist_out do -- to be checked: begin- or enddir kan nil zijn, weird - rangedimensions = node.direct.naturalwidth or rangedimensions - local function calculate_width_to_enddir(this_box,begindir) -- can be a helper local dir_nest = 1 local enddir = begindir @@ -545,9 +507,6 @@ local hlist_out, vlist_out do local boxwidth, boxheight, boxdepth = getwhd(this_box) - local g_set, - g_order, - g_sign = getboxglue(this_box) local cur_h = 0 local cur_v = 0 @@ -556,12 +515,14 @@ local hlist_out, vlist_out do current = getlist(this_box) end - while current do - local char, id = isglyph(current) - if char then + -- we can encounter localpar, boundary and penalty nodes but a special + -- iterator over content nodes won't save much + + for current, id, subtype in nextnode, current do + if id == glyph_code then + local char, font = isglyph(current) local x_offset, y_offset = getoffsets(current) if x_offset ~= 0 or y_offset ~= 0 then - -- synch_pos_with_cur(ref_h, ref_v, cur_h + x_offset, cur_v - y_offset) if pos_r == righttoleft_code then pos_h = ref_h - (cur_h + x_offset) else @@ -570,99 +531,98 @@ local hlist_out, vlist_out do pos_v = ref_v - (cur_v - y_offset) -- synced end - local wd, ht, dp = flush_character(current,id,char,false,true,pos_h,pos_v,pos_r) + local wd, ht, dp = flush_character(current,font,char,false,true,pos_h,pos_v,pos_r) cur_h = cur_h + wd elseif id == glue_code then - local gluewidth - if g_sign == 0 then - gluewidth = getwidth(current) - else - gluewidth = effectiveglue(current,this_box) - end + local gluewidth = effectiveglue(current,this_box) if gluewidth ~= 0 then - local leader = getleader(current) - if leader then - local width, height, depth = getwhd(leader) - if getid(leader) == rule_code then - if gluewidth > 0 then - if height == running then - height = boxheight - end - if depth == running then - depth = boxdepth + if subtype >= leaders_code then + local leader = getleader(current) + if leader then + local width, height, depth = getwhd(leader) + if getid(leader) == rule_code then + if gluewidth > 0 then + if height == running then + height = boxheight + end + if depth == running then + depth = boxdepth + end + local total = height + depth + if total > 0 then + if pos_r == righttoleft_code then + pos_h = pos_h - gluewidth + end + pos_v = pos_v - depth + flushrule(leader,pos_h,pos_v,pos_r,gluewidth,total,getsubtype(leader)) + end + cur_h = cur_h + gluewidth end - local total = height + depth - if total > 0 then + elseif width > 0 and gluewidth > 0 then + local boxdir = getdirection(leader) or lefttoright_code + gluewidth = gluewidth + 10 + local edge = cur_h + gluewidth + local lx = 0 + -- local subtype = getsubtype(current) + if subtype == gleaders_code then + local save_h = cur_h if pos_r == righttoleft_code then - pos_h = pos_h - gluewidth + cur_h = ref_h - shipbox_h - cur_h + cur_h = width * (cur_h / width) + cur_h = ref_h - shipbox_h - cur_h + else + cur_h = cur_h + ref_h - shipbox_h + cur_h = width * (cur_h / width) + cur_h = cur_h - ref_h - shipbox_h end - pos_v = pos_v - depth - flushrule(leader,pos_h,pos_v,pos_r,gluewidth,total) - end - cur_h = cur_h + gluewidth - end - elseif width > 0 and gluewidth > 0 then - local boxdir = getdirection(leader) or lefttoright_code - gluewidth = gluewidth + 10 - local edge = cur_h + gluewidth - local lx = 0 - local subtype = getsubtype(current) - if subtype == gleader_code then - local save_h = cur_h - if pos_r == righttoleft_code then - cur_h = ref_h - shipbox_h - cur_h + if cur_h < save_h then + cur_h = cur_h + width + end + elseif subtype == leaders_code then + local save_h = cur_h cur_h = width * (cur_h / width) - cur_h = ref_h - shipbox_h - cur_h + if cur_h < save_h then + cur_h = cur_h + width + end else - cur_h = cur_h + ref_h - shipbox_h - cur_h = width * (cur_h / width) - cur_h = cur_h - ref_h - shipbox_h - end - if cur_h < save_h then - cur_h = cur_h + width + lq = gluewidth / width + lr = gluewidth % width + if subtype == cleaders_code then + cur_h = cur_h + lr / 2 + else + lx = lr / (lq + 1) + cur_h = cur_h + (lr - (lq - 1) * lx) / 2 + end end - elseif subtype == leader_code then -- aleader ? - local save_h = cur_h - cur_h = width * (cur_h / width) - if cur_h < save_h then - cur_h = cur_h + width + local shift = getshift(leader) + while cur_h + width <= edge do + local basepoint_h = 0 + -- local basepoint_v = shift + if boxdir ~= pos_r then + basepoint_h = boxwidth + end + -- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h,shift) + if pos_r == righttoleft_code then + pos_h = ref_h - (cur_h + basepoint_h) + else + pos_h = ref_h + (cur_h + basepoint_h) + end + pos_v = ref_v - shift + -- synced + outer_doing_leaders = doing_leaders + doing_leaders = true + if getid(leader) == vlist_code then + vlist_out(leader) + else + hlist_out(leader) + end + doing_leaders = outer_doing_leaders + cur_h = cur_h + width + lx end + cur_h = edge - 10 else - lq = gluewidth / width - lr = gluewidth % width - if subtype == cleader_code then - cur_h = cur_h + lr / 2 - else - lx = lr / (lq + 1) - cur_h = cur_h + (lr - (lq - 1) * lx) / 2 - end - end - local shift = getshift(leader) - while cur_h + width <= edge do - local basepoint_h = 0 - -- local basepoint_v = shift - if boxdir ~= pos_r then - basepoint_h = boxwidth - end - -- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h,shift) - if pos_r == righttoleft_code then - pos_h = ref_h - (cur_h + basepoint_h) - else - pos_h = ref_h + (cur_h + basepoint_h) - end - pos_v = ref_v - shift - -- synced - outer_doing_leaders = doing_leaders - doing_leaders = true - if getid(leader) == vlist_code then - vlist_out(leader) - else - hlist_out(leader) - end - doing_leaders = outer_doing_leaders - cur_h = cur_h + width + lx + cur_h = cur_h + gluewidth end - cur_h = edge - 10 else cur_h = cur_h + gluewidth end @@ -671,21 +631,14 @@ local hlist_out, vlist_out do end end elseif id == hlist_code or id == vlist_code then - -- w h d dir l, s, o = getall(current) local boxdir = getdirection(current) or lefttoright_code local width, height, depth = getwhd(current) local list = getlist(current) if list then local shift, orientation = getshift(current) if not orientation then - -- - -- local width, height, depth, list, boxdir, shift, orientation = getall(current) - -- if list then - -- if not orientation then - -- local basepoint_h = boxdir ~= pos_r and width or 0 -- local basepoint_v = shift - -- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h,shift) if pos_r == righttoleft_code then pos_h = ref_h - (cur_h + basepoint_h) else @@ -702,7 +655,6 @@ local hlist_out, vlist_out do local orientation, xoffset, yoffset = getorientation(current) local basepoint_h = boxdir ~= pos_r and width or 0 -- local basepoint_v = shift - -- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h + xoffset,shift - yoffset) if pos_r == righttoleft_code then pos_h = ref_h - (cur_h + basepoint_h + xoffset) else @@ -733,7 +685,6 @@ local hlist_out, vlist_out do basepoint_v = basepoint_v - height end end - -- synch_pos_with_cur(ref_h,ref_v,cur_h+basepoint_h,cur_v + basepoint_v) if pos_r == righttoleft_code then pos_h = ref_h - (cur_h + basepoint_h) else @@ -752,12 +703,12 @@ local hlist_out, vlist_out do end cur_h = cur_h + width elseif id == disc_code then - local replace = getfield(current,"replace") - if replace and getsubtype(current) ~= select_disc then + local replace, tail = getreplace(current) + if replace and subtype ~= select_disc then -- we could flatten .. no gain - setlink(findtail(replace),getnext(current)) + setlink(tail,getnext(current)) setlink(current,replace) - setfield(current,"replace") + setreplace(current) end elseif id == kern_code then local kern, factor = getkern(current,true) @@ -769,7 +720,6 @@ local hlist_out, vlist_out do end end elseif id == rule_code then - -- w h d x y = getall(current) local width, height, depth = getwhd(current) if width > 0 then if height == running then @@ -794,19 +744,17 @@ local hlist_out, vlist_out do xoffset = - xoffset end pos_v = pos_v - depth - flushrule(current,pos_h + xoffset,pos_v + yoffset,pos_r,width,total) + flushrule(current,pos_h + xoffset,pos_v + yoffset,pos_r,width,total,subtype) end cur_h = cur_h + width end elseif id == math_code then - local kern = getkern(current) - if kern ~= 0 then - cur_h = cur_h + kern - elseif g_sign == 0 then - cur_h = cur_h + getwidth(current) - else - cur_h = cur_h + effectiveglue(current,this_box) - end + -- local kern = getkern(current) + -- if kern ~= 0 then + -- cur_h = cur_h + kern + -- else + cur_h = cur_h + effectiveglue(current,this_box) + -- end elseif id == dir_code then -- we normally have proper begin-end pairs -- a begin without end is (silently) handled @@ -834,7 +782,6 @@ local hlist_out, vlist_out do ds.ref_v = ref_v setdirection(enddir,pos_r) end - -- synch_pos_with_cur(ref_h,ref_v,cur_h,cur_v) if pos_r == righttoleft_code then pos_h = ref_h - cur_h else @@ -849,20 +796,19 @@ local hlist_out, vlist_out do pos_r = dir end elseif id == whatsit_code then - local subtype = getsubtype(current) if subtype == literalwhatsit_code then - flushpdfliteral(current,pos_h,pos_v) + flushliteral(current,pos_h,pos_v) elseif subtype == lateluawhatsit_code then flushlatelua(current,pos_h,pos_v,cur_h,cur_v) elseif subtype == setmatrixwhatsit_code then - flushpdfsetmatrix(current,pos_h,pos_v) + flushsetmatrix(current,pos_h,pos_v) elseif subtype == savewhatsit_code then - flushpdfsave(current,pos_h,pos_v) + flushsave(current,pos_h,pos_v) elseif subtype == restorewhatsit_code then - flushpdfrestore(current,pos_h,pos_v) + flushrestore(current,pos_h,pos_v) elseif subtype == saveposwhatsit_code then - last_position_x = pos_h -- or pdf_h - last_position_y = pos_v -- or pdf_v + last_position_x = pos_h + last_position_y = pos_v elseif subtype == writewhatsit_code then flushwriteout(current) elseif subtype == closewhatsit_code then @@ -873,8 +819,6 @@ local hlist_out, vlist_out do elseif id == marginkern_code then cur_h = cur_h + getkern(current) end - current = getnext(current) - -- synch_pos_with_cur(ref_h, ref_v, cur_h, cur_v) -- already done in list so skip if pos_r == righttoleft_code then pos_h = ref_h - cur_h else @@ -899,16 +843,12 @@ local hlist_out, vlist_out do local boxwidth, boxheight, boxdepth = getwhd(this_box) - local g_set, - g_order, - g_sign = getboxglue(this_box) local cur_h = 0 local cur_v = - boxheight local top_edge = cur_v - -- synch_pos_with_cur(ref_h, ref_v, cur_h, cur_v) if pos_r == righttoleft_code then pos_h = ref_h - cur_h else @@ -925,104 +865,96 @@ local hlist_out, vlist_out do -- local id = getid(current) for current, id, subtype in nextnode, current do if id == glue_code then - local glueheight - if g_sign == 0 then - glueheight = getwidth(current) - else - glueheight = effectiveglue(current,this_box) - end - local leader = getleader(current) - if leader then - local width, height, depth = getwhd(leader) - local total = height + depth - if getid(leader) == rule_code then - depth = 0 -- hm - if total > 0 then - if width == running then - width = boxwidth - end - if width > 0 then - if pos_r == righttoleft_code then - cur_h = cur_h - width - end - flushrule(leader,pos_h,pos_v - total,pos_r,width,total) - end - cur_v = cur_v + total - end - else - if total > 0 and glueheight > 0 then - glueheight = glueheight + 10 - local edge = cur_v + glueheight - local ly = 0 - if subtype == gleader_code then - save_v = cur_v - cur_v = ref_v - shipbox_v - cur_v - cur_v = total * (cur_v / total) - cur_v = ref_v - shipbox_v - cur_v - if cur_v < save_v then - cur_v = cur_v + total - end - elseif subtype == leader_code then -- aleader - save_v = cur_v - cur_v = top_edge + total * ((cur_v - top_edge) / total) - if cur_v < save_v then + local glueheight = effectiveglue(current,this_box) + if glueheight ~= 0 then + if subtype >= leaders_code then + local leader = getleader(current) + if leader then + local width, height, depth = getwhd(leader) + local total = height + depth + if getid(leader) == rule_code then + depth = 0 -- hm + if total > 0 then + if width == running then + width = boxwidth + end + if width > 0 then + if pos_r == righttoleft_code then + cur_h = cur_h - width + end + flushrule(leader,pos_h,pos_v - total,pos_r,width,total,getsubtype(leader)) + end cur_v = cur_v + total end - else - lq = glueheight / total - lr = glueheight % total - if subtype == cleaders_code then - cur_v = cur_v + lr / 2 - else - ly = lr / (lq + 1) - cur_v = cur_v + (lr - (lq - 1) * ly) / 2 - end - end - local shift = getshift(leader) - while cur_v + total <= edge do -- todo: <= edge - total - -- synch_pos_with_cur(ref_h, ref_v, getshift(leader), cur_v + height) - if pos_r == righttoleft_code then - pos_h = ref_h - shift + elseif total > 0 and glueheight > 0 then + glueheight = glueheight + 10 + local edge = cur_v + glueheight + local ly = 0 + if subtype == gleaders_code then + save_v = cur_v + cur_v = ref_v - shipbox_v - cur_v + cur_v = total * (cur_v / total) + cur_v = ref_v - shipbox_v - cur_v + if cur_v < save_v then + cur_v = cur_v + total + end + elseif subtype == leaders_code then -- aleader + save_v = cur_v + cur_v = top_edge + total * ((cur_v - top_edge) / total) + if cur_v < save_v then + cur_v = cur_v + total + end else - pos_h = ref_h + shift + lq = glueheight / total + lr = glueheight % total + if subtype == cleaders_code then + cur_v = cur_v + lr / 2 + else + ly = lr / (lq + 1) + cur_v = cur_v + (lr - (lq - 1) * ly) / 2 + end end - pos_v = ref_v - (cur_v + height) - -- synced - outer_doing_leaders = doing_leaders - doing_leaders = true - if getid(leader) == vlist_code then - vlist_out(leader) - else - hlist_out(leader) + local shift = getshift(leader) + while cur_v + total <= edge do -- todo: <= edge - total + -- synch_pos_with_cur(ref_h, ref_v, getshift(leader), cur_v + height) + if pos_r == righttoleft_code then + pos_h = ref_h - shift + else + pos_h = ref_h + shift + end + pos_v = ref_v - (cur_v + height) + -- synced + outer_doing_leaders = doing_leaders + doing_leaders = true + if getid(leader) == vlist_code then + vlist_out(leader) + else + hlist_out(leader) + end + doing_leaders = outer_doing_leaders + cur_v = cur_v + total + ly end - doing_leaders = outer_doing_leaders - cur_v = cur_v + total + ly + cur_v = edge - 10 + else + cur_v = cur_v + glueheight end - cur_v = edge - 10 - else - cur_v = cur_v + glueheight end + else + cur_v = cur_v + glueheight end - else - cur_v = cur_v + glueheight end elseif id == hlist_code or id == vlist_code then - -- w h d dir l, s, o = getall(current) local boxdir = getdirection(current) or lefttoright_code local width, height, depth = getwhd(current) local list = getlist(current) if list then local shift, orientation = getshift(current) if not orientation then --- local width, height, depth, list, boxdir, shift, orientation = getall(current) --- if list then --- if not orientation then -- local basepoint_h = shift -- local basepoint_v = height if boxdir ~= pos_r then shift = shift + width end - -- synch_pos_with_cur(ref_h,ref_v,shift,cur_v + height) if pos_r == righttoleft_code then pos_h = ref_h - shift else @@ -1042,7 +974,6 @@ local hlist_out, vlist_out do if boxdir ~= pos_r then shift = shift + width end - -- synch_pos_with_cur(ref_h,ref_v,shift + xoffset,cur_v + height - yoffset) if pos_r == righttoleft_code then pos_h = ref_h - (shift + xoffset) else @@ -1067,7 +998,6 @@ local hlist_out, vlist_out do elseif orientation == 3 then -- weird basepoint_h = basepoint_h + height end - -- synch_pos_with_cur(ref_h,ref_v,basepoint_h,cur_v + basepoint_v) if pos_r == righttoleft_code then pos_h = ref_h - basepoint_h else @@ -1088,7 +1018,6 @@ local hlist_out, vlist_out do elseif id == kern_code then cur_v = cur_v + getkern(current) elseif id == rule_code then - -- w h d x y = getall(current) local width, height, depth = getwhd(current) local total = height + depth if total > 0 then @@ -1108,24 +1037,24 @@ local hlist_out, vlist_out do cur_h = cur_h - width xoffset = - xoffset end - flushrule(current,pos_h + xoffset,pos_v - total - yoffset,pos_r,width,total) + flushrule(current,pos_h + xoffset,pos_v - total - yoffset,pos_r,width,total,subtype) end cur_v = cur_v + total end elseif id == whatsit_code then if subtype == literalwhatsit_code then - flushpdfliteral(current,pos_h,pos_v) + flushliteral(current,pos_h,pos_v) elseif subtype == lateluawhatsit_code then flushlatelua(current,pos_h,pos_v,cur_h,cur_v) elseif subtype == setmatrixwhatsit_code then - flushpdfsetmatrix(current,pos_h,pos_v) + flushsetmatrix(current,pos_h,pos_v) elseif subtype == savewhatsit_code then - flushpdfsave(current,pos_h,pos_v) + flushsave(current,pos_h,pos_v) elseif subtype == restorewhatsit_code then - flushpdfrestore(current,pos_h,pos_v) + flushrestore(current,pos_h,pos_v) elseif subtype == saveposwhatsit_code then - last_position_x = pos_h -- or pdf_h - last_position_y = pos_v -- or pdf_v + last_position_x = pos_h + last_position_y = pos_v elseif subtype == writewhatsit_code then flushwriteout(current) elseif subtype == closewhatsit_code then @@ -1134,7 +1063,6 @@ local hlist_out, vlist_out do flushopenout(current) end end - -- synch_pos_with_cur(ref_h, ref_v, cur_h, cur_v) if pos_r == righttoleft_code then pos_h = ref_h - cur_h else @@ -1150,19 +1078,17 @@ local hlist_out, vlist_out do end -function lpdf.convert(box,smode,objnum,specification) -- temp name +function drivers.converters.lmtx(driver,box,smode,objnum,specification) - if box then - box = tonut(box) - else - report("error in converter, no box") + if not driver then + report("error in converter, no driver") return end - local driver = instances.pdf - if driver then - -- tracing + if box then + box = tonut(box) else + report("error in converter, no box") return end @@ -1171,7 +1097,8 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name initialize = actions.initialize finalize = actions.finalize - updatefontstate = actions.updatefontstate + + updatefontstate = flushers.updatefontstate pushorientation = flushers.pushorientation poporientation = flushers.poporientation @@ -1180,17 +1107,19 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name flushrule = flushers.rule flushsimplerule = flushers.simplerule flushspecial = flushers.special - flushpdfliteral = flushers.pdfliteral - flushpdfsetmatrix = flushers.pdfsetmatrix - flushpdfsave = flushers.pdfsave - flushpdfrestore = flushers.pdfrestore - -- flushpdfimage = flushers.pdfimage + flushliteral = flushers.literal + flushsetmatrix = flushers.setmatrix + flushsave = flushers.save + flushrestore = flushers.restore + -- flushimage = flushers.image reset_dir_stack() reset_state() shippingmode = smode + local details = nil -- must be outside labels + local width, height, depth = getwhd(box) local total = height + depth @@ -1222,7 +1151,9 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name -- We have zero offsets in ConTeXt. local pagewidth, pageheight = getpagedimensions() - -- local h_offset_par, v_offset_par = texget("hoffset"), texget("voffset") + + -- local h_offset_par = texget("hoffset") + -- local v_offset_par = texget("voffset") -- page_h_origin = trueinch -- page_v_origin = trueinch @@ -1252,12 +1183,7 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name local refpoint_h = 0 -- + page_h_origin + h_offset_par local refpoint_v = page_size_v -- - page_v_origin - v_offset_par - -- synch_pos_with_cur(refpoint_h,refpoint_v,0,height) - if pos_r == righttoleft_code then - pos_h = refpoint_h - else - pos_h = refpoint_h - end + pos_h = refpoint_h pos_v = refpoint_v - height -- synced @@ -1276,12 +1202,16 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name shipbox_ref_h = pos_h shipbox_ref_v = pos_v - initialize { - shippingmode = smode, -- target - boundingbox = { 0, 0, page_size_h, page_size_v }, - objectnumber = objnum, + details = { + shippingmode = smode, -- target + boundingbox = { 0, 0, page_size_h, page_size_v }, + objectnumber = smode ~= "page" and objnum or nil, + pagenumber = smode == "page" and objnum or nil, + specification = specification, } + initialize(driver,details) + lastfont = nil -- this forces a sync each page / object if getid(box) == vlist_code then @@ -1292,7 +1222,8 @@ function lpdf.convert(box,smode,objnum,specification) -- temp name ::DONE:: - finalize(objnum,specification) + finalize(driver,details) + shippingmode = "none" end diff --git a/tex/context/base/mkiv/grph-inc.mkiv b/tex/context/base/mkiv/grph-inc.mkiv index abf9d709a..83681580e 100644 --- a/tex/context/base/mkiv/grph-inc.mkiv +++ b/tex/context/base/mkiv/grph-inc.mkiv @@ -982,6 +982,10 @@ \unexpanded\def\inlinefigure[#1]{\dontleavehmode\sbox{\externalfigure[#1][\v!inline]}} +%D Needs to be done global: + +\definelayer[epdfcontent] + \protect \endinput %D Moved here because this already old code is nowhere documents (so I need to check diff --git a/tex/context/base/mkiv/lpdf-eng.lua b/tex/context/base/mkiv/lpdf-eng.lua index 6f2e75c46..42435fad5 100644 --- a/tex/context/base/mkiv/lpdf-eng.lua +++ b/tex/context/base/mkiv/lpdf-eng.lua @@ -63,7 +63,7 @@ img = table.setmetatableindex ( do - local function prepare() + local function prepare(driver) if not environment.initex then -- install new functions in pdf namespace updaters.apply("backend.update.pdf") @@ -77,29 +77,23 @@ do end end - local function outputfilename() + local function outputfilename(driver) if not filename then filename = addsuffix(tex.jobname,"pdf") end return filename end - function lpdf.flushers() - return { } - end - - function lpdf.actions() - return { - convert = tex.shipout, - outputfilename = outputfilename, - prepare = prepare, - } - end - drivers.install { name = "pdf", - flushers = lpdf.flushers(), - actions = lpdf.actions(), + flushers = { + -- nothing here + }, + actions = { + convert = drivers.converters.engine, + outputfilename = outputfilename, + prepare = prepare, + }, } end diff --git a/tex/context/base/mkiv/lpdf-epa.lua b/tex/context/base/mkiv/lpdf-epa.lua index 7ec331554..45000aebc 100644 --- a/tex/context/base/mkiv/lpdf-epa.lua +++ b/tex/context/base/mkiv/lpdf-epa.lua @@ -72,7 +72,7 @@ local maxdimen = 0x3FFFFFFF -- 2^30-1 local bpfactor = number.dimenfactors.bp -local layerspec = { -- predefining saves time +local layerspec = { "epdfcontent" } @@ -143,11 +143,18 @@ end local layerused = false +-- local function initializelayer(height,width) +-- if not layerused then +-- context.definelayer(layerspec, { height = height .. "bp", width = width .. "bp" }) +-- layerused = true +-- end +-- end + local function initializelayer(height,width) - if not layerused then - context.definelayer(layerspec, { height = height .. "bp", width = width .. "bp" }) +-- if not layerused then + context.setuplayer(layerspec, { height = height .. "bp", width = width .. "bp" }) layerused = true - end +-- end end function codeinjections.flushmergelayer() diff --git a/tex/context/base/mkiv/lpdf-lmt.lua b/tex/context/base/mkiv/lpdf-lmt.lua index 25a73fe67..8fdbf9a36 100644 --- a/tex/context/base/mkiv/lpdf-lmt.lua +++ b/tex/context/base/mkiv/lpdf-lmt.lua @@ -8,6 +8,15 @@ if not modules then modules = { } end modules ['lpdf-lmt'] = { -- The code below was originally in back-lpd.lua but it makes more sense in -- this namespace. I will rename variables. +-- +-- There is no way that a lua based backend can compete with the original one +-- for relative simple text runs. And we're talking seconds here on say 500 +-- pages with paragraphs alternativng between three fonts and colors. But such +-- documents are rare so in practice we are quite okay, especially because in +-- ConTeXt we can gain quite a bit elsewhere. So, when we loose 30% on such +-- simple documents, we break even on for instance the manual, and gain 30% on +-- Thomas's turture test (also for other reasons). But .. who knows what magic +-- I can cook up in due time. if CONTEXTLMTXMODE == 0 then return @@ -33,7 +42,7 @@ local band, extract = bit32.band, bit32.extract local concat, sortedhash = table.concat, table.sortedhash local setmetatableindex = table.setmetatableindex -local bpfactor = number.dimenfactors.bp +local <const> bpfactor = number.dimenfactors.bp local md5HEX = md5.HEX local osuuid = os.uuid @@ -244,29 +253,20 @@ local function calc_pdfpos(h,v) if mode == "page" then cmtx = h - pdf_h cmty = v - pdf_v - if h ~= pdf_h or v ~= pdf_v then - return true - end + return h ~= pdf_h or v ~= pdf_v elseif mode == "text" then tmtx = h - saved_text_pos_h tmty = v - saved_text_pos_v - if h ~= pdf_h or v ~= pdf_v then - return true - end + return h ~= pdf_h or v ~= pdf_v elseif horizontalmode then tmty = v - saved_text_pos_v tj_delta = cw - h -- + saved_chararray_pos_h - if tj_delta ~= 0 or v ~= pdf_v then - return true - end + return tj_delta ~= 0 or v ~= pdf_v else tmtx = h - saved_text_pos_h tj_delta = cw + v -- - saved_chararray_pos_v - if tj_delta ~= 0 or h ~= pdf_h then - return true - end + return tj_delta ~= 0 or h ~= pdf_h end - return false end local function pdf_set_pos(h,v) @@ -316,12 +316,14 @@ local function pdf_set_pos_temp(h,v) end end +-- these dummy returns makes using them a bit faster + local function pdf_end_string_nl() if mode == "char" then end_charmode() - end_chararray() + return end_chararray() elseif mode == "chararray" then - end_chararray() + return end_chararray() end end @@ -329,13 +331,13 @@ local function pdf_goto_textmode() if mode == "page" then -- pdf_set_pos(0,0) pdf_reset_pos() - begin_text() + return begin_text() elseif mode ~= "text" then if mode == "char" then end_charmode() - end_chararray() + return end_chararray() else -- if mode == "chararray" then - end_chararray() + return end_chararray() end end end @@ -345,12 +347,12 @@ local function pdf_goto_pagemode() if mode == "char" then end_charmode() end_chararray() - end_text() + return end_text() elseif mode == "chararray" then end_chararray() - end_text() + return end_text() elseif mode == "text" then - end_text() + return end_text() end end end @@ -411,6 +413,49 @@ local flushcharacter do end end + -- This only saves a little on hz because there we switch a lot of + -- instances. + + -- local lastslant, lastextend, lastsqueeze, lastformat, lastsize, lastwidth, lastmode, lastused, lastfont + -- + -- local function setup_fontparameters(font,factor,f,e) + -- if font ~= lastfont then + -- lastslant = (fontparameters.slantfactor or 0) / 1000 + -- lastextend = (fontparameters.extendfactor or 1000) / 1000 + -- lastsqueeze = (fontparameters.squeezefactor or 1000) / 1000 + -- lastformat = fontproperties.format + -- lastsize = fontparameters.size * bpfactor + -- if format == "opentype" or format == "type1" then + -- lastsize = lastsize * 1000 / fontparameters.units -- can we avoid this ? + -- end + -- lastwidth = fontparameters.width + -- lastmode = fontparameters.mode + -- lastused = usedfonts[font] -- cache + -- lastfont = font + -- end + -- local expand = 1 + factor / 1000000 + -- if e then + -- tmrx = expand * lastextend * e + -- else + -- tmrx = expand * lastextend + -- end + -- tmsy = lastslant + -- tmry = lastsqueeze + -- need_width = lastwidth + -- need_mode = lastmode + -- f_cur = lastfont + -- f_pdf = lastused + -- cur_factor = factor + -- cur_f = f + -- cur_e = e + -- tj_delta = 0 + -- if f then + -- fs = lastsize * f + -- else + -- fs = lastsize + -- end + -- end + local f_width = formatters["%.6F w"] local f_mode = formatters["%i Tr"] local f_font = formatters["/F%i %.6F Tf"] @@ -455,15 +500,23 @@ local flushcharacter do cur_tmrx = tmrx end - local f_skip = formatters["%.1f"] + -- local f_skip = formatters["%.1f"] -- local f_octal = formatters["\\%o"] -- local f_char = formatters["%c"] local f_hex = formatters["%04X"] local h_hex = setmetatableindex(function(t,k) -- we already have this somewhere - local v = f_hex(k) - t[k] = v - return v + if k < 256 then + -- not sparse in this range + for i=0,255 do + t[i] = f_hex(i) + end + return t[k] + else + local v = f_hex(k) + t[k] = v + return v + end end) flushcharacter = function(current,pos_h,pos_v,pos_r,font,char,data,naturalwidth,factor,width,f,e) @@ -535,7 +588,9 @@ local flushcharacter do cw = cw + naturalwidth +if not pdfcharacters[index] then pdfcharacters[index] = true +end end @@ -543,20 +598,19 @@ end -- literals -local flushpdfliteral do +local flushliteral do - local literalvalues = nodes.literalvalues + local <const> nodeproperties = nodes.properties.data + local <const> literalvalues = nodes.literalvalues - local originliteral_code = literalvalues.origin - local pageliteral_code = literalvalues.page - local alwaysliteral_code = literalvalues.always - local rawliteral_code = literalvalues.raw - local textliteral_code = literalvalues.text - local fontliteral_code = literalvalues.font + local <const> originliteral_code = literalvalues.origin + local <const> pageliteral_code = literalvalues.page + local <const> alwaysliteral_code = literalvalues.always + local <const> rawliteral_code = literalvalues.raw + local <const> textliteral_code = literalvalues.text + local <const> fontliteral_code = literalvalues.font - local nodeproperties = nodes.properties.data - - flushpdfliteral = function(current,pos_h,pos_v,mode,str) + flushliteral = function(current,pos_h,pos_v,mode,str) if mode then if not str then mode, str = originliteral_code, mode @@ -650,7 +704,7 @@ end -- grouping & orientation -local flushpdfsave, flushpdfrestore, flushpdfsetmatrix do +local flushsave, flushrestore, flushsetmatrix do local matrices = { } local positions = { } @@ -659,7 +713,7 @@ local flushpdfsave, flushpdfrestore, flushpdfsetmatrix do local f_matrix = formatters["%s 0 0 cm"] - flushpdfsave = function(current,pos_h,pos_v) + flushsave = function(current,pos_h,pos_v) nofpositions = nofpositions + 1 positions[nofpositions] = { pos_h, pos_v, nofmatrices } pdf_goto_pagemode() @@ -667,7 +721,7 @@ local flushpdfsave, flushpdfrestore, flushpdfsetmatrix do b = b + 1 ; buffer[b] = "q" end - flushpdfrestore = function(current,pos_h,pos_v) + flushrestore = function(current,pos_h,pos_v) if nofpositions < 1 then return end @@ -705,7 +759,7 @@ local flushpdfsave, flushpdfrestore, flushpdfsetmatrix do local nodeproperties = nodes.properties.data - flushpdfsetmatrix = function(current,pos_h,pos_v) + flushsetmatrix = function(current,pos_h,pos_v) local str if type(current) == "string" then str = current @@ -766,44 +820,45 @@ local flushpdfsave, flushpdfrestore, flushpdfsetmatrix do end -- pushorientation = function(orientation,pos_h,pos_v,pos_r) --- flushpdfsave(false,pos_h,pos_v) +-- flushsave(false,pos_h,pos_v) -- if orientation == 1 then --- flushpdfsetmatrix("0 -1 1 0",pos_h,pos_v) +-- flushsetmatrix("0 -1 1 0",pos_h,pos_v) -- elseif orientation == 2 then --- flushpdfsetmatrix("-1 0 0 -1",pos_h,pos_v) +-- flushsetmatrix("-1 0 0 -1",pos_h,pos_v) -- elseif orientation == 3 then --- flushpdfsetmatrix("0 1 -1 0",pos_h,pos_v) +-- flushsetmatrix("0 1 -1 0",pos_h,pos_v) -- end -- end -- poporientation = function(orientation,pos_h,pos_v,pos_r) --- flushpdfrestore(false,pos_h,pos_v) +-- flushrestore(false,pos_h,pos_v) -- end end -- rules -local flushedxforms = { } -- actually box resources but can also be direct +local flushedxforms = { } -- actually box resources but can also be direct +local localconverter = nil -- will be set -local flushrule, flushsimplerule, flushpdfimage do +local flushrule, flushsimplerule, flushimage do - local rulecodes = nodes.rulecodes - local newrule = nodes.pool.rule + local rulecodes = nodes.rulecodes + local newrule = nodes.pool.rule - local setprop = nuts.setprop - local getprop = nuts.getprop + local setprop = nuts.setprop + local getprop = nuts.getprop - local normalrule_code = rulecodes.normal - local boxrule_code = rulecodes.box - local imagerule_code = rulecodes.image - local emptyrule_code = rulecodes.empty - local userrule_code = rulecodes.user - local overrule_code = rulecodes.over - local underrule_code = rulecodes.under - local fractionrule_code = rulecodes.fraction - local radicalrule_code = rulecodes.radical - local outlinerule_code = rulecodes.outline + local <const> normalrule_code = rulecodes.normal + local <const> boxrule_code = rulecodes.box + local <const> imagerule_code = rulecodes.image + local <const> emptyrule_code = rulecodes.empty + local <const> userrule_code = rulecodes.user + local <const> overrule_code = rulecodes.over + local <const> underrule_code = rulecodes.under + local <const> fractionrule_code = rulecodes.fraction + local <const> radicalrule_code = rulecodes.radical + local <const> outlinerule_code = rulecodes.outline local rule_callback = callbacks.functions.process_rule @@ -869,7 +924,7 @@ local flushrule, flushsimplerule, flushpdfimage do } boxresources[objnum] = l if immediate then - lpdf.convert(list,"xform",objnum,l) + localconverter(list,"xform",objnum,l) flushedxforms[objnum] = { true , objnum } flushlist(list) else @@ -959,13 +1014,13 @@ local flushrule, flushsimplerule, flushpdfimage do -- place image also used in vf but we can use a different one if -- we need it - local imagetypes = images.types -- pdf png jpg jp2 jbig2 stream memstream - local img_none = imagetypes.none - local img_pdf = imagetypes.pdf - local img_stream = imagetypes.stream - local img_memstream = imagetypes.memstream + local imagetypes = images.types -- pdf png jpg jp2 jbig2 stream memstream + local img_none = imagetypes.none + local img_pdf = imagetypes.pdf + local img_stream = imagetypes.stream + local img_memstream = imagetypes.memstream - local one_bp = 65536 * bpfactor + local <const> one_bp = 65536 * bpfactor local imageresources, n = { }, 0 @@ -1085,7 +1140,7 @@ local flushrule, flushsimplerule, flushpdfimage do b = b + 1 ; buffer[b] = s_e end - flushpdfimage = function(index,width,height,depth,pos_h,pos_v) + flushimage = function(index,width,height,depth,pos_h,pos_v) -- used in vf characters @@ -1122,9 +1177,8 @@ local flushrule, flushsimplerule, flushpdfimage do -- For the moment we need this hack because the engine checks the 'image' -- command in virtual fonts (so we use lua instead). - flushrule = function(current,pos_h,pos_v,pos_r,size_h,size_v) + flushrule = function(current,pos_h,pos_v,pos_r,size_h,size_v,subtype) - local subtype = getsubtype(current) if subtype == emptyrule_code then return elseif subtype == boxrule_code then @@ -1222,7 +1276,7 @@ local wrapup, registerpage do } end - wrapup = function() + wrapup = function(driver) -- hook (to reshuffle pages) local pagetree = { } @@ -1300,8 +1354,8 @@ end pdf_h, pdf_v = 0, 0 -local function initialize(specification) - reset_variables(specification) +local function initialize(driver,details) + reset_variables(details) reset_buffer() end @@ -1316,12 +1370,15 @@ local f_image = formatters["Im%d"] local pushmode, popmode -local function finalize(objnum,specification) +local function finalize(driver,details) pushmode() pdf_goto_pagemode() -- for now + local objnum = details.objnum + local specification = details.specification + local content = concat(buffer,"\n",1,b) local fonts = nil @@ -1391,7 +1448,9 @@ local function finalize(objnum,specification) local margin = specification.margin or 0 local attributes = specification.attributes or "" local resources = specification.resources or "" + local wrapper = nil + if xformtype == 0 then wrapper = pdfdictionary { Type = pdf_xobject, @@ -1451,7 +1510,7 @@ local function finalize(objnum,specification) local objnum = f[2] -- specification.objnum local specification = boxresources[objnum] local list = specification.list - lpdf.convert(list,"xform",f[2],specification) + localconverter(list,"xform",f[2],specification) end end @@ -1487,7 +1546,7 @@ local streams = { } -- maybe just parallel to objects (no holes) local nofobjects = 0 local offset = 0 local f = false -local flush = false +----- flush = false local threshold = 40 -- also #("/Filter /FlateDecode") local objectstream = true local compress = true @@ -1563,13 +1622,14 @@ end local addtocache, flushcache, cache do - local data, d = { }, 0 - local list, l = { }, 0 - local coffset = 0 - local maxsize = 32 * 1024 -- uncompressed - local maxcount = 0xFF + local data, d = { }, 0 + local list, l = { }, 0 + local coffset = 0 local indices = { } + local <const> maxsize = 32 * 1024 -- uncompressed + local <const> maxcount = 0xFF + addtocache = function(n,str) local size = #str if size == 0 then @@ -1621,9 +1681,9 @@ local addtocache, flushcache, cache do else b = f_stream_b_d_u(cache,strobj(),#data) end - flush(f,b) - flush(f,data) - flush(f,e) + f:write(b) + f:write(data) + f:write(e) offset = offset + #b + #data + #e data, d = { }, 0 list, l = { }, 0 @@ -1663,7 +1723,7 @@ local function flushnormalobj(data,n) if level == 0 then objects[n] = offset offset = offset + #data - flush(f,data) + f:write(data) else if not lastdeferred then lastdeferred = n @@ -1706,9 +1766,9 @@ local function flushstreamobj(data,n,dict,comp,nolength) else b = dict and f_stream_b_d_u(n,dict,size) or f_stream_b_n_u(n,size) end - flush(f,b) - flush(f,data) - flush(f,e) + f:write(b) + f:write(data) + f:write(e) objects[n] = offset offset = offset + #b + #data + #e else @@ -1746,7 +1806,7 @@ local function flushdeferred() if type(o) == "string" then objects[n] = offset offset = offset + #o - flush(f,o) + f:write(o) end end lastdeferred = false @@ -1865,6 +1925,14 @@ updaters.register("backend.update.pdf",function() pdf.immediateobj = obj end) +-- Bah, in lua 5.4 we cannot longer use flush = getmetatable(f).write as efficient +-- flusher due to some change in the metatable definitions (more indirectness) ... +-- so maybe we should introduce our own helper for this as now we get a lookup for +-- each write (and writing isn't already the fastest). A little Lua charm gone as +-- now the memory variant also needs to use this 'object' model. (Ok, the <const> +-- is a new charm but for that to work in our advance I need to patch quite some +-- files.) + local openfile, closefile do local f_used = formatters["%010i 00000 n \010"] @@ -1878,34 +1946,45 @@ local openfile, closefile do local inmemory = false -- local inmemory = environment.arguments.inmemory - local close = nil + -- local close = nil openfile = function(filename) if inmemory then - f = { } + -- local n = 0 + -- f = { } + -- flush = function(f,s) + -- n = n + 1 f[n] = s + -- end + -- close = function(f) + -- f = concat(f) + -- io.savedata(filename,f) + -- f = false + -- end local n = 0 - flush = function(f,s) - n = n + 1 f[n] = s - end - close = function(f) - f = concat(f) - io.savedata(filename,f) - f = false - end - else + f = { + write = function(self,s) + n = n + 1 f[n] = s + end, + close = function(self) + f = concat(f) + io.savedata(filename,f) + f = false + end, + } + else f = io.open(filename,"wb") if not f then -- message os.exit() end - flush = getmetatable(f).write - close = getmetatable(f).close + -- flush = getmetatable(f).write + -- close = getmetatable(f).close end local v = f_pdf(majorversion,minorversion) -- local b = "%\xCC\xD5\xC1\xD4\xC5\xD8\xD0\xC4\xC6\010" -- LUATEXPDF (+128) local b = "%\xC3\xCF\xCE\xD4\xC5\xD8\xD4\xD0\xC4\xC6\010" -- CONTEXTPDF (+128) - flush(f,v) - flush(f,b) + f:write(v) + f:write(b) offset = #v + #b end @@ -2051,20 +2130,20 @@ local openfile, closefile do local comp = zlibcompress(data,3) if comp then data = comp - flush(f,f_stream_b_d_c(nofobjects,xref(),#data)) + f:write(f_stream_b_d_c(nofobjects,xref(),#data)) else - flush(f,f_stream_b_d_u(nofobjects,xref(),#data)) + f:write(f_stream_b_d_u(nofobjects,xref(),#data)) end else - flush(f,f_stream_b_d_u(nofobjects,xref(),#data)) + f:write(f_stream_b_d_u(nofobjects,xref(),#data)) end - flush(f,data) - flush(f,s_stream_e) - flush(f,f_startxref(xrefoffset)) + f:write(data) + f:write(s_stream_e) + f:write(f_startxref(xrefoffset)) else flushdeferred() xrefoffset = offset - flush(f,f_xref(nofobjects+1)) + f:write(f_xref(nofobjects+1)) local trailer = pdfdictionary { Size = nofobjects+1, Root = catalog, @@ -2084,16 +2163,16 @@ local openfile, closefile do end end objects[0] = f_first(lastfree) - flush(f,concat(objects,"",0,nofobjects)) + f:write(concat(objects,"",0,nofobjects)) trailer.Size = nofobjects + 1 if trailerid then - flush(f,f_trailer_id(trailer(),trailerid,trailerid,xrefoffset)) + f:write(f_trailer_id(trailer(),trailerid,trailerid,xrefoffset)) else - flush(f,f_trailer_no(trailer(),xrefoffset)) + f:write(f_trailer_no(trailer(),xrefoffset)) end end end - close(f) + f:close() io.flush() end @@ -2114,7 +2193,6 @@ updaters.register("backend.update.pdf",function() local img_none = imagetypes.none local rulecodes = nodes.rulecodes - local imagerule_code = rulecodes.image local setprop = nodes.nuts.setprop @@ -2123,7 +2201,8 @@ updaters.register("backend.update.pdf",function() local lastindex = 0 local indices = { } - local bpfactor = number.dimenfactors.bp + local <const> bpfactor = number.dimenfactors.bp + local <const> imagerule_code = rulecodes.image function codeinjections.newimage(specification) return specification @@ -2287,7 +2366,7 @@ updaters.register("backend.update.lpdf",function() topdf[id] = index end -- pdf.print or pdf.literal - flushpdfimage(index,wd,ht,dp,pos_h,pos_v) + flushimage(index,wd,ht,dp,pos_h,pos_v) end local function pdfvfimage(wd,ht,dp,data,name) @@ -2310,15 +2389,20 @@ do local renamefile = os.rename -- local copyfile = file.copy -- local addsuffix = file.addsuffix + local texgetbox = tex.getbox local pdfname = nil local tmpname = nil + local converter = nil + local useddriver = nil -- a bit of a hack - local function outputfilename() + local function outputfilename(driver) return pdfname end - local function prepare() + -- todo: prevent twice + + local function prepare(driver) if not environment.initex then -- install new functions in pdf namespace updaters.apply("backend.update.pdf") @@ -2343,21 +2427,29 @@ do openfile(tmpname) -- luatex.registerstopactions(1,function() - lpdf.finalizedocument() - closefile() + if pdfname then + lpdf.finalizedocument() + closefile() + end end) -- luatex.registerpageactions(1,function() - lpdf.finalizepage(true) + if pdfname then + lpdf.finalizepage(true) + end end) -- -- lpdf.registerdocumentfinalizer(wrapup,nil,"wrapping up") + -- end -- environment.lmtxmode = CONTEXTLMTXMODE + -- + converter = drivers.converters.lmtx + useddriver = driver end - local function wrapup() + local function wrapup(driver) if pdfname then local ok = true if isfile(pdfname) then @@ -2380,7 +2472,7 @@ do end end - local function cleanup() + local function cleanup(driver) if tmpname then closefile(true) if isfile(tmpname) then @@ -2391,44 +2483,42 @@ do end end - local function convert(boxnumber) - lpdf.convert(tex.box[boxnumber],"page") + local function convert(driver,boxnumber) + converter(driver,texgetbox(boxnumber),"page") + end + + localconverter = function(...) + converter(useddriver,...) end - function lpdf.flushers() - return { + drivers.install { + name = "pdf", + flushers = { character = flushcharacter, rule = flushrule, simplerule = flushsimplerule, pushorientation = pushorientation, poporientation = poporientation, -- - pdfliteral = flushpdfliteral, - pdfsetmatrix = flushpdfsetmatrix, - pdfsave = flushpdfsave, - pdfrestore = flushpdfrestore, - pdfimage = flushpdfimage, - } - end - - function lpdf.actions() - return { + literal = flushliteral, + setmatrix = flushsetmatrix, + save = flushsave, + restore = flushrestore, + image = flushimage, + -- + updatefontstate = updatefontstate, + }, + actions = { prepare = prepare, wrapup = wrapup, - convert = convert, cleanup = cleanup, -- initialize = initialize, + convert = convert, finalize = finalize, - updatefontstate = updatefontstate, + -- outputfilename = outputfilename, - } - end - - drivers.install { - name = "pdf", - flushers = lpdf.flushers(), - actions = lpdf.actions(), + }, } end diff --git a/tex/context/base/mkiv/lpdf-mis.lua b/tex/context/base/mkiv/lpdf-mis.lua index 0f51ea4f6..c5422b49e 100644 --- a/tex/context/base/mkiv/lpdf-mis.lua +++ b/tex/context/base/mkiv/lpdf-mis.lua @@ -196,6 +196,10 @@ function codeinjections.setupidentity(specification) end end +function codeinjections.getidentityvariable(name) + return identity[name] +end + local done = false -- using "setupidentity = function() end" fails as the meaning is frozen in register local function setupidentity() diff --git a/tex/context/base/mkiv/luat-cnf.lua b/tex/context/base/mkiv/luat-cnf.lua index c398b75bb..88e7a7353 100644 --- a/tex/context/base/mkiv/luat-cnf.lua +++ b/tex/context/base/mkiv/luat-cnf.lua @@ -104,7 +104,7 @@ function texconfig.init() local tv = type(gv) if tv == "table" then for k, v in next, gv do - keys[k] = tostring(v) -- true -- by tostring we cannot call overloades functions (security) + keys[k] = tostring(v) -- true -- by tostring we cannot call overloads functions (security) end end lib[v] = keys diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua index 4ec3bd7c2..5222ea84f 100644 --- a/tex/context/base/mkiv/mult-def.lua +++ b/tex/context/base/mkiv/mult-def.lua @@ -7340,6 +7340,12 @@ return { ["compressdistance"]={ ["en"]="compressdistance", }, + ["compressmethod"]={ + ["en"]="compressmethod", + }, + ["compressstopper"]={ + ["en"]="compressstopper", + }, ["concerns"]={ ["en"]="concerns", ["nl"]="betreft", @@ -13122,6 +13128,9 @@ return { ["compressseparator"]={ ["en"]="compressseparator", }, + ["compressstopper"]={ + ["en"]="compressstopper", + }, ["concept"]={ ["cs"]="koncept", ["de"]="konzept", @@ -16108,6 +16117,10 @@ return { ["selectfont"]={ ["en"]="selectfont", }, + ["separator"]={ + ["en"]="separator", + ["nl"]="scheider", + }, ["september"]={ ["cs"]="zari", ["de"]="september", diff --git a/tex/context/base/mkiv/mult-def.mkiv b/tex/context/base/mkiv/mult-def.mkiv index d9404bc16..78fcdf667 100644 --- a/tex/context/base/mkiv/mult-def.mkiv +++ b/tex/context/base/mkiv/mult-def.mkiv @@ -37,9 +37,9 @@ % some left-overs -\def\c!HL {HL} -\def\c!VL {VL} -\def\c!NL {NL} +\def\c!HL{HL} +\def\c!VL{VL} +\def\c!NL{NL} % stop todo diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua index 2770db21f..5cd5fb373 100644 --- a/tex/context/base/mkiv/mult-prm.lua +++ b/tex/context/base/mkiv/mult-prm.lua @@ -254,6 +254,7 @@ return { "fixupboxesmode", "fontid", "formatname", + "frozen", "futureexpand", "futureexpandis", "gleaders", diff --git a/tex/context/base/mkiv/node-fin.lua b/tex/context/base/mkiv/node-fin.lua index dc681d165..5f2940f45 100644 --- a/tex/context/base/mkiv/node-fin.lua +++ b/tex/context/base/mkiv/node-fin.lua @@ -25,6 +25,7 @@ local getattr = nuts.getattr local getwidth = nuts.getwidth local getwhd = nuts.getwhd local getorientation = nuts.getorientation +local has_dimensions = nuts.has_dimensions local setlist = nuts.setlist local setleader = nuts.setleader @@ -182,7 +183,7 @@ local function process(attribute,head,inheritance,default) -- one attribute local leader = nil for stack, id in nextnode, head do if id == glyph_code or id == disc_code then - check = true -- disc no longer needed as we flatten replace + check = true elseif id == glue_code then leader = getleader(stack) if leader then @@ -235,8 +236,7 @@ local function process(attribute,head,inheritance,default) -- one attribute -- end nested -- end elseif id == rule_code then - local wd, ht, dp = getwhd(stack) - check = wd ~= 0 or (ht+dp) ~= 0 + check = has_dimensions(stack) end -- much faster this way than using a check() and nested() function if check then @@ -309,7 +309,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes local leader = nil for stack, id, subtype in nextnode, head do if id == glyph_code or id == disc_code then - check = true -- disc no longer needed as we flatten replace + check = true elseif id == glue_code then leader = getleader(stack) if leader then @@ -374,8 +374,7 @@ local function selective(attribute,head,inheritance,default) -- two attributes -- so no redundant color stuff (only here, layers for instance should obey) check = false else - local wd, ht, dp = getwhd(stack) - check = wd ~= 0 or (ht+dp) ~= 0 + check = has_dimensions(stack) end end if check then @@ -485,8 +484,7 @@ local function stacked(attribute,head,default) -- no triggering, no inheritance, end end elseif id == rule_code then - local wd, ht, dp = getwhd(stack) - check = wd ~= 0 or (ht+dp) ~= 0 + check = has_dimensions(stack) end if check then local a = getattr(stack,attribute) @@ -571,8 +569,7 @@ local function stacker(attribute,head,default) -- no triggering, no inheritance, end end elseif id == rule_code then - local wd, ht, dp = getwhd(current) - check = wd ~= 0 or (ht+dp) ~= 0 + check = has_dimensions(current) end if check then diff --git a/tex/context/base/mkiv/node-fnt.lua b/tex/context/base/mkiv/node-fnt.lua index 25254009f..1b245639b 100644 --- a/tex/context/base/mkiv/node-fnt.lua +++ b/tex/context/base/mkiv/node-fnt.lua @@ -210,12 +210,12 @@ do local usedfonts local attrfonts - local basefonts + local basefonts -- could be reused local basefont local prevfont local prevattr local variants - local redundant + local redundant -- could be reused local firstnone local lastfont local lastproc diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua index b097fb8b1..f3877d5c9 100644 --- a/tex/context/base/mkiv/node-nut.lua +++ b/tex/context/base/mkiv/node-nut.lua @@ -203,6 +203,7 @@ nuts.vpack = direct.vpack nuts.writable_spec = direct.writable_spec nuts.write = direct.write nuts.mlist_to_hlist = direct.mlist_to_hlist +nuts.has_dimensions = direct.has_dimensions if not nuts.mlist_to_hlist then @@ -219,6 +220,17 @@ if not nuts.mlist_to_hlist then end +if not nuts.has_dimensions then + + local getwhd = direct.getwhd + + function nuts.has_dimensions(n) + local wd, ht, dp = getwhd(n) + return wd ~= 0 or (ht + dp) ~= 0 + end + +end + local getfield = direct.getfield local setfield = direct.setfield @@ -254,6 +266,13 @@ nuts.setdisc = direct.setdisc nuts.getdiscretionary = direct.getdisc nuts.setdiscretionary = direct.setdisc +nuts.getpre = direct.getpre +nuts.setpre = direct.setpre +nuts.getpost = direct.getpost +nuts.setpost = direct.setpost +nuts.getreplace = direct.getreplace +nuts.setreplace = direct.setreplace + local getdata = direct.getdata local setdata = direct.setdata @@ -382,6 +401,23 @@ local remove = (CONTEXTLMTXMODE > 0 and LUATEXFUNCTIONALITY >= 20190704) and d_r return head, current end +-- for now + +if not nuts.getpre then + + local d_getdisc = direct.getdisc + local d_setfield = direct.setfield + + function nuts.getpre(d) local h, _, _, t, _, _ = d_getdisc(d,true) return h, t end + function nuts.getpost(d) local _, h, _, _, t, _ = d_getdisc(d,true) return h, t end + function nuts.getreplace(d) local _, _, h, _, _, t = d_getdisc(d,true) return h, t end + + function nuts.setpre(d,n) d_setfield("pre", n) end + function nuts.setpost(d,n) d_setfield("post", n) end + function nuts.setreplace(d,n) d_setfield("replace",n) end + +end + -- alias nuts.getsurround = nuts.getkern diff --git a/tex/context/base/mkiv/node-ref.lua b/tex/context/base/mkiv/node-ref.lua index e12bd95bd..21fc4ce4d 100644 --- a/tex/context/base/mkiv/node-ref.lua +++ b/tex/context/base/mkiv/node-ref.lua @@ -166,33 +166,33 @@ local function dimensions(parent,start,stop) -- in principle we could move some -- todo: if no prev and no next and parent -- todo: we need a a list_dimensions for a vlist if getid(parent) == vlist_code then - if false then - local l = getlist(parent) - local c = l - local ok = false - while c do - if c == start then - ok = true - end - if ok and getid(c) == hlist_code then - break - else - c = getnext(c) - end - end - if ok and c then - if trace_areas then - report_area("dimensions taken of first line in vlist") - end - local w, h, d = getwhd(c) - return w, h, d, c - else - if trace_areas then - report_area("dimensions taken of vlist (probably wrong)") - end - return hlist_dimensions(start,stop,parent) - end - else + -- if false then + -- local l = getlist(parent) + -- local c = l + -- local ok = false + -- while c do + -- if c == start then + -- ok = true + -- end + -- if ok and getid(c) == hlist_code then + -- break + -- else + -- c = getnext(c) + -- end + -- end + -- if ok and c then + -- if trace_areas then + -- report_area("dimensions taken of first line in vlist") + -- end + -- local w, h, d = getwhd(c) + -- return w, h, d, c + -- else + -- if trace_areas then + -- report_area("dimensions taken of vlist (probably wrong)") + -- end + -- return hlist_dimensions(start,stop,parent) + -- end + -- else -- -- we can as well calculate here because we only have kerns and glue -- @@ -200,7 +200,7 @@ local function dimensions(parent,start,stop) -- in principle we could move some local last = nil local current = start local noflines = 0 - while current do + while current do -- can be loop local id = getid(current) if id == hlist_code or id == vlist_code or id == rule_code then if noflines == 0 then @@ -239,7 +239,7 @@ local function dimensions(parent,start,stop) -- in principle we could move some return hlist_dimensions(start,stop,parent) end end - end + -- end else if trace_areas then report_area("dimensions taken of range starting with %a using parent",nodecodes[id]) @@ -929,7 +929,6 @@ local function makedestination(width,height,depth,reference) end end - function nodes.destinations.handler(head) if head and topofstack > 0 then return (inject_areas(head,attribute,makedestination,stack,done)) diff --git a/tex/context/base/mkiv/page-run.lua b/tex/context/base/mkiv/page-run.lua index 88a7d6664..53331fc0e 100644 --- a/tex/context/base/mkiv/page-run.lua +++ b/tex/context/base/mkiv/page-run.lua @@ -212,7 +212,7 @@ function commands.showusage() report(" save size : %s of %s", status.max_save_stack, status.save_size) report("") report(" luabytecode bytes : %s in %s registers", status.luabytecode_bytes, status.luabytecodes) - report(" luastate bytes : %s", status.luastate_bytes) + report(" luastate bytes : %s of %s", status.luastate_bytes, status.luastate_bytes_max or "unknown") report("") report(" callbacks : %s", status.callbacks) report(" indirect callbacks : %s", status.indirect_callbacks) diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 472dee79a..aa20128db 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 4b9db0b9a..3e5df5ff2 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-doc.lua b/tex/context/base/mkiv/strc-doc.lua index 4b2ac04b7..aa5fe352e 100644 --- a/tex/context/base/mkiv/strc-doc.lua +++ b/tex/context/base/mkiv/strc-doc.lua @@ -672,8 +672,15 @@ local function process(index,numbers,ownnumbers,criterium,separatorset,conversio end end -function sections.typesetnumber(entry,kind,...) -- kind='section','number','prefix' - if entry and entry.hidenumber ~= true then -- can be nil +-- kind : section number prefix + +function sections.typesetnumber(entry,kind,...) + -- + -- Maybe the hiding becomes an option .. after all this test was there + -- for a reason, but for now we have this: + -- + -- if entry and entry.hidenumber ~= true then + if entry then local separatorset = "" local conversionset = "" local conversion = "" diff --git a/tex/context/base/mkiv/strc-lnt.mkvi b/tex/context/base/mkiv/strc-lnt.mkvi index 4a6f14245..ad8c80d93 100644 --- a/tex/context/base/mkiv/strc-lnt.mkvi +++ b/tex/context/base/mkiv/strc-lnt.mkvi @@ -160,13 +160,6 @@ % compress=yes|no % compressmethod=separator|stopper -\def\c!compressdistance{compressdistance} -\def\c!compressmethod {compressmethod} -\def\c!compressstopper {compressstopper} % c -\def\v!compressstopper {compressstopper} % v - -\def\v!separator {separator} % v - \setvalue{\??linenotescompressmethod\v!separator}% {\edef\p_compressseparator{\noteparameter\c!compressseparator}% \scratchskip\noteparameter\c!compressdistance\relax diff --git a/tex/context/base/mkiv/strc-reg.lua b/tex/context/base/mkiv/strc-reg.lua index be3436bd4..88b738b6d 100644 --- a/tex/context/base/mkiv/strc-reg.lua +++ b/tex/context/base/mkiv/strc-reg.lua @@ -761,6 +761,8 @@ local seeindex = 0 -- meerdere loops, seewords, dan words, anders seewords +-- todo: split seeword + local function crosslinkseewords(result,check) -- all words -- collect all seewords local seewords = { } @@ -778,23 +780,68 @@ local function crosslinkseewords(result,check) -- all words end end end + -- mark seeparents + + -- local seeparents = { } + -- for i=1,#result do + -- local data = result[i] + -- local word = data.list[1] + -- local okay = word and word[1] + -- if okay then + -- local seeindex = seewords[okay] + -- if seeindex then + -- seeparents[okay] = data + -- data.references.seeparent = seeindex + -- if trace_registers then + -- report_registers("see parent %03i: %s",seeindex,okay) + -- end + -- end + -- end + -- end + + local entries = { } + local keywords = { } local seeparents = { } for i=1,#result do local data = result[i] - local word = data.list[1] - word = word and word[1] - if word then - local seeindex = seewords[word] + local word = data.list + local size = #word + if data.seeword then + -- beware: a seeword has an extra entry for sorting purposes + size = size - 1 + end + for i=1,size do + local w = word[i] + local e = w[1] + local k = w[2] or e + entries [i] = e + keywords[i] = k + end + -- first try the keys + local okay, seeindex + for n=size,1,-1 do + okay = concat(keywords,"+",1,n) + seeindex = seewords[okay] + -- first try the entries if seeindex then - seeparents[word] = data - data.references.seeparent = seeindex - if trace_registers then - report_registers("see parent %03i: %s",seeindex,word) - end + break + end + okay = concat(entries,"+",1,n) + seeindex = seewords[okay] + if seeindex then + break + end + end + if seeindex then + seeparents[okay] = data + data.references.seeparent = seeindex + if trace_registers then + report_registers("see parent %03i: %s",seeindex,okay) end end end + -- mark seewords and extend sort list for i=1,#result do local data = result[i] diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv index 24397ecbf..281c4a218 100644 --- a/tex/context/base/mkiv/syst-ini.mkiv +++ b/tex/context/base/mkiv/syst-ini.mkiv @@ -1098,21 +1098,27 @@ \let\pagebottomoffset\voffset \let\normalpagebottomoffset\voffset \fi -%D Handy. +%D Handy (this will change, again). -\suppresslongerror \plusone -\suppressoutererror \plusone -\suppressmathparerror \plusone -\suppressifcsnameerror\plusone +\ifdefined\suppresslongerror \suppresslongerror \plusone \fi +\ifdefined\suppressoutererror \suppressoutererror \plusone \fi +\ifdefined\suppressmathparerror \suppressmathparerror \plusone \fi +\ifdefined\suppressifcsnameerror \suppressifcsnameerror \plusone \fi +\ifdefined\suppressfontnotfounderror\suppressfontnotfounderror\zerocount\fi -\let \suppresslongerror \relax -\newcount\suppresslongerror \let\normalsuppresslongerror \suppresslongerror -\let \suppressoutererror \suppresslongerror \let\normalsuppressoutererror \suppresslongerror -\let \suppressmathparerror \suppresslongerror \let\normalsuppressmathparerror \suppresslongerror -\let \suppressifcsnameerror\suppresslongerror \let\normalsuppressifcsnameerror\suppresslongerror +\let \suppresslongerror \relax +\newcount\suppresslongerror \let\normalsuppresslongerror \suppresslongerror +\let \suppressoutererror \suppresslongerror \let\normalsuppressoutererror \suppresslongerror +\let \suppressmathparerror \suppresslongerror \let\normalsuppressmathparerror \suppresslongerror +\let \suppressifcsnameerror \suppresslongerror \let\normalsuppressifcsnameerror \suppresslongerror +\let \suppressfontnotfounderror\suppresslongerror \let\normalsuppressfontnotfounderror\suppresslongerror \matheqnogapstep\zerocount % for now +%D Experiment: + +\ifdefined\frozen \else \def\frozen{} \let\normalfrozen\frozen \fi + %D Now we define a few helpers that we need in a very early stage. We have no %D message system yet but redundant definitions are fatal anyway. diff --git a/tex/context/base/mkiv/toks-ini.lua b/tex/context/base/mkiv/toks-ini.lua index b7657625b..af93d3bc1 100644 --- a/tex/context/base/mkiv/toks-ini.lua +++ b/tex/context/base/mkiv/toks-ini.lua @@ -42,13 +42,21 @@ local scan_glue = token.scan_glue local scan_keyword = token.scan_keyword local scan_keyword_cs = token.scan_keyword_cs or scan_keyword local scan_token = token.scan_token +local scan_list = token.scan_list local scan_word = token.scan_word +local scan_key = token.scan_key +local scan_value = token.scan_value +local scan_char = token.scan_char local scan_number = token.scan_number local scan_csname = token.scan_csname local scan_real = token.scan_real local scan_float = token.scan_float local get_next = token.get_next +local get_next_token = token.get_next_token +local skip_next = token.skip_next +local peek_next_char = token.peek_next_char +local is_next_char = token.is_next_char local set_macro = token.set_macro local get_macro = token.get_macro @@ -134,6 +142,7 @@ tokens.scanners = { -- these expand token = scan_token, toks = scan_toks, tokens = scan_toks, + list = scan_list, dimen = scan_dimen, dimension = scan_dimen, glue = scan_glue, @@ -149,11 +158,17 @@ tokens.scanners = { -- these expand code = scan_code, tokencode = scan_token_code, word = scan_word, + key = scan_key, + value = scan_value, + char = scan_char, number = scan_number, boolean = scan_boolean, keyword = scan_keyword, keywordcs = scan_keyword_cs, csname = scan_csname, + peek = peek_next_char, + skip = skip_next, + ischar = is_next_char, } tokens.getters = { -- these don't expand @@ -225,6 +240,7 @@ if setinspector then active = t.active, expandable = t.expandable, protected = t.protected, + frozen = t.frozen, mode = t.mode, index = t.index, cmdname = cmdname, diff --git a/tex/context/base/mkiv/toks-scn.lua b/tex/context/base/mkiv/toks-scn.lua index f259bcee5..b707500e7 100644 --- a/tex/context/base/mkiv/toks-scn.lua +++ b/tex/context/base/mkiv/toks-scn.lua @@ -29,6 +29,7 @@ local scannumber = scanners.number local scankeyword = scanners.keyword local scankeywordcs = scanners.keywordcs local scanword = scanners.word +local scankey = scanners.key local scancode = scanners.code local scanboolean = scanners.boolean local scandimen = scanners.dimen @@ -180,6 +181,7 @@ local shortcuts = { scankeyword = scankeyword, scankeywordcs = scankeywordcs, scanword = scanword, + -- scankey = scankey, scancode = scancode, scanboolean = scanboolean, scandimen = scandimen, diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua index bd406b0e5..4d754ec68 100644 --- a/tex/context/base/mkiv/trac-deb.lua +++ b/tex/context/base/mkiv/trac-deb.lua @@ -315,7 +315,7 @@ directives.register("system.errorcontext", function(v) register('show_error_message', nop) register('show_warning_message',function() processwarning(v) end) register('show_error_hook', function() processerror(v) end) - register('show_lua_error_hook', nop) + register('show_lua_error_hook', function() processerror(v) end) else register('show_error_message', nil) register('show_error_hook', nil) @@ -371,7 +371,8 @@ function lmx.showerror(lmxname) end function lmx.overloaderror() - callback.register('show_error_hook', function() lmx.showerror() end) -- prevents arguments being passed + callback.register('show_error_hook', function() lmx.showerror() end) -- prevents arguments being passed + callback.register('show_lua_error_hook', function() lmx.showerror() end) -- prevents arguments being passed end directives.register("system.showerror", lmx.overloaderror) diff --git a/tex/context/base/mkiv/trac-inf.lua b/tex/context/base/mkiv/trac-inf.lua index 0a4537e31..24ebc5249 100644 --- a/tex/context/base/mkiv/trac-inf.lua +++ b/tex/context/base/mkiv/trac-inf.lua @@ -262,7 +262,11 @@ end function statistics.memused() -- no math.round yet -) local round = math.round or math.floor - return format("%s MB (ctx: %s MB)",round(collectgarbage("count")/1000), round(status.luastate_bytes/1000000)) + return format("%s MB, ctx: %s MB, max: %s MB)", + round(collectgarbage("count")/1000), + round(status.luastate_bytes/1000000), + status.luastate_bytes_max and round(status.luastate_bytes_max/1000000) or "unknown" + ) end starttiming(statistics) diff --git a/tex/context/base/mkiv/typo-cap.lua b/tex/context/base/mkiv/typo-cap.lua index 7e8003c62..64bb66dab 100644 --- a/tex/context/base/mkiv/typo-cap.lua +++ b/tex/context/base/mkiv/typo-cap.lua @@ -315,6 +315,9 @@ register(variables.camel, camel) -- 10 register(variables.cap, variables.capital) -- clone register(variables.Cap, variables.Capital) -- clone +-- this can be more clever: when we unset we can actually +-- use the same attr ref if needed + function cases.handler(head) -- not real fast but also not used on much data local start = head local lastfont = { } @@ -341,9 +344,10 @@ function cases.handler(head) -- not real fast but also not used on much data end local action = actions[n] -- map back to low number if action then - start = action(start,attr,lastfont,n,count) + local quit + start, quit = action(start,attr,lastfont,n,count) if trace_casing then - report_casing("case trigger %a, instance %a, fontid %a, result %a",n,m,id,ok) + report_casing("case trigger %a, instance %a, fontid %a, result %a",n,m,id,quit and "-" or "+") end elseif trace_casing then report_casing("unknown case trigger %a",n) diff --git a/tex/context/base/mkiv/typo-pag.lua b/tex/context/base/mkiv/typo-pag.lua index 05513e20c..ea4b1574c 100644 --- a/tex/context/base/mkiv/typo-pag.lua +++ b/tex/context/base/mkiv/typo-pag.lua @@ -108,93 +108,94 @@ function parbuilders.registertogether(line,specification) -- might change end end -local function keeptogether(start,a) - if start then - local specification = cache[a] - if a then - local current = getnext(start) - local previous = start - local total = getdepth(previous) - local slack = specification.slack - local threshold = specification.depth - slack +local function keeptogether(start,a,specification) + local current = getnext(start) + local previous = start + local total = getdepth(previous) + local slack = specification.slack + local threshold = specification.depth - slack + if trace_keeptogether then + report_keeptogether("%s, index %s, total %p, threshold %p, slack %p","list",a,total,threshold,slack) + end + while current do + local id = getid(current) + if id == vlist_code or id == hlist_code then + local wd, ht, dp = getwhd(current) + total = total + ht + dp + if trace_keeptogether then + report_keeptogether("%s, index %s, total %p, threshold %p","list",a,total,threshold) + end + if total <= threshold then + if getid(previous) == penalty_code then + setpenalty(previous,10000) + else + insert_node_after(head,previous,new_penalty(10000)) + end + else + break + end + elseif id == glue_code then + -- hm, breakpoint, maybe turn this into kern + total = total + getwidth(current) if trace_keeptogether then - report_keeptogether("%s, index %s, total %p, threshold %p, slack %p","list",a,total,threshold,slack) + report_keeptogether("%s, index %s, total %p, threshold %p","glue",a,total,threshold) end - while current do - local id = getid(current) - if id == vlist_code or id == hlist_code then - local wd, ht, dp = getwhd(current) - total = total + ht + dp - if trace_keeptogether then - report_keeptogether("%s, index %s, total %p, threshold %p","list",a,total,threshold) - end - if total <= threshold then - if getid(previous) == penalty_code then - setpenalty(previous,10000) - else - insert_node_after(head,previous,new_penalty(10000)) - end - else - break - end - elseif id == glue_code then - -- hm, breakpoint, maybe turn this into kern - total = total + getwidth(current) - if trace_keeptogether then - report_keeptogether("%s, index %s, total %p, threshold %p","glue",a,total,threshold) - end - if total <= threshold then - if getid(previous) == penalty_code then - setpenalty(previous,10000) - else - insert_node_after(head,previous,new_penalty(10000)) - end - else - break - end - elseif id == kern_code then - total = total + getkern(current) - if trace_keeptogether then - report_keeptogether("%s, index %s, total %s, threshold %s","kern",a,total,threshold) - end - if total <= threshold then - if getid(previous) == penalty_code then - setpenalty(previous,10000) - else - insert_node_after(head,previous,new_penalty(10000)) - end - else - break - end - elseif id == penalty_code then - if total <= threshold then - if getid(previous) == penalty_code then - setpenalty(previous,10000) - end - setpenalty(current,10000) - else - break - end + if total <= threshold then + if getid(previous) == penalty_code then + setpenalty(previous,10000) + else + insert_node_after(head,previous,new_penalty(10000)) end - previous = current - current = getnext(current) + else + break + end + elseif id == kern_code then + total = total + getkern(current) + if trace_keeptogether then + report_keeptogether("%s, index %s, total %s, threshold %s","kern",a,total,threshold) + end + if total <= threshold then + if getid(previous) == penalty_code then + setpenalty(previous,10000) + else + insert_node_after(head,previous,new_penalty(10000)) + end + else + break + end + elseif id == penalty_code then + if total <= threshold then + if getid(previous) == penalty_code then + setpenalty(previous,10000) + end + setpenalty(current,10000) + else + break end end + previous = current + current = getnext(current) end end -- also look at first non glue/kern node e.g for a dropped caps function parbuilders.keeptogether(head) - local done = false + local done = false -- can go local current = head while current do if getid(current) == hlist_code then local a = takeattr(current,a_keeptogether) if a and a > 0 then - keeptogether(current,a) - cache[a] = nil - done = true + local specification = cache[a] + if specification then + keeptogether(current,a,specification) + -- this is tricky ... we need a better resetter, maybe some + -- injected latelua or a gc method on a property (interesting + -- experiment) + cache[a] = nil + done = true + end end end current = getnext(current) diff --git a/tex/context/base/mkiv/util-jsn.lua b/tex/context/base/mkiv/util-jsn.lua index 68c6a712e..8da351897 100644 --- a/tex/context/base/mkiv/util-jsn.lua +++ b/tex/context/base/mkiv/util-jsn.lua @@ -122,11 +122,14 @@ do local f_key_val_num = f_key_val_seq local f_key_val_yes = formatters[ "\n" .. '%w"%s" : true' ] local f_key_val_nop = formatters[ "\n" .. '%w"%s" : false' ] + local f_key_val_null = formatters[ "\n" .. '%w"%s" : null' ] local f_val_num = formatters[ "\n" .. '%w%s' ] local f_val_str = formatters[ "\n" .. '%w"%s"' ] local f_val_yes = formatters[ "\n" .. '%wtrue' ] local f_val_nop = formatters[ "\n" .. '%wfalse' ] + local f_val_null = formatters[ "\n" .. '%wnull' ] + local f_val_empty = formatters[ "\n" .. '%w{ }' ] local f_val_seq = f_val_num -- no empty tables because unknown if table or hash @@ -158,8 +161,10 @@ do n = n + 1 t[n] = '"' elseif tv == "boolean" then n = n + 1 t[n] = v and "true" or "false" - else + elseif v then n = n + 1 t[n] = tostring(v) + else + n = n + 1 t[n] = "null" end end n = n + 1 t[n] = " ]" @@ -217,8 +222,11 @@ do if st then n = n + 1 t[n] = f_val_seq(depth,st) else - tojsonpp(v,k,depth,level+1,0) + tojsonpp(v,nil,depth,level+1,#v) end + else + n = n + 1 + t[n] = f_val_empty(depth) end elseif tv == "boolean" then n = n + 1 @@ -227,6 +235,9 @@ do else t[n] = f_val_nop(depth,v) end + else + n = n + 1 + t[n] = f_val_null(depth) end end elseif next(root) then @@ -244,12 +255,12 @@ do n = n + 1 t[n] = f_key_val_num(depth,k,v) elseif tk == "string" then k = lpegmatch(escaper,k) or k - n = n + 1 t[n] = f_key_val_str(depth,k,v) + n = n + 1 t[n] = f_key_val_num(depth,k,v) end elseif tv == "string" then if tk == "number" then v = lpegmatch(escaper,v) or v - n = n + 1 t[n] = f_key_val_num(depth,k,v) + n = n + 1 t[n] = f_key_val_str(depth,k,v) elseif tk == "string" then k = lpegmatch(escaper,k) or k v = lpegmatch(escaper,v) or v @@ -287,6 +298,15 @@ do t[n] = f_key_val_nop(depth,k) end end + else + if tk == "number" then + n = n + 1 + t[n] = f_key_val_null(depth,k) + elseif tk == "string" then + k = lpegmatch(escaper,k) or k + n = n + 1 + t[n] = f_key_val_null(depth,k) + end end end end @@ -348,6 +368,8 @@ do n = n + 1 ; t[n] = value elseif kind == "boolean" then n = n + 1 ; t[n] = tostring(value) + else + n = n + 1 ; t[n] = "null" end return t, n end @@ -377,10 +399,9 @@ do n = 0 if pretty then tojsonpp(value,name,0,0,#value) --- value = concat(t,"\n",1,n) value = concat(t,"",1,n) else - tojson(value,0) + t, n = tojson(value,0) value = concat(t,"",1,n) end t = nil diff --git a/tex/context/interface/mkii/keys-de.xml b/tex/context/interface/mkii/keys-de.xml index 2ab5c9c12..9ac3dcb03 100644 --- a/tex/context/interface/mkii/keys-de.xml +++ b/tex/context/interface/mkii/keys-de.xml @@ -150,6 +150,7 @@ <cd:variable name='comment' value='kommentar'/> <cd:variable name='component' value='komponente'/> <cd:variable name='compressseparator' value='compressseparator'/> + <cd:variable name='compressstopper' value='compressstopper'/> <cd:variable name='concept' value='konzept'/> <cd:variable name='construction' value='construction'/> <cd:variable name='content' value='inhalt'/> @@ -480,6 +481,7 @@ <cd:variable name='sectionnumber' value='abschnittsnummer'/> <cd:variable name='see' value='sieh'/> <cd:variable name='selectfont' value='selectfont'/> + <cd:variable name='separator' value='separator'/> <cd:variable name='september' value='september'/> <cd:variable name='serif' value='serif'/> <cd:variable name='serifbold' value='serifbold'/> @@ -738,7 +740,9 @@ <cd:constant name='compoundhyphen' value='compoundhyphen'/> <cd:constant name='compress' value='compress'/> <cd:constant name='compressdistance' value='compressdistance'/> + <cd:constant name='compressmethod' value='compressmethod'/> <cd:constant name='compressseparator' value='compressseparator'/> + <cd:constant name='compressstopper' value='compressstopper'/> <cd:constant name='concerns' value='concerns'/> <cd:constant name='connector' value='connector'/> <cd:constant name='continue' value='fortsetzen'/> diff --git a/tex/context/interface/mkii/keys-nl.xml b/tex/context/interface/mkii/keys-nl.xml index 06df09bc5..45a4f36d6 100644 --- a/tex/context/interface/mkii/keys-nl.xml +++ b/tex/context/interface/mkii/keys-nl.xml @@ -150,6 +150,7 @@ <cd:variable name='comment' value='commentaar'/> <cd:variable name='component' value='onderdeel'/> <cd:variable name='compressseparator' value='compressseparator'/> + <cd:variable name='compressstopper' value='compressstopper'/> <cd:variable name='concept' value='concept'/> <cd:variable name='construction' value='construction'/> <cd:variable name='content' value='inhoud'/> @@ -376,6 +377,7 @@ <cd:variable name='nohz' value='geenhz'/> <cd:variable name='noline' value='noline'/> <cd:variable name='nomarking' value='geenmarkering'/> + <cd:variable name='nomenubar' value='geenmenubalk'/> <cd:variable name='none' value='geen'/> <cd:variable name='nonumber' value='geennummer'/> <cd:variable name='norepeat' value='norepeat'/> @@ -479,6 +481,7 @@ <cd:variable name='sectionnumber' value='sectienummer'/> <cd:variable name='see' value='zie'/> <cd:variable name='selectfont' value='selectfont'/> + <cd:variable name='separator' value='scheider'/> <cd:variable name='september' value='september'/> <cd:variable name='serif' value='serif'/> <cd:variable name='serifbold' value='serifbold'/> @@ -572,6 +575,7 @@ <cd:variable name='temporary' value='voorlopig'/> <cd:variable name='test' value='test'/> <cd:variable name='text' value='tekst'/> + <cd:variable name='textnote' value='tekstnoot'/> <cd:variable name='three' value='drie'/> <cd:variable name='thursday' value='donderdag'/> <cd:variable name='tight' value='krap'/> @@ -735,7 +739,10 @@ <cd:constant name='component' value='component'/> <cd:constant name='compoundhyphen' value='koppelteken'/> <cd:constant name='compress' value='comprimeren'/> + <cd:constant name='compressdistance' value='compressdistance'/> + <cd:constant name='compressmethod' value='compressmethod'/> <cd:constant name='compressseparator' value='compressseparator'/> + <cd:constant name='compressstopper' value='compressstopper'/> <cd:constant name='concerns' value='betreft'/> <cd:constant name='connector' value='connector'/> <cd:constant name='continue' value='doorgaan'/> diff --git a/tex/context/interface/mkii/keys-pe.xml b/tex/context/interface/mkii/keys-pe.xml index 710f9d74b..86f8f49c9 100644 --- a/tex/context/interface/mkii/keys-pe.xml +++ b/tex/context/interface/mkii/keys-pe.xml @@ -150,6 +150,7 @@ <cd:variable name='comment' value='توضیح'/> <cd:variable name='component' value='مولفه'/> <cd:variable name='compressseparator' value='compressseparator'/> + <cd:variable name='compressstopper' value='compressstopper'/> <cd:variable name='concept' value='مفهوم'/> <cd:variable name='construction' value='construction'/> <cd:variable name='content' value='محتوا'/> @@ -480,6 +481,7 @@ <cd:variable name='sectionnumber' value='شمارهبخش'/> <cd:variable name='see' value='ببینید'/> <cd:variable name='selectfont' value='selectfont'/> + <cd:variable name='separator' value='separator'/> <cd:variable name='september' value='سپتامبر'/> <cd:variable name='serif' value='سریف'/> <cd:variable name='serifbold' value='serifbold'/> @@ -738,7 +740,9 @@ <cd:constant name='compoundhyphen' value='compoundhyphen'/> <cd:constant name='compress' value='فشردن'/> <cd:constant name='compressdistance' value='compressdistance'/> + <cd:constant name='compressmethod' value='compressmethod'/> <cd:constant name='compressseparator' value='compressseparator'/> + <cd:constant name='compressstopper' value='compressstopper'/> <cd:constant name='concerns' value='concerns'/> <cd:constant name='connector' value='connector'/> <cd:constant name='continue' value='ادامه'/> diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml index 75802edd8..9a2154718 100644 --- a/tex/context/interface/mkii/keys-ro.xml +++ b/tex/context/interface/mkii/keys-ro.xml @@ -150,6 +150,7 @@ <cd:variable name='comment' value='comentariu'/> <cd:variable name='component' value='componenta'/> <cd:variable name='compressseparator' value='compressseparator'/> + <cd:variable name='compressstopper' value='compressstopper'/> <cd:variable name='concept' value='concept'/> <cd:variable name='construction' value='construction'/> <cd:variable name='content' value='cuprins'/> @@ -480,6 +481,7 @@ <cd:variable name='sectionnumber' value='numarsetiune'/> <cd:variable name='see' value='vezi'/> <cd:variable name='selectfont' value='selectfont'/> + <cd:variable name='separator' value='separator'/> <cd:variable name='september' value='septembrie'/> <cd:variable name='serif' value='serif'/> <cd:variable name='serifbold' value='serifbold'/> @@ -738,7 +740,9 @@ <cd:constant name='compoundhyphen' value='compoundhyphen'/> <cd:constant name='compress' value='compress'/> <cd:constant name='compressdistance' value='compressdistance'/> + <cd:constant name='compressmethod' value='compressmethod'/> <cd:constant name='compressseparator' value='compressseparator'/> + <cd:constant name='compressstopper' value='compressstopper'/> <cd:constant name='concerns' value='concerns'/> <cd:constant name='connector' value='connector'/> <cd:constant name='continue' value='continua'/> diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex 97b13f0d0..7d7f5f10e 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 9f90949bb..b1bf55d2e 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/context/modules/mkiv/s-cgj.mkiv b/tex/context/modules/mkiv/s-cgj.mkiv index 2950a799d..3e7518777 100644 --- a/tex/context/modules/mkiv/s-cgj.mkiv +++ b/tex/context/modules/mkiv/s-cgj.mkiv @@ -1,258 +1,231 @@ -%D \module -%D [file=s-cgj.mkiv, -%D version=2018.09.28, -%D title=Context group style file, -%D subtitle=CG-journal base style, -%D author={Adrian Egger, W. Egger, Taco Hoekwater}, -%D date=\currentdate, -%D copyright={Context Group}] - -%D \type {\enablemode[draft]} has to come before loading the style. Maybe some -%D day I'll make something more official and then some \type {everydraft} or so. +%\module [ +% file=s-cgj.mkiv, +% version=2012.12.05, +% title=Context group style file, +% subtitle=CG-journal base style, +% author={Adrian Egger, W. Egger, Taco Hoekwater}, +% date=\currentdate, +% copyright={Context Group}% +%] + +\enablemode[cgjpagecolumns] % Fixme and todo ... -\startmodule[cgj] +\definecolor[NoteColor] [g=1,r=.25,b=.25] +\definecolor[WarnColor] [r=1,g=.25,b=.25] -\definecolor[NoteColor][g=1,r=.25,b=.25] -\definecolor[WarnColor][r=1,g=.25,b=.25] +\def\todo#1% + {\startframedtext + [background=color,backgroundcolor=NoteColor] + {\bf TODO:}~~#1\par + \stopframedtext } -\unexpanded\def\todo#1% - {\startframedtext[background=color,backgroundcolor=NoteColor] - \dontleavehmode\start\bf TODO:\stop~~#1\par - \stopframedtext} +\def\fixme#1% + {\startframedtext + [background=color,backgroundcolor=WarnColor] + {\bf FIXME:}~~#1\par + \stopframedtext } -\unexpanded\def\fixme#1% - {\startframedtext[background=color,backgroundcolor=WarnColor] - \dontleavehmode\start\bf FIXME:\stop~~#1\par - \stopframedtext } +% There is a draft mode, which enables all frames +% \enablemode[draft] -%D Base set of variables. The actual values are set in the file -%D CG-journal. +\doifmodeelse + {draft} + {\def\OnOff{on}\showframe} + {\def\OnOff{off}} + +% Base set of variables +% The actual values are set in the file CG-journal \setvariables [CG-Journal] [Title={Journal}, RunningTitle={Journal}, SubTitle={From the base set of variables}, Version=1.0, - NOFColumns=2] + NOFColumns=2, + ] +\setupinteraction[ + state=start, + color=, + contrastcolor=, + style=, + title=Journal, + author=context group, +] +\placebookmarks[title,chapter,subject,section][chapter] +\setupinteractionscreen[option={doublesided,bookmark}] \startmode[onecolumn,fullwidth] - \setvariables - [CG-Journal] - [NOFColumns=1] +\setvariables + [CG-Journal] + [NOFColumns=1] \stopmode -% Fonts setup. - +% Fonts setup \usetypescriptfile[plex] +%\usetypescriptfile[type-inconsolata] \starttypescript [cgj] - \definetypeface [cgj] [rm] [serif][ibmplex-light] [default] - \definetypeface [cgj] [ss] [sans] [ibmplex-light] [default] - \definetypeface [cgj] [mm] [math] [palatino] [default] - \definetypeface [cgj] [tt] [mono] [ibmplex] [default][rscale=0.9] + \definetypeface [cgj] [rm] [serif][ibmplex] [default] + \definetypeface [cgj] [ss] [sans] [ibmplex] [default] + \definetypeface [cgj] [mm] [math] [palatino] [default] + \definetypeface [cgj] [tt] [mono] [ibmplex] [default] [rscale=0.9] \stoptypescript \starttypescript [cgj-light] - \definetypeface [cgj-light] [rm] [serif][ibmplex-extralight] [default] - \definetypeface [cgj-light] [ss] [sans] [ibmplex-extralight] [default] - \definetypeface [cgj-light] [mm] [math] [palatino] [default] - \definetypeface [cgj-light] [tt] [mono] [ibmplex-extralight] [default][rscale=0.9] + \definetypeface [cgj-light] [rm] [serif][ibmplex] [default] + \definetypeface [cgj-light] [ss] [sans] [ibmplex-light] [default] + \definetypeface [cgj-light] [mm] [math] [palatino] [default] + \definetypeface [cgj-light] [tt] [mono] [ibmplex] [default] [rscale=0.9] \stoptypescript -\starttypescript [cgj-extralight] - \definetypeface [cgj-extralight] [rm] [serif][ibmplex-thin] [default] - \definetypeface [cgj-extralight] [ss] [sans] [ibmplex-thin] [default] - \definetypeface [cgj-extralight] [mm] [math] [palatino] [default] - \definetypeface [cgj-extralight] [tt] [mono] [ibmplex-thin] [default][rscale=0.9] -\stoptypescript - -\usebodyfont - [cgj-light,cgj-extralight] - -\setupbodyfont - [cgj,ss,10pt] +\usebodyfont[cgj-light,ss,10pt] +\setupbodyfont[cgj,ss,10pt] -\definebodyfontenvironment[10pt][interlinespace=13pt] +\definebodyfontenvironment[10pt][interlinespace=12pt] \definebodyfontenvironment[12pt][interlinespace=16pt] \definebodyfontenvironment[16pt][interlinespace=20pt] - -\setupinterlinespace - [line=13pt] - +\setupinterlinespace[line=12pt] \let\sl\it -%D Path to the logos - -\setupexternalfigures - [directory=./Logos, - location={global,local,default}] - -%D Logos: black logo only. +% Path to the logos +\setupexternalfigures[directory=./Logos] +% Logos +% Black logo only \useexternalfigure [Logo] [cg_corp_logo_loop_black_cmyk] - [width=30mm, - height=19mm] - -%D Black logo with text - + [width=30mm,height=19mm] +%Black logo with text \useexternalfigure [LogoText] [cg_corp_logo_text_black_cmyk] - [width=50mm, - height=35.2mm] - -%D Colors + [width=50mm,height=35.2mm] +% Colors \definecolor[CGlightblue][c=1,m=.15,y=0,k=0] -\definecolor[CGdeepblue] [c=1,m=.8,y=0,k=.3] -\definecolor[CGgray] [c=0,m=0,y=0,k=.1] - -%D Article styles +\definecolor[CGdeepblue][c=1,m=.8,y=0,k=.3] +\definecolor[CGgray][c=0,m=0,y=0,k=.1] +% Article styles \definealternativestyle [Articleheading] [{\switchtobodyfont[16pt,ss]\bf}] - \definealternativestyle [Articlesubheading] [{\switchtobodyfont[16pt,ss]\tf}] - \definealternativestyle [Authorname] [{\switchtobodyfont[12pt,ss]\it}] - \definealternativestyle [Sectionheading] [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=12pt]}] - \definealternativestyle [Subsectionheading] [{\switchtobodyfont[cgj-light,10pt,ss]\bf\setupinterlinespace[line=10pt]}] - \definealternativestyle [IntroCopy] [{\switchtobodyfont[12pt,ss]\tf}] - \definealternativestyle [PagenumberStyle] [{\switchtobodyfont[cgj-light,10pt,ss]\bf}] -%D Headerstyles:Breadcrumbs - +% Headerstyles - Breadcrumbs \definealternativestyle [BreadcrumbMd] - [{\switchtobodyfont[cgj-light,10pt,ss]\bf}] - + [{\switchtobodyfont[10pt,ss]\bf}] \definealternativestyle [BreadcrumbRg] - [{\switchtobodyfont[cgj,10pt,ss]}] - + [{\switchtobodyfont[cgj-light,10pt,ss]\bf}] \definealternativestyle [BreadcrumbLt] [{\switchtobodyfont[10pt,ss]\tf}] - \definealternativestyle [BreadcrumbTh] [{\switchtobodyfont[cgj-light,10pt,ss]\tf}] -%D Captionstyles - +% Captionstyles \definealternativestyle [Captionheading] [{\switchtobodyfont[8pt,ss]\bf\setupinterlinespace[line=8pt]}] - \definealternativestyle [Captiontext] [{\switchtobodyfont[8pt,ss]\tf\setupinterlinespace[line=8pt]}] -%D Article signature - +% Article signature \definealternativestyle [Signaturestyle] [{\switchtobodyfont[10pt,ss]\it}] -%D Article footnotes - +% Article footnotes \definealternativestyle [Articlefootnotes] [{\switchtobodyfont[8pt,ss]\tf}] -%D Index and TOC styles - +% Index /TOC styles +% It looks like the inheritance is gone. +%\definealternativestyle +% [IndexContents][Articleheading] \definealternativestyle [IndexContents] [{\switchtobodyfont[16pt,ss]\bf\setupinterlinespace[line=18pt]}] - \definealternativestyle [IndexArticleTitle] [{\switchtobodyfont[12pt,ss]\tf\setupinterlinespace[line=20pt]}] - \definealternativestyle [IndexNumber] [{\switchtobodyfont[12pt,ss]\bf\setupinterlinespace[line=20pt]}] - \definealternativestyle [IndexAuthor] [{\switchtobodyfont[12pt,ss]\it\setupinterlinespace[line=20pt]}] -%D Math: still missing. - -%D Verbatim +% Math +% --> still missing +% Verbatim \definealternativestyle [DisplayMonospaced] - [\tt] - + [{\switchtobodyfont[10pt,tt]\setupinterlinespace[line=12pt]}] \definealternativestyle [DisplayMonospacedX] - [{\switchtobodyfont[8pt,tt]}] - + [{\switchtobodyfont[8pt,tt]\setupinterlinespace[line=11pt]}] \definealternativestyle [DisplayMonospacedS] - [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=10pt]}] - -%D Blank adjustment + [{\switchtobodyfont[9pt,tt]\setupinterlinespace[line=12pt]}] -\defineblank[CGblank] [6pt] -\defineblank[BigCGblank] [24pt] +% \blank adjustment +\defineblank[CGblank][6pt] +\defineblank[BigCGblank][24pt] \defineblank[MediumCGblank][12pt] -%D Paper definition +% Paper definition +\definepapersize[Journal][width=210mm,height=266mm] +\setuppapersize[Journal][Journal] -\definepapersize - [Journal] - [width=210mm, - height=266mm] - -\setuppapersize - [Journal] - [Journal] - -%D General layout +% General layout \definelayout [General] - [topspace=18mm, + [topspace=20mm, backspace=28mm, header=5mm, - headerdistance=7mm, - footer=5mm, + headerdistance=5mm, + footer=3mm, footerdistance=5mm, width=157mm, height=224mm, - marking=on] + marking=on, + ] \definelayout [Content] - [topspace=18mm, + [topspace=20mm, backspace=28mm, header=5mm, - headerdistance=7mm, + headerdistance=5mm, footer=0mm, footerdistance=0mm, width=157mm, @@ -260,52 +233,62 @@ margindistance=4mm, rightmargin=21mm, leftmargin=21mm, - marking=on] + marking=on, + ] \definelayout [Imprint] - [topspace=18mm, + [topspace=20mm, backspace=28mm, header=5mm, - headerdistance=7mm, - footer=5mm, + headerdistance=5mm, + footer=3mm, footerdistance=5mm, width=107mm, height=224mm, margindistance=4mm, rightmargin=45.3mm, leftmargin=21mm, - marking=on] + marking=on, + ] \definelayout [SingleColumn] - [topspace=18mm, + [topspace=20mm, backspace=55mm, header=5mm, - headerdistance=7mm, - footer=5mm, + headerdistance=5mm, + footer=3mm, footerdistance=5mm, width=130mm, height=224mm, margindistance=4mm, leftmargin=48mm, rightmargin=21mm, - marking=on] - -%D Pagenumbering: Pagenumber is set in the footer - -\setuppagenumbering - [location=, - alternative=doublesided] - -%D Head-definitions + marking=on, + ] + +% Pagenumbering: Pagenumber is set in the footer +\setuppagenumbering[location=,alternative=doublesided] + +% Head-definitions +% The distances according to the style-guide +% H1 = Article title +% H2 = Section title (1. Bla bla) +% H3 = Subsection title (1.1 Bla bla) +% H4 = Subsubsection title (1.1.1 Bla bla) +% +% Between abstract and body: 2 lines 10/12pt --> 24 pt: BigCGblank +% Between H2 and bodycopy/H3: 1 line 6/6pt --> 6 pt: CGblank +% Between H3 and bodycopy/H4: 1 line 6/6pt --> 6 pt: CGblank +% End H2 paragraph: 2 lines 10/12pt --> 24 pt: BigCGblank +% End H3 paragraph: 1 line 6/6pt --> 6 pt: CGblank \setuphead [title] [style=Articleheading, after={\blank[BigCGblank]}, page=yes] - \setuphead [part] [placehead=no, @@ -314,9 +297,8 @@ page=no, numbercommand=, expansion=yes] - \setuphead - [section] + [section,subject] [style=Sectionheading, before={\blank[BigCGblank]}, after={\blank[CGblank]}, @@ -324,8 +306,8 @@ distance=4pt, align={flushleft,nothyphenated}, resetnumber=yes, - continue=yes] - + continue=yes, + ] \setuphead [subsection] [style=Subsectionheading, @@ -335,49 +317,41 @@ distance=4pt, align={flushleft,nothyphenated}, resetnumber=yes, - continue=yes] - -\setuphead - [subject] - [style=Sectionheading, - before={\blank[BigCGblank]}, - after=] - + continue=yes, + ] +%\setuphead +% [subject] +% [style=Sectionheading,before={\blank[BigCGblank]},after=] \setuphead [subsubject] [style=Subsectionheading, before={\blank[CGblank]}, after={\blank[CGblank]}, - sectionstopper=] + sectionstopper=, + ] +% Columns +% The setup of the columns is done at the moment columns are started (see end of file) -%D A special head for the footnote section in multicolumn mode excuse the low-level -%D rule, I wanted it to look like the start of footnotes in single column mode. (TH) +% Index/TOC page setups +\unprotect -\definehead - [footnotesubject] - [subject] + \def\listboxproperties {\strc_lists_get_reference_attribute} + \def\listrenderingsetup {\the\t_lists_every_renderingtext} + \def\listrenderingsynchronize{\the\t_lists_every_renderingsynchronize} -\setuphead - [footnotesubject] - [style=Sectionheading, - before={\kern -13pt}, - after={\smash{\lower 13pt\hbox{\vrule width 2.5cm height 1pt depth 0pt}}}] +\protect - -%D The setup of the columns is done at the moment columns are started (see end -%D of file) - -%D Index/TOC page setups +% now you can say: \definelistalternative - [CGJ:Index] - [renderingsetup=CGJ:Indexheading] - + [CGJ:Index] + [renderingsetup=CGJ:Indexheading] \definelistalternative - [CGJ:Index:Chapter] - [renderingsetup=CGJ:Indexheading:Chapter] + [CGJ:Index:Chapter] + [renderingsetup=CGJ:Indexheading:Chapter] -\startsetups[CGJ:Indexheading:Chapter] + + \startsetups[CGJ:Indexheading:Chapter] \listparameter{before} \vbox \listboxproperties{all} { \forgetall @@ -388,14 +362,20 @@ \useliststyleandcolor{numberstyle}{numbercolor} \currentlistentrypagenumber \egroup} + % \bgroup + % \useliststyleandcolor{numberstyle}{numbercolor} + % \currentlistsymbol + % \egroup + % .\space \bgroup \useliststyleandcolor{textstyle}{textcolor} \smash{\currentlistentrytitle}% \egroup + % \par } \par \listparameter{after} -\stopsetups + \stopsetups \startsetups[CGJ:Indexheading] \listparameter{before} @@ -405,9 +385,15 @@ \listrenderingsynchronize \hbox to 15mm{ \bgroup + %\useliststyleandcolor{pagestyle}{pagecolor} \useliststyleandcolor{numberstyle}{numbercolor} \currentlistentrypagenumber \egroup} + % \bgroup + % \useliststyleandcolor{numberstyle}{numbercolor} + % \currentlistsymbol + % \egroup + % .\space \bgroup \useliststyleandcolor{textstyle}{textcolor} \currentlistentrytitle @@ -419,45 +405,71 @@ \stopsetups \setuplist - [part] - [before={\blank[CGblank]}, - after=, - style=IndexContents, - numberstyle=\IndexNumber, - textstyle=\IndexArticleTitle, - prefix=no, - alternative=CGJ:Index:Chapter] - -%D Captions - + [part] + [before={\blank[CGblank]}, + after=, + style=IndexContents, + numberstyle=\IndexNumber, + textstyle=\IndexArticleTitle, + prefix=no, + alternative=CGJ:Index:Chapter] + +%\setuplist +% [section] +% [before={\blank[CGblank]}, +% after={}, +% style=IndexHeaderB, +% % numberstyle=\bf, +% % textstyle=\bfa, +% prefix=no, +% alternative=CGJ:Index] +% +%\setuplist +% [subsection] +% [before={}, +% after={}, +% style=IndexHeaderC, +% % numberstyle=\bf, +% % textstyle=\bfa, +% prefix=no, +% alternative=CGJ:Index] + +% Floats + +% \setupfloat +% [figure] +% [] + +% Captions \setupcaptions [suffix={.}, + width=max, headstyle=\Captionheading, style=\Captiontext, - distance=6pt] + distance=2pt + ] \setupcaption[figure][way=bypart] \setupcaption[table] [way=bypart] -%D Datacollection: article parameters (other fields and defaults) - -\unexpanded\def\CGJBibData[#1]% +% Datacollection: article parameters (other fields and defaults) +\def\CGJBibData[#1]% {\getparameters - [CGJ] - [SubTitle=, - RunningAuthor=, - RunningTitle=Example, - Email=, - Address=, - Page=1, - Title={My Article}, - Author={Example Author}, - Period=, - Number=, - Year=, - TocAuthor=, - TocTitle=, - #1]% + [CGJ] + [SubTitle=, + RunningAuthor=, + RunningTitle=Example, + Email=, + Address=, + Page=1, + Title={My Article}, + Author={Example Author}, + Period=, + Number=, + Year=, + TocAuthor=, + TocTitle=, + #1]% \doifnothing {\CGJRunningTitle} {\let\CGJRunningTitle\CGJTitle}% @@ -470,116 +482,130 @@ \doifnothing {\CGJTocTitle} {\let\CGJTocTitle\CGJTitle}% - \setvariables - [CGJToc] - [Author=\CGJTocAuthor, - Title=\CGJTocTitle]% for TOC + \setvariables[CGJToc][Author=\CGJTocAuthor, + Title=\CGJTocTitle]% for TOC } -\unexpanded\def\dostartArticle[#1] - {\CGJBibData[#1] - \doifelse - {\getvariable{CG-Journal}{NOFColumns}} - {1} - {\doifmodeelse{fullwidth} - {\setuplayout[General]} - {\setuplayout[SingleColumn]}} - {\setupnotes[location=none] - \setuplayout[General]}% - \bgroup - {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par} - {\doifsomething{\CGJSubTitle} - {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}} - {\doifsomething{\CGJAuthor} - {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par} - \part - {\getvariable{CGJToc}{Title}% - \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }% - \IndexAuthor\getvariable{CGJToc}{Author}} - \godown[13pt]% - \egroup - \par - \hyphenpenalty1000\relax} - -\unexpanded\def\startArticle - {\dosingleempty\dostartArticle} - -\def\signArticle - {} - -%D In multicolumn mode, footnotes come are at the end of the article: - -\startsetups article:after - \startfootnotesubject[title=] - \placefootnotes - \stopfootnotesubject -\stopsetups - -\unexpanded\def\stopArticle - {\doifelse{\getvariable{CG-Journal}{NOFColumns}}{1} - {\par - \signArticle} - {\setups{article:after} - \par - \signArticle - \stoppagecolumns} - \page} - -\unexpanded\def\startAbstract - {\bgroup - \switchtobodyfont[12pt] - \IntroCopy} - -\unexpanded\def\stopAbstract - {\par - \egroup - \finishAbstract} - -\unexpanded\def\finishAbstract - {\doifelse {\getvariable{CG-Journal}{NOFColumns}} {1} - {\blank[BigCGblank]} - {\vbox{\blank[BigCGblank]}% - \par - \startpagecolumns[balance=yes,distance=12pt,page=no,n=\getvariable{CG-Journal}{NOFColumns}] - \setupitemgroup[itemize][packed] - \setuplayout[grid=yes]} % grid mode only in columns +\def\dostartArticle[#1]{% + \CGJBibData[#1] + % \pageno=\CGJPage + % \setupuserpagenumber[start=\CGJPage] + \doifelse + {\getvariable{CG-Journal}{NOFColumns}} + {1} + {\doifmodeelse{fullwidth} + {\setuplayout[General]} + {\setuplayout[SingleColumn]}} + {\setuplayout + [General]}% + \doifmode{cgjpagecolumns} + {\definepagecolumns [cgjpagecolumns][n=\getvariable{CG-Journal}{NOFColumns},distance=12pt,page=no]} + \bgroup + {\switchtobodyfont[16pt]\Articleheading\CGJTitle\par} + {\doifsomething{\CGJSubTitle} + {\switchtobodyfont[16pt]\Articlesubheading\CGJSubTitle\par}} + {\doifsomething + {\CGJAuthor} + {\switchtobodyfont[12pt]\Authorname \CGJAuthor}\par} + \part{\getvariable{CGJToc}{Title}% + \doifsomething{\getvariable{CGJToc}{Author}}{ \emdash\ }% + \IndexAuthor\getvariable{CGJToc}{Author}} + \godown[16pt] + \egroup + \hyphenpenalty1000} + +\def\startArticle{\dosingleempty\dostartArticle} + +\def\signArticle{} + +\def\CGJRunningTitle {} +\def\CGJRunningAuthor {} +\unprotect +\def\mystoppagecolumns% + {\page \endgroup \page_otr_command_set_vsize \page_otr_command_set_hsize \page \endgroup} +\protect + +\def\stopArticle{% + \par\signArticle + \doifmodeelse{cgjcolumnsets} + {\stopcolumnset \page} + {\doifmodeelse{cgjpagecolumns} + {\mystoppagecolumns} + {\doifmodeelse{cgjmixedcolumns} + {\stopmixedcolumns \page} + {\stopcolumns \page}% + }% + }% } - -\unexpanded\def\noAbstract - {\kern -24pt - \finishAbstract} - -%D Headertexts - +\def\startAbstract{% + \bgroup + \switchtobodyfont[12pt] + \IntroCopy} + + +\def\finishAbstract{% + \blank[BigCGblank]% + \doif + {\getvariable{CG-Journal}{NOFColumns}} + {>1} + {\setupcolumns + [n=\getvariable{CG-Journal}{NOFColumns}, + distance=4mm, + balance=yes, + ] + } + \doifmodeelse{cgjcolumnsets} + {\definecolumnset[cgjcolumnsets][n=\getvariable{CG-Journal}{NOFColumns},balance=yes]% + \startcolumnset[cgjcolumnsets]} + {\doifmodeelse{cgjpagecolumns} + {\par\ifnum \getvariable{CG-Journal}{NOFColumns}>1 \hbox{}\par\fi\startpagecolumns[cgjpagecolumns]} + {\doifmodeelse{cgjmixedcolumns} + {\definemixedcolumns[cgjmixedcolumns][n=\getvariable{CG-Journal}{NOFColumns},balance=yes,blank={line,fixed}]% + \startmixedcolumns[cgjmixedcolumns]} + {\startcolumns[n=\getvariable{CG-Journal}{NOFColumns}]}% + }% + }% +} + +\def\stopAbstract{% + \par + \egroup + \finishAbstract} + +\def\noAbstract{\kern -24pt \finishAbstract} + + +% Headertexts \startsetups[Header:texts] - \setupheadertexts - [] [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}] %odd - [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CG-Journal}{RunningTitle}}] [] %even + \setupheadertexts + [] + [{{\BreadcrumbLt\CGJRunningTitle}{\BreadcrumbTh\doifsomething{\CGJRunningAuthor}{\ > }\CGJRunningAuthor}}] %odd + [{\BreadcrumbMd contextgroup}{\BreadcrumbRg\ > \getvariable{CG-Journal}{RunningTitle}}] %even + [] \stopsetups -%D Footertexts +% Footertexts \startsetups[Footer:texts] \setupfootertexts - [] [\PagenumberStyle\pagenumber] - [\PagenumberStyle\pagenumber] [] + [] + [\PagenumberStyle\pagenumber] + [\PagenumberStyle\pagenumber] + [] \stopsetups -%D Setup tolerance, stretch. - -\setuptolerance - [tolerant,stretch] +% Setup tolerance, stretch +\setuptolerance[tolerant,stretch] -%D Setting up footnotes. +% Setting up footnotes \setupnotation [footnote] [way=bypart, - rule=on] - -%D Adjustments to the container containing the footnotes. + rule=on] +% Adjustments to the container containing the footnotes \setupnote [footnote] [frame=off, @@ -588,62 +614,64 @@ background=, rulecolor=black, %% the line above the inserts rulethickness=1pt, - next={ }, - split=verystrict, - scope=page, style=Articlefootnotes] -\doifmodeelse {draft} {\setupnote[footnote][frame=on]} - -% Setup typing. -\setupnarrower - [middle=3mm, - left=5mm] +% Setup typing +\setupnarrower[middle=3mm] +\setupnarrower[left=5mm] \definetextbackground - [verbatim] + [typingbg] [frame=off, + location=paragraph, background=color, backgroundcolor=CGgray, - leftoffset=2mm,rightoffset=2mm, - topoffset=2mm,bottomoffset=2mm, - location=paragraph, + width=\hsize, + leftoffset=2mm, % doesnt work in the current beta align=flushleft] - -\doifmodeelse {draft} {\definetextbackground[verbatim][frame=on]} - -\definetextbackground - [verbatimitem] - [verbatim] - -\setuptextbackground - [verbatimitem] - [before=, - after=, - width=\the\dimexpr\hsize-10.5mm\relax] - + \startsetups typing:before - \blank[MediumCGblank] - \starttextbackground[verbatim] + \blank[MediumCGblank] + \starttextbackground[typingbg][style=DisplayMonospacedS] + \hfuzz=7.02pt % don't care if it bleeds in to the frame a little + \setupnarrower[left=2mm] % because leftoffset does not work in the current beta + \startnarrower[left] \stopsetups \startsetups typing:before:small - \blank[MediumCGblank] - \starttextbackground[verbatim] + \blank[MediumCGblank] + \starttextbackground[typingbg][style=DisplayMonospacedX] + \hfuzz=6.3pt % don't care if it bleeds in to the frame a little + \setupnarrower[left=2mm] + \startnarrower[left] \stopsetups \startsetups typing:after - \stoptextbackground - \blank[MediumCGblank] + \stopnarrower\par + \stoptextbackground + \blank[MediumCGblank] \stopsetups \startsetups typing:before:item - \starttextbackground[verbatimitem] +% \blank[3pt] + \startframedtext + [frame=off, + before=, + after=, + background=color, + backgroundcolor=CGgray, + width=\the\dimexpr\hsize-10.5mm\relax, + offset=3mm, + align=flushleft, + style=DisplayMonospacedS, + ] + \hfuzz=7.02pt % don't care if it bleeds in to the frame a little \stopsetups \startsetups typing:after:item - \stoptextbackground + \stopframedtext +% \blank[3pt] \stopsetups \setuptyping @@ -652,24 +680,15 @@ before=\setups{typing:before}, after=\setups{typing:after}] -\setuptype - [style=DisplayMonospaced] - -%D When verbatim becomes too large: - -\definetyping - [smalltyping] - +\definetyping[smalltyping] \setuptyping [smalltyping] [style=DisplayMonospacedX, before=\setups{typing:before:small}, after=\setups{typing:after}] -\unexpanded\def\smalltypefile{\typefile[smalltyping][]} - -%D Bullet lists. +% Bullet lists \setupitemgroup [itemize] [each] @@ -679,7 +698,15 @@ align=right, before={\blank[MediumCGblank]\startnarrower[left]}, after={\stopnarrower\blank[MediumCGblank]}, - inbetween={\blank[CGblank]}] + inbetween={\blank[CGblank]}, + ] + +\def\Href#1{\underbar{\hyphenatedurl{#1}}} + +\setupformulas[align=flushleft,margin=5mm] + +\setupquotation[before={\blank[CGblank]\switchtobodyfont[8pt]\setupinterlinespace[line=12pt]}, + after={\par\blank[CGblank]}] \definedescription [description] @@ -688,27 +715,8 @@ before={\blank}, after={\blank}] -\setupformula - [align=flushleft, - margin=5mm] - -\setupquotation - [before={\blank[CGblank]\switchtobodyfont[10pt]}, - after={\blank[CGblank]}] - -\setupwhitespace - [medium] - -\usemodule[abr-02,abr-03,abr-04] - -\unexpanded\def\Href#1{\underbar{\hyphenatedurl{#1}}} \unexpanded\def\CG {\ConTeXt\ group} -\setnewconstant\kindofpagetextareas\plusone % partial page. HH: low level, no high level switch (yet) - -%D There is a draft mode, which enables all frames: - -\doifmode {draft} {\showframe} - -\stopmodule +\usemodule[abr-02] +\endinput diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 6bd9bbd59..49621663d 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 : 07/04/19 12:29:22 +-- merge date : 07/16/19 18:23:09 do -- begin closure to overcome local limits and interference |