[R] Rd2dvi problem.
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Nov 10 07:54:50 CET 2008
R_LATEXCMD is defined in R_HOME/etc/Renviron (sourced by R CMD), and
conditionally re-defined in Rd2dvi.
On a sub-architecture build such as the CRAN MacOS distribution that will
be R_HOME/etc/<arch>/Renviron, and on that distribution it is defined as
'false'. So you do need to define to a proper value in your environment,
e.g. put R_LATEXCMD=latex in your ~/.Renviron file.
It might be worth discussing on R-sig-mac why the default is not 'latex'.
This is what is done on Windows, another system on which a TeX
installation is optional.
On Mon, 10 Nov 2008, Rolf Turner wrote:
>
> If I execute
>
> R CMD Rd2dvi foo.Rd
>
> I get messages of the form:
>
> Converting Rd files to LaTeX ...
> foo.Rd
> Creating dvi output from LaTeX ...
> Saving output to 'foo.dvi' ...
> cp: .Rd2dvi4366/Rd2.dvi: No such file or directory
> Done
> xdvi-xaw: Fatal error: foo.dvi: No such file.
>
> Indeed if I add the --no-clean flag and then cd to the .Rd2dvi<whatever>
> directory, I find that there is no Rd2.dvi file there. There *are*
> files Rd2.tex and Rd2.tex.pre present. And moreover if I execute
>
> latex Rd2
>
> I get a perfectly acceptable Rd2.dvi file.
>
> I don't find a file ``foo.dvi'' anywhere.
>
> Note that ``R CMD Rd2dvi --pdf foo.Rd'' works seamlessly and produces foo.pdf
> as expected.
>
> When I look at the sh code in Rd2dvi I get the impression that ``R_LATEXCMD''
> is defined only when the --pdf flag is on, and it seems that this is what is
> or should be used to do the actual latex processing. The comments at the
> point where the latex processing looks like it is taking place refer to
> ``R_LATEXCMD'' being ***re*** defined for --pdf, but as far as I can the
> only place where it is defined at all is for the --pdf case. But I could be
> wrong since I don't really understand what is going on here.
>
> I'm sure that R CMD Rd2dvi (without the --pdf flag) worked for me in the
> past.
> Something seems to have changed as consequence of an upgrade. Has a bug
> crept
> into R CMD Rd2dvi or is there something weird about my system? I'm currently
> using R 2.8.0; complete session information is:
>
> R version 2.8.0 (2008-10-20)
> i386-apple-darwin8.11.1
>
> locale:
> C
>
> attached base packages:
> [1] datasets utils stats graphics grDevices methods base
>
> other attached packages:
> [1] misc_0.0-9 fortunes_1.3-5 MASS_7.2-44
>
> Can anyone suggest where to start looking for the source of my problem?
>
> Thanks.
>
> cheers,
>
> Rolf Turner
>
>
> ######################################################################
> Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
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-help
mailing list