kable problem: 'longtable = T' and 'full_width = T' are required in my case but they seem to be incompatible

139 views Asked by At

PROBLEM: How to knit/render in pdf a one column table, containing a continuous text and extending on a second page?
With the default "longtable = F", the table is truncated!
While specifying "longtable = T" the source doesn't compile!
The log signals:

Dimension too large.
\LT@max@sel #1#2->{\ifdim #2=\wd \tw@
#1\else \number \c@LT@chunks \fi }{\th...
l.167 \end{longtabu}

Below the text of the Rmd that compiles but truncates the table.
Removing # before longtable, it produces the error.

.# (dots added to have the chunk limits visible)
.---
output: pdf_document
.---

.```{r} suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(kableExtra))

tibble(Title = paste(paste(lorem:::ipsum(paragraphs = 20),
collapse = " NEXT "), " *** END ***")) %>%
kbl(booktabs = T,
longtable = T
) %>%
kable_styling(full_width = TRUE,
latex_options = c("hold_position", "repeat_header"),
repeat_header_continued =
"\textit{(Continued on Next Page...)}"
)
.```

END of TEST

Issue open also in KableExtra GitHub repo

0

There are 0 answers