diff options
author | Hans Hagen <pragma@wxs.nl> | 2021-08-22 12:15:53 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2021-08-22 12:15:53 +0200 |
commit | 4d2f305f0f00e1d6d6c03443596a830bfb9da69c (patch) | |
tree | aa049c7577e473819cf14b8950304fd4079eee1a | |
parent | af60125ab3fa9e482720f0f46c2143fa08512113 (diff) | |
download | context-4d2f305f0f00e1d6d6c03443596a830bfb9da69c.tar.gz |
2021-08-22 11:53:00
40 files changed, 380 insertions, 168 deletions
diff --git a/doc/context/documents/general/manuals/luametafun.pdf b/doc/context/documents/general/manuals/luametafun.pdf Binary files differindex caa40e26d..79456a46d 100644 --- a/doc/context/documents/general/manuals/luametafun.pdf +++ b/doc/context/documents/general/manuals/luametafun.pdf diff --git a/doc/context/documents/general/manuals/luametatex.pdf b/doc/context/documents/general/manuals/luametatex.pdf Binary files differindex 5843ef324..129da6905 100644 --- a/doc/context/documents/general/manuals/luametatex.pdf +++ b/doc/context/documents/general/manuals/luametatex.pdf diff --git a/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex b/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex new file mode 100644 index 000000000..cf91cff2f --- /dev/null +++ b/doc/context/sources/general/manuals/luametafun/luametafun-mesh-examples.tex @@ -0,0 +1,163 @@ +% language=us runpath=texruns:manuals/luametafun + +\startbuffer[1] +\startuseMPgraphic{MyPath1} + fill OverlayBox withcolor "darkyellow" ; + save p ; path p[] ; + p1 := unitsquare xysized( OverlayWidth/4, OverlayHeight/4) ; + p2 := unitsquare xysized(2OverlayWidth/4,3OverlayHeight/5) shifted ( OverlayWidth/4,0) ; + p3 := unitsquare xysized( OverlayWidth/4, OverlayHeight ) shifted (3OverlayWidth/4,0) ; + fill p1 withcolor "darkred" ; + fill p2 withcolor "darkblue" ; + fill p3 withcolor "darkgreen" ; + draw lmt_mesh [ paths = { p1, p2, p3 } ] ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\startbuffer[2] +\startuseMPgraphic{MyPath2} + save q ; path q ; q := unitcircle xysized(OverlayWidth,OverlayHeight) ; + save p ; path p ; p := for i=1 upto length(q) : + (center q) -- (point (i-1) of q) -- (point i of q) -- (center q) -- + endfor cycle ; + fill q withcolor "darkgray" ; + draw lmt_mesh [ + trace = true, + paths = { p } + ] withcolor "darkred" ; + + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\startbuffer[3] +\startuseMPgraphic{MyPath3} + save q ; path q ; q := unitcircle xysized(OverlayWidth,OverlayHeight) randomized 3mm ; + fill q withcolor "darkgray" ; + draw lmt_mesh [ + trace = true, + paths = { meshed(q,OverlayBox,.05) } + ] withcolor "darkgreen" ; + % draw OverlayMesh(q,.025) withcolor "darkgreen" ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\startbuffer[4] +\startuseMPgraphic{MyPath4} + save q ; path q ; q := unitcircle xysized(OverlayWidth,OverlayHeight) randomized 3mm ; + fill q withcolor "darkgray" ; + draw lmt_mesh [ + trace = true, + auto = true, + step = 0.0125, + paths = { q } + ] withcolor "darkyellow" ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\startbuffer[5] +\startuseMPgraphic{MyPath5} + save q ; path q ; q := unitdiamond xysized(OverlayWidth,OverlayHeight) randomized 2mm ; + q := q shifted - center q shifted center OverlayBox ; + fill q withcolor "darkgray" ; + draw lmt_mesh [ + trace = true, + auto = true, + step = 0.0125, + paths = { q } + ] withcolor "darkmagenta" ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\startbuffer[6] +\startuseMPgraphic{MyPath6} + save p ; path p[] ; + p1 := p2 := fullcircle xysized(2OverlayWidth/5,2OverlayHeight/3) ; + p1 := p1 shifted - center p1 shifted center OverlayBox shifted (-1OverlayWidth/4,0) ; + p2 := p2 shifted - center p2 shifted center OverlayBox shifted ( 1OverlayWidth/4,0) ; + fill p1 withcolor "middlegray" ; + fill p2 withcolor "middlegray" ; + draw lmt_mesh [ + trace = true, + auto = true, + step = 0.02, + paths = { p1, p2 } + ] withcolor "darkcyan" ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\startbuffer[7] +\startuseMPgraphic{MyPath7} + save p ; path p[] ; + p1 := p2 := fullcircle xysized(2OverlayWidth/5,2OverlayHeight/3) rotated 45 ; + p1 := p1 shifted - center p1 shifted center OverlayBox shifted (-1OverlayWidth/4,0) ; + p2 := p2 shifted - center p2 shifted center OverlayBox shifted ( 1OverlayWidth/4,0) ; + fill p1 withcolor "middlegray" ; + fill p2 withcolor "middlegray" ; + draw lmt_mesh [ + trace = true, + auto = true, + step = 0.01, + box = OverlayBox enlarged -5mm, + paths = { p1, p2 } + ] withcolor "darkcyan" ; + draw OverlayBox enlarged -5mm withcolor "darkgray" ; + setbounds currentpicture to OverlayBox ; +\stopuseMPgraphic +\stopbuffer + +\continueifinputfile {luametafun-mesh-examples.tex} + +\setupbodyfont[dejavu] + +\setupinteraction + [state=start, + color=white, + contrastcolor=white] + +\starttext + + \getbuffer[1,2,3,4,5,6,7] + + \defineoverlay[MyPath1][\useMPgraphic{MyPath1}] + \defineoverlay[MyPath2][\useMPgraphic{MyPath2}] + \defineoverlay[MyPath3][\useMPgraphic{MyPath3}] + \defineoverlay[MyPath4][\useMPgraphic{MyPath4}] + \defineoverlay[MyPath5][\useMPgraphic{MyPath5}] + \defineoverlay[MyPath6][\useMPgraphic{MyPath6}] + \defineoverlay[MyPath7][\useMPgraphic{MyPath7}] + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath1,frame=off]{Example 1}[realpage(2)] + \stopTEXpage + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath2,frame=off]{Example 2}[realpage(3)] + \stopTEXpage + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath3,frame=off]{Example 3}[realpage(4)] + \stopTEXpage + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath4,frame=off]{Example 4}[realpage(5)] + \stopTEXpage + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath5,frame=off]{Example 5}[realpage(6)] + \stopTEXpage + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath6,frame=off]{Example 6}[realpage(7)] + \stopTEXpage + + \startTEXpage + \button[height=3cm,width=4cm,background=MyPath7,frame=off]{Example 7}[realpage(1)] + \stopTEXpage + +\stoptext diff --git a/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex b/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex index 88acff077..98b9a86b7 100644 --- a/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex +++ b/doc/context/sources/general/manuals/luametafun/luametafun-mesh.tex @@ -3,6 +3,12 @@ \environment luametafun-style \environment luametafun-mesh-examples +\doiffileelse{luatex-mesh-examples.pdf} { + % okay +} { + \ctxlua{os.execute("context luatex-mesh-examples.tex")} +} + \startcomponent luametafun-mesh \startchapter[title={Mesh}] diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex b/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex index c48ad822f..81bcf40a3 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-lua.tex @@ -15,17 +15,13 @@ Although \LUAMETATEX\ is primarily meant as a \TEX\ engine, it can also serve as a stand alone \LUA\ interpreter. There are two ways to make \LUAMETATEX\ behave -like a standalone \LUA\ interpreter: - -\startitemize[packed] -\startitem - if a \type {--luaonly} option is given on the commandline, or -\stopitem -\startitem - if the only non|-|option argument (file) on the commandline has the extension - \type {lua} or \type {luc}. -\stopitem -\stopitemize +like a standalone \LUA\ interpreter. The first method uses the command line +option \type {--luaonly} followed by a filename. The second is more automatic: if +the only non|-|option argument (file) on the commandline has the extension \type +{lmt} or \type {lua}. The \type {luc} extension has been dropped because bytecode +compiled files are not portable and one can always load indirect. The \type {lmt} +suffix is more \CONTEXT\ specific and makes it possible to have files for +\LUATEX\ and \LUAMETATEX\ alongside. In this mode, it will set \LUA's \type {arg[0]} to the found script name, pushing preceding options in negative values and the rest of the command line in the @@ -39,8 +35,10 @@ possible below the 3MB which is okay for a script engine. When no argument is given, \LUAMETATEX\ will look for a \LUA\ file with the same name as the binary and run that one when present. This makes it possible to use the engine as a stub. For instance, in \CONTEXT\ a symlink from \type {mtxrun} to -type {luametatex} will run the \type {mtxrun.lua} script when present in the same -path as the binary itself +type {luametatex} will run the \type {mtxrun.lmt} or \type {mtxrun.lua} script +when present in the same path as the binary itself. As mentioned before first +checking for (\CONTEXT) \type {lmt} files permits different files for different +engines in the same path. \stopsubsection diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 25e2ed4d7..c7d303da4 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{2021.08.19 19:40} +\newcontextversion{2021.08.22 11:51} %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 7d3289b97..6ae23853c 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{2021.08.19 19:40} +\edef\contextversion{2021.08.22 11:51} %D For those who want to use this: diff --git a/tex/context/base/mkii/mult-fr.mkii b/tex/context/base/mkii/mult-fr.mkii index 861f90c55..369931ac8 100644 --- a/tex/context/base/mkii/mult-fr.mkii +++ b/tex/context/base/mkii/mult-fr.mkii @@ -151,6 +151,7 @@ \setinterfacevariable{commands}{commandes} \setinterfacevariable{comment}{commentaire} \setinterfacevariable{component}{composant} +\setinterfacevariable{compress}{compress} \setinterfacevariable{compressseparator}{separateurreduction} \setinterfacevariable{compressstopper}{stoppeurreduction} \setinterfacevariable{concept}{concept} diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index da7aa9dc0..f0b4107f9 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{2021.08.19 19:40} +\newcontextversion{2021.08.22 11:51} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index d837240b4..dea117595 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{2021.08.19 19:40} +\edef\contextversion{2021.08.22 11:51} %D Kind of special: diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 61569f5d1..2f3480094 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 163af8eee..54c5df511 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkxl/anch-pos.lmt b/tex/context/base/mkxl/anch-pos.lmt index 5e53406da..fdb71ceb9 100644 --- a/tex/context/base/mkxl/anch-pos.lmt +++ b/tex/context/base/mkxl/anch-pos.lmt @@ -285,7 +285,7 @@ if treemode then local prefix, one, two = lpegmatch(p_splitter,k) local list = rawget(t,prefix) if list and type(list) == "table" then - v = list[one] or false + local v = list[one] or false if v then if prefix == "p" then if deltapacking and type(v) == "number" then diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index 7b5f090d9..804a45955 100644 --- a/tex/context/base/mkxl/cont-new.mkxl +++ b/tex/context/base/mkxl/cont-new.mkxl @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2021.08.19 19:40} +\newcontextversion{2021.08.22 11:51} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl index 978808ec5..f18aa8946 100644 --- a/tex/context/base/mkxl/context.mkxl +++ b/tex/context/base/mkxl/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \immutable\edef\contextformat {\jobname} -\immutable\edef\contextversion{2021.08.19 19:40} +\immutable\edef\contextversion{2021.08.22 11:51} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/font-mat.mklx b/tex/context/base/mkxl/font-mat.mklx index 1963d808d..cca22c497 100644 --- a/tex/context/base/mkxl/font-mat.mklx +++ b/tex/context/base/mkxl/font-mat.mklx @@ -413,11 +413,11 @@ \to \t_font_math_strategies \ifdefined\defaultmathfamily \else - \setnewconstant\defaultmathfamily\zerocount + \setnewconstant\defaultmathfamily\zerocount % no longer used, always zero \fi \appendtoks - \fam\defaultmathfamily % all characters and symbols are in this family + \fam\zerocount % all characters and symbols are in this family \to \everymathematics \protected\def\font_helpers_synchronize_math_family_mr diff --git a/tex/context/base/mkxl/font-ots.lmt b/tex/context/base/mkxl/font-ots.lmt index ca6490fc0..dcafac025 100644 --- a/tex/context/base/mkxl/font-ots.lmt +++ b/tex/context/base/mkxl/font-ots.lmt @@ -919,6 +919,8 @@ function handlers.gsub_ligature(head,start,dataset,sequence,ligature,rlmode,skip return head, start, true, true end ligature = ligature.ligature + else + ligature = ligature.ligature end -- local ligature = tonumber(ligature) or ligature.ligature if ligature then diff --git a/tex/context/base/mkxl/lpdf-mis.lmt b/tex/context/base/mkxl/lpdf-mis.lmt index db8ad2cbe..ca018e9f0 100644 --- a/tex/context/base/mkxl/lpdf-mis.lmt +++ b/tex/context/base/mkxl/lpdf-mis.lmt @@ -594,6 +594,8 @@ local function featurecreep() conversion = getset("structure:conversions",p.block,conversionset,1,"numbers") end end + -- If needed we can do some preroll on a prefix (label) but this is a rather useless + -- feature (creep) anyway so why bother. conversion = conversion and map[conversion] or map.numbers if number == 1 or oldlabel ~= label or oldconversion ~= conversion then list[#list+1] = i - 1 -- pdf starts numbering at 0 diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt index 9da799764..3df8c1700 100644 --- a/tex/context/base/mkxl/math-act.lmt +++ b/tex/context/base/mkxl/math-act.lmt @@ -355,13 +355,13 @@ end mathematics.extensiblecode = extensiblecode mathematics.horizontalcode = horizontalcode -interfaces.implement { +interfaces.implement { -- can be public with two times "integerargument" name = "extensiblecode", arguments = { "integer", "integer" }, actions = { extensiblecode, context } } -interfaces.implement { +interfaces.implement { -- can be public with two times "integerargument" name = "horizontalcode", arguments = { "integer", "integer" }, actions = function(family,unicode) diff --git a/tex/context/base/mkxl/math-def.mkxl b/tex/context/base/mkxl/math-def.mkxl index 1f3da649d..c7cf65270 100644 --- a/tex/context/base/mkxl/math-def.mkxl +++ b/tex/context/base/mkxl/math-def.mkxl @@ -18,7 +18,7 @@ \pushoverloadmode % cap etc \startluacode - mathematics.define(\number\defaultmathfamily) + mathematics.define() -- mathematics.xml.registerentities() \stopluacode diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl index cfefb4e2e..9f328847e 100644 --- a/tex/context/base/mkxl/math-fen.mkxl +++ b/tex/context/base/mkxl/math-fen.mkxl @@ -856,9 +856,9 @@ %D The next characters were used for constructing nicer extensibles but %D nowadays we have real characters. -\immutable\Umathchardef\braceld\zerocount \defaultmathfamily "FF07A -\immutable\Umathchardef\bracerd\zerocount \defaultmathfamily "FF07B -\immutable\Umathchardef\bracelu\zerocount \defaultmathfamily "FF07C -\immutable\Umathchardef\braceru\zerocount \defaultmathfamily "FF07D +\immutable\Umathchardef\braceld\zerocount \zerocount "FF07A +\immutable\Umathchardef\bracerd\zerocount \zerocount "FF07B +\immutable\Umathchardef\bracelu\zerocount \zerocount "FF07C +\immutable\Umathchardef\braceru\zerocount \zerocount "FF07D \protect diff --git a/tex/context/base/mkxl/math-ini.lmt b/tex/context/base/mkxl/math-ini.lmt index e31b14af3..d199d5063 100644 --- a/tex/context/base/mkxl/math-ini.lmt +++ b/tex/context/base/mkxl/math-ini.lmt @@ -251,10 +251,9 @@ do -- there will be a combined \(math)chardef (tracker) - function mathematics.define(family) - family = family or 0 - family = families[family] or family - local data = characters.data + function mathematics.define() -- we now always use family zero + local family = 0 + local data = characters.data for unicode, character in sortedhash(data) do local symbol = character.mathsymbol local mset = true diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl index 4425c936d..a481af744 100644 --- a/tex/context/base/mkxl/math-ini.mkxl +++ b/tex/context/base/mkxl/math-ini.mkxl @@ -143,8 +143,6 @@ \c_attr_displaymath\plusone \to \everybeforedisplayformula -\defaultmathfamily \zerocount % 255 - % defined at lua end \permanent\protected\def\resetmathattributes{\resetmathattributes} % handy @@ -417,10 +415,10 @@ % todo: only in mmode % these commands are semi-public but should not be used directly (lua names wil change) -\permanent\protected\def\setmathattribute #1#2{\ifmmode\clf_setmathattribute{#1}{#2}\fi} -\permanent\protected\def\setmathalphabet #1{\ifmmode\clf_setmathalphabet{#1}\fi} -\permanent\protected\def\setmathfontstyle #1{\ifmmode\clf_setmathstyle{#1}\fi} -\permanent\protected\def\setmathfontalternate#1{\ifmmode\clf_setmathalternate\defaultmathfamily{#1}\fi} +%permanent\protected\def\setmathattribute #1#2{\ifmmode\clf_setmathattribute{#1}{#2}\fi} +%permanent\protected\def\setmathalphabet #1{\ifmmode\clf_setmathalphabet{#1}\fi} +%permanent\protected\def\setmathfontstyle #1{\ifmmode\clf_setmathstyle{#1}\fi} +%permanent\protected\def\setmathfontalternate#1{\ifmmode\clf_setmathalternate{#1}\fi} \installcorenamespace{mathstylealternative} % might become a setuphandler @@ -441,7 +439,7 @@ \appendtoks \edef\p_stylealternative{\mathematicsparameter\c!stylealternative}% \ifempty\p_stylealternative\else - \clf_presetmathalternate\defaultmathfamily{\p_stylealternative}% + \presetmathfontalternate{\p_stylealternative}% \fi \to \everymathematics @@ -1372,8 +1370,8 @@ \installcorenamespace{mathaligndirection} -\setvalue{\??mathaligndirection r2l}{\settrue\c_math_right_to_left} -\setvalue{\??mathaligndirection\v!righttoleft}{\settrue\c_math_right_to_left} +\defcsname\??mathaligndirection r2l\endcsname{\settrue\c_math_right_to_left} +\defcsname\??mathaligndirection\v!righttoleft\endcsname{\settrue\c_math_right_to_left} \appendtoks \ifcsname\??mathaligndirection\mathematicsparameter\c!align\endcsname @@ -1528,7 +1526,7 @@ \letcsname\??mathitalics 2\endcsname\plustwo % fontdata \letcsname\??mathitalics 3\endcsname\plusthree % quad based \letcsname\??mathitalics 4\endcsname\plusfour % combination of 1 and 3 -\letcsname\??mathitalics\v!none \endcsname\attributeunsetvalue +\letcsname\??mathitalics \v!none\endcsname\attributeunsetvalue \letcsname\??mathitalics\v!reset\endcsname\attributeunsetvalue \def\math_italics_initialize @@ -2533,8 +2531,8 @@ \newcount\interdisplaylinepenalty \interdisplaylinepenalty\plushundred -% Actually, not using an if saves one macro so there is no penalty -% for splitting up this macro. +% Actually, not using an if saves one macro so there is no penalty for splitting up +% this macro. % % \newif\ifdt@p % @@ -2626,8 +2624,8 @@ % this should be a primitive: -\permanent\def\mathextensiblecode#1#2{\clf_extensiblecode\numexpr#1\relax\numexpr#2\relax} -\permanent\def\mathhorizontalcode#1#2{\clf_horizontalcode\numexpr#1\relax\numexpr#2\relax} +\permanent\def\mathextensiblecode#1#2{\clf_extensiblecode\numexpr#1\relax\numexpr#2\relax} % todo: use public lua but needs testing +\permanent\def\mathhorizontalcode#1#2{\clf_horizontalcode\numexpr#1\relax\numexpr#2\relax} % todo: use public lua but needs testing % experimental: diff --git a/tex/context/base/mkxl/math-map.lmt b/tex/context/base/mkxl/math-map.lmt index 304cbe592..8637667de 100644 --- a/tex/context/base/mkxl/math-map.lmt +++ b/tex/context/base/mkxl/math-map.lmt @@ -46,6 +46,9 @@ local setmetatableindex = table.setmetatableindex local texgetattribute = tex.getattribute local texsetattribute = tex.setattribute +local texgetmode = tex.getmode +local mathmode_code = tex.modelevels.math + local trace_greek = false trackers.register("math.greek", function(v) trace_greek = v end) local report_remapping = logs.reporter("mathematics","remapping") @@ -651,34 +654,46 @@ end implement { name = "setmathattribute", - arguments = "2 strings", + arguments = "2 arguments", + public = true, + protected = true, actions = function(alphabet,style) - local data = alphabets[alphabet] or regular - data = data[style] or data.tf - texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) + if texgetmode() == mathmode_code then + local data = alphabets[alphabet] or regular + data = data[style] or data.tf + texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) + end end } implement { - name = "setmathstyle", - arguments = "string", + name = "setmathfontstyle", + arguments = "argument", + public = true, + protected = true, actions = function(style) - local r = mathremap[texgetattribute(mathalphabet)] - local alphabet = r and r.alphabet or "regular" - local data = alphabets[alphabet][style] - texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) + if texgetmode() == mathmode_code then + local r = mathremap[texgetattribute(mathalphabet)] + local alphabet = r and r.alphabet or "regular" + local data = alphabets[alphabet][style] + texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) + end end } implement { name = "setmathalphabet", - arguments = "string", + arguments = "argument", + public = true, + protected = true, actions = function(alphabet) - -- local r = mathremap[mathalphabet] - local r = mathremap[texgetattribute(mathalphabet)] - local style = r and r.style or "tf" - local data = alphabets[alphabet][style] - texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) + if texgetmode() == mathmode_code then + -- local r = mathremap[mathalphabet] + local r = mathremap[texgetattribute(mathalphabet)] + local style = r and r.style or "tf" + local data = alphabets[alphabet][style] + texsetattribute(mathalphabet,data and data.attribute or texattribute[mathalphabet]) + end end } diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt index 09c67b8a1..5745695d8 100644 --- a/tex/context/base/mkxl/math-noa.lmt +++ b/tex/context/base/mkxl/math-noa.lmt @@ -47,6 +47,9 @@ local registerdirective = directives.register local logreporter = logs.reporter local setmetatableindex = table.setmetatableindex +local texgetmode = tex.getmode +local mathmode_code = tex.modelevels.math + local colortracers = nodes.tracers.colors local trace_remapping = false registertracker("math.remapping", function(v) trace_remapping = v end) @@ -1412,6 +1415,7 @@ do local fontresources = fonts.hashes.resources local function getalternate(fam,tag,current) + -- fam is always zero, so we assume a very consistent setup local resources = fontresources[getfontoffamily(fam)] local attribute = unsetvalue if resources then @@ -1452,26 +1456,28 @@ do end end - local function presetalternate(fam,tag) - texsetattribute(a_mathalternate,getalternate(fam,tag)) - end - implement { - name = "presetmathalternate", - actions = presetalternate, - arguments = { "integer", "string" } + name = "presetmathfontalternate", + arguments = "argument", + public = true, + protected = true, + actions = function(tag) + if texgetmode() == mathmode_code then + texsetattribute(a_mathalternate,getalternate(0,tag)) + end + end, } - local function setalternate(fam,tag) - local a = texgetattribute(a_mathalternate) - local v = getalternate(fam,tag,a) - texsetattribute(a_mathalternate,v) - end - implement { - name = "setmathalternate", - actions = setalternate, - arguments = { "integer", "string" } + name = "setmathfontalternate", + arguments = "argument", + public = true, + protected = true, + actions = function(tag) + if texgetmode() == mathmode_code then + texsetattribute(a_mathalternate,getalternate(0,tag,texgetattribute(a_mathalternate))) + end + end, } alternate[mathchar_code] = function(pointer) -- slow diff --git a/tex/context/base/mkxl/math-rad.mklx b/tex/context/base/mkxl/math-rad.mklx index c5445f8f1..041681f0b 100644 --- a/tex/context/base/mkxl/math-rad.mklx +++ b/tex/context/base/mkxl/math-rad.mklx @@ -23,8 +23,8 @@ %D Old stuff: -% \def\rootradical{\Uroot \defaultmathfamily "221A } % can be done in char-def -% \def\surdradical{\Uradical \defaultmathfamily "221A } % can be done in char-def +% \def\rootradical{\Uroot 0 "221A } % can be done in char-def +% \def\surdradical{\Uradical 0 "221A } % can be done in char-def \permanent\protected\def\root#1\of{\rootradical{#1}} % #2 diff --git a/tex/context/base/mkxl/math-stc.mklx b/tex/context/base/mkxl/math-stc.mklx index b819c3ca5..5ae8857dd 100644 --- a/tex/context/base/mkxl/math-stc.mklx +++ b/tex/context/base/mkxl/math-stc.mklx @@ -1028,8 +1028,8 @@ % \setupbodyfont[xits] \getbuffer % \setupbodyfont[cambria] \getbuffer -\immutable\protected\def\normaldoublebrace {\Umathaccents 0 \defaultmathfamily "23DE 0 \defaultmathfamily "23DF } -\immutable\protected\def\normaldoubleparent{\Umathaccents 0 \defaultmathfamily "23DC 0 \defaultmathfamily "23DD } +\immutable\protected\def\normaldoublebrace {\Umathaccents \zerocount \zerocount "23DE \zerocount \zerocount "23DF } +\immutable\protected\def\normaldoubleparent{\Umathaccents \zerocount \zerocount "23DC \zerocount \zerocount "23DD } % let's keep this @@ -1340,7 +1340,7 @@ \fi \ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi {\usemathstackerscolorparameter\c!color - \Umathchar\zerocount\defaultmathfamily#codepoint}% + \Umathchar\zerocount\zerocount#codepoint}% \ifempty\p_moffset \else \mskip\p_moffset\relax \fi @@ -1370,10 +1370,10 @@ % \mathrel{\mathop{\hbox to \dimen0{\hss\copy4\hss}} % \limits\normalsuperscript{\box0}\normalsubscript{\box2}}% -% $\Uoverdelimiter \defaultmathfamily "2194 {xxxx}$ -% $\Uunderdelimiter\defaultmathfamily "2194 {xxxx}$ -% $\Udelimiterover \defaultmathfamily "2194 {xxxx}$ -% $\Udelimiterunder\defaultmathfamily "2194 {xxxx}$ -% $\Udelimiterover \defaultmathfamily "219A {\Udelimiterunder \defaultmathfamily "219B {xxxx}}$ +% $\Uoverdelimiter \zerocount "2194 {xxxx}$ +% $\Uunderdelimiter\zerocount "2194 {xxxx}$ +% $\Udelimiterover \zerocount "2194 {xxxx}$ +% $\Udelimiterunder\zerocount "2194 {xxxx}$ +% $\Udelimiterover \zerocount "219A {\Udelimiterunder \zerocount "219B {xxxx}}$ % $a \mathrel{\mathop{\filledhboxr{mid}}}\limits^{\filledhboxg{\strut top}}_{\filledhboxb{\strut bottom}} b$ diff --git a/tex/context/base/mkxl/page-bck.mkxl b/tex/context/base/mkxl/page-bck.mkxl index 5683ba250..e955325e5 100644 --- a/tex/context/base/mkxl/page-bck.mkxl +++ b/tex/context/base/mkxl/page-bck.mkxl @@ -19,6 +19,8 @@ \unprotect +\startcontextdefinitioncode + % maybe use \currentframedhash here %D For special purposes, users can question the \type {*background} mode. This mode @@ -664,6 +666,8 @@ \permanent\let\popbackground\relax +\stopcontextdefinitioncode + \protect \endinput % %D The next series is used in local (for instance floating) backgrounds. diff --git a/tex/context/base/mkxl/page-com.mkxl b/tex/context/base/mkxl/page-com.mkxl index a7d8aaba7..fbe6a0e70 100644 --- a/tex/context/base/mkxl/page-com.mkxl +++ b/tex/context/base/mkxl/page-com.mkxl @@ -66,7 +66,7 @@ % \fi -\setvalue{\??pagecommentstates\v!start}% +\defcsname\??pagecommentstates\v!start\endcsname {\d_page_comments_offset \directpagecommentparameter\c!offset \relax \d_page_comments_distance\directpagecommentparameter\c!distance\relax \d_page_comments_width \directpagecommentparameter\c!width \relax @@ -76,41 +76,41 @@ \setuppapersize[\papersize][\v!pagecomment]% \setupbackgrounds[\v!paper][\c!background=\v!pagecomment]} % maybe append if already set -\setvalue{\??pagecommentstates\v!stop}% +\defcsname\??pagecommentstates\v!stop\endcsname {\setupbackgrounds[\v!paper][\c!background=]} -\setvalue{\??pagecommentstates\v!none}% +\defcsname\??pagecommentstates\v!none\endcsname {} -\setvalue{\??pagecommentlocations\v!bottom}% +\defcsname\??pagecommentlocations\v!bottom\endcsname {\setuplayout[\c!location=]% \setuppapersize[\c!top=\vskip\d_page_comments_offset,\c!bottom=\vss,\c!left=\hskip\d_page_comments_offset,\c!right=]% \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_height\relax \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset\relax \defineoverlay[\v!pagecomment][\page_comments_top_bottom]} -\setvalue{\??pagecommentlocations\v!top}% +\defcsname\??pagecommentlocations\v!top\endcsname {\setuplayout[\c!location=]% \setuppapersize[\c!top=\vss,\c!bottom=\vskip\d_page_comments_offset,\c!left=\hskip\d_page_comments_offset,\c!right=]% \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_height\relax \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset\relax \defineoverlay[\v!pagecomment][\page_comments_top_bottom]} -\setvalue{\??pagecommentlocations\v!left}% +\defcsname\??pagecommentlocations\v!left\endcsname {\setuplayout[\c!location=]% \setuppapersize[\c!top=\vskip\d_page_comments_offset,\c!bottom=,\c!left=\hss,\c!right=\hskip\d_page_comments_offset]% \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset\relax \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_width\relax \defineoverlay[\v!pagecomment][\page_comments_left_right]} -\setvalue{\??pagecommentlocations\v!right}% +\defcsname\??pagecommentlocations\v!right\endcsname {\setuplayout[\c!location=]% \setuppapersize[\c!top=\vskip\d_page_comments_offset,\c!bottom=,\c!left=\hskip\d_page_comments_offset,\c!right =\hss]% \d_page_comments_page_height\dimexpr\paperheight+2\d_page_comments_offset\relax \d_page_comments_page_width \dimexpr\paperwidth +2\d_page_comments_offset+\d_page_comments_distance+\d_page_comments_width\relax \defineoverlay[\v!pagecomment][\page_comments_left_right]} -\setvalue{\??pagecommentlocations\v!none}% +\defcsname\??pagecommentlocations\v!none\endcsname {}% \setuppapersize[\c!bottom=,\c!top=,\c!left=,\c!right=]} \protected\def\page_comments_top_bottom diff --git a/tex/context/base/mkxl/page-imp.mkxl b/tex/context/base/mkxl/page-imp.mkxl index 676313029..b555ffab6 100644 --- a/tex/context/base/mkxl/page-imp.mkxl +++ b/tex/context/base/mkxl/page-imp.mkxl @@ -142,9 +142,9 @@ \def\page_shipouts_ignore#1% {\begingroup \writestatus\m!system - {\ifarrangingpages arranged \fi page + {\ifarrangingpages arranged\normalspace\fi page\normalspace \ifarrangingpages\the\arrangeno\else\the\realpageno\fi\normalspace - not flushed}% + not\normalspace flushed}% % \setbox\scratchbox\hpack % {#1}% no finalize \deadcycles\zerocount diff --git a/tex/context/base/mkxl/page-inf.mkxl b/tex/context/base/mkxl/page-inf.mkxl index 7e65d6e9a..107591af3 100644 --- a/tex/context/base/mkxl/page-inf.mkxl +++ b/tex/context/base/mkxl/page-inf.mkxl @@ -29,12 +29,14 @@ \permanent\tolerant\protected\def\setupversion[#1]% {\the\everyresetversion - \doifelseassignment{#1}% - {\getdummyparameters[\c!alternative=,\c!text=,#1]% - \edef\currentversioninfo{\dummyparameter\c!alternative}% - \edef\currentversiontext{\dummyparameter\c!text}}% - {\edef\currentversioninfo{#1}% - \let \currentversiontext\empty}% + \ifhastok={#1}% + \getdummyparameters[\c!alternative=,\c!text=,#1]% + \edef\currentversioninfo{\dummyparameter\c!alternative}% + \edef\currentversiontext{\dummyparameter\c!text}% + \else + \edef\currentversioninfo{#1}% + \let \currentversiontext\empty + \fi \ifcsname\??layoutinfo\currentversioninfo\endcsname \let\page_info_add_to_box\page_info_add_to_box_indeed \else @@ -49,7 +51,7 @@ {\begincsname\??layoutinfo\currentversioninfo\endcsname} \permanent\protected\def\installversioninfo#1#2% - {\setvalue{\??layoutinfo#1}{#2}} + {\defcsname\??layoutinfo#1\endcsname{#2}} \permanent\protected\def\includeversioninfo#1% {\begincsname\??layoutinfo#1\endcsname} diff --git a/tex/context/base/mkxl/page-mrk.mkxl b/tex/context/base/mkxl/page-mrk.mkxl index f04d31e3a..76b6e0745 100644 --- a/tex/context/base/mkxl/page-mrk.mkxl +++ b/tex/context/base/mkxl/page-mrk.mkxl @@ -103,7 +103,7 @@ \setbox\scratchbox\hpack \layoutcomponentboxattribute\bgroup \useMPgraphic {print:number}% - {w=\the\scratchwidth ,h=\the\scratchheight,% + {w=\the\scratchwidth,h=\the\scratchheight,% l=\pagecutmarklength,o=\pagecutmarkoffset,% n=\number\ifcase\arrangeno\realpageno\else\arrangeno\fi}% \egroup diff --git a/tex/context/base/mkxl/page-plg.mkxl b/tex/context/base/mkxl/page-plg.mkxl index 10cc1447b..7671a39c4 100644 --- a/tex/context/base/mkxl/page-plg.mkxl +++ b/tex/context/base/mkxl/page-plg.mkxl @@ -111,6 +111,8 @@ \unprotect +\startcontextdefinitioncode + \installcorenamespace{layoutmakeupalternative} \def\page_boxes_construct_content_makeup#1#2#3% targetbox flusher box @@ -196,8 +198,8 @@ % to be done nicely (proper namespacing) -\setvalue{\??layoutmakeupalternative\v!leftpage }{\csname\??layoutmakeupalternative\v!page\endcsname} -\setvalue{\??layoutmakeupalternative\v!rightpage}{\csname\??layoutmakeupalternative\v!page\endcsname} +\defcsname\??layoutmakeupalternative\v!leftpage \endcsname{\csname\??layoutmakeupalternative\v!page\endcsname} +\defcsname\??layoutmakeupalternative\v!rightpage\endcsname{\csname\??layoutmakeupalternative\v!page\endcsname} \permanent\protected\def\startpagelayout {\bgroup @@ -208,6 +210,8 @@ \def\page_layouts_start_layout[#1]#2\stoppagelayout {\egroup - \setvalue{\??layoutmakeupalternative#1}{#2}} + \defcsname\??layoutmakeupalternative#1\endcsname{#2}} + +\stopcontextdefinitioncode \protect \endinput diff --git a/tex/context/base/mkxl/page-sel.mklx b/tex/context/base/mkxl/page-sel.mklx index 41ca751ad..0cdef5ba4 100644 --- a/tex/context/base/mkxl/page-sel.mklx +++ b/tex/context/base/mkxl/page-sel.mklx @@ -19,6 +19,8 @@ \unprotect +\startcontextdefinitioncode + %D One can (mis)use this mechanism to (re)arrange pages of already produced files. %D %D \starttyping @@ -63,9 +65,9 @@ \dontcomplain \getfiguredimensions[#filename]% \setupcurrentwithpages - [\c!width=\zeropoint,% - \c!n=\noffigurepages,% - \c!category=,% + [\c!width=\zeropoint, + \c!n=\noffigurepages, + \c!category=, #settings]% \global\c_page_selectors_n\directwithpagesparameter\c!n\relax \scratchwidth\directwithpagesparameter\c!width\relax @@ -85,9 +87,9 @@ \dontcomplain \getfiguredimensions[#filename]% \setupcurrentwithpages - [\c!width=\zeropoint,% - \c!n=\noffigurepages,% - \c!category=,% + [\c!width=\zeropoint, + \c!n=\noffigurepages, + \c!category=, #settings]% \global\c_page_selectors_n\directwithpagesparameter\c!n\relax \scratchwidth\directwithpagesparameter\c!width\relax @@ -136,10 +138,10 @@ {\bgroup \getfiguredimensions[#filename]% \setupcurrentwithpages - [\c!marking=\v!off,% - \c!offset=\zeropoint,% - \c!n=\noffigurepages,% - \c!category=,% + [\c!marking=\v!off, + \c!offset=\zeropoint, + \c!n=\noffigurepages, + \c!category=, #settings]% \global\c_page_selectors_n\directwithpagesparameter\c!n\relax \scratchoffset\directwithpagesparameter\c!offset\relax @@ -212,7 +214,7 @@ \directwithpagesparameter\c!after \egroup} -\setvalue{\??combinepagesalternative\v!a}% use hpacks +\defcsname\??combinepagesalternative\v!a\endcsname % use hpacks {\global\combinedpagescounter\directwithpagesparameter\c!start\relax \doloop {\vbox to \textheight @@ -237,7 +239,7 @@ \c!backgroundcolor=\directwithpagesparameter\c!backgroundcolor, \c!frame=\directwithpagesparameter\c!frame]% \fi - \directwithpagesparameter\c!right} + \directwithpagesparameter\c!right}% \directwithpagesparameter\c!bottom}% \global\advance\combinedpagescounter\plusone \hfil}% @@ -249,7 +251,7 @@ \exitloop \fi}} -\setvalue{\??combinepagesalternative\v!c}% +\defcsname\??combinepagesalternative\v!c\endcsname {\global\combinedpagescounter\directwithpagesparameter\c!start\relax \doloop {\vbox to \textheight @@ -288,7 +290,7 @@ \letcsname\??combinepagesalternative\v!horizontal\expandafter\endcsname\csname\??combinepagesalternative\v!a\endcsname \letcsname\??combinepagesalternative\v!vertical \expandafter\endcsname\csname\??combinepagesalternative\v!c\endcsname -\setvalue{\??combinepagesalternative\v!b}% +\defcsname\??combinepagesalternative\v!b\endcsname {\global\combinedpagescounter\directwithpagesparameter\c!start\relax \doloop {\startbaselinecorrection @@ -332,20 +334,23 @@ \glet\slicedpagenumber\!!zerocount \getfiguredimensions[#filename]% \setupcurrentwithpages - [\c!offset=\zeropoint,% - \c!hoffset=\zeropoint,% + [\c!offset=\zeropoint, + \c!hoffset=\zeropoint, \c!voffset=\zeropoint, - \c!width=\figurewidth,% - \c!height=\figureheight,% - \c!n=\noffigurepages,% - \c!category=,% + \c!width=\figurewidth, + \c!height=\figureheight, + \c!n=\noffigurepages, + \c!category=, #oddsettings]% \global\c_page_selectors_n\directwithpagesparameter\c!n\relax \ifnum\c_page_selectors_n>\zerocount \definepapersize - [\s!dummy][\c!height=\directwithpagesparameter\c!height,\c!width=\directwithpagesparameter\c!width]% + [\s!dummy] + [\c!height=\directwithpagesparameter\c!height, + \c!width=\directwithpagesparameter\c!width]% \setuppapersize - [\s!dummy][\s!dummy]% + [\s!dummy] + [\s!dummy]% \setuplayout [\c!backspace=\zeropoint,\c!topspace=\zeropoint, \c!height=\v!middle,\c!width=\v!middle, @@ -360,9 +365,9 @@ \dorecurse\c_page_selectors_n {\let\slicedpagestepy\recurselevel \clip - [\c!nx=\c_page_selectors_n,\c!ny=\c_page_selectors_n,\c!x=\slicedpagestepx,\c!y=\slicedpagestepy] + [\c!nx=\c_page_selectors_n,\c!ny=\c_page_selectors_n,\c!x=\slicedpagestepx,\c!y=\slicedpagestepy]% {\scale - [\c!scale=\number\c_page_selectors_n000] + [\c!scale=\number\c_page_selectors_n000]% {\externalfigure[#filename][\c!page=\slicedpagenumber]}}% \page}}% \else @@ -385,21 +390,21 @@ \permanent\protected\def\trimpages[#1]% was for a over decade in p-pdf-51.tex {\begingroup \getdummyparameters - [\c!file=dummy, + [\c!file=dummy,% \c!hoffset=\zeropoint, \c!voffset=\zeropoint, \c!width=17cm, \c!height=24cm, \c!x=\zeropoint, \c!y=\zeropoint, - #1] + #1]% \getfiguredimensions [\dummyparameter\c!file] - [\c!object=\v!no] + [\c!object=\v!no]% \dorecurse\noffigurepages {\scale [\c!width=\paperwidth, - \c!height=\paperheight] + \c!height=\paperheight]% {\offset [\c!x=\dummyparameter\c!x, \c!y=\dummyparameter\c!y] @@ -418,4 +423,6 @@ \fi}}}}% \endgroup} +\stopcontextdefinitioncode + \protect \endinput diff --git a/tex/context/base/mkxl/page-smp.mkxl b/tex/context/base/mkxl/page-smp.mkxl index d560843e0..2f620bdbc 100644 --- a/tex/context/base/mkxl/page-smp.mkxl +++ b/tex/context/base/mkxl/page-smp.mkxl @@ -13,6 +13,8 @@ \unprotect +\startcontextdefinitioncode + %D The old one: \definemixedcolumns @@ -50,8 +52,10 @@ \edef\rigidcolumnlines {\directdummyparameter\c!lines}% \setrigidcolumnhsize - {\directdummyparameter\c!width}% - {\directdummyparameter\c!distance}% + {\directdummyparameter\c!width} + {\directdummyparameter\c!distance} {\directdummyparameter\c!n}} +\stopcontextdefinitioncode + \protect \endinput diff --git a/tex/context/base/mkxl/page-txt.mklx b/tex/context/base/mkxl/page-txt.mklx index 969f0a447..27cf50773 100644 --- a/tex/context/base/mkxl/page-txt.mklx +++ b/tex/context/base/mkxl/page-txt.mklx @@ -252,12 +252,12 @@ \def\page_layouts_process_element_limited#content% are the {}{}{} still needed? {\limitated left \p_width - text {#content} - sentinel {\unknown} + text {#content}% + sentinel {\unknown}% \relax} -\setvalue{\??layouttextspecial\v!pagenumber}{\page_layouts_place_page_number} -\setvalue{\??layouttextspecial\v!date }{\currentdate} +\defcsname\??layouttextspecial\v!pagenumber\endcsname{\page_layouts_place_page_number} +\defcsname\??layouttextspecial\v!date \endcsname{\currentdate} %D When specified, the texts are automatically limited in length. @@ -321,24 +321,24 @@ \newconditional\resyncaftertextline -\setvalue{\??layouttextsline\v!normal}{\page_layouts_place_text_line_indeed} -\setvalue{\??layouttextsline\empty }{\page_layouts_place_text_line_indeed} +\defcsname\??layouttextsline\v!normal\endcsname{\page_layouts_place_text_line_indeed} +\defcsname\??layouttextsline\empty \endcsname{\page_layouts_place_text_line_indeed} -\letvalue{\??layouttextsline\v!none}\gobbletwoarguments -\letvalue{\??layouttextsline\v!stop}\gobbletwoarguments +\letcsname\??layouttextsline\v!none\endcsname\gobbletwoarguments +\letcsname\??layouttextsline\v!stop\endcsname\gobbletwoarguments -\setvalue{\??layouttextsline\v!high}#vertical#height% +\defcsname\??layouttextsline\v!high\endcsname#vertical#height% {\global\settrue\resyncaftertextline \page_layouts_reset_element_status#vertical} -\setvalue{\??layouttextsline\v!empty}#vertical#height% +\defcsname\??layouttextsline\v!empty\endcsname#vertical#height% {\page_layouts_reset_element_status#vertical} -\setvalue{\??layouttextsline\v!start}#vertical#height% +\defcsname\??layouttextsline\v!start\endcsname#vertical#height% {\page_layouts_reset_element_status#vertical% \page_layouts_place_text_line_indeed#vertical#height} -\setvalue{\??layouttextsline\v!nomarking}#vertical#height% +\defcsname\??layouttextsline\v!nomarking\endcsname#vertical#height% {\bgroup \page_layouts_reset_element_status#vertical% \settrue\inhibitgetmarking @@ -367,7 +367,7 @@ \page_layouts_place_text_line_indeed#vertical#height% \endgroup} -\letvalue{\??layouttextsline\s!unknown}\page_layouts_place_text_line_unknown +\letcsname\??layouttextsline\s!unknown\endcsname\page_layouts_place_text_line_unknown %D The following macro has to be called after a page is flushed. @@ -788,25 +788,25 @@ {\let\m_page_layouts_page_number_location_v\v!footer \let\m_page_layouts_page_number_location_h\v!text \let\m_page_layouts_page_number_location_x\c!middletext - \processallactionsinset[\directpagenumberingparameter\c!location] - [ \v!header=>\let\m_page_layouts_page_number_location_v\v!header, - \v!footer=>\let\m_page_layouts_page_number_location_v\v!footer, + \processallactionsinset[\directpagenumberingparameter\c!location]% + [ \v!header=>\let\m_page_layouts_page_number_location_v\v!header,% + \v!footer=>\let\m_page_layouts_page_number_location_v\v!footer,% \v!middle=>\let\m_page_layouts_page_number_location_h\v!text - \let\m_page_layouts_page_number_location_x\c!middletext, + \let\m_page_layouts_page_number_location_x\c!middletext,% \v!left=>\let\m_page_layouts_page_number_location_h\v!text - \let\m_page_layouts_page_number_location_x\c!lefttext, + \let\m_page_layouts_page_number_location_x\c!lefttext,% \v!right=>\let\m_page_layouts_page_number_location_h\v!text - \let\m_page_layouts_page_number_location_x\c!righttext, + \let\m_page_layouts_page_number_location_x\c!righttext,% \v!inleft=>\let\m_page_layouts_page_number_location_h\v!margin - \let\m_page_layouts_page_number_location_x\c!lefttext, + \let\m_page_layouts_page_number_location_x\c!lefttext,% \v!inright=>\let\m_page_layouts_page_number_location_h\v!margin - \let\m_page_layouts_page_number_location_x\c!righttext, + \let\m_page_layouts_page_number_location_x\c!righttext,% \v!inmargin=>\let\m_page_layouts_page_number_location_h\v!margin - \def\m_page_layouts_page_number_location_x{\ifdoublesided\c!margintext\else\c!righttext\fi}, + \def\m_page_layouts_page_number_location_x{\ifdoublesided\c!margintext\else\c!righttext\fi},% \v!margin=>\let\m_page_layouts_page_number_location_h\v!margin - \def\m_page_layouts_page_number_location_x{\ifdoublesided\c!margintext\else\c!righttext\fi}, + \def\m_page_layouts_page_number_location_x{\ifdoublesided\c!margintext\else\c!righttext\fi},% \v!atmargin=>\let\m_page_layouts_page_number_location_h\v!text - \let\m_page_layouts_page_number_location_x\c!marginedgetext, + \let\m_page_layouts_page_number_location_x\c!marginedgetext,% \v!marginedge=>\let\m_page_layouts_page_number_location_h\v!text \let\m_page_layouts_page_number_location_x\c!marginedgetext]} diff --git a/tex/context/base/mkxl/strc-ref.mklx b/tex/context/base/mkxl/strc-ref.mklx index 1f0491cf1..a11e9dd5f 100644 --- a/tex/context/base/mkxl/strc-ref.mklx +++ b/tex/context/base/mkxl/strc-ref.mklx @@ -188,7 +188,7 @@ \protected\def\strc_references_destination_point_yes {\strc_references_inject_before % new \dostarttagged\t!reference\empty - \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup + \dontleavehmode\hbox attr \destinationattribute\lastdestinationattribute\bgroup % \hpack \strc_references_flush_destination_nodes \strc_references_placeholder \egroup @@ -198,7 +198,7 @@ \protected\def\strc_references_destination_point_nop {\strc_references_inject_before % new \dostarttagged\t!reference\empty - \dontleavehmode\hbox \bgroup + \dontleavehmode\hbox \bgroup % \hpack \strc_references_flush_destination_nodes \strc_references_placeholder \egroup diff --git a/tex/context/interface/mkii/keys-fr.xml b/tex/context/interface/mkii/keys-fr.xml index c337aa5be..0149da566 100644 --- a/tex/context/interface/mkii/keys-fr.xml +++ b/tex/context/interface/mkii/keys-fr.xml @@ -154,6 +154,7 @@ <cd:variable name='commands' value='commandes'/> <cd:variable name='comment' value='commentaire'/> <cd:variable name='component' value='composant'/> + <cd:variable name='compress' value='compress'/> <cd:variable name='compressseparator' value='separateurreduction'/> <cd:variable name='compressstopper' value='stoppeurreduction'/> <cd:variable name='concept' value='concept'/> diff --git a/tex/context/modules/mkxl/s-system-tokens.lmt b/tex/context/modules/mkxl/s-system-tokens.lmt index 39258d637..c19f6699e 100644 --- a/tex/context/modules/mkxl/s-system-tokens.lmt +++ b/tex/context/modules/mkxl/s-system-tokens.lmt @@ -173,7 +173,7 @@ function moduledata.system.tokens.table(t) end w = concat(r, " ") end - if type(t) == "table" then + if type(t) == "table" and #t > 0 then context.starttabulate { "|l|r|r|l|c|l|l|" } ctx_FL() ctx_NC() context.formatted.rlap("\\bold %s: %s",w,n) diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index e764e950c..cba008e9d 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 : 2021-08-19 19:40 +-- merge date : 2021-08-22 11:51 do -- begin closure to overcome local limits and interference |