[Tex/LaTex] Captions and subcaptions of a very long table

captionslongtable

I have a very long table that spans multiple pages. On top of the table, there is a caption like 'Table 1: A list'. Now, for the parts of the table that spans to the next pages, I want to put something like 'Table 1 (continued)' on each every page right above the table. How can I do that?

Thank you for any advice.
Regards,
Tung

\begin{longtable}{|p{7cm}|p{2cm}|p{2.5cm}|p{2.5cm}|}
\caption{A list\label{tab:list}} \\ 
\hline
Name       &    Company     &  Catalog Number   &   Comments    \\ \hline
a          &    b           &   123             &               \\ \hline
c          &    d           &   522             &     xyz       \\ \hline
\end{longtable}

Best Answer

You can use \caption*. I'd also recommend using booktabs and dispensing with the vertical rules.

The weird page layout is just because you didn't provide an example I could use to reproduce the problem so I had to make a 3 line tabular span 2 pages...

\documentclass[a5paper,landscape,12pt]{article}
\usepackage{longtable,booktabs}
\usepackage[hscale=.9,vscale=.2]{geometry}
\begin{document}

\begin{longtable}{p{7cm}p{2cm}p{2.5cm}p{2.5cm}}
\caption{A list\label{tab:list}} \\
\toprule
Name       &    Company     &  Catalog Number   &   Comments    \\ \midrule\endfirsthead
\caption*{\tablename{} \ref{tab:list} (continued)}\\
\toprule
Name       &    Company     &  Catalog Number   &   Comments    \\ \midrule\endhead
\bottomrule\endfoot
a          &    b           &   123             &               \\
c          &    d           &   522             &     xyz       \\
\end{longtable}

\end{document}

squished tabular

Related Question