I have a table in my r markdown pdf.
kable(df, "latex", longtable = F, booktabs = T) %>%
kable_styling(latex_options = c("hold_position",
"scale_down"),
fixed_thead = T)
this give a nice table centered in the page, but it is too long for the height of the page. so I added
kable(df, "latex", longtable = T, booktabs = T) %>%
kable_styling(latex_options = c("repeat_header"))
as suggested by many posts. My table now is split across several pages but now wider so that it does not fit within the width of the paper.
How can I keep the original width while still using longtable.
I run the same code suggested here enter link description here but my table exceeds the width of the paper.