I recently had the following problem, I was using a label to reference a table where I placed the “tabular”- environment into the “small”- environment to decrease its size. The number indicated by the reference was not the table index, but rather the number of the section/subsection within which I placed the table. The problems seems to exist in both, Miktex and MacTex…
A table ususally has the following structure (for an introduction to tables click here) with the “small”- environment added to slightly decrease its size:
\begin{table}[htdp] \caption{default} \begin{small} \begin{center} \begin{tabular}{|c|c|} \end{tabular} \end{center} \end{small} \label{default} \end{table}
Placing the label inside both, “small”- and “center”- environment solves the problem.
Hence:
\begin{table}[htdp] \caption{default} \begin{small} \begin{center} \begin{tabular}{|c|c|} \end{tabular} \label{default} \end{center} \end{small} \end{table}
I actually don’t know why Latex does not translate the reference correctly, as the label is still within the “table”-environment, at least the problem can be solved that way.