Closed jdjohn215 closed 1 month ago
I'm curious if anyone has found a workaround to do the table cross-references without the messy table formatting?
This is a Quarto issue. https://github.com/quarto-dev/quarto-cli/issues/7151 Not sure how we could work around this in gt. flextable seems to have done it. https://github.com/davidgohel/flextable.
Essentially, we could tweak our knit_print()
method for word output in Quarto
Duplicate of https://github.com/rstudio/gt/issues/1604
Prework
Description
Tables in word documents created by Quarto are constrained to an extremely narrow width. This only happens when the code chunk creating the table is given a label, and it did not happen under the previous release of the Quarto CLI.
This may be an issue for Quarto, not gt, in which case I'll close this issue and submit it to the Quarto CLI maintainers.
Reproducible example
This quarto document creates the output shown in the following image.
format: docx
R version 4.3.2 (2023-10-31) Platform: x86_64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.4.1
Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0
locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: America/Chicago tzcode source: internal
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] gt_0.10.1
loaded via a namespace (and not attached): [1] digest_0.6.35 utf8_1.2.4 R6_2.5.1 fastmap_1.1.1
[5] tidyselect_1.2.1 xfun_0.43 magrittr_2.0.3 glue_1.7.0
[9] tibble_3.2.1 knitr_1.45 pkgconfig_2.0.3 htmltools_0.5.8.1 [13] generics_0.1.3 rmarkdown_2.26 dplyr_1.1.4 lifecycle_1.0.4
[17] xml2_1.3.6 cli_3.6.2 fansi_1.0.6 vctrs_0.6.5
[21] withr_3.0.0 compiler_4.3.2 rstudioapi_0.15.0 tools_4.3.2
[25] pillar_1.9.0 evaluate_0.23 yaml_2.3.8 rlang_1.1.3
[29] jsonlite_1.8.8