RStudio cannot find LaTeX after updating Mavericks

I use Sweave quite often on my system using RStudio. However, I recently upgraded my Mac OS from Lion to Mavericks.

This caused several problems: First, RStudio could not find the R library, and it just does not start. I reinstalled RStudio but still got the same problem. So I reinstalled R and RStudio, and then RStudio started working.

And now RStudio still cannot find the TeX installation and gives me the following warning: "TeX installation was not detected. Please install TeX before compiling."

This will probably be fixed by reinstalling, but I would rather avoid a new TeX download (~ 2.3G) .

Any ideas on how to resolve this?

0
source share
1 answer

RStudio expects to pdflatexbe on the system path (i.e., input Sys.which("pdflatex")to the R console should return the path to pdflatex).

You can fix the problem by returning pdflatexback to the system path:

  • Find the path that is pdflatexinstalled on your system probably /usr/texbin, but use find /usr -name pdflatexit if you need help.
  • Create a file named TeXin /etc/paths.dthat contains this path.

For instance:

$ sudo -s "echo /usr/texbin > /etc/paths.d/TeX"

You must restart to make changes.

+1
source

All Articles