vincentarelbundock / modelsummary

Beautiful and customizable model summaries in R.
http://modelsummary.com
Other
896 stars 74 forks source link

Arguments for \newcolumntype deprecated in siunitx #789

Closed mrwunderbar666 closed 2 weeks ago

mrwunderbar666 commented 2 weeks ago

The more recent version of siunitx raises a deprecation warning for the following arguments

Package siunitx Info: Option "table-align-text-pre" has been deprecated in
(siunitx)             this release.
(siunitx)             
(siunitx)             Use "table-align-text-before = false" as a replacement.

Package siunitx Info: Option "table-align-text-post" has been deprecated in
(siunitx)             this release.
(siunitx)             
(siunitx)             Use "table-align-text-after = false" as a replacement.

This leads to unpleasant alignment of significance stars in regression tables (note the hideous spacing between the stars):

image

I could fix it by replacing the definition of \newcolumntype manually in the knitted tex file:

\newcolumntype{d}{S[
    input-open-uncertainty=,
    input-close-uncertainty=,
    parse-numbers = false,
    table-align-text-before = false,
    table-align-text-after = false,
    table-format= 5.3]}

Please consider changing the siunitx arguments in factory_kableExtra.R

vincentarelbundock commented 2 weeks ago

Thanks for raising this issue.

I made an update but didn't include all those lines. On my end, it looks like things are working as expected, so maybe we don't need all those specifications? Let me know if you try the Github version and run into issues:

https://github.com/vincentarelbundock/modelsummary/commit/a41229000547df04b504271f57e08bbf1627c038

mrwunderbar666 commented 2 weeks ago

Beautiful! Thanks for the swift fix!

Result using the latest github version:

image