diff options
Diffstat (limited to 'tex/context/base/mkiv/meta-pdh.lua')
-rw-r--r-- | tex/context/base/mkiv/meta-pdh.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tex/context/base/mkiv/meta-pdh.lua b/tex/context/base/mkiv/meta-pdh.lua index 5040715c4..afd1576cb 100644 --- a/tex/context/base/mkiv/meta-pdh.lua +++ b/tex/context/base/mkiv/meta-pdh.lua @@ -30,7 +30,9 @@ local concat, format, find, gsub, gmatch = table.concat, string.format, string.f local tostring, tonumber, select = tostring, tonumber, select local lpegmatch = lpeg.match -local metapost = metapost +metapost = metapost or { } +local metapost = metapost +local context = context metapost.mptopdf = metapost.mptopdf or { } local mptopdf = metapost.mptopdf @@ -98,7 +100,7 @@ function mptopdf.steps.strip() -- .3 per expr end local name, version = gmatch(preamble,"%%%%Creator: +(.-) +(.-) ") mptopdf.version = tostring(version or "0") - if find(preamble,"/hlw{0 dtransform") then + if find(preamble,"/hlw{0 dtransform",1,true) then mptopdf.shortcuts = true end -- the boundingbox specification needs to come before data, well, not really @@ -587,7 +589,7 @@ do local captures_new = ( space + procset + preamble + verbose )^0 function mptopdf.parsers.lpeg() - if find(mptopdf.data,"%%%%BeginResource: procset mpost") then + if find(mptopdf.data,"%%BeginResource: procset mpost",1,true) then lpegmatch(captures_new,mptopdf.data) else lpegmatch(captures_old,mptopdf.data) |