bmacGTPM / rticles

LaTeX Journal Article Templates for R Markdown
0 stars 0 forks source link

Errors like "file 'mdpi_article.pdf' does not exist" #5

Closed bmacGTPM closed 5 years ago

bmacGTPM commented 5 years ago

After clicking Build, Check I often got errors like this

Error from rmarkdown::render(testdoc, quiet = TRUE)  at test-formats.R#22 
  Error in tools::file_path_as_absolute(output_file) : 
    file 'mdpi_article.pdf' does not exist
bmacGTPM commented 5 years ago

In order to dig deeper, I created a new R Markdown file using the MDPI template and knitted as pdf to see what the LaTeX errors. A font was missing, same kind of problem as #2

Interestingly, after knitting a second time without making changes, the problem is solved. This must be because LaTeX is auto-downloading/updating something, and has the stupid/annoying requirement of compiling several times until it actually works.

Since this happened for several article types, I reinstalled MikTeX. It seems like I had to choose the option to install for all users on the computer, not just me, for it to work. But everything works now.