title: texi2dvi error when compiling tex files using RStudio and knitr since Mac OSX 10.10 upgrade
body: <p>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.</p>
  
  <p>I am basically unable to compile any Tex files from RStudio, including the minimal files. Running the <code>knit2pdf</code> function produces a .tex file but does not produce a PDF file. Instead it returns the following error:</p>
  
  <pre><code>Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
    Running 'texi2dvi' on 'Test.tex' failed.
  </code></pre>
  
  <p>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.</p>
  
  <p><strong>Update</strong>: 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 <code>tex2dvi</code> 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 <code>pdftk</code> using the <code>system</code> command in R).</p>
  
  <p><strong>Issue Resolved</strong>: This issue was resolved through a <a href="https://stackoverflow.com/questions/26491934/running-system-command-from-r-console-cannot-locate-installed-programs-since-upg/26492588#26492588">related post</a>. It turns out that Yosemite does not allow programs to forward the <code>PATH</code> variable to child processes... The (temporary) solution is to launch RStudio through the Terminal.</p>