vincentarelbundock / tinytable

Simple and Customizable Tables in `R`
https://vincentarelbundock.github.io/tinytable
GNU General Public License v3.0
196 stars 16 forks source link

Exporting a wide table to PDF truncates the output #234

Closed etiennebacher closed 5 months ago

etiennebacher commented 5 months ago

This is a silly example, the real usecase is exporting a balance table made by datasummary_balance() to PDF.

library(tinytable)

# wide df
test <- cbind(mtcars[1, ], mtcars[1, ])

tt(test) |> 
  save_tt("foo.pdf")
#> Warning: Package tabularray Warning: Table width is too small, need 284.97998pt
#> more!

In the PDF output, the table is truncated. Maybe it's a limitation of the standalone package but it would be great to automatically fit the table.

vincentarelbundock commented 5 months ago

Does it work with the "resize" theme?

etiennebacher commented 5 months ago

Thanks, that solved the truncation but there's still the warning of tabularray. Not sure if you consider this a problem or not so I leave this open

vincentarelbundock commented 5 months ago

That doesn't show up in the finale table, right?

Of course, it would be better to not display a warning there. But realistically, I'll probably prioritize other things with my limited dev time.

etiennebacher commented 5 months ago

That doesn't show up in the finale table, right?

No, it doesn't show, the output is fine

But realistically, I'll probably prioritize other things with my limited dev time.

Sure sure, no problem