I'm having a problem compiling Latex files using RStudio (0.98.1079) and Knitr (1.7) and R (3.1.1). The problem only started with the upgrade to the latest version of Mac OS X.
Basically, I cannot compile any Tex files from RStudio, including minimal files. Running the knit2pdf function creates a .tex file but does not create a PDF file. Instead, it returns the following error:
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, : Running 'texi2dvi' on 'Test.tex' failed.
It is strange that I can compile a .tex file using another Tex program (i.e. Texpad / TexShop) just fine. For reference, I am using TexLive 2013 and trying to compile using pdfLateX.
Update . I just uninstalled and updated all the software involved in this problem (R, RStudio, Knitr and LaTeX). However, I still have the same problem. My gut says that the tex2dvi function tex2dvi not indicate the correct installation of LaTeX on my computer, but I have no idea how to diagnose / fix the problem (oddly enough, I also cannot run pdftk using the system command in R).
The problem is resolved . This issue was resolved with a linked message . It turns out that Yosemite does not allow programs to send the PATH variable to child processes ... A temporary solution is to start RStudio through the terminal.
r rstudio knitr tex
Berk U.
source share