Tags

, , , , , ,

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.

Advertisements