Including Eps Graphics in pdfLaTeX
Including Eps Graphics in pdfLaTeX
html
LaTeX
The postscript generated by dvips can be converted to pdf format with the Adobe software or ghostscript,
but there are a number of disadvantages in comparison to using pdfTeX. In particular, the files are usually
larger, and ghostscript prior to v6.0 converts the type-1 scalable fonts into type-3 bitmaps, resulting in poor
appearance when viewing. The type-3 bitmaps will also occur if the dvips isn't configured to use type-1.
The main limitation of pdfTeX is that postscript figures cannot yet be directly imported into documents.
Instead, inclusions must be bitmaps (PNG or JPG), a simple format of PDF, or MetaPost output. Some EPS
graphics may be converted to PDF and included, but I have had limited success with this approach in the
pase. However, I have found that conversion through MetaPost is quite robust for vector graphics. For
bitmaps you will want to instead convert to PNG for line-art or JPG for photos.
via pdf
In more recent times, the later versions of epstopdf by Sebastian Rahtz et al. appear to quite successfully
perform the translation to pdf directly. This means that the pdf generation process is quite easy:
via mps
I would consider this section now obsolete, and graphics would now be generally be included with pdf as
described above. Hovewer, to instead perform the conversion via MetaPost, you will need both pstoedit and
metapost. I suggest pstoedit v3.14 or later as it incorporates changes and bug fixes I made. Metapost is
found in most TeX distributions. To generate a .mps file from a .eps file, use the following commands:
You will need to alter the path to the fontmap.mpost file to suit you installation. The last line is necessary
because metapost gives the output file the extension of ".1", while it is more convenient to import it into
pdfTeX with an extension of ".mps".
With a little bit of trickery, it is possible to make metapost typeset any mathematics during the conversion.
This means that it is possible to include LaTeX equations in graphic editor that does not natively support it
(such as Sketch).
1 of 2 12/16/10 13:33
Including eps graphics in pdfLaTeX - 2pi.info http://www.2pi.info/latex/Includingeps.html
\usepackage{graphics}
\includegraphics{file}
If the extension is not specified, LaTeX will find the .eps file, and pdfTeX will find the .mps or .pdf file.
\begin{figure}[htb!]
\centering%
\includegraphics{FigureExample}
\caption{An Example Figure}
\label{fig:FigureExample}
\end{figure}
In order to keep files small, I recommend using the Times or Helvetica fonts, as these are built-in fonts on pdf
readers, and don't need to be included in the file. For example, use the times package (\usepackagetimes in
the preamble).
http://2pi.info
2 of 2 12/16/10 13:33