[R-SIG-Mac] building a package on a Mac: pdflatex

Simon Urbanek simon.urbanek at r-project.org
Tue Jul 5 16:19:03 CEST 2011


On Jul 5, 2011, at 9:48 AM, David Winsemius wrote:

> 
> On Jul 5, 2011, at 9:10 AM, Federico Calboli wrote:
> 
>> Simon,
>> 
>>> both are entirely irrelevant - run
>>> system("pdflatex --version")
>>> in R - that is the only thing that counts. If it shows an error, then you don't have pdflatex on your PATH which would be the problem. As a side note, you are showing two separate TeX packages which may not help you to find out what breaks in your setup in general ...
>> 
>> 
>> thanks for the hint. Unfortunately:
>> 
>> system("pdflatex --version")
>> /bin/sh: pdflatex: command not found
>> 
>> doing a simple
>> 
>> PATH=$PATH:/user/texbin
>> 
>> fixed it if I use R and package.skeleton() from the terminal. If I use the R gui (from the standard R 2.13.0 CRAN download) it still does not find pdflatex and does not build a usable package skeleton.
>> 
>> In any case, your hit solved my issue. Now, how do I set the path for the R gui?
>> 
> 
> When the answer to this is posted, I am wondering if it could be put in the Mac R FAQ because it seems that I have read several questions of late that involve users puzzling where to set various paths for Finder,  bash, and R that are stored in different places/environments. It would be good not to need to search for a r-sig-mac posting but rather refer to a "central document".
> 

But that is largely irrelevant to R. R has its own mechanisms that are well documented in the R documentation, so you can use environment.plist or .profile if you are so inclined, but I would not recommend it, mainly because it will still lead to discrepancies between the GUI and the shell. Moreover, it's not R specific so it will influence other apps that may not expect it. Also it's easy to forget about such things when you are upgrading the system. So, I'm saying just use .Renviron and/or .Rprofile and all is well :).

Cheers,
Simon



More information about the R-SIG-Mac mailing list