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

Denis Chabot chabotd at globetrotter.net
Sun Nov 16 15:37:20 CET 2008


Dear Prof Ripley,


Le 08-11-15 à 11:30, Prof Brian Ripley a écrit :

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

Sorry for the lack of precision. Sweave worked perfectly within R. It  
is when I tried to compile the ".tex" document with LaTeX (via  
TeXShop) that i got the error message.
>
>
>> 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.

I don't know if my system is case-insensitive (Mac OS X 10.5.5), I  
think it is. More importantly, I wrote the error message wrong. I just  
checked and Sweave was capilalized.
>
>
> 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 should have been clearer that Sweave worked well within R, and that  
it was my LaTeX installation could not find Sweave.sty. In fact I  
hesitated between asking the Mac-LaTeX  list or the Mac-R list, and  
decided upon the later because I felt more readers of this list use  
both R and LaTeX.

I guess my question becomes: why do I get this message from LaTeX that  
I did not get when I was using R 2.7 instead of 2.8, TeXLive 2007  
instead of 2008.

For now, I can keep working by placing a copy of Sweave.sty in the  
directory where both my ".Rnw" and ".tex" files reside.

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