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

Mojca Miklavec mojca.miklavec.lists at gmail.com
Sat Nov 8 18:10:15 CET 2014

On Sat, Nov 8, 2014 at 3:07 PM, Askar Safin wrote:
> Hi.
> How to include eps (for example, produced by mpost) in latex for pdf generating? I use TexLive on GNU/Linux.
> Using trial-and-error method, I discovered that the following sequence works:
>
> # cat doc.tex
> \documentclass{article}
> \usepackage[dvips]{graphicx}
> \begin{document}
> \includegraphics{graphic.1}
> \end{document}
> # latex doc.tex
> # dvipdfm doc.dvi
>
> But I wonder what is the right way of doing this? Is there any way to use "pdflatex" directly and not this ugly "latex + dvipdfm" sequence?

Use "mptopdf" to convert straight from metapost to pdf.

Then you can include PDF images instead of having to go through
PostScript. Zdenek's suggestion might also work, but in my opinion
it's better to simply create PDF with MetaPost, then you'll be facing
less problems.

Mojca

PS: an alternative way is to use embeded metapost code inside the
document, but that's a lot easier to do in another macro package.