3

I am having an issue compiling Latex files using RStudio (0.98.1079) and Knitr (1.7) and R (3.1.1). The issue has only started since I upgraded to the latest version of Mac OS X.

I am basically unable to compile any Tex files from RStudio, including the minimal files. Running the knit2pdf function produces a .tex file but does not produce 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.

The weird thing is that I can compile the .tex file using another Tex program (i.e. Texpad/TexShop) just fine. Just for reference, I am using TexLive 2013 and trying to compile using pdfLateX.

Update: I have just uninstalled and upgraded all of the software involved in this problem (R, RStudio, Knitr, and LaTeX). However, I am still having the same issue. My gut says that the tex2dvi function does not point to the correct LaTeX installation on my computer but I have no idea on how to diagnose / fix the issue (strangely, I can also not run pdftk using the system command in R).

Issue Resolved: This issue was resolved through a related post. It turns out that Yosemite does not allow programs to forward the PATH variable to child processes... The (temporary) solution is to launch RStudio through the Terminal.

Community
  • 1
  • 1
Berk U.
  • 7,018
  • 6
  • 44
  • 69

0 Answers0