Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have an error while trying to use epstopdf package. This is my code

\documentclass[11pt,oneside,a4paper,onecolumn]{article}

\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes

% For using eps files
\usepackage{epstopdf}
\epstopdfsetup{outdir=./}

\begin{document}
\begin{figure}[h!]
  \centering
    \includegraphics[width=0.1\textwidth]{./apple2.eps}
    \caption{Apple}                                                             
\end{figure}
\end{document}

This is the error message:

Package epstopdf Warning: Shell escape feature is not enabled.

(/usr/share/texmf-texlive/tex/latex/latexconfig/epstopdf-sys.cfg))) (./fig.aux)
(/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
)

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

See the pdftex.def package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.15 ...raphics[width=0.1\textwidth]{./apple2.eps}

?

Do you know how to fix it?

share|improve this question
    
You need to enable --shell-escape. So this either from the command line, or within your editor. –  Werner Aug 29 '13 at 3:55
    
When using PSTricks( \usepackage[usenames,dvipsnames]{pstricks}) go with latex-->dvips-->ps2pdf or xelatex compilation route (both support for inclusion of .eps figures normally), and hence no need for extra packages \usepackage{epstopdf} plus -shell-escape enabled as @Werner suggested. Note: replace \usepackage{epsfig} (obsolete) with \usepackage{graphicx} –  texenthusiast Aug 29 '13 at 3:59
    
that works, you can make as an answer, I will accept it –  msh Aug 29 '13 at 4:03
add comment

1 Answer

up vote 3 down vote accepted

When using PSTricks package \usepackage[usenames,dvipsnames]{pstricks} go with

latex-->dvips-->ps2pdf or xelatex compilation route (both support for inclusion of .eps figures normally). With both compilation routes, there is no need for extra packages \usepackage{epstopdf} plus -shell-escape enabled as @Werner suggested.

Note: replace obsolete \usepackage{epsfig} with \usepackage{graphicx}

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.