# numbering several latex figures

How is it possible to include figure labeling in latex? By labeling I mean that if I import several figures:

\begin{figure}[ht]
\centering
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure1.pdf}
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure2.pdf}
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure3.pdf}
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure4.pdf}
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure5.pdf}
\end{figure}


How can I number these figures, such as the first figure as (a) the second as (b) and so on... I would like these to show in the top left corner outside each graphic which I can then refer to in the caption.

-
Have a look at the subfig package. –  Jellby Jun 27 '12 at 8:58

You need the subfig or the subcaption package for that. Here is an example using the subfig package:

\documentclass{article}
\usepackage{subfig}

\begin{document}
\begin{figure}
\centering
\subfloat[caption of the subfigure]{\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure1.pdf}\label{fig:subfig-a}}\\
\subfloat[caption of the subfigure]{\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure2.pdf}}\\
\subfloat[caption of the subfigure]{\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure3.pdf}}\\
\subfloat[caption of the subfigure]{\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure4.pdf}}...
\caption{caption of the whole figure}\label{fig:whole}
\end{figure}
The whole figure is~\label{fig:whole} and the first subfigure is~\label{fig:subfig-a}.
\end{document}


See subcaption vs. subfig for differences between the two packages

-

The easiest way is to put everything in a structure like this :

\begin{figure}[ht]
\begin{tabular}{c}
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure1.pdf}\\
\includegraphics[height = 0.2\textwidth,width=0.8\textwidth]{Figure2.pdf}\\

Semantically, subfloats is a better choice. Functionally, I'd say minipages and subfloats are simpler, more flexible and more appropriate. –  You Jun 27 '12 at 11:38