gt icon indicating copy to clipboard operation
gt copied to clipboard

Long table header repeated on each page.

Open rjazwiec opened this issue 10 months ago • 3 comments

Prework

Proposal

As far as I looked it in .tex files gt uses longtable environment for tables spanning over few pages. Unfortunately, table headers are not repeated on each page.

I'm not LaTex pro, but I tested manually adding \endhead after \midrule before the first row of data, and each time it worked very well. Both for tables rendered in portrait and in landscape*.

I think it would be nice to have parameter in gt() that decides if \endhead should be added to latex output.

*package lscape

rjazwiec avatar Apr 23 '24 08:04 rjazwiec

Sample result of manually adding \endhead rendered to pdf sample2.pdf

rjazwiec avatar Apr 23 '24 08:04 rjazwiec

I agree this would be a very helpful addition!

bzkrouse avatar May 08 '24 16:05 bzkrouse

I agree as well. Additionally, wouldn't it be useful if a label could be set at the top of the headers from the second page onward to indicate continuity, and that label could also be customizable?

The attached screenshot is from the 'kableExtra' package. In this package, there is a 'repeat_header' option that, when enabled, adds the label '(continued)' above the header on the second and subsequent pages. However, this label cannot be changed. As a Japanese user, there are times when I would like to change the label to Japanese :-) .

image

ujtwr avatar Oct 11 '24 23:10 ujtwr