Replies: 2 comments 5 replies
-
This is a bug that we have fixed on our 1.4 pre-releases. What version are you using?
Not splitting the table across pages will be a gt-specific setting, and I'm afraid I don't know the solution there. You can try to figure out what's wrong by using |
Beta Was this translation helpful? Give feedback.
-
I'm not sure there's a way (yet) to control table LaTeX positioning with {gt} (there's an open issue for it here rstudio/gt#157). For instance, this: ```{r}
#| label: tbl-test
#| tbl-cap: "Testing"
data.frame(A = 1:2, B = 3:4) |>
gt::gt()
``` emits this: \begin{table}
\caption{\label{tbl-test}Testing}
\centering{
\begin{longtable*}{rr}
\toprule
A & B \\
\midrule\addlinespace[2.5pt]
1 & 3 \\
2 & 4 \\
\bottomrule
\end{longtable*}
}
\end{table}% and there's not a way to inject options into the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am using Quarto with R and RStudio to write a thesis document. I am adding a table that summarises the characteristics of patients I studied. I created this using
gtsummary
.I have created the table and it renders correctly in my final pdf. However, I want to make it sit on it's own page rather than getting split across two pages. I don't know how to do this.
Code to create table:
I then use another chunk to print:
The caption renders at the top of the table, I am unsure why. Most frustratingly I want make sure the table isn't split across pages. I know how to achieve this with Latex, but am unsure how to achieve the same here.
Anyone any ideas?
Beta Was this translation helpful? Give feedback.
All reactions