You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[~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
Reacted by Becca Krouse, ekoraytascilar and Matt Ashby
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 :-) .
Reacted by ekoraytascilar, Matt Shotwell, Colin Gillespie and Matt Ashby
The latex.header_repeat = TRUE available since gt 1.1.0 (thanks to #1995 from @thebioengineer) solves this issue for me, so couldn't you close this issue (as well as #1982)? I got here by searching "how to make header repeat in gt long table" and was initially under the impression that the option wasn't yet available.
I agree that the suggestion for a customizable addition to the header like "(continued)" as suggested by @ujtwr is a good one, but that seems like it belongs in a separate issue.
Activity
rjazwiec commentedon Apr 23, 2024
Sample result of manually adding
\endheadrendered to pdfsample2.pdf
bzkrouse commentedon May 8, 2024
I agree this would be a very helpful addition!
ujtwr commentedon Oct 11, 2024
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 :-) .
iantaylor-NOAA commentedon Apr 7, 2026
The
latex.header_repeat = TRUEavailable since gt 1.1.0 (thanks to #1995 from @thebioengineer) solves this issue for me, so couldn't you close this issue (as well as #1982)? I got here by searching "how to make header repeat in gt long table" and was initially under the impression that the option wasn't yet available.I agree that the suggestion for a customizable addition to the header like "(continued)" as suggested by @ujtwr is a good one, but that seems like it belongs in a separate issue.