[tex-live] What is the right way to include eps in latex for pdf generating?

Dan Luecking dluecking at sbcglobal.net
Mon Nov 10 23:46:42 CET 2014

On Sat Nov 8 2014 at 23:24:38 CET, Askar Safin wrote

>But I still think that the bug ( 
><http://paste.debian.net/130920>http://paste.debian.net/130920 ) is valid

If metapost output is created from a file that has prologues=0
(the default) or 1, then it is not true EPS (font information is
missing). It can sometimes be processed with ghostscript, provided
only fonts known to GS are used (or none at all) and an appropriate
FontMap.* file is available.

The output can be made true EPS by adding prologues:=2; (font name
is added) or prologues:=3; (font is embedded, this is the best
choice). It is incorrect to assume metapost output is EPS otherwise.
This is documented (mpman.pdf, pages 24-25 in TeXLive 2014).

So the bug report actually documents a user error: the graphic.mp
file does not set prologues:=2 or 3, and yet graphic.1 is renamed
to graphic.eps and treated as if it were EPS.

There are a number of ways to post-process graphic.1 so that the
result is EPS with embedded fonts even without prologues = 3.
Many will filter the file through dvips, as it only requires the
tfm filename and that the fonts be installed for TeX use.
For example (quoting/escaping may be needed in a Unix-based OS):

   tex mpsproof \bbox graphic.1
   dvips -o graphic.eps mpsproof.dvi

One can also post-process into pdf with the same mpsproof.tex,
embedding fonts if not already embedded:

   pdftex -jobname=graphic mpsproof \bbox graphic.1

Pdflatex can also import the graphic directly, embedding the fonts
along the way, but only if the file is declared as metapost output,
normally by giving it extension .mps.


Daniel H. Luecking
Department of Mathematical Sciences
Fayetteville, Arkansas

More information about the tex-live mailing list