[R-SIG-Mac] problem with sweave
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Jun 26 09:06:12 CEST 2009
On Thu, 25 Jun 2009, Christophe Dutang wrote:
> Dear list,
>
> I completely reinstalled mac os 10.5 few weeks ago, and since then I
> experienced some problem to use build vignettes.
>
> Following the discussion in
> https://stat.ethz.ch/pipermail/r-sig-mac/2008-November/005578.html
> I put the R texmf directory in my search path with
You put it in your executable search path and I wrote 'input search
path'. That's not 'following'!
You've not told us what TeX you have installed (and none comes with
Mac OS X and there is a choice of third-party ones). So the following
is a guess based on the fact that R's utiities work (and they do set
the input search path).
You need to manipulate the environment variable TEXINPUTS. Something
like
export TEXINPUTS="/Library/Frameworks/R.framework/Versions/Current/Resources/share/texmf:"
(You may well not just be able to append to TEXINPUTS as set, as it
may or may not have a trailing colon.)
The reason for the caution is that there are TeX distributions in
which this does not work, and other ways are needed to set the input
search path -- and that used for R on Windows is one of them.
> if [ -d /Library/Frameworks/R.framework/Versions/Current/Resources/
> share/texmf ]; then
> export PATH="${PATH}:/Library/Frameworks/R.framework/Versions/Current/
> Resources/share/texmf:."
> fi
>
> Then if I build the vignette with R CMD build of the overall package,
> everything is fine. For example for randtoolbox I got
> ...
> * DONE (randtoolbox)
> * creating vignettes ... OK
> ...
>
> The package randtoolbox contains a makefile in inst/doc to compile the
> vignette.
>
> But if I use my makefile directly in the inst/doc directory, it does
> not work:
> (/usr/local/texlive/2008/texmf-dist/tex/latex/bigfoot/perpage.sty)
>
> ! LaTeX Error: File `Sweave.sty' not found.
>
> Type X to quit or <RETURN> to proceed,
> or enter new name. (Default extension: sty)
>
> My makefile is
>
> TEXI2DVI = texi2dvi --pdf
> SWEAVE = R CMD Sweave
> RM = rm -rf
>
> all: randtoolbox.pdf clean
>
> randtoolbox.pdf : randtoolbox.Rnw
> $(SWEAVE) randtoolbox.Rnw
> $(TEXI2DVI) randtoolbox.tex
>
> clean:
> $(RM) Rplots*.eps Rplots*.pdf Rplots*.jpg randtoolbox-*.eps
> randtoolbox-*.pdf randtoolbox-*.jpg *.aux *.log *.blg *.bbl *.brf
> *.out *.tex *.rel *.toc *~ auto
>
> Without any reason, if I run manually R CMD Sweave, it works...
>
> Do you have any idea why it does not work?
>
> Thanks in advance
>
> Christophe
> --
> Christophe Dutang
> Ph. D. student at ISFA, Lyon, France
> website: http://dutangc.free.fr
--
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