[Rd] Rd2pdf and Rd2dvi don't find texi2dvi

Duncan Murdoch murdoch.duncan at gmail.com
Fri Mar 25 13:47:47 CET 2011

On 25/03/2011 4:23 AM, Tobias Erhardt wrote:
> Hello everybody
> I'm am trying to build a pdf out of the Rd files that i wrote for a package, so that I can attach it to my thesis.
> if i Run Rd2pdf (or Rd2dvi) I get this error massage:
> Hmm ... looks like a package
> Converting Rd files to LaTeX .
> Creating pdf output from LaTeX ...
> Error in texi2dvi("Rd2.tex", pdf = (out_ext == "pdf"), quiet = FALSE,  :
>    Running 'texi2dvi' on 'Rd2.tex' failed.
> Output:
> You don't have a working TeX binary (tex) installed anywhere in
> your PATH, and texi2dvi cannot proceed without one.  If you want to use
> this script, you'll need to install TeX (if you don't have it) or change
> your PATH or TEX environment variable (if you do).  See the --help
> output for more details.
> For information about obtaining TeX, please see http://www.tug.org.  If
> you happen to be using Debian, you can get it with this command:
>    apt-get install tetex-bin
> Error in running tools::texi2dvi
> The problem is, that i have a valid Tex installation and I am able to call texi2dvi in the shell, as it is in my path.
> In R getOption("texi2dvi") gives me the correct path to texi2dvi "/usr/bin/texi2dvi"
> I am running R2.12.2 on MacOSX 10.6.7 and have TexLive 2010 installed

That message is coming from texi2dvi (the system command), not from R.  
So you might want to investigate why texi2dvi as invoked from R is 
different than texi2dvi as invoked from your shell.  I'd try

system("texi2dvi --version")

in R and compare the result to what you get outside, examine the 
environment variables PATH and TEX in both places (with 
Sys.getenv(c("PATH", "TEX")) in R) to look for differences, etc.

Duncan Murdoch

More information about the R-devel mailing list