Just for documentation: In an up-to-date TeXlive 2011 installation, references to subfloats are off by one if the caption is above the subfloat (position=top
). In the example below, this concerns references to subtables but not to subfigures.
\documentclass{scrartcl}
\pagestyle{empty}
\usepackage{subfig}
\captionsetup*[table]{position=top}
\captionsetup*[subtable]{position=top}
\captionsetup*[figure]{position=bottom}
\captionsetup*[subfigure]{position=bottom}
\begin{document}
\begin{figure}
\subfloat[1]{11111\label{fig:1}} \subfloat[2]{22222\label{fig:2}}
\caption{fig}\label{fig}
\end{figure}
\begin{table}
\caption{tbl}\label{tbl}
\subfloat[A]{aaaaa\label{tbl:a}} \subfloat[B]{bbbbb\label{tbl:b}}
\end{table}
Figure~\ref{fig} (\ref{fig:1}, \ref{fig:2}) and Table~\ref{tbl} (\ref{tbl:a}, \ref{tbl:b}).
\end{document}
Switching to subcaption
has resolved the issues, but I wish there would be a "compatibility" option so that code that used to work with subfig
works also with subcaption
. (Or at least a HOWTO with a reference to \subcaptionbox
.)