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]]
Hi, Huang> De : r-help-bounces at r-project.org > [mailto:r-help-bounces at r-project.org] De la part de huang min > Envoy? : jeudi 27 septembre 2007 11:31 > > 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.This is a FAQ: see http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-14000A.12 Which says: "If you can create the .tex ?le by running Sweave() in R, but cannot convert the .tex ?le to .dvi or .pdf, this is most likely caused by a space in the path of your R installation. If the path of your R installation contains any blank characters (like the default "c:\Program Files\..." in English versions of Windows), this may cause problems, because programs like tex or latex cannot handle blanks in paths properly. Two possible solutions: 1. Install R in a path not containing any blanks. 2. Copy the ?le Sweave.sty to a directory in your tex path or the directory containing the Sweave ?le and put a \usepackage{Sweave} into the preamble of your Sweave ?le." I use the first solution... Christophe -- Christophe Declercq, MD Observatoire r?gional de la sant? Nord-Pas-de-Calais 235, avenue de la recherche BP 86 F-59373 LOOS C?dex Phone 33 3 20 15 49 24 Fax 33 3 20 15 10 46 E-mail c.declercq at orsnpdc.org> > 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. > > >
See A.12 in http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html huang min schrieb:> 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. >-- Eik Vettorazzi Institut f?r Medizinische Biometrie und Epidemiologie Universit?tsklinikum Hamburg-Eppendorf Martinistr. 52 20246 Hamburg T ++49/40/42803-8243 F ++49/40/42803-7790
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.