I'm using the IEEEtran class, and I need to use the subfig package with the caption=false option. However, when I use the package like this
\documentclass{article}
% Remove the caption=false and this work as intended
\usepackage[font=footnotesize,caption=false]{subfig}
\begin{document}
\begin{table}
\caption{My tables}
\centering
\begin{tabular}{cc}
\subfloat[\label{tab:1}]{%
\begin{tabular}{lc}
\hline\noalign{\smallskip}
a & b\\
\hline\noalign{\smallskip}
foo & bar\\\hline\noalign{\smallskip}
\end{tabular}%
}&%
\subfloat[]{%
\begin{tabular}{lc}
\hline\noalign{\smallskip}
a & b\\
\hline\noalign{\smallskip}
foo & bar\\\hline\noalign{\smallskip}
\end{tabular}%
\label{tab:2}
}%subfloat
\end{tabular}
\end{table}
Testing a reference to \ref{tab:1} and \ref{tab:2}.
\end{document}
I obtain the reference to 2a and 2b instead of 1a and 1b. However, if I remove the caption=false everything works fine. But, I'm require to use that part, so the IEEEtran class can put the correct formatting to the captions.
What solution do I have? I tried to move the \label around, as you can see in both cases, but both have the same result.
Am I missing something here?
caption(that is the same as removing thecaption=false--I think) removes the special format that the IEEEtran uses. Note that I didn't putIEEEtranin the document class, but if you use it you will see the difference. – adn Jun 13 '12 at 5:31IEEEtrannormally uses text all caps, but when usingcaptionexplicitly the words are normal (not capitalized). – adn Jun 13 '12 at 6:07