[R] Sweave problem in Windows

MikeHA michael.allerhand at ed.ac.uk
Thu Dec 6 16:37:54 CET 2007




huang min wrote:
> 
> Hi,
> 
> I have searched the lists but still can not solve the problem. I am using
> a
> windows machine. After I sweave some Rnw file, I got a tex file. However,
> the tex file can not be compiled. I know the problem is in the line
> \usepackage{C:/PROGRA~1/R/R-25~1.1/share/texmf/Sweave} and I need to
> modify
> this line to
> \usepackage{Sweave}.
> 
> I hope there can be some automatic way to do this instead of changing this
> line in the tex file whenever I modify something. Thank you.
> 
> Huang
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org 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.
> 
> 

Simple workaround is to include the \usepackage{Sweave} in your .Rnw file,
after the \documentclass like this:

\documentclass[a4paper]{article}
\usepackage{Sweave}

Make sure you have all the .sty files you need in the same folder as your
.tex file.

cheers,  Mike

-- 
View this message in context: http://www.nabble.com/Sweave-problem-in-Windows-tf4527254.html#a14194509
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list