A recent version of rmarkdown changed how it calls LaTeX and pandoc (I believe it was something where the call to LaTeX used to be indirect through pandoc, but now is done more directly). This also caused this type of problem for me, at least when using rmarkdown::render (as opposed to the 'knit' button)
See the extended discussion of the issue here:
Two things that helped me:
- Make sure your all your paths do not have spaces. In particular, my LaTeX engine (MiKTeX) used to be located in a path with a space, but when I switched it to a path without, it was fixed.
- Update Rstudio to a recent version.
I am a little unclear if it has been resolved in knitr/markdown packages, but this Rstudio issue was also affecting pdf creation on windows for me: