I would like to ask a question about longtable
package. I've already posted it in other forums.
I have a long table (a several-pages-long one) using longtable
package and I would like to add a table caption at the bottom of every piece of table, but a different one in the FIRST page.
longtable
package allows a different "header" in the first page of the table (\endfirsthead
) and/or a different "footer" in the LAST page of the table (\endlastfoot
). What I would like to do is a different foot caption in the FIRST page of the table.
My example would be something like this:
First page table foot caption: "Table 1.2: Table description and so, and so…".
Following page table foot captions: "Table 1.2 (contd.): Table description and so, and so…".
It is similar to the example available at the documentation of longtable
package about the usage of \endfirsthead
, but I want to put it at the bottom of the tables because captions for all figures and tables in my document are at the foot, not at the head.
Is it so strange what I want to do?? How can I do it with longtable
?
I would be very grateful if you could give me any hint or tip.
Thank you in advance for your answers! 🙂
Best Answer
You can try the following example. That adds
\endfirstfoot
.Addendum by Skillmon:
The above approach will use the normal
foot
instead of thefirstfoot
if thelongtable
will only take a single page andlastfoot
wasn't used. The following is almost identical to the above code, but it will use thefirstfoot
on a single pagelongtable
.The precedence for the footer on a single page
longtable
will be:lastfoot
, and if that's emptyfirstfoot
, and if that's emptyfoot
.Code: