[R-SIG-Mac] 'sweave.sty' not found

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Nov 15 17:30:56 CET 2008


On Sat, 15 Nov 2008, Denis Chabot wrote:

> Hi,
>
> I often used Sweave in the last few years, but today I could not get it to 
> work.

What is 'it'?  What exactly did you run (in R or elsewhere)?

> I got this in the LaTeX console:
>
> LaTex error: file 'sweave.sty' not found.

The filename should be Sweave.sty: do you have a case-insensitive file 
system?  If not, that is the problem: it is looking for the wrong file 
name.

Not finding Sweave.sty is correct if you are running latex directly on the 
file in R 2.8.0 (sic, see the posting guide).  You are expected to use R 
CMD Sweave, or Sweave() inside R. See the NEWS item

     o	The default for 'stylepath' in Sweave's (default) RweaveLatex
 	driver is now FALSE rather than TRUE if
 	SWEAVE_STYLEPATH_DEFAULT is unset : see ?RweaveLatex.
 	To support this, tools::texi2dvi adds the R 'texmf' directory
 	to the input search path.

which inter alia tells you how to get the old behaviour (and the bugs it 
caused).  The alternative is to manually add the directory mentioned to 
TEXINPUTS.

> I am not sure when I lost the ability to use Sweave but in the last 4-5 weeks 
> I reinstalled my OS (10.5.5), R (2.8) and LaTeX (from TeXLive 2008 using 
> MacTeX).
>
> In the past I had nothing special to do, Sweave just worked after Iinstalled 
> LaTeX and R.
>
> I use a MacBook Pro.
>
> Thanks in advance,
>
> Denis

-- 
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