Error unable to run 'pdflatex' after update

pdflatex

#1

Ana

Apr 3, 06:49 EDT

Hi everybody,

After an update I got the following error:

Error: Failed to compile Informe3EP-knitr.tex.
In addition: Warning message:
running command '"pdflatex" -halt-on-error -interaction=batchmode "Informe3EP-knitr.tex"' had status 1 

Any ideas how to fix the problem?
Thanks a lot for any suggests.
Ana


#2

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:

  1. 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.
  2. 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:


#3

Thanks so much for the comments.

Now it´s working


#4

Hello Ana, can you tell what you did (following jalsalam pointers) that solved it? Was it removing the space from the path where the tex program is stored? Was it simply updating Rstudio?

Thanks in advance.


#5

Hi Omar,

What i did was rename my MikTex folder in programs and after that in RStudio I installed the package tinytex again(devtools::install_github('yihui/tinytex')
After these two steps it worked again
You can see more information here: https://github.com/rstudio/rmarkdown/issues/1285
I hope this help you


#6

Hi Ana,

Thanks for the further detailsn since they were of good help. Installing the package tinytex and restarting R did the trick for me this time. I also removed the spaces from the path where miktex engine was stored.

Hope this also help others.