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 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?

share|improve this question
3  
1. No need for figure extension explicitly, \includegraphics{fig1} is good enough. add \usepackage{epstopdf} after \usepackage{graphicx} in preamble to make .eps figures work with pdflatex for TeXLive(2009). 2. In TeXLive 2012 it's done automatically (behind using epstopdf)without adding any package. xelatex handles .eps natively. 3. Have a look at Heiko Oberdiek's Answer to Graphics file extensions and their order of inclusion when not specified –  texenthusiast Jun 1 '13 at 5:50
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 1 '13 at 5: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 1 '13 at 6: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 1 '13 at 6:37
1  
@texenthusiast,thank you. My problem is solved. –  Soumitra Sen Jun 1 '13 at 7:02

2 Answers 2

Open the terminal application then type:

cd Desktop
latex yourfile.tex
dvips yourfile.dvi
ps2pdf yourfile.ps

(finish each line with pressing enter).

share|improve this answer

I use use in such cases the following procedure:

  • convert the EPS files to pdf (with ps2pdf fig1.eps fig1.pdf)
  • use includegraphics or includepdf (from pdfpages) to include the formerly eps files
  • use pdflatex as well

Use these MWE instead of yours:

\documentclass{book}
\usepackage{graphicx}  

\begin{document}
Here some text  
\begin{figure}[ht]
\begin{center}
\includegraphics[height=3.5cm,width=3cm,angle=0]{fig1.pdf}
\caption{First figure}
\end{center}
\end{figure}  
Here some text
\end{document}
share|improve this answer
    
It is not clear to me what are you saying, @Micha. –  Soumitra Sen Jun 1 '13 at 5:21
    
I add your MWE and hope, it will be clear now –  Micha Jun 1 '13 at 5:40
    
In this process the picture quality is not better than the eps figure gives. I want to keep .eps figure in the tex file and then I want to follow my desired steps. –  Soumitra Sen Jun 1 '13 at 5:55

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.