\begin{figure}%
\centering
\subfloat[Original]{{\includegraphics[width=4cm]{cata_orig.png} }}%
\qquad
\subfloat[Imposter]{{\includegraphics[width=4cm]{cata_impos.png} }}%
\caption{Catalog Images}%
\label{fig:cata}%
\end{figure}
In my latex file, when I do Fig. \ref{fig:cata}
it compiles it to Fig. 4
. But how do I refer cata_orig.png
which is labeled (a)
in compiling.
\begin{figure}%
\centering
\subfloat[Original]{{\includegraphics[width=4cm]{cata_orig.png} \label{fig:hello}}%
\qquad
\subfloat[Imposter]{{\includegraphics[width=4cm]{cata_impos.png} }}%
\caption{Catalog Images}%
\label{fig:cata}%
\end{figure}
I added a \label{}
in the subfloat but when I try to refer it using \protect\subref{fig:hello}
, it compiles to (a)
. I want it to say 4 (a)
.
Best Answer
Update: A modern version (replacing
subfig
by the more modernsubcaption
):Here's one option (adding the reference to the caption):