diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-02-25 14:15:08 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-02-25 14:15:08 +0100 |
commit | 2956fe45a7fd41b8f84ccec8edcba66a3445e6e9 (patch) | |
tree | 9b8bb67ac817b66a7395ae7b2a8c7b5586079f32 /tex/context/base/mkiv/mlib-run.lua | |
parent | 33e29b1ba0661b0f58605749528362a0e12eae52 (diff) | |
download | context-2956fe45a7fd41b8f84ccec8edcba66a3445e6e9.tar.gz |
2016-02-25 14:02:00
Diffstat (limited to 'tex/context/base/mkiv/mlib-run.lua')
-rw-r--r-- | tex/context/base/mkiv/mlib-run.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tex/context/base/mkiv/mlib-run.lua b/tex/context/base/mkiv/mlib-run.lua index f20461bbb..8109cff2d 100644 --- a/tex/context/base/mkiv/mlib-run.lua +++ b/tex/context/base/mkiv/mlib-run.lua @@ -601,10 +601,17 @@ do function metapost.simple(format,code) -- even less than metapost.quickcanddirty local mpx = metapost.format(format or "metafun","metafun") -- metapost.setoutercolor(2) - metapost.process(mpx,code,false,flusher,false,false,1,true) -- last true is plugmode ! - local stream = concat(result," ") - result = nil -- cleanup - return stream, width, height, depth + metapost.process(mpx, + { "beginfig(1);", code, "endfig;" }, + false, flusher, false, false, 1, true -- last true is plugmode ! + ) + if result then + local stream = concat(result," ") + result = nil -- cleanup + return stream, width, height, depth + else + return "", 0, 0, 0 + end end end |