Closed MarcoPortmann closed 8 months ago
What would be the resizebox{} LaTEX code for that, you think?
I figured it out. It should work in the latest version from Github:
---
format: pdf
---
```{r}
library(tinytable)
tt(cbind(mtcars[1:4,], mtcars[1:4,])) |>
theme_tt("resize", direction = "down") |>
theme_tt("placement", "H")
tt(cbind(mtcars[1:4, 1:3])) |>
theme_tt("resize", direction = "down") |>
theme_tt("placement", "H")
library(tinytable)
tt(cbind(mtcars[1:4,], mtcars[1:4,])) |>
theme_tt("resize", direction = "both") |>
theme_tt("placement", "H")
tt(cbind(mtcars[1:4, 1:3])) |>
theme_tt("resize", direction = "both") |>
theme_tt("placement", "H")
It would be handy, if
tt_theme(theme ="resize", width = ...
had an option to resize the table in one direction only. For instance, I'd like to keep the original size, if a table's width is smaller than the page's width but I'd like to scale the table down if it doesn't fit on the page.