# When using the 'longtable' package, how can I have the table title on the second page indicate that it's a continuation from the previous page?

\documentclass[letterpaper]{article}
\usepackage{longtable}              % Longtable package
\usepackage[margin=1in]{geometry}   % Margins
\usepackage{booktabs}               % Nicer horizontal lines

\begin{document}
\begin{longtable}{ l l }
\caption{Heading} \\ \toprule       % toprule, midrule, and bottomrule are the horizontal lines
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\ \bottomrule
\end{longtable}
\end{document}


The above code produces the following:

But this is what I want on the second page (this is obviously a product of MS Paint, but please bear with me): !

So, how would I do this?

-
You have to define a first head. Just have a look into the documentation please. – Kurt Jul 16 '13 at 21:23
@Kurt To be fair, I also found it quite counterintuitive that the normal header command suddenly determines the modified header while the normal header needs a new command in this particular case. Of course it follows its own logic but I can't say I would have looked for something like \endfirsthead. – Christian Jul 16 '13 at 21:27
@Christian I didn't recognize that it could be counterintuitive, because if I have to learn the usage of a new package I always look first into the documentation. There you can found the solution very easy with example ... – Kurt Jul 16 '13 at 21:44
@Christian blame the twisted logic of the package author. – David Carlisle Jul 16 '13 at 21:54
@Kurt I didn't want to say it couldn't be found. Obviously I did find this. I just say that I can understand when somebody doesn't find this without reading through nine pages of docs, that – no offence, David – the this-table-shows-it-all example is not the most clearly arranged example possible and that consequently it should be easy to find more worthy victims of RTFMing on the Internet. – Christian Jul 16 '13 at 21:55

Use \endfirsthead for the first heading and \endhead for all the other pages.

\documentclass[letterpaper]{article}
\usepackage{longtable}              % Longtable package
\usepackage[margin=1in]{geometry}   % Margins
\usepackage{booktabs}               % Nicer horizontal lines

\begin{document}
\begin{longtable}{ l l }
\caption{Heading} \\ \toprule       % toprule, midrule, and bottomrule are the horizontal lines
\caption{Heading (cont.)} \\ \toprule       % toprule, midrule, and bottomrule are the horizontal lines
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\
Left cell & Right cell \\ \bottomrule
\end{longtable}
\end{document}


-
Thanks, that worked perfectly! – Donkey Jul 16 '13 at 21:28
+1 for having read my extensive and lucid documentation:-) – David Carlisle Jul 16 '13 at 21:58