[pdftex] Metapost and PDF files

Hans Hagen pragma at wxs.nl
Fri May 4 15:50:07 CEST 2001


At 01:20 PM 4/28/01 -0800, Christopher S. Swingley wrote:
>Hi!
>
>I'm having a devil of a time trying to figure out how to use Metapost
>in combination with PDFTeX and Ghostscript.  I believe the problem is
>that I want to use the Computer Modern fonts in my figures, but the
>only program that seems to understand how to deal with these fonts
>is dvips.  I can put 'prologues:=1;' at the top of my *.mp file,
>but then I get fonts that won't match the rest of my document.
>
>What I'm trying to accomplish is the creation of figures with Metapost
>that I can use in LaTeX or TeX files, for the generation of PostScript
>and PDF files.  Right now the only thing I can get to work is to
>include the figures in a TeX document, run it, then turn it into
>PostScript using dvips.  But I can't get a PDF file using any method
>beyond ps2pdf (which is a raster version of the PostScript file and
>doesn't look very good).  xdvi also displays a poor quality version
>of the figures when I preview the dvi file.
>
>I've loaded the Computer Modern fonts into ghostscript so it can
>read them by doing: gs prfont.ps, and then typing GS> /cmr10 DoFont,
>but Ghostscript doesn't seem to know what to make of the fonts in the
>Metapost figure files (gs: Error: /undefined in cmr10, gs: Operand
>stack: (1)).

I lost track of the answers on this mail, but including mp output into
pdftex does demand anything special: just include the graphic, either using
yoru macro package higher level interface (probably using mps as extension
or type) or using \convertMPtoPDF{name}{1}{1} which takes care of all fonts
[given that they have entries in the pdftex map file]. If you want an
proper eps, you can use mptopdf to produce a stand alone graphic. 

If you want inclusion in a dvi file, keep in mind that mpoutput is rather
tuned for dvips. However, there are tricks around this [we apply these when
using for instance dvipsone] 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma at wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------




More information about the pdftex mailing list