I can no longer use RMarkdown to render pdfs. Rmarkdown continues to render to HTML and Word. I am working in Windows 11 and RStudio 2023.12.1 Build 402.
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22631)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.12 lubridate_1.9.2 digest_0.6.35 evaluate_0.21 zip_2.3.0
[6] stringi_1.7.12 rlang_1.1.3 cli_3.6.2 rstudioapi_0.16.0 generics_0.1.3
[11] openxlsx_4.2.5.2 rmarkdown_2.24 tools_4.2.2 tinytex_0.46 xfun_0.40
[16] yaml_2.3.8 fastmap_1.1.1 compiler_4.2.2 timechange_0.2.0 htmltools_0.5.8.1
[21] knitr_1.43
Last week I changed to the most recent version of RStudio before I noticed the problem. However reinstalling the previous version of RStudio did not resolve the problem. A check of the error message using ChatGPT4.0 suggested that the Latex package amsmath might need to be included. When I included options(tinytex.verbose = TRUE) in my Rmd file, no missing LaTex packages are identified. The numberwithin has to do with numbering of equations, text
The problem occurs any Rmd file, not just my production file–e.g. with the example Rmd file included with RStudio, I get the error message with this Rmd file when I knit to PDF:
---
title: "Test2"
output:
pdf_document: default
html_document:
df_print: paged
word_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
options(tinytex.verbose = TRUE)
R Markdown
summary(cars)
Including Plots
plot(pressure)