Quantcast

Sweave and Miktex (Sweave.sty not found)

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Sweave and Miktex (Sweave.sty not found)

Katie Surrence
Hi all,

I know from googling that this is a common problem; I've just tried what I
understand to be the common solutions to know avail -- maybe I'm just
confused.

 I installed Miktex 2.8 -- it seems to be working fine.

I'm using this demo document: http://www.stat.berkeley.edu/~houston/demo.Rnw

I've copied the Sweave.sty file into at this point multiple places on the
Miktex path, including folders where I can see that it is looking for, and
successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
went to the Miktex settings application and clicked Refresh FNDB and Update
formats.

Still I get this error when I try to run pdfLaTeX on the demo.tex file:
!LaTeX Error: File 'Sweave.sty' not found.

Can anyone help?

Thanks!

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

djmuseR
Hi:

Start here:
http://docs.miktex.org/manual/localadditions.html#id573835

I have a LocalTeXfiles directory under my home directory on Windows 7, with
nested folders for tex -> latex -> Sweave. All of my Sweave files (*.fd,
*.cfg, *.sty) are in the Sweave directory. The manual linked above shows you
how to register the directory with MiKTeX.

HTH,
Dennis

On Tue, Sep 14, 2010 at 5:56 AM, Katie Surrence <[hidden email]> wrote:

> Hi all,
>
> I know from googling that this is a common problem; I've just tried what I
> understand to be the common solutions to know avail -- maybe I'm just
> confused.
>
>  I installed Miktex 2.8 -- it seems to be working fine.
>
> I'm using this demo document:
> http://www.stat.berkeley.edu/~houston/demo.Rnw<http://www.stat.berkeley.edu/%7Ehouston/demo.Rnw>
>
> I've copied the Sweave.sty file into at this point multiple places on the
> Miktex path, including folders where I can see that it is looking for, and
> successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
> went to the Miktex settings application and clicked Refresh FNDB and Update
> formats.
>
> Still I get this error when I try to run pdfLaTeX on the demo.tex file:
> !LaTeX Error: File 'Sweave.sty' not found.
>
> Can anyone help?
>
> Thanks!
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Greg Johnson-9
In reply to this post by Katie Surrence
Katie Surrence <tiburona <at> gmail.com> writes:

...

> I've copied the Sweave.sty file into at this point multiple places on the
> Miktex path, including folders where I can see that it is looking for, and
> successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
> went to the Miktex settings application and clicked Refresh FNDB and Update
> formats.
>
> Still I get this error when I try to run pdfLaTeX on the demo.tex file:
> !LaTeX Error: File 'Sweave.sty' not found.
>
> Can anyone help?
>
> Thanks!
 

I have had good luck copying sweave.sty into the same directory as the .tex file
created by Sweave() before I run Mitex.

Greg

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Duncan Murdoch-2
In reply to this post by Katie Surrence
  On 14/09/2010 8:56 AM, Katie Surrence wrote:

> Hi all,
>
> I know from googling that this is a common problem; I've just tried what I
> understand to be the common solutions to know avail -- maybe I'm just
> confused.
>
>   I installed Miktex 2.8 -- it seems to be working fine.
>
> I'm using this demo document: http://www.stat.berkeley.edu/~houston/demo.Rnw
>
> I've copied the Sweave.sty file into at this point multiple places on the
> Miktex path, including folders where I can see that it is looking for, and
> successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
> went to the Miktex settings application and clicked Refresh FNDB and Update
> formats.
>
> Still I get this error when I try to run pdfLaTeX on the demo.tex file:
> !LaTeX Error: File 'Sweave.sty' not found.
>
> Can anyone help?
>


You don't mention your R version, but recent ones have the command "Rcmd
texify" which will call MikTeX correctly.

If you want fancier handling of the Sweave input --> preview workflow,
take a look at my patchDVI package on R-forge.  It allows "reverse
search" from the previewer to find the right line in the Sweave input
file, rather than in the intermediate .tex file.

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Duncan Murdoch-2
In reply to this post by Greg Johnson-9
  On 14/09/2010 10:27 AM, Greg Johnson wrote:

