[R-SIG-Mac] Sweave.sty

Kasper Daniel Hansen kasperdanielhansen at gmail.com
Thu Sep 9 15:26:16 CEST 2010


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.
>
> Duncan Murdoch wrote:
>>
>> On 08/09/2010 6:13 PM, [Ricardo Rodriguez] Your XEN ICT Team wrote:
>>>
>>> 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?
>>
>> Sweave.sty should have been installed with R, in the directory given by
>>
>> file.path(R.home(), "share", "texmf")
>
> 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.
>
>>
>> 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.
>>
>
> 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 Rodríguez
> Your XEN ICT Team
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list