rstudio / gt

Easily generate information-rich, publication-quality tables from R
https://gt.rstudio.com
Other
1.97k stars 199 forks source link

Long table header repeated on each page. #1630

Open rjazwiec opened 4 months ago

rjazwiec commented 4 months ago

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 commented 4 months ago

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

bzkrouse commented 3 months ago

I agree this would be a very helpful addition!