problem to save PDF file on Rstudio?

output file: EXER2TD1-ADD.knit.md

"C:/Program Files/RStudio/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS EXER2TD1-ADD.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output EXER2TD1-ADD.tex --lua-filter "C:\PROGRA~1\R\R-42~1.2\library\RMARKD~1\RMARKD~1\lua\PAGEBR~1.LUA" --lua-filter "C:\PROGRA~1\R\R-42~1.2\library\RMARKD~1\RMARKD~1\lua\LATEX-~1.LUA" --embed-resources --standalone --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in"
Error: LaTeX failed to compile EXER2TD1-ADD.tex. See The R package tinytex - Helper Functions to Manage TinyTeX, and Compile LaTeX Documents - Yihui Xie | 谢益辉 for debugging tips.
In addition: Warning message:
In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'"pdflatex"' not found
Execution halted

Since part of the error message is '"pdflatex"' not found, I wonder if you have installed Latex software. Have you run

tinytex::install_tinytex()
2 Likes