summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mlib-pdf.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/mlib-pdf.mkiv11
1 files changed, 8 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv b/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv
index 2681b081044..8506b3b15e6 100644
--- a/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv
+++ b/Master/texmf-dist/tex/context/base/mlib-pdf.mkiv
@@ -15,7 +15,7 @@
\registerctxluafile{mlib-pdf}{1.001}
-\def\MPLIBtoPDF#1{\ctxlua{metapost.flush_literal(#1)}}
+\def\MPLIBtoPDF#1{\ctxlua{metapost.flushliteral(#1)}}
\def\MPLIBboundingbox#1#2#3#4%
{\xdef\MPllx{#1}%
@@ -26,7 +26,8 @@
\xdef\MPheight{\the\dimexpr#4\onebasepoint-#2\onebasepoint\relax}}
\def\startMPLIBtoPDF#1#2#3#4% watch the transparency reset
- {\naturalhbox\bgroup
+ {\dostarttagged\t!mpgraphic\empty
+ \naturalhbox attr \imageattribute 1 \bgroup
\doactivatecolor\s!black\forcecolorhack
\MPLIBboundingbox{#1}{#2}{#3}{#4}%
%\forgetall % done already elsewhere
@@ -52,7 +53,8 @@
\wd\scratchbox\MPwidth
\ht\scratchbox\MPheight
\dopackageMPgraphic\scratchbox
- \egroup}
+ \egroup
+ \dostoptagged}
% \def\MPLIBtextext#1#2#3#4#5%
% {\begingroup
@@ -88,4 +90,7 @@
\box\scratchbox
\endgroup}
+\def\MPLIBflushreset
+ {\ctxlua{metapost.flushreset()}}
+
\protect \endinput