From murdoch.duncan at gmail.com  Fri Mar 25 13:47:47 2011
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Fri, 25 Mar 2011 08:47:47 -0400
Subject: [Rd] Rd2pdf and Rd2dvi don't find texi2dvi
In-Reply-To: <AF958FF9-6AE8-468F-B7A4-116B806D59CA@gmail.com>
References: <AF958FF9-6AE8-468F-B7A4-116B806D59CA@gmail.com>
Message-ID: <4D8C8EF3.4000400@gmail.com>

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



[Rd] Rd2pdf and Rd2dvi don't find texi2dvi
Duncan Murdoch