Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customized borders cannot be exported to RTF files #1657

Open
6 tasks done
AlexZHENGH opened this issue May 10, 2024 · 0 comments
Open
6 tasks done

Customized borders cannot be exported to RTF files #1657

AlexZHENGH opened this issue May 10, 2024 · 0 comments
Assignees

Comments

@AlexZHENGH
Copy link

AlexZHENGH commented May 10, 2024

Prework

Description

Customized table borders cannot be exported to RTF files.

Reproducible example

  • Post a minimal reproducible example so the maintainer can troubleshoot the problems you identify. A reproducible example is:
    • Runnable: post enough R code and data so any onlooker can create the error on their own computer.
    • Minimal: reduce runtime wherever possible and remove complicated details that are irrelevant to the issue at hand.
    • Readable: format your code according to the tidyverse style guide.
library(gt)

tbl <- exibble |>
  gt(
    rowname_col = "row",
    groupname_col = "group"
  ) |>
  gt::tab_header(title="demo") |>
  tab_options(
    table_body.border.bottom.style = "solid",
    table_body.border.bottom.color = "black",
    table_body.border.bottom.width = px(2),
    
    heading.border.bottom.style = "solid",
    heading.border.bottom.color = "black",
    heading.border.bottom.width = px(2),
    
    footnotes.marks = c("[a]", "[b]"),
    page.orientation = "landscape"
  )
tbl

gtsave(tbl, 'demo-rtf-border.rtf')

Below is a screenshot of the exported RTF file.

image

Expected result

The borders are shown in the RTF tables.

image

Session info

End the reproducible example with a call to sessionInfo() in the same session (e.g. reprex(session_info = TRUE)) and include the output.

> sessionInfo()
R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 11 x64 (build 22631)

Matrix products: default


locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8  LC_CTYPE=Chinese (Simplified)_China.utf8    LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C                                LC_TIME=Chinese (Simplified)_China.utf8    

time zone: Asia/Shanghai
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] purrr_1.0.2 rlang_1.1.2 tidyr_1.3.0 dplyr_1.1.3 gt_0.10.1  

loaded via a namespace (and not attached):
 [1] sass_0.4.7              utf8_1.2.4              generics_0.1.3          fontLiberation_0.1.0    bitops_1.0-7           
 [6] xml2_1.3.5              stringi_1.7.12          httpcode_0.3.0          digest_0.6.33           magrittr_2.0.3         
[11] evaluate_0.23           grid_4.3.2              flextable_0.9.6         fastmap_1.1.1           jsonlite_1.8.7         
[16] zip_2.3.1               crul_1.4.2              promises_1.2.1          fansi_1.0.5             fontBitstreamVera_0.1.1
[21] textshaping_0.3.7       cli_3.6.1               shiny_1.8.0             fontquiver_0.2.1        crayon_1.5.2           
[26] commonmark_1.9.0        ellipsis_0.3.2          withr_2.5.2             gfonts_0.2.0            gdtools_0.3.7          
[31] tools_4.3.2             officer_0.6.6           uuid_1.1-1              httpuv_1.6.13           forcats_1.0.0          
[36] curl_5.1.0              vctrs_0.6.4             R6_2.5.1                mime_0.12               lifecycle_1.0.4        
[41] stringr_1.5.0           fs_1.6.3                ragg_1.2.6              pkgconfig_2.0.3         pillar_1.9.0           
[46] later_1.3.2             data.table_1.14.8       glue_1.6.2              Rcpp_1.0.11             systemfonts_1.0.5      
[51] xfun_0.41               tibble_3.2.1            tidyselect_1.2.0        rstudioapi_0.15.0       knitr_1.45             
[56] xtable_1.8-4            htmltools_0.5.7         rmarkdown_2.25          compiler_4.3.2          markdown_1.11          
[61] askpass_1.2.0           openssl_2.1.1  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants