[Tex/LaTex] Using Kile and PdfLaTeX with eps files

epsgraphicskilepdftex

I'm aware there's a lot of questions regarding using eps files as graphics in pdfLaTeX, and have tried many 'fixes'/'get arounds' based on answers I've read on this forum (amongst others), but still can't get it to work.

I'm using Kile 2.1.0 on Ubuntu 12.04 LTS, having recently come from using TeXShop on a Mac.

I've read that in order to get Kile to compile my .tex file using PdfLaTeX I need to insert:

\usepackage{epstopdf}

in the preamble, which I have, but it still doesn't work. For example in a test .tex file I have included \usepackage{epstopdf} in the preamble, and then in the body written:

\begin{figure}[h!]
\begin{center}
\includegraphics[scale = 0.7]{pic1.eps}
\caption{\textit{A graphic.}}
\label{Label1}
\end{center}
\end{figure}

Upon running PDFLaTeX in Kile I get:

! Package pdftex.def Error: File `pic1-eps-converted-to.pdf' not found.

Which would suggest to me that epstopdf is doing SOMETHING, maybe putting the converted eps file somewhere silly?

Thanks in advance,
Olie

Best Answer

without the option --shell-escape it can't run external programs. Add it to Kile at `Settings->Configure Kile-> Build:

enter image description here

then the following should work:

\listfiles
\documentclass{article}
\usepackage{graphicx}
%\usepackage{epstopdf}
\begin{document}

\includegraphics[width=0.8\linewidth]{/tmp/titel2.eps}

\end{document}

epstopdf is loaded by default:

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
/tmp/titel2-eps-converted-to.pdf
 ***********

You can test, if epstopdf.sty is installed. Run in a terminal:

kpsewhich epstopdf.sty

and it should report the location of the file:

voss@shania:~> kpsewhich epstopdf.sty
/usr/local/texlive/2013/texmf-dist/tex/latex/oberdiek/epstopdf.sty

If it outputs nothing then you have to install that package.