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

Mojca Miklavec mojca.miklavec.lists at gmail.com
Mon Nov 10 20:47:31 CET 2014


On Mon, Nov 10, 2014 at 2:52 PM, Askar Safin wrote:
>
> So, what is the right way to include mpost in latex for pdf generating? X_X
> At the moment I see the two right ways:
> 1. The way I used before
> .mp: outputtemplate:="%j.%c"; (default)
> .tex: \usepackage{graphicx}
> .tex: \includegraphics{file.1}
> shell: mpost file.mp
> shell: latex file.tex
> shell: dvipdfm file.dvi
> 2. The way from http://math.berkeley.edu/~vojta/tex/samp-l/mpost.html
> .mp: outputtemplate:="%j%c.mps";
> .tex: \usepackage{graphicx}
> .tex: \includegraphics{file1.mps} (or \includegraphics{file1})
> shell: mpost file.mp
> shell: pdflatex file.tex

My suggestion is still:

3. create a pdf graphics

(4. alternative, just for the brave: use mplib or tikz; see
http://tex.stackexchange.com/questions/3750/ploting-a-function-using-mplib-in-lualatex)

> Both work. But what of them are the right way?

Personally I would try to avoid dvi and go straight from tex to pdf.

>The first one is better because it uses standard "latex", which generates .dvi (device independent file), which is supposed to be converted to other formats (this is original Knuth's intention).

It was the original Knuth's intention, but dvi is pretty outdated by
now. It's not really "independent" or "standard" either (it needs
external files like fonts and images and dvi viewers aren't always
helpful). And every engine uses its own private extensions to be able
to work with it. It's still useful and handy in some cases, but both
modern engines (XeTeX, LuaTeX, also pdfTeX to some extent) at least
try to skip the dvi step and go straight to pdf. Using dvi as
intermediate format before creating pdf just creates extra book
keeping and double work.

> The second one is better because it generates pdf directly from tex.
> So, what is the right one? What is philosophically better? What is used in mathematical world? What is used by mathematical journals? What is expected by journals when sending papers to them? What is the best for distributing works and publishing them in the internet?

You can create an EPS *and* PDF from the same metapost graphic. Then
you don't need to worry about anything else as it will work either
straight to pdf or via intermediate tex->dvi->ps->pdf.

Many journals (and conference organizers) use ancient technologies,
with the philosophy "if it isn't broken, don't fix it". So they would
stick with dvi and latex 2.09 forever anyway. I don't think you want
to follow their lead.

Mojca



More information about the tex-live mailing list