officedown
officedown copied to clipboard
Knitting to word with hyperlink in footnote
Attempting to add a hyperlink in a footnote via Rmd and knit to rdocx_document
results in an "unreadable" file per Microsoft Word. See Rmd reprex below:
---
output:
officedown::rdocx_document
---
`` ```{r}
library(officer)
url <- "https://github.com"
ft <- fp_text(font.size = 10)
hl <- hyperlink_ftext(href = url, text = url, prop = ft)
`` ```
The github website^[`r hl`]
sessionInfo()
R version 4.3.1 (2023-06-16 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] officedown_0.3.1 officer_0.6.3
loaded via a namespace (and not attached):
[1] jsonlite_1.8.7 compiler_4.3.1 crayon_1.5.2 promises_1.2.0.1 Rcpp_1.0.11 zip_2.3.0
[7] xml2_1.3.5 later_1.3.1 fontquiver_0.2.1 systemfonts_1.0.4 textshaping_0.3.6 uuid_1.1-0
[13] yaml_2.3.7 fastmap_1.1.1 mime_0.12 R6_2.5.1 gfonts_0.2.0 gdtools_0.3.3
[19] curl_5.0.1 knitr_1.43 openssl_2.1.0 crul_1.4.0 shiny_1.7.4.1 rlang_1.1.1
[25] rvg_0.3.3 cachem_1.0.8 httpcode_0.3.0 httpuv_1.6.11 xfun_0.39 memoise_2.0.1
[31] cli_3.6.1 magrittr_2.0.3 digest_0.6.33 xtable_1.8-4 rstudioapi_0.15.0 askpass_1.2.0
[37] lifecycle_1.0.3 evaluate_0.21 glue_1.6.2 fontLiberation_0.1.0 ragg_1.2.5 fontBitstreamVera_0.1.1
[43] rmarkdown_2.25 ellipsis_0.3.2 tools_4.3.1 htmltools_0.5.5