diff options
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/back-pdp.lua | 56 | ||||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/lpdf-nod.lua | 25 | ||||
-rw-r--r-- | tex/context/base/mkiv/mult-low.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/node-ini.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 24546 -> 24601 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 265635 -> 265852 bytes |
8 files changed, 63 insertions, 25 deletions
diff --git a/tex/context/base/mkiv/back-pdp.lua b/tex/context/base/mkiv/back-pdp.lua index 857f13ef2..3de83bef1 100644 --- a/tex/context/base/mkiv/back-pdp.lua +++ b/tex/context/base/mkiv/back-pdp.lua @@ -22,6 +22,7 @@ local tokenscanners = tokens.scanners local scanword = tokenscanners.word local scankeyword = tokenscanners.keyword local scanstring = tokenscanners.string +local scantoks = tokenscanners.toks local scaninteger = tokenscanners.integer local scanwhd = tokenscanners.whd @@ -30,6 +31,7 @@ local report = logs.reporter("backend") local nodepool = nodes.pool local newliteral = nodepool.literal +local newlateliteral = nodepool.lateliteral local newsave = nodepool.save local newrestore = nodepool.restore local newsetmatrix = nodepool.setmatrix @@ -40,8 +42,24 @@ local variables = interfaces.variables -- literals +-- local function pdfliteral() +-- context(newliteral(scanword() or "origin",scanstring())) +-- end + +-- Who knows what will end up in e.g. tikz .. so we now do: + local function pdfliteral() - context(newliteral(scanword() or "origin",scanstring())) + local word = scanword() + local node + if word == "shipout" then + context(newlateliteral(scanword() or "origin",scantoks())) + else + context(newliteral(word or "origin",scanstring())) + end +end + +local function pdflateliteral() + context(newlateliteral(scanword() or "origin",scantoks())) end -- objects @@ -198,14 +216,15 @@ end -- mapfile mapline includechars catalog info names trailer local extensions = { - literal = pdfliteral, - obj = pdfobj, - refobj = pdfrefobj, - dest = pdfdest, - annot = pdfannot, - save = pdfsave, - restore = pdfrestore, - setmatrix = pdfsetmatrix, + literal = pdfliteral, + lateliteral = pdflateliteral, + obj = pdfobj, + refobj = pdfrefobj, + dest = pdfdest, + annot = pdfannot, + save = pdfsave, + restore = pdfrestore, + setmatrix = pdfsetmatrix, } local function pdfextension() @@ -276,12 +295,13 @@ implement { name = "pdfvariable", actions = pdfvariable } -- for the moment (tikz) -implement { name = "pdfliteral", actions = pdfliteral } -implement { name = "pdfobj", actions = pdfobj } -implement { name = "pdflastobj", actions = pdflastobj } -implement { name = "pdfrefobj", actions = pdfrefobj } ---------- { name = "pdfannot", actions = pdfannot } ---------- { name = "pdfdest", actions = pdfdest } ---------- { name = "pdfsave", actions = pdfsave } ---------- { name = "pdfrestore", actions = pdfrestore } ---------- { name = "pdfsetmatrix", actions = pdfsetmatrix } +implement { name = "pdfliteral", actions = pdfliteral } +implement { name = "pdflateliteral", actions = pdflateliteral } +implement { name = "pdfobj", actions = pdfobj } +implement { name = "pdflastobj", actions = pdflastobj } +implement { name = "pdfrefobj", actions = pdfrefobj } +--------- { name = "pdfannot", actions = pdfannot } +--------- { name = "pdfdest", actions = pdfdest } +--------- { name = "pdfsave", actions = pdfsave } +--------- { name = "pdfrestore", actions = pdfrestore } +--------- { name = "pdfsetmatrix", actions = pdfsetmatrix } diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index b525836df..0fe54e581 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2023.02.14 17:41} +\newcontextversion{2023.02.23 21:23} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index a5e343291..ea936fd95 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -49,7 +49,7 @@ %D {YYYY.MM.DD HH:MM} format. \edef\contextformat {\jobname} -\edef\contextversion{2023.02.14 17:41} +\edef\contextversion{2023.02.23 21:23} %D Kind of special: diff --git a/tex/context/base/mkiv/lpdf-nod.lua b/tex/context/base/mkiv/lpdf-nod.lua index fcb2d1457..6702ed506 100644 --- a/tex/context/base/mkiv/lpdf-nod.lua +++ b/tex/context/base/mkiv/lpdf-nod.lua @@ -24,10 +24,11 @@ local register = nodepool.register local whatsit_code = nodecodes.whatsit -local savewhatsit_code = whatsitcodes.save -local restorewhatsit_code = whatsitcodes.restore -local setmatrixwhatsit_code = whatsitcodes.setmatrix -local literalwhatsit_code = whatsitcodes.literal +local savewhatsit_code = whatsitcodes.save +local restorewhatsit_code = whatsitcodes.restore +local setmatrixwhatsit_code = whatsitcodes.setmatrix +local literalwhatsit_code = whatsitcodes.literal +local lateliteralwhatsit_code = whatsitcodes.lateliteral local literalvalues = nodes.literalvalues local originliteral_code = literalvalues.origin @@ -66,6 +67,22 @@ function nodepool.literal(mode,str) end end +-- We only define this for testing as we don't need it: + +local lateliteralnode = register(new_node(whatsit_code, lateliteralwhatsit_code)) + +function nodepool.lateliteral(mode,str) + local t = copy_node(lateliteralnode) + if str then + setfield(t,"mode",literals[mode] and mode or pageliteral_code) + setdata(t,str) + else + setfield(t,"mode",pageliteral_code) + setdata(t,mode) + end + return t +end + local savenode = register(new_node(whatsit_code, savewhatsit_code)) local restorenode = register(new_node(whatsit_code, restorewhatsit_code)) local setmatrixnode = register(new_node(whatsit_code, setmatrixwhatsit_code)) diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua index 088bc698c..686fbfb7a 100644 --- a/tex/context/base/mkiv/mult-low.lua +++ b/tex/context/base/mkiv/mult-low.lua @@ -113,7 +113,7 @@ return { "checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode", "analyzescriptnucleuscharmathcontrolcode", "analyzescriptnucleuslistmathcontrolcode", "analyzescriptnucleusboxmathcontrolcode", "accenttopskewwithoffsetmathcontrolcode", "ignorekerndimensionsmathcontrolcode", "ignoreflataccentsmathcontrolcode", - "extendaccentsmathcontrolcode", + "extendaccentsmathcontrolcode", "extenddelimitersmathcontrolcode", -- "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode", diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua index 4c27357b7..ef7d4afed 100644 --- a/tex/context/base/mkiv/node-ini.lua +++ b/tex/context/base/mkiv/node-ini.lua @@ -201,6 +201,7 @@ end if not whatcodes.literal then whatcodes.literal = whatcodes.pdfliteral + whatcodes.lateliteral = whatcodes.pdflateliteral whatcodes.save = whatcodes.pdfsave whatcodes.restore = whatcodes.pdfrestore whatcodes.setmatrix = whatcodes.pdfsetmatrix diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 70fe4d224..95229e3fe 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 9540ac450..07a4610e0 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf |