summaryrefslogtreecommitdiff
path: root/tex/context/base/mlib-pps.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-11-27 15:54:00 +0100
committerHans Hagen <pragma@wxs.nl>2012-11-27 15:54:00 +0100
commitb631755b8a94ec171a195eb02f23b6f7a7be2024 (patch)
treea6f3562d91eda6d4d403ca93c71972a738701384 /tex/context/base/mlib-pps.lua
parent82a9d3d7e785ad838f8c6d0e5d779947be0c359f (diff)
downloadcontext-b631755b8a94ec171a195eb02f23b6f7a7be2024.tar.gz
beta 2012.11.27 15:54
Diffstat (limited to 'tex/context/base/mlib-pps.lua')
-rw-r--r--tex/context/base/mlib-pps.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index 7821b3dbf..8d8db65ae 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -642,7 +642,7 @@ local scriptsplitter = Ct ( Ct (
C((1-S("= "))^1) * S("= ")^1 * C((1-S("\n\r"))^0) * S("\n\r")^0
)^0 )
-local function splitscript(script)
+local function splitprescript(script)
local hash = lpegmatch(scriptsplitter,script)
for i=#hash,1,-1 do
local h = hash[i]
@@ -654,6 +654,20 @@ local function splitscript(script)
return hash
end
+-- -- not used:
+--
+-- local function splitpostscript(script)
+-- local hash = lpegmatch(scriptsplitter,script)
+-- for i=1,#hash do
+-- local h = hash[i]
+-- hash[h[1]] = h[2]
+-- end
+-- if trace_scripts then
+-- report_scripts(table.serialize(hash,"postscript"))
+-- end
+-- return hash
+-- end
+
function metapost.pluginactions(what,t,flushfigure) -- before/after object, depending on what
for i=1,#what do
local wi = what[i]
@@ -681,7 +695,7 @@ end
function metapost.analyzeplugins(object) -- each object (first pass)
local prescript = object.prescript -- specifications
if prescript and #prescript > 0 then
- return analyzer(object,splitscript(prescript))
+ return analyzer(object,splitprescript(prescript))
end
end
@@ -690,7 +704,7 @@ function metapost.processplugins(object) -- each object (second pass)
if prescript and #prescript > 0 then
local before = { }
local after = { }
- processor(object,splitscript(prescript),before,after)
+ processor(object,splitprescript(prescript),before,after)
return #before > 0 and before, #after > 0 and after
else
local c = object.color