Skip to content

Sweave.sty

5 messages · Duncan Murdoch, Ricardo Rodríguez, Kasper Daniel Hansen

#
Please, allow me a simple question: must I get a copy of Sweave.sty 
installed with R-2.11.1.pkg?

I'm a bit puzzle with this issue and I think that this file is not 
installed with R-2.11.1.pkg. Could you confirm if I am right?

Thanks!
#
On 08/09/2010 6:13 PM, [Ricardo Rodriguez] Your XEN ICT Team wrote:
Sweave.sty should have been installed with R, in the directory given by

file.path(R.home(), "share", "texmf")

The organization of that directory will change with the 2.12.0 release 
(becoming compliant with a TeX standard whose name I forget), so don't 
carve the path in stone.

Duncan Murdoch
#
Thanks.
Duncan Murdoch wrote:
Confirmed: Sweave.sty is installed in that location. I've tried
http://cran.r-project.org/bin/macosx/R-2.11.1.pkg in two MacPro boxes
running Leopard and Snow Leopard.
OK! we'll be pending on this change! With the new LyX2.0.0 (now in
alpha5 stage) release R, code chunks (R code in a LaTeX document) will 
be able to be used out of the box with any document class
(http://wiki.lyx.org/LyX/NewInLyX20). Provided R is installed, of course!

Right now, the problem is that Sweave.sty is not available for LyX
without "human" intervention. I'm not skilled enough as for
understanding what the reorganization of the directory where Sweave.sty
is installed does mean, but I will forward this message to 
lyx-devel at lists.lyx.org where people is discussing the best way of 
making Sweave.sty provided by R "visible" to LyX.

Greetings!
#
Ricardo

The problem is that the place where R puts the Sweave file is not part
of the search path for your tex installation.  You can fix this by
adding the path as you would add any other path, or you can use the
following in your .Rprofile which will put an absolute path inside
your generated tex document (just look at the header of the tex
document).  The absolute path means that running your tex document
through tex in order to generate say a pdf will only work on your
computer, but that might not be an issue for you.

  Sys.setenv("SWEAVE_STYLEPATH_DEFAULT" = "TRUE")

Kasper

On Thu, Sep 9, 2010 at 8:21 AM, [Ricardo Rodriguez] Your XEN ICT Team
<webmaster at xen.net> wrote:
#
Thanks!
Kasper Daniel Hansen wrote:
The first objective of my question is to understand why LyX 
(http://www.lyx.org/) is not able to find Sweave.sty. It is far clear 
now: LyX relies on TeX (well, in fact is a kind of front end to TeX) and 
if TeX is not able to find it, LyX won't be it either.

As said before in this thread, what we try to find is a way to get 
Sweave.sty available for LyX out of the box: one LyX and R are 
installed, no more "human" intervention will be required.

I'm also forwarding this message to lyx-devel at lists.lyx.org

Greetings!

Ricardo