From marc_schwartz at me.com  Thu Dec 23 17:42:06 2010
From: marc_schwartz at me.com (Marc Schwartz)
Date: Thu, 23 Dec 2010 10:42:06 -0600
Subject: [Rd] Error in generating sweave-tex -> pdf file
In-Reply-To: <AANLkTi=6aD5j21NDpuOzRnWUrtkr8dwhzOFifK9Wu5wN@mail.gmail.com>
References: <695094.94551.qm@web62005.mail.re1.yahoo.com>
	<4D12386F.8010102@gmail.com>
	<406979.19878.qm@web62004.mail.re1.yahoo.com>
	<4D126E8D.4070303@gmail.com>
	<108778.25309.qm@web62001.mail.re1.yahoo.com>
	<4D133EBA.2030408@gmail.com>
	<744506.27662.qm@web62001.mail.re1.yahoo.com>
	<4D134826.3000806@gmail.com>
	<487879.49500.qm@web62001.mail.re1.yahoo.com>
	<AANLkTi=6aD5j21NDpuOzRnWUrtkr8dwhzOFifK9Wu5wN@mail.gmail.com>
Message-ID: <39776546-FF40-4559-9B99-3869E9E6E06A@me.com>

Hi,

Sorry for the late entry here, but I just noted that Carol is running Fedora 10, which has not been actively supported for just over a year. It went End of Life (EOL) in December of 2009, which means that your Fedora 10 installation has been without bug/security fixes, application patches and other important updates since then.

The only actively supported released versions of Fedora are 13 and 14. So you should really update the underlying Fedora installation ASAP, which will also get you to R version 2.12.x, which is available via Fedora's yum updates for 13 and 14.

At this point, it would be prudent to move to Fedora 14, given that Fedora 13 will go EOL late next Spring after Fedora 15 is released. So you may as well give yourself a longer time frame of support, given Fedora's aggressive version update/EOL schedule.

HTH,

Marc Schwartz

On Dec 23, 2010, at 10:13 AM, Kasper Daniel Hansen wrote:

