I've been struggling with this for 8 weeks now and still no resolution. I've been through many of the proposed solutions to rmarkdown - compile pdf with no resolution including reinstalling R, RStudio, rmarkdown, tinytex, tinytex:::install_prebuilt(), ... . I've used rmarkdown for creating pdfs for 4 years without issue (except those of my own making) and suddenly in November, I started getting the messages for the two-authors.rmd example below the errors:
processing file: two-authors.Rmd
output file: two-authors.knit.md
Error: Failed to compile two-authors.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
In addition: Warning messages:
1: In system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
'CreateProcess' failed to run 'C:\Users\David Stevens\AppData\Roaming\TinyTeX\bin\win32\pdflatex.exe -halt-on-error -interaction=batchmode "two-authors.tex"'
2: In system2("tlmgr", args, ...) :
'CreateProcess' failed to run 'C:\Users\David Stevens\AppData\Roaming\TinyTeX\bin\win32\tlmgr.bat update --all --self'
Execution halted
Two-authors.rmd
title: "Two authors"
output: pdf_document
author:
- John Doe
- Jane Doe
The default LaTeX template should work with multiple authors: https://github.com/rstudio/rmarkdown/issues/1716
Sys.which('pdflatex') gives the right path. I don't know where to turn to fix this. Thankfully, I can use RStudio Cloud and all is well but that isn't always available to me. I'd really like to get back to where rmarkdown (and bookdown) can compile to pdf.
My system - Windows 10, R 3.6.2, RStudio 1.2.5033, latest rmarkdown/tinytex and miktex 2.9.