I am using sub tables and it seems because I but the table caption above I get the wrong number in the sub table references. How can I fix this?
I am pretty sure it is related to the package float package. I am very interested in both quick hacks to fix this specific problem with this combination and in a better set of tools that I can use the next time to avoid these sort of problem all together.
Here is what I am doing:
\documentclass[11pt,a4paper]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{float}
\newsubfloat{table}
\begin{document}
\begin{table}[H]
\centering
\begin{minipage}{0.9\textwidth}
\caption{Multple tables\label{theTable}}
\begin{minipage}{0.5\textwidth}
\subcaption{A sub table\label{firstSubTable}}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\subcaption{Second sub table\label{secondSubTable}}
\end{minipage}
\end{minipage}
\end{table}
Referencing the table (Table~\ref{theTable}) seems right but in referencing the
sub tables (Table~\ref{firstSubTable} and Table~\ref{secondSubTable}) they get
the wrong table number.
\end{document}
And how it looks:



floatis apparently not compatible withmemoir. Don't use the[H]option: if a table must go here, then it's difficult to think it need captions. Leave it to float. – egreg Dec 6 '12 at 18:14[H]"hack" to place. How I made the thing be placed at a location hardly has anything to do with whether it has caption or not I would say... – jonalv Dec 7 '12 at 9:13