### Including Figures in Latex Documents

Here is and example which illustrates how to include an eps file emtex.eps in a latex2e document using the graphicx package.
\documentclass{article}
\usepackage{graphicx}
% This simple example shows how to include an Encapsulated
% Postscript file (called emtex.eps) below in a LaTeX document.
% If you use "xfig" to generate your eps file, remember that
%  1) By default xfig saves figures in landscape mode - change to portrait mode
%     before saving your file as an encapsulated postscript file
%  2) Choose eps rather than ps as the format to export your picture
%  3) You should also save your file in native xfig format
%     as, say file.fig, so that you can edit it with xfig later on.
%     xfig will not edit ps or eps files.
\begin{document}

Diagram of Emtex's directories

%%  Example

%% Use this with Latex:
\includegraphics[height=4in]{emtex.eps}

\end{document}


If you want to transform your latex document into a pdf file, you could use pdflatex. Pdflatex allows you to use other graphics formats (besides eps) as the example below shows


\documentclass{article}
\usepackage[pdftex]{graphicx}
% If you want to include non-eps graphics in latex document,
% you should use the pdftex option for the graphicx package.
% See the \usepackage line above and the \DeclareGraphicsExtentions
% below.  You can run only run pdflatex on this file (to generate
% pdf output). Latex will not work on it.
% This simple example shows how to include an Encapsulated
% Postscript file (called emtex.eps) below in a LaTeX document.
% If you use "xfig" to generate your eps file, remember that
%  1) By default xfig saves figures in landscape mode - change to portrait mode
%     before saving your file as an encapsulated postscript file
%  2) Choose eps rather than ps as the format to export your picture
%  3) You should also save your file in native xfig format
%     as, say file.fig, so that you can edit it with xfig
%     later on. xfig will not edit ps or eps files.
\begin{document}
\DeclareGraphicsExtensions{.pdf,.png,.gif,.jpg}
Diagram of Emtex's directories

%%  Example

%% Use this with pdfLatex:
\includegraphics[height=4in]{emtex.pdf}

\end{document}


Another way to create a pdf file, which produces sharper images, is to first use \includegraphics to include the .eps file as explained above, then do
	dvips -Ppdf file.dvi
ps2pdf file.ps

Using the -Ppdf option with dvips will produce a sharper image.