I have this simple table:
one = c("one") two = c ("two") df = data.frame(one, two) knitr::kable(escape = FALSE, df, align = "l") |> kableExtra::kable_styling(latex_options = "hold_position")
If I add a lot of text to one of the cells, the table will exceed the page width instead of going to a new line. I want it to make it always fit the page width. I know a possible solution is to use the
tabularx environment from the tabularx package, but I'm not sure how to do that with kable. I could also set
full_width = TRUE in
kable_styling, but that will cause vertical borders to dissapear.