diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-02-08 21:04:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-02-08 21:04:00 +0100 |
commit | c5de3b109d06dbee374f754a7c86d7aac2c4ec3f (patch) | |
tree | f931e06e45076cd7f0c8c6232ff593fa8f464d54 /tex/context/base/mlib-pps.lua | |
parent | 586e8f786598e3f3447e3dbe3589a54c9e6bb696 (diff) | |
download | context-c5de3b109d06dbee374f754a7c86d7aac2c4ec3f.tar.gz |
beta 2012.02.08 21:04
Diffstat (limited to 'tex/context/base/mlib-pps.lua')
-rw-r--r-- | tex/context/base/mlib-pps.lua | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua index 85766a866..e6459df05 100644 --- a/tex/context/base/mlib-pps.lua +++ b/tex/context/base/mlib-pps.lua @@ -624,9 +624,9 @@ local resetter = nil local analyzer = nil local processor = nil -local resetteractions = sequencers.reset { arguments = "" } -local analyzeractions = sequencers.reset { arguments = "object,prescript" } -local processoractions = sequencers.reset { arguments = "object,prescript,before,after" } +local resetteractions = sequencers.new { arguments = "" } +local analyzeractions = sequencers.new { arguments = "object,prescript" } +local processoractions = sequencers.new { arguments = "object,prescript,before,after" } appendgroup(resetteractions, "system") appendgroup(analyzeractions, "system") @@ -654,12 +654,12 @@ local function splitscript(script) return hash end -function metapost.pluginactions(what,t,flushfigure) -- to be checked: too many 0 g 0 G +function metapost.pluginactions(what,t,flushfigure) -- before/after object, depending on what for i=1,#what do local wi = what[i] if type(wi) == "function" then -- assume injection - flushfigure(t) + flushfigure(t) -- to be checked: too many 0 g 0 G t = { } wi() else @@ -669,18 +669,23 @@ function metapost.pluginactions(what,t,flushfigure) -- to be checked: too many 0 return t end -function metapost.resetplugins() +function metapost.resetplugins() -- intialize plugins, before figure + -- plugins can have been added + resetter = resetteractions .runner + analyzer = analyzeractions .runner + processor = processoractions.runner + -- let's apply one runner resetter() end -function metapost.analyzeplugins(object) +function metapost.analyzeplugins(object) -- each object (first pass) local prescript = object.prescript -- specifications if prescript and #prescript > 0 then return analyzer(object,splitscript(prescript)) end end -function metapost.processplugins(object) -- maybe environment table +function metapost.processplugins(object) -- each object (second pass) local prescript = object.prescript -- specifications if prescript and #prescript > 0 then local before = { } @@ -1048,8 +1053,8 @@ appendaction(processoractions,"system",tr_process) -- last, as color can be rese appendaction(processoractions,"system",la_process) --- no auto here +-- we're nice and set them already -resetter = sequencers.compile(resetteractions ) -analyzer = sequencers.compile(analyzeractions ) -processor = sequencers.compile(processoractions) +resetter = resetteractions .runner +analyzer = analyzeractions .runner +processor = processoractions.runner |