-
Notifications
You must be signed in to change notification settings - Fork 414
Open
Labels
crossrefenhancementNew feature or requestNew feature or requestlatexLaTeX engines related libraries and technologiesLaTeX engines related libraries and technologiestablesIssues with Tables including the gt integrationIssues with Tables including the gt integration
Milestone
Description
Quarto injects the \caption and \label into the longtable, but places them before \endhead without adding a separate \endfirsthead block. This causes the caption to repeat on every page.
Discussed in https://github.com/orgs/quarto-dev/discussions/14145
Originally posted by jtatria March 3, 2026
Description
I'm trying t format a very long table with repeated headers in each page using gt with latex options longtable and header_repeat, but I'm getting repeated table captions on each page, and multiple entries in the list of tables.
How can I accomplish a long table with repeated headers but a single caption?
I already tried using gt's own gt:tab_caption, but the caption wouldn't show in quarto.
MRE:
---
title: "gt demo"
format:
pdf:
documentclass: report
lot: true
---
## Demo
```{r}
#| label: tbl-demo
#| tbl-cap: "Caption repeats"
gt::gt( iris ) |> gt::tab_options(
latex.use_longtable=TRUE,
latex.header_repeat=TRUE
)
```
```
Any help would be greatly appreciated. Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
crossrefenhancementNew feature or requestNew feature or requestlatexLaTeX engines related libraries and technologiesLaTeX engines related libraries and technologiestablesIssues with Tables including the gt integrationIssues with Tables including the gt integration