> Hi Carol
> 
> As you now know, this is because per default R/Sweave puts the line
>  \usepackage{Sweave}
> in the generated tex file.  This means the tex file is "portable", but
> it also implies that Sweave.sty needs to be "installed" in your tex
> installation.  Or you can put the Sweave.sty in the directory of the
> Rnw file since tex usually is set up to search the same directory.
> 
> An alternative is to get R to generate a line like
>  \usepackage{FULL_PATH_TO_SWEAVE.STY}
> in the tex document.  This implies that the tex file can only be
> tex'ed on a setup where the Sweave.sty is at the same place - hence it
> kind of break portability.  Now portability of the tex file does not
> matter to many users - most of us think of the tex file as an
> intermediate file and only care about the Rnw file and the final PDF.
> You get this behaviour by setting the environment variable
>  SWEAVE_STYLEPATH_DEFAULT
> to
>  TRUE
> An easy way to do this is to include the following line in your .Rprofile
> Sys.setenv("SWEAVE_STYLEPATH_DEFAULT" = "TRUE")
> 
> This trick also fixes running Sweave on a system where you do not have
> admin rights.
> 
> Kasper
> 
> On Thu, Dec 23, 2010 at 5:14 AM, carol white <wht_crl at yahoo.com> wrote:
>> Another question that I have is the following:
>> 
>> If I want to create the package vignette on a server for which I don't have
>> admin rights to install Sweave.sty, where is the best place to save this file if
>> I want to run from anywhere in my home directoy or do I have to put this file in
>> a directory where I should always run from there?
>> 
>> I also attach Sweave.sty to check if it the right file.
>> 
>> 
>> 
>> 
>> ----- Original Message ----
>> From: Duncan Murdoch <murdoch.duncan at gmail.com>
>> To: carol white <wht_crl at yahoo.com>
>> Cc: r-devel at r-project.org
>> Sent: Thu, December 23, 2010 2:01:26 PM
>> Subject: Re: [Rd] Error in generating sweave-tex -> pdf file
>> 
>> On 23/12/2010 7:46 AM, carol white wrote:
>>> R installation and admin manual doesn't tell where to save Sweave.sty.
>> 
>> You shouldn't need to move it.
>> 
>> 
>>> I use R 2.10.0, fedora 10 and, tex  Version 3.141592-1.40.3 (Web2C 7.5.6)
>> 
>> That R is pretty old.  I wouldn't be surprised if the current release
>> handled things better.  But the thing that appears to be missing on your
>> system is texinfo, and that's not part of R.
>> 
>> Duncan Murdoch
>> 
>>> 
>>> Cheers,
>>> 
>>> 
>>> 
>>> ----- Original Message ----
>>> From: Duncan Murdoch<murdoch.duncan at gmail.com>
>>> To: carol white<wht_crl at yahoo.com>
>>> Cc: r-devel at r-project.org
>>> Sent: Thu, December 23, 2010 1:21:14 PM
>>> Subject: Re: [Rd] Error in generating sweave-tex ->  pdf file
>>> 
>>> On 23/12/2010 5:26 AM, carol white wrote:
>>>> When I copied Sweave.sty in the directory where I ran R, I didn't have any
>>>> error. But this is not the good solution as R can be run in any folder.
>>>> 
>>>> I copied Sweave.sty in  /usr/share/texmf/. I put my Rnw file in inst/doc
>>> folder
>>>> in my R package to create the vignette. I ran R CMD check and it doesn find
>>>> texi2dvi.
>>> 
>>> texi2dvi is both a function name in R (in the tools package) and a GNU
>>> utility that comes with texinfo and some TeX distributions, but
>>> apparently not with yours.  See the R Installation and Administration
>>> manual for suggestions on where to get it.  If that doesn't help, you
>>> might get help on this list by stating the versions of everything you're
>>> using: R, your OS, and TeX.
>>> 
>>> Duncan Murdoch
>>> 
>>>> 
>>>> 
>>>> 
>>>> ----- Original Message ----
>>>> From: Duncan Murdoch<murdoch.duncan at gmail.com>
>>>> To: carol white<wht_crl at yahoo.com>
>>>> Cc: r-devel at r-project.org
>>>> Sent: Wed, December 22, 2010 10:33:01 PM
>>>> Subject: Re: [Rd] Error in generating sweave-tex ->   pdf file
>>>> 
>>>> On 22/12/2010 1:30 PM, carol white wrote:
>>>>> Should the Sweave package be in /usr/share/texmf/tex/latex/? How about
>>>>> Sweave.sty?
>>>> 
>>>> I meant Sweave.sty, there's no separate Sweave package.  It should be in
>>>> the R home directory, somewhere within share/texmf.
>>>> 
>>>> Duncan Murdoch
>>>> 
>>>>> Thanks
>>>>> 
>>>>> 
>>>>> 
>>>>> ----- Original Message ----
>>>>> From: Duncan Murdoch<murdoch.duncan at gmail.com>
>>>>> To: carol white<wht_crl at yahoo.com>
>>>>> Cc: r-devel at r-project.org
>>>>> Sent: Wed, December 22, 2010 6:42:07 PM
>>>>> Subject: Re: [Rd] Error in generating sweave-tex ->    pdf file
>>>>> 
>>>>> On 22/12/2010 12:27 PM, carol white wrote:
>>>>>>    Hi,
>>>>>>    I created a Sweave file (see below). when I want to convert tex
>>>>>>    file generated from it into pdf, I get error message as follows:
>>>>>> 
>>>>>>    >     texi2dvi("test.tex", pdf=TRUE)
>>>>>>    Error in texi2dvi("test.tex", pdf = TRUE) :
>>>>>>       Running 'texi2dvi' on 'test.tex' failed.
>>>>>>    LaTeX errors:
>>>>>>    ! Undefined control sequence.
>>>>>>    l.8 \begin
>>>>>>               {Schunk}
>>>>> 
>>>>> The Schunk, Sinput, and Soutput environments are defined in Sweave package.
>>>>> Something went wrong and latex didn't find them, either because it didn't
>>> find
>>>>> Sweave.sty, or because it did, but that file has been messed up.
>>>>> 
>>>>> 
>>>>>>    ?
>>>>>>    ! Interruption.
>>>>>>    ! Interruption.
>>>>>>    <to be read again>
>>>>>>                        {
>>>>>>    l.8 \begin{
>>>>>>                Schunk}
>>>>>>    ! Undefined control sequence.
>>>>>>    l.9 \begin
>>>>>>               {Sinput}
>>>>>>    The control sequence at the end of the top line
>>>>>>    of your error message was never \def'ed. If you have
>>>>>>    ------------------------
>>>>>>    test.Rnw
>>>>>> 
>>>>>>    \usepackage{Sweave}
>>>>>>    \ documentclass [ a4paper ]{ article }
>>>>>>    \ title { Sweave Example 1}
>>>>>>    \ begin { document }
>>>>>>    \ maketitle
>>>>> 
>>>>> Are there really spaces between the backslashes and the macros?  I think
>> that
>>>>> doesn't work.  You should also have the \usepackage{Sweave} line after the
>>>>> opening \documentclass line.
>>>>> 
>>>>> Duncan Murdoch
>>>>> 
>>>>>>    In this example we embed parts of the examples from the
>>>>>>    help page into a \ LaTeX {} document :
>>>>>>    <<a>>=
>>>>>>    y=2
>>>>>>    y = y +1
>>>>>>    @
>>>>>>    which shows that the location parameter of the Ozone
>>>>>>    distribution varies significantly from month to month . Finally we
>>>>>>    include a boxplot of the data :
>>>>>> 
>>>>>>    \end{ document }



[Rd] Error in generating sweave-tex -> pdf file
Marc Schwartz