Since several users have run into the issue of failing to compile R Markdown to PDF (e.g., this post, and the Github issue rstudio/rmarkdown#1285, with detailed solutions here), I hope some brave users could help me test the current development version of tinytex for a few days:
devtools::install_github('yihui/tinytex')
# although not required, you may also test the dev version of rmarkdown
devtools::install_github('rstudio/rmarkdown')
Although I'm pretty sure it should fix the issue, I need to be careful about releasing it to CRAN (for reasons explained here).
Note that the issue only affects those who compile R Markdown documents to PDF (1) interactively (i.e., call rmarkdown::render()
in the R console), (2) on Windows, (3) using MiKTeX, and (4) in the R console of RStudio. This is a rather weird bug. You won't have problems if you don't satisfy one of these conditions. For example, if you hit the Knit
button in RStudio, you should be fine (because the R session launched is not interactive).
BTW, you don't have to uninstall MiKTeX and install TinyTeX (tinytex::install_tinytex()
), although I believe TinyTeX will make your life much easier (Note that TinyTeX is a LaTeX distribution, and tinytex is the R package; they are not really tied to each other).
Thanks!