[OS X TeX] eps figure into document

Wendy McKay wgm at cds.caltech.edu
Mon Nov 3 23:44:49 CET 2008


On Mon, 3 Nov 2008, David Derbes wrote:

> I don't know if you're using TeXShop, but if you are, the drill is a little
> non-intuitive.
> First, you open the EPS with TeXShop, and this calls ImageMagick or
> GhostScript or something which turns the EPS into a PDF. 
> (The experts will tell you and me, too.)
> 
> When you choose the EPS file with File->Open, you will see eventually the
> EPS image rendered as a PDF. Close the image file.
> 
> Then, in the LaTeX file, you say, as you did,
> 
> \includegraphics{filename}
> 
> Do NOT include the .PDF extension.
> 
> And that should do it, at least if you are generating a PDF file with LaTeX.
> 
> Anyway, that's what I've been doing for years.
> 
> David Derbes
> U of Chicago Laboratory Schools
>


There is no need to manually convert the files.

In TeXShop there is Templates/LaTeX Template"
with the lines you need to automatically convert eps to pdf
during run time

Include these lines in the preamble

\usepackage{graphicx}
\usepackage{epstopdf}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename 
#1 .tif`.png}

and in the main document drop the extension (.eps) when including the 
figure.

When you typeset with pdftex the myfig.eps file gets converted
by epstopdf automagically.
e.g.,

\includegraphics{Figures/myfig}

(Put all the illustrations in a Figures folder (call it what you like)  so 
that when the .pdf files get generated all the figures are in one 
directory)

and after running the above example, there will be two files
 	Figures/myfig.eps            %original
 	Figures/myfig.pdf            %generated by epstopdf


Hope this helps.

~wendy


More information about the macostex-archives mailing list