<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Perhaps it is this what you are looking for?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted1">
<a href="https://www.ctan.org/pkg/exteps" id="LPlnk793570">https://www.ctan.org/pkg/exteps</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<h1 lang="none" style="margin-bottom: 0.4em; margin-top: 0.7em; padding: 0.2em 0px; font-size: 28px; line-height: 33.6px; border-radius: 6pt 6pt 0px 0px; font-family: Helvetica, Arial, Verdana, sans-serif; color: rgb(66, 66, 133); background-color: rgb(255, 255, 255);" class="ContentPasted0">
exteps – Include EPS figures in<span class="ContentPasted0"> </span><span class="mflogo ContentPasted0" style="font-family:MFLogo, sans-serif;font-size:25.2px">METAPOST</span></h1>
<div class="left" style="margin-top: 1em; max-width: 65em; min-width: 15em; float: left; font-family: Helvetica, Arial, Verdana, sans-serif; font-size: medium; background-color: rgb(255, 255, 255);">
<p style="margin-bottom:0.4em;margin-top:0.3em" class="ContentPasted0"></p>
<p style="margin-bottom:0.4em;margin-top:0.3em" class="ContentPasted0">Exteps is a module for including external EPS figures into<span class="ContentPasted0"> </span><span class="mflogo ContentPasted0" style="font-family:MFLogo, sans-serif;font-size:14.4px">METAPOST</span><span class="ContentPasted0"> </span>figures.
It is written entirely in<span class="ContentPasted0"> </span><span class="mflogo ContentPasted0" style="font-family:MFLogo, sans-serif;font-size:14.4px">METAPOST</span>, and does not therefore require any post processing of the<span class="ContentPasted0"> </span><span class="mflogo ContentPasted0" style="font-family:MFLogo, sans-serif;font-size:14.4px">METAPOST</span><span class="ContentPasted0"> </span>output.</p>
</div>
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> metapost <metapost-bounces+navarro=us.es@tug.org> en nombre de Laurence.Finston@gmx.net <Laurence.Finston@gmx.net><br>
<b>Enviado:</b> jueves, 18 de mayo de 2023 10:31<br>
<b>Para:</b> metapost@tug.org <metapost@tug.org><br>
<b>Asunto:</b> [metapost] Including graphics in MP</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hello,<br>
<br>
Is it possible to include PostScript graphics, or literal PostScript in general, in MP files?<br>
The purpose is to composite multiple images with correct alignment.<br>
It's possible to do this in TeX (see below), but it would be nice to be able to do this directly in MP.<br>
<br>
I've determined that this doesn't work:<br>
<br>
%prologues := 3;<br>
%outputtemplate := "%j_%c.ps";<br>
<br>
outputformat:="png";<br>
outputformatoptions:="format=rgb antialias=none";<br>
outputtemplate := "%j_%c.png";<br>
<br>
verbatimtex \input epsf etex;<br>
<br>
path q[];<br>
<br>
beginfig(1);<br>
q0 = (unitsquare scaled 2cm) shifted (-1cm, -1cm);<br>
draw q0 withpen pencircle scaled .333mm;<br>
label(btex \vbox{\hbox{\epsffile{testdot1.eps}}} etex, origin);<br>
endfig;<br>
end;<br>
<br>
It fails silently and the resulting PNG file is just a white square (see attachment). It doesn't work with EPS output, either.<br>
<br>
It does work to do this in TeX:<br>
<br>
\input epsf<br>
\parindent=0pt<br>
\parskip=0pt<br>
\baselineskip=0pt<br>
\advance\hoffset by -1in<br>
\advance\voffset by -1in<br>
\nopagenumbers<br>
\def\epsfsize#1#2{#1}<br>
<br>
\vbox to 0pt{\vskip2cm\hbox to 0pt{\hskip1cm<br>
\epsffile{testdot1.eps}\hss}\vss}<br>
\vbox to 0pt{\vskip2cm<br>
\hbox to 0pt{\hskip1cm\epsffile{testdot2.eps}\hss}\vss}<br>
\vfil\eject<br>
\bye<br>
<br>
The result is in `testinclude.pdf' (attached).<br>
<br>
Any help would be much appreciated.<br>
<br>
Laurence Finston<br>
<br>
<br>
<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>