> Katie Surrence<tiburona<at>  gmail.com>  writes:
>
> ...
>
> >  I've copied the Sweave.sty file into at this point multiple places on the
> >  Miktex path, including folders where I can see that it is looking for, and
> >  successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
> >  went to the Miktex settings application and clicked Refresh FNDB and Update
> >  formats.
> >
> >  Still I get this error when I try to run pdfLaTeX on the demo.tex file:
> >  !LaTeX Error: File 'Sweave.sty' not found.
> >
> >  Can anyone help?
> >
> >  Thanks!
>
>
> I have had good luck copying sweave.sty into the same directory as the .tex file
> created by Sweave() before I run Mitex.
>

Watch out for versioning problems if you do this.  Old Sweave.sty files
don't necessarily work with newer Sweave() output.

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Katie Surrence
In reply to this post by djmuseR
Thank you very much, Dennis.  That worked.  I had tried pointing the list of
Roots to the R directory where the Sweave file was originally located, and
had gotten an error, but I had not tried making my own directory.

On Tue, Sep 14, 2010 at 9:08 AM, Dennis Murphy <[hidden email]> wrote:

> Hi:
>
> Start here:
> http://docs.miktex.org/manual/localadditions.html#id573835
>
> I have a LocalTeXfiles directory under my home directory on Windows 7, with
> nested folders for tex -> latex -> Sweave. All of my Sweave files (*.fd,
> *.cfg, *.sty) are in the Sweave directory. The manual linked above shows you
> how to register the directory with MiKTeX.
>
> HTH,
> Dennis
>
> On Tue, Sep 14, 2010 at 5:56 AM, Katie Surrence <[hidden email]>wrote:
>
>> Hi all,
>>
>> I know from googling that this is a common problem; I've just tried what I
>> understand to be the common solutions to know avail -- maybe I'm just
>> confused.
>>
>>  I installed Miktex 2.8 -- it seems to be working fine.
>>
>> I'm using this demo document:
>> http://www.stat.berkeley.edu/~houston/demo.Rnw<http://www.stat.berkeley.edu/%7Ehouston/demo.Rnw>
>>
>> I've copied the Sweave.sty file into at this point multiple places on the
>> Miktex path, including folders where I can see that it is looking for, and
>> successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
>> went to the Miktex settings application and clicked Refresh FNDB and
>> Update
>> formats.
>>
>> Still I get this error when I try to run pdfLaTeX on the demo.tex file:
>> !LaTeX Error: File 'Sweave.sty' not found.
>>
>> Can anyone help?
>>
>> Thanks!
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Katie Surrence
In reply to this post by Duncan Murdoch-2
Thanks Duncan -- I'm running R 2.11 and ??texify gets me no recognition.

At the moment I'm trying to get something that works -- I'm not nearly to
the point of fancy.  I solved my Sweave.sty problem although I'm still not
managing to generate the graph in the demo file.  But maybe I should make
that a separate question.

On Tue, Sep 14, 2010 at 9:33 AM, Duncan Murdoch <[hidden email]>wrote:

>  On 14/09/2010 8:56 AM, Katie Surrence wrote:
>
>> Hi all,
>>
>> I know from googling that this is a common problem; I've just tried what I
>> understand to be the common solutions to know avail -- maybe I'm just
>> confused.
>>
>>  I installed Miktex 2.8 -- it seems to be working fine.
>>
>> I'm using this demo document:
>> http://www.stat.berkeley.edu/~houston/demo.Rnw<http://www.stat.berkeley.edu/%7Ehouston/demo.Rnw>
>>
>> I've copied the Sweave.sty file into at this point multiple places on the
>> Miktex path, including folders where I can see that it is looking for, and
>> successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
>> went to the Miktex settings application and clicked Refresh FNDB and
>> Update
>> formats.
>>
>> Still I get this error when I try to run pdfLaTeX on the demo.tex file:
>> !LaTeX Error: File 'Sweave.sty' not found.
>>
>> Can anyone help?
>>
>>
>
> You don't mention your R version, but recent ones have the command "Rcmd
> texify" which will call MikTeX correctly.
>
> If you want fancier handling of the Sweave input --> preview workflow, take
> a look at my patchDVI package on R-forge.  It allows "reverse search" from
> the previewer to find the right line in the Sweave input file, rather than
> in the intermediate .tex file.
>
> Duncan Murdoch
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Duncan Murdoch-2
  On 14/09/2010 11:51 AM, Katie Surrence wrote:
