Skip to content
Prev 5339 / 15075 Next

'sweave.sty' not found

On Sat, 15 Nov 2008, Denis Chabot wrote:

            
What is 'it'?  What exactly did you run (in R or elsewhere)?
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.