Hi there,
I encountered similar issues in this post when rendering a flextable in a Beamer presentation. Surprisingly, it worked fine for all other document formats like Word, PDF, PPTX, and HTML, except for Beamer. Every attempt to debug the problem was unsuccessful, despite trying the following steps:
- Re-installing/Updating R.
- Re-installing/Updating R Studio.
- Re-installing/Updating all the packages.
- Restarting the R session.
- Following the debugging instructions provided in the error below.
Unfortunately, the issue persists and the error message continues to appear.
processing file: test2.Rmd
/usr/local/bin/pandoc +RTS -K512m -RTS test2.knit.md --to beamer --from markdown+autolink_bare_uris+tex_math_single_backslash --output test2.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --highlight-style tango --pdf-engine pdflatex --embed-resources --standalone
output file: test2.knit.md! Undefined control sequence.
\OldarrayrulewidthError: LaTeX failed to compile test2.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips. See test2.log for more info.
Execution halted
The example code used in R Markdown is as in the post above by @davidgohel.
As I have 2 Macs, one is M1, and one is Intel, I tried this Rmd file on them and both showed the same error of "! Undefined control sequence. \Oldarrayrulewidth".
Do you have a trick for this?
My session information:
sessionInfo()
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.3Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8time zone: Asia/Tokyo
tzcode source: internalattached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] gtsummary_1.7.1 kableExtra_1.3.4.9000 lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0
[6] dplyr_1.1.2 purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
[11] ggplot2_3.4.2 tidyverse_2.0.0 flextable_0.9.2loaded via a namespace (and not attached):
[1] tidyselect_1.2.0 viridisLite_0.4.2 fastmap_1.1.1 xaringan_0.28 fontquiver_0.2.1
[6] broom.helpers_1.13.0 promises_1.2.0.1 digest_0.6.33 timechange_0.2.0 mime_0.12
[11] lifecycle_1.0.3 ellipsis_0.3.2 gfonts_0.2.0 processx_3.8.2 magrittr_2.0.3
[16] compiler_4.3.1 sass_0.4.6 rlang_1.1.1 tools_4.3.1 gt_0.9.0
[21] utf8_1.2.3 yaml_2.3.7 data.table_1.14.8 knitr_1.43 askpass_1.1
[26] prettyunits_1.1.1 htmlwidgets_1.6.2 pkgbuild_1.4.2 curl_5.0.1 xml2_1.3.5
[31] rsconnect_0.8.29 pkgload_1.3.2.1 httpcode_0.3.0 miniUI_0.1.1.1 withr_2.5.0
[36] grid_4.3.1 fansi_1.0.4 urlchecker_1.0.1 profvis_0.3.8 gdtools_0.3.3
[41] xtable_1.8-4 colorspace_2.1-0 scales_1.2.1 crul_1.4.0 tinytex_0.45
[46] cli_3.6.1 rmarkdown_2.23 crayon_1.5.2 ragg_1.2.5 generics_0.1.3
[51] remotes_2.4.2 rstudioapi_0.15.0 httr_1.4.6 tzdb_0.4.0 sessioninfo_1.2.2
[56] cachem_1.0.8 rvest_1.0.3 vctrs_0.6.3 devtools_2.4.5 webshot_0.5.5
[61] jsonlite_1.8.7 fontBitstreamVera_0.1.1 xaringanthemer_0.4.2 callr_3.7.3 hms_1.1.3
[66] systemfonts_1.0.4 jquerylib_0.1.4 glue_1.6.2 ps_1.7.5 DT_0.28
[71] stringi_1.7.12 gtable_0.3.3 later_1.3.1 munsell_0.5.0 pillar_1.9.0
[76] htmltools_0.5.5 openssl_2.0.6 R6_2.5.1 textshaping_0.3.6 evaluate_0.21
[81] shiny_1.7.4.1 memoise_2.0.1 bslib_0.5.0 fontLibera