There are two ways of doing this. One way is to use ps2pdf, which is explained here in this page, and the other way is to use pdflatex, which is explained here in this page. Using ps2pdf is very simple. However, if you want more fine control for the generated pdf file, you should use pdfLaTeX.
dvips -Ppdf -G0 myfile
ps2pdf myfile.ps
dvips -t letterSize -Ppdf -G0 myfile
When using pdflatex, you just run pdflatex instead of latex to compile your LaTeX file. However, pdflatex does not read eps format. Thus you should convert it to pdf format.
When you include your graphics file, do not give the extension:
\begin{figure}
\includegraphics[width=.5\textwidth, height=!]{myimage}
\caption{My Figure} \label{fig:my}
\end{figure}
When compiling by LaTeX, the eps file is searched by default. When compiling by pdfLaTeX, the pdf file is searched by default. Thus you don't need to change your TeX file when switching between LaTeX and pdfLaTeX.
The epstopdf command coming from your TeX distribution can convert eps to pdf. However, due to a bug in GhostScript, the image is rotated by 90 degrees sometimes. Thus you should use this command to do the conversion. Of course you want to replace my.eps and my.pdf with the file name of your images.
egrep -v "^%%Orientation:" my.eps | epstopdf --filter --outfile=my.pdf
Here is a Makefile to convert eps to pdf and use pdflatex and latex automatically.
Back to LaTeX introduction
Back to my home page
| Last updated Tuesday October 28, 2003. Please report problems to webmaster@cs.usask.ca |