6

I'm with a problem with the package epspdfconversion. I use the following preamble:

\documentclass[pdftex,12pt,a4paper,openany]{memoir}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{amsmath,amssymb,amsfonts,wasysym}
\usepackage{graphicx}
\usepackage[help]{epspdfconversion}
\usepackage[left=3cm,right=2cm,top=3cm,bottom=2cm]{geometry}
\usepackage[center]{caption}
\usepackage{color}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage[pdftex, colorlinks=true, linkcolor=black, citecolor=black, urlcolor=black]{hyperref} 
\usepackage[all]{hypcap}

and when I try to add a figure:

\begin{figure}
\includegraphics[scale=0.5]{ocupfd.eps}
\caption{a}
\end{figure}

the program gives me the following error:

Package pdftex.def Error: File `ocupfd-epspdf-to.pdf' not found

What should I do?

egreg
  • 1,121,712
  • 1
    Are you calling pdflatex with the -shell-escape option? If you don't need any of the fancy options of epspdfconversion, maybe \usepackage{epstopdf} will do, without even the command line option, if your TeX distribution is recent. – egreg Nov 14 '11 at 23:39
  • @egreg How do I execute this -shell-escapeoption? – Rodrigo Thomas Nov 15 '11 at 00:24
  • It depends on your settings: operating system and editor. – egreg Nov 15 '11 at 00:25
  • I use Ubuntu, and TeXMaker – Rodrigo Thomas Nov 15 '11 at 00:27
  • @egreg Could you tell me how do I execute the -shell-escapeoption for the TeXMaker on Ubuntu? – Rodrigo Thomas Nov 15 '11 at 01:21
  • When you open the "Commands" tab in the configuration window for Texmaker, in the box next to PdfLaTeX you have to add -shell-escape just before %.tex (separate it with spaces). – egreg Nov 15 '11 at 06:35
  • If you're using TeX Live 2010 or TeX Live 2011, you don't need to change anything but remove \usepackage[help]{epspdfconversion}. The graphics.cfg of TeX Live since 2010 contains code for on-the-fly conversion of eps to pdf with the default settings. – Schweinebacke Nov 15 '11 at 07:39

1 Answers1

9

The epspdfconversion package needs that pdflatex is called with the command line option -shell-escape. How this is done depends much on what is the TeX environment one uses.

For example, with Texmaker (or TeXStudio) it's sufficient to go to the configuration window and add the option in the PdfLaTeX tab so that it looks like

pdflatex -interaction=nonstopmode -shell-escape %.tex

Similarly for other TeX editors.

The package offers many fancy options. If one doesn't need them and has TeX Live 2010 or later (or MiKTeX 2.9), it's easier to load the package epstopdf and the conversion will be done automatically, without the need of the -shell-escape option.

Martin Scharrer
  • 262,582
egreg
  • 1,121,712