[R-SIG-Mac] Rd2dvi --pdf

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 5 07:31:59 CET 2010


On Mon, 4 Jan 2010, Matthew Fero wrote:

> I know this has been addressed before, but I'm not sure I understand 
> the prior comments.
>
> Does the R Mac binary installer include the latex components 
> necessary to run the 'R CMD Rd2dvi --pdf' command?  If so, where

No.  See the FAQ, specifically section 2.1 and

http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#TeX-suite-of-tools-for-documentation-_0028optional_0029

Note that these days the 'R Mac binary installer' contains much less 
than it used to, basically just R (not Tcl/Tk for example).

> should it be located, because I'm getting the error, 
> "/Library/Frameworks/R.framework/Resources/bin/Rd2dvi: line 233: 
> /usr/texbin/pdflatex: No such file or directory".  If not, any 
> suggestions on an easy way to install a lightweight, compatible 
> latex distribution?

Unfortunately the CRAN binary of R (which I presume you are using) 
hardocodes the path to the TeX distribution (to values appropriate to 
MacTeX).  Depending on the architecture you are using, look in the 
file named like 
/Library/Frameworks/R.framework/Resources/etc/i386/Renviron and either 
edit the file or set the appropriate environment variables 
appropriately.

MacTeX is not 'lightweight' but you do need quite a lot (including 
fonts) to process Rd format.  So unless you install a comprehensive 
distribution or have one that updates itself on the fly, you are 
likely to spend a lot of time chasing down additional TeX packages.

> Thanks,
>
> Matthew


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-SIG-Mac mailing list