In subcaption: remove page number from lof, someone asks how to remove page numbers from the list of figures when using subcaption. This in itself works fine.
However, when I generate a list of tables with this configuration, the list of tables is completely blank. What am I doing wrong?
\documentclass{article}
\usepackage{tabu}
%\usepackage{caption}
\usepackage{subcaption}
\captionsetup[subfigure]{list=true}
\usepackage[subfigure]{tocloft}
\newcounter{lofdepth}
\setcounter{lofdepth}{2}
\cftpagenumbersoff{subfigure}
\begin{document}
\listoffigures
\listoftables
\clearpage
\begin{figure}[!ht]
\centering
\begin{subfigure}{.5\linewidth}
\centering
A
\caption{test subfigure}
\end{subfigure}%
\begin{subfigure}{.5\linewidth}
\centering
B
\caption{another test subfigure}
\end{subfigure}
\caption{A figure with subfigures}
\end{figure}
\begin{table}
\begin{tabu}{X | c | c | c | c }%
Method & Mean Bin & Worst Bin & RMS Error & Dead Time \\ \hline%
Delay line & 60~ps & 165~ps & 40~ps & 2.5~ns \\
Type A (FSR) & 30~ps & 65~ps & 25~ps & 5~ns \\
Type B (ISR) & -- & -- & 10~ps & 45~ns
\end{tabu}%
\caption{A Table}
\end{table}
\end{document}