5

I am using pdflatex to produce a .pdf file. But, it is not working when .eps files are compiled. I have tried it with XeLatex but, it is hanging out sometimes. Now I want to produce a .pdf file using two steps : latex -> dvips -> ps2pdf. I don't know how to use it. The location of my .tex file (i.e., Myfile.tex) is on the desktop and the system is Ubuntu11.04.
As for example :

\documentclass{book}
\usepackage{graphicx,epstopdf}  

\begin{document}
Here some text  
\begin{figure}[ht]
\begin{center}
\includegraphics[height=3.5cm,width=3cm,angle=0]{fig1}
\caption{First figure}
\end{center}
\end{figure}  
Here some text
\end{document}

How can I do so?

karlkoeller
  • 124,410
Soumitra Sen
  • 2,995
  • 2
    ... 4. Imp: How was the .eps generated ? Unless someone uses PSTricks, pdflatex should work fine. 5. Note place your fig1.eps and .tex in same place/folder. 6. Which editor are you using run latex filename then dvips filename and ps2pdf filename there may be flags/options incase one wants to add inside editor configuration. – texenthusiast Jun 01 '13 at 05:54
  • I am using 'kile'.I have used '\usepackage{epstopdf}'. But, it shows an error :'fig1-eps-converted-to.pdf' not found \includegraphics[height=3.5cm,width=3cm,angle=0]{fig1.eps}' – Soumitra Sen Jun 01 '13 at 06:22
  • 1
    Remove file extension and enable shell escape pdflatex -shell-escape filename. Please post all relevant/important information like this error inside the Q and fig.eps file (dropbox) instead of comments so that it will be noticed by all and Q & A remains tidy and standalone. – texenthusiast Jun 01 '13 at 06:37
  • I have updated my post removing file extension. But the same error occured. How can I enable shell escape ? – Soumitra Sen Jun 01 '13 at 06:52
  • 1
    @texenthusiast,thank you. My problem is solved. – Soumitra Sen Jun 01 '13 at 07:02