gt
gt copied to clipboard
Long table header repeated on each page.
Prework
- [x] Read and abide by gt's code of conduct and contributing guidelines.
- [~x] Search for duplicates among the existing issues (both open and closed).
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
Sample result of manually adding \endhead
rendered to pdf
sample2.pdf
I agree this would be a very helpful addition!
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 :-) .