Skip to content

longtable doesn't use list format

In the following example the longtable doesn't use the defined list format. It works if one issues an (unbraced!) table caption before:

\documentclass{article}


\usepackage{caption,longtable}

\DeclareCaptionListFormat{named}{\makebox[0pt][r]{TAB~}#2:}
\captionsetup[table]{listformat=named}

\begin{document}

\listoftables

\begin{longtable}{l}
\caption{Longtable} \\
\end{longtable}

\captionof{table}{Tabular}

\begin{longtable}{l}
\caption{Longtable2} \\
\end{longtable}


\end{document}

captionbug