diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-11-10 12:23:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-11-10 12:23:00 +0100 |
commit | 5060dba38886b030b3eb30142a5f4b443579b742 (patch) | |
tree | fbbf55365318f8ce75335ef603af7da47dcf6e36 /tex/context/base/mlib-pps.lua | |
parent | 148a3541e75ffe0d68c7c18175460328b22fd618 (diff) | |
download | context-5060dba38886b030b3eb30142a5f4b443579b742.tar.gz |
beta 2013.11.10 12:23
Diffstat (limited to 'tex/context/base/mlib-pps.lua')
-rw-r--r-- | tex/context/base/mlib-pps.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua index 9f6cedad1..535c9ff9d 100644 --- a/tex/context/base/mlib-pps.lua +++ b/tex/context/base/mlib-pps.lua @@ -967,24 +967,25 @@ local function tx_process(object,prescript,before,after) end end --- graphics +-- graphics (we use the given index because pictures can be reused) local graphics = { } function metapost.intermediate.actions.makempy() if #graphics > 0 then makempy.processgraphics(graphics) - graphics = { } -- ? + graphics = { } -- ? could be gt_reset end end local function gt_analyze(object,prescript) local gt_stage = prescript.gt_stage - if gt_stage == "trial" then - graphics[#graphics+1] = formatters["\\MPLIBgraphictext{%s}"](object.postscript or "") - top.intermediate = true - top.multipass = true - metapost.multipass = true -- ugly + local gt_index = tonumber(prescript.gt_index) + if gt_stage == "trial" and not graphics[gt_index] then + graphics[gt_index] = formatters["\\MPLIBgraphictext{%s}"](object.postscript or "") + top.intermediate = true + top.multipass = true + metapost.multipass = true -- ugly end end |