summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/mlib-pps.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-01-27 16:14:16 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-01-27 16:14:16 +0100
commit95a1799032dc61dbca4a11e495be34b4397c8fec (patch)
tree4b24bf117a90ba704dedf19ab1b1a734d78f4e45 /tex/context/base/mkiv/mlib-pps.lua
parent0cfeab235554eeee0dddd6c3f44d3939ab490ff1 (diff)
downloadcontext-95a1799032dc61dbca4a11e495be34b4397c8fec.tar.gz
2017-01-27 14:46:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-pps.lua')
-rw-r--r--tex/context/base/mkiv/mlib-pps.lua18
1 files changed, 6 insertions, 12 deletions
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 945830853..d08d5ddb7 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -23,7 +23,7 @@ local setmacro = interfaces.setmacro
----- texgetbox = tex.getbox
local texsetbox = tex.setbox
-local textakebox = tex.takebox
+local textakebox = tex.takebox -- or: nodes.takebox
local copy_list = node.copy_list
local flush_list = node.flush_list
local setmetatableindex = table.setmetatableindex
@@ -258,10 +258,10 @@ end
local function stopjob()
if top then
- for n, tn in next, top.textexts do
- flush_list(tn)
+ for slot, content in next, top.textexts do
+ flush_list(content)
if trace_textexts then
- report_textexts("freeing text %s",n)
+ report_textexts("freeing text %s",slot)
end
end
if trace_runs then
@@ -284,12 +284,7 @@ local function settext(box,slot)
-- if trace_textexts then
-- report_textexts("getting text %s from box %s",slot,box)
-- end
- -- top.textexts[slot] = copy_list(texgetbox(box))
- -- texsetbox(box,nil)
- -- this can become
top.textexts[slot] = textakebox(box)
- else
- -- weird error
end
end
@@ -300,9 +295,6 @@ local function gettext(box,slot)
-- if trace_textexts then
-- report_textexts("putting text %s in box %s",slot,box)
-- end
- -- top.textexts[slot] = nil -- no, pictures can be placed several times
- else
- -- weird error
end
end
@@ -745,6 +737,8 @@ function metapost.graphic_base_pass(specification) -- name will change (see mlib
context(stopjob)
end
+-- we overload metapost.process here
+
function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass, askedfig, plugmode) -- overloads
startjob(plugmode)
processmetapost(mpx, data, trialrun, flusher, multipass, isextrapass, askedfig)