vincentarelbundock / tinytable

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

`theme_tt("tabular")` with `modelsummary` #301

Closed vincentarelbundock closed 2 weeks ago

vincentarelbundock commented 3 weeks ago
The tabular theme is fantastic if you follow the steps on the website.

If you use modelsummary, it doesn't work without some manual editing of the .tex output:
library(modelsummary)
library(tinytable)

reg<-lm(data=mtcars,mpg~cyl) 

# still has talltblr syntax after begin
modelsummary(reg)|> theme_tt('tabular') |> print('latex')

# still has talltblr syntax after begin
# ends with talltblr
modelsummary(reg, stars =  c('*' = .1, '**' = .05, '***' = 0.01))|> 
  theme_tt('tabular') |> print('latex')

Originally posted by @mjdcurtis in https://github.com/vincentarelbundock/tinytable/issues/268#issuecomment-2212552257

vincentarelbundock commented 3 weeks ago

https://github.com/vincentarelbundock/tinytable/issues/268#issuecomment-2212565953

andrewheiss commented 2 weeks ago

Ha, I just ran into this issue too when working with theme_tt("tabular", style = "tabularray")(for making a table cross-referencable in an appendix, via https://github.com/vincentarelbundock/tinytable/issues/293#issuecomment-2205794565)

The table in LaTeX starts with \begin{tabular} but ends with \end{talltblr}

vincentarelbundock commented 2 weeks ago

@mjdcurtis @andrewheiss

I believe this is fixed in version 0.3.0.28 of tinytable from Github.