# [#6628] [latex] Using longtable with label and \endlastfoot produces extra space after last row

Date:
2019-05-31 09:24
Priority:
3
State:
Open
Submitted by:
Basil Eric Rabi (brabi)
Assigned to:
Nobody (None)
Hardware:
PC
Product:
None
Operating System:
Linux
Component:
None
Version:
None
Severity:
None
Resolution:
None
URL:
Summary:
[latex] Using longtable with label and \endlastfoot produces extra space after last row

Detailed description
Attached is a sweave file which can be compiled to PDF in knitr.
The table caption is placed at the top.

The first print.xtable has a label argument but it results to a longtable with blank row before the last foot.

The second print.xtable has no label argument, however the label itself is placed in the caption argument. I believe this should be the expected output even if the label argument is present.

Looking at the generated tex file, the extra space seem to result from the \label being placed after the last row of the longtable. The extra space can be removed when the \label is placed right after the \caption.

sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 30 (Workstation Edition)

other attached packages:
[1] xtable_1.8-4

Message
Date: 2019-05-31 09:37
Sender: Basil Eric Rabi

Attachments: