17 Sep
2011
17 Sep
'11
11:11 a.m.
In article
Dear Hans,
I have problems with externalfigure inside metapost.
In MKII, only externalfigure "something.png"; works, while in MKIV only draw externalfigure "something.png"; is accepted.
Is there any chance to accept one of the syntaxes in both flavours?
Thank you, Mojca
Minimal example:
\starttext \startMPpage % only good for MKII externalfigure "abc.png" xyscaled (5cm,8cm); % only good for MKIV % draw externalfigure "abc.png" xyscaled (5cm,8cm); \stopMPpage \stoptext
Does the following workaround work for you? def mydraw text t = def f = begingroup t endgroup enddef; if picture f : draw f ; fi enddef; mydraw externalfigure "abc.png" xyscaled (5cm,8cm); Nicola