Including eps files in LaTeX


  1. Put ``\input{psfig}'' very soon after ``\begin{document}''
  2. To include a picture in a figure, do the following:
    \begin{figure}
    \begin{center}
    \mbox{\psfig{figure=FIGURE.eps,width=2.5in}}
    \caption{This is my caption.}
    \label{fig:figure-label}
    \end{center}
    \end{figure} 
    
    In the above, FIGURE.eps is the encapsulated postscript file name and fig:figure-label is the LaTeX label for the figure. The width of 2.5in is user-specified, and LaTeX will automatically rescale the height. Similarly, you can specify the height.

    NOTE: If the file is regular postscript and not eps, the above will still work, but you might have to use some \vspace*{...} and \hspace*{...} commands to place it properly, since the bounding box will not be set correctly.


Back

Last modified 05 August 2003; please report problems to sscott at cse.unl.edu.