I'm using Latex for a Report about signal processing and I've a lot of figures. SoI putted them into minipages to display them side by side. It's fine but the references doesn't work. Here is an example:
\part{Figures}
\section{Question 2}
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{21comp.eps}
\label{fig:21comp}
\caption{Comparaison des réponses impulsionnelles des filtres $h_1[m]$ et $h_2[m]$}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{21comp2.eps}
\label{fig:21comp2}
\caption{Comparaison des filtres $h_1[m]$ et d'un filtre passe-bas parfait}
\end{minipage}
\end{figure}
For me it seems to be fine but when I try to use a reference like \ref{fig:21comp}, it displays only A (the part) and not 1 for the figure number.
What am I doing wrong ? Is it related with my minipages ?
Thanks.
\centeringinstructions inside theminipageenvironments are redundant, as you're setting the widths of the graphs to take up the full space that's available. – Mico Mar 23 '13 at 17:46