[latex] Multiple figures under the same caption using ``subfigure''
If you want to put several small figures under the same caption, then you need to include the subfigure (along with graphicx) package. The format is something like this:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Contents of main.tex (LaTeX Source)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%%%%%%%%% Preamble %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\documentclass[11pt,a4paper]{article}
\usepackage{graphicx, subfigure}
%
%%%%%%%%% The Document starts here %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\begin{document}
%
Some random text at the beginning of the document ........
%%
% -------------- Include the figures as follows -------------------%
%%
\begin{figure}[ht!]
\begin{center}
%
\subfigure[Caption of First Figure]{%
\label{fig:first}
\includegraphics[width=0.4\textwidth]{FirstFigure}
}%
\subfigure[Caption of Second Figure]{%
\label{fig:second}
\includegraphics[width=0.4\textwidth]{SecondFigure}
}\\ % ------- End of the first row ----------------------%
\subfigure[Caption of Third Figure]{%
\label{fig:third}
\includegraphics[width=0.4\textwidth]{ThirdFigure}
}%
\subfigure[Caption of Fourth Figure]{%
\label{fig:fourth}
\includegraphics[width=0.4\textwidth]{FourthFigure}
}%
%
\end{center}
\caption{%
The l-o-n-g caption for all the subfigures
(FirstFigure through FourthFigure) goes here.
}%
\label{fig:subfigures}
\end{figure}
%%
% -------------- End of figure environment ----------------------%
%%
The first, second, third and the fourth subfigures in Figure
\ref{fig:subfigures} are labeled as
\ref{fig:first}, \ref{fig:second}, \ref{fig:third} and \ref{fig:fourth},
respectively.
Some more text before the end ..........
%
\end{document}
%
%%%%%% The End %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
It will create two rows of subfigures with two subfigures on each row (needless to say, you must have all those figures, viz. FirstFigure.eps through FourthFigure.eps, in the same directory as the LaTeX source file). The optional argument within the square brackets immediately following the subfigure statement is the caption of the subfigure (besides the main caption for all the subfigures at the end).
Various other options (e.g., cropping, resizing are rotating the figures) for includegraphics were explained awhile ago.
Reference: here.

[...] More about includegraphics was posted awhile ago: here and here. [...]
[...] More about includegraphics was posted awhile ago: here and here. [...]
when i compile, i get the error:
File “subfigure.sty” not found
This error indicates that you don’t have the required style file “subfigure.sty” in the LaTeX search path. As a temporary solution, you may download the subfigure.sty in your working directory and the compile your LaTeX document. (Copy subfigure.sty to the correct directory where all other style file resides to make this solution ‘permanent’!)
Download location in the CTAN archive:
http://www.ctan.org/tex-archive/obsolete/macros/latex209/contrib/misc
Thanks, this was a big help.
HI all, I think that the general label referring to the whole figure must be placed after the caption (that is, \label{fig:subfigures} must go just before \end{figure})
otherwise latex won’t show the good figure number..
giorgio
You are absolutely right. Thanks! I have fixed the problem.