I want to put a lengthy caption at the end of a table, and, as currently formatted, the caption doesn't fit on the page with the last row of the table. The result is a rather ugly header on the last page; in particular, the double \hline
in the head produces a horizontal line unattached to a table, which is rather unsightly. Basically, I'm looking for something like a \endlasthead
.
Example code:
\documentclass[landscape]{article}
\usepackage{lmodern}
\usepackage{graphicx, longtable, multirow}
\begin{document}
\begin{longtable}{|c|c|}
\hline
\textbf{Letters} & \textbf{Numbers} \\
\hline \hline
\endfirsthead
\multicolumn{ 2 }{c}
{{\bfseries \tablename\ \thetable{} -- continued from previous page}}
\\ \hline
\textbf{Letters} & \textbf{Numbers} \\
\hline \hline
\endhead
\hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline
\endfoot
\endlastfoot
A & 1 \\ B & 2 \\ C & 3 \\ D & 4 \\ E & 5 \\ F & 6 \\ G & 7 \\ H & 8 \\ I & 9 \\ J & 10 \\ K & 11 \\ L & 12 \\ M & 13 \\ N & 14 \\ O & 15 \\ P & 16 \\ Q & 17 \\ R & 18 \\ S & 19 \\ T & 20 \\ U & 21 \\ V & 22 \\ W & 23 \\ X & 24 \\ Y & 25 \\ Z & 26 \\
\caption{Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.}
\end{longtable}
\end{document}
Here's a question where someone was able to change the first foot, so I'm guessing this should be possible. My tex fu isn't up to parsing @Heiko Oberdeik's solution, but if someone can explain how it could be modified for my purposes that would work.