> Thanks Duncan -- I'm running R 2.11 and ??texify gets me no recognition.

There is a command by that name in the tools package (not loaded by
default, so that's why help didn't work), but I was talking about
entering it at the command prompt, as you would latex or pdflatex.

Duncan Murdoch

> At the moment I'm trying to get something that works -- I'm not nearly to
> the point of fancy.  I solved my Sweave.sty problem although I'm still not
> managing to generate the graph in the demo file.  But maybe I should make
> that a separate question.
>
> On Tue, Sep 14, 2010 at 9:33 AM, Duncan Murdoch<[hidden email]>wrote:
>
> >   On 14/09/2010 8:56 AM, Katie Surrence wrote:
> >
> >>  Hi all,
> >>
> >>  I know from googling that this is a common problem; I've just tried what I
> >>  understand to be the common solutions to know avail -- maybe I'm just
> >>  confused.
> >>
> >>   I installed Miktex 2.8 -- it seems to be working fine.
> >>
> >>  I'm using this demo document:
> >>  http://www.stat.berkeley.edu/~houston/demo.Rnw<http://www.stat.berkeley.edu/%7Ehouston/demo.Rnw>
> >>
> >>  I've copied the Sweave.sty file into at this point multiple places on the
> >>  Miktex path, including folders where I can see that it is looking for, and
> >>  successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I also
> >>  went to the Miktex settings application and clicked Refresh FNDB and
> >>  Update
> >>  formats.
> >>
> >>  Still I get this error when I try to run pdfLaTeX on the demo.tex file:
> >>  !LaTeX Error: File 'Sweave.sty' not found.
> >>
> >>  Can anyone help?
> >>
> >>
> >
> >  You don't mention your R version, but recent ones have the command "Rcmd
> >  texify" which will call MikTeX correctly.
> >
> >  If you want fancier handling of the Sweave input -->  preview workflow, take
> >  a look at my patchDVI package on R-forge.  It allows "reverse search" from
> >  the previewer to find the right line in the Sweave input file, rather than
> >  in the intermediate .tex file.
> >
> >  Duncan Murdoch
> >
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Greg Snow-2
In reply to this post by Katie Surrence
I have found that if I put \include{Sweave} explicitly in my sweave source file then it finds the copy in the MikTeK folders, but if I don't then Sweave tries to add that line, but pointing to the R directory that caused the problem in the first place.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[hidden email]
801.408.8111


> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of Katie Surrence
> Sent: Tuesday, September 14, 2010 6:57 AM
> To: [hidden email]
> Subject: [R] Sweave and Miktex (Sweave.sty not found)
>
> Hi all,
>
> I know from googling that this is a common problem; I've just tried
> what I
> understand to be the common solutions to know avail -- maybe I'm just
> confused.
>
>  I installed Miktex 2.8 -- it seems to be working fine.
>
> I'm using this demo document:
> http://www.stat.berkeley.edu/~houston/demo.Rnw
>
> I've copied the Sweave.sty file into at this point multiple places on
> the
> Miktex path, including folders where I can see that it is looking for,
> and
> successfully finding, sty files (e.g. Miktex 2.8/tex/latex/base).   I
> also
> went to the Miktex settings application and clicked Refresh FNDB and
> Update
> formats.
>
> Still I get this error when I try to run pdfLaTeX on the demo.tex file:
> !LaTeX Error: File 'Sweave.sty' not found.
>
> Can anyone help?
>
> Thanks!
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Sweave and Miktex (Sweave.sty not found)

Duncan Murdoch-2
  On 14/09/2010 2:00 PM, Greg Snow wrote:
> I have found that if I put \include{Sweave} explicitly in my sweave source file then it finds the copy in the MikTeK folders, but if I don't then Sweave tries to add that line, but pointing to the R directory that caused the problem in the first place.
>

Yes, MikTeX (or latex in general?) often gets confused by the pathnames
that Sweave enters.  Putting in the explicit \include stops Sweave from
trying to help.

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Loading...