In the 'RWeaveLatexSetup' function in the 'tools' package in R 1.6.0 , the code below does not work (pdflatex can't find 'Sweave.sty'): if (stylepath) styfile <- file.path(R.home(), "share", "texmf", "Sweave") else styfile <- "Sweave" In R 1.5.1, that was: if(stylepath) styfile <- file.path(.path.package("tools"), "Sweave", "Sweave") else styfile <- "Sweave" and that was working. Version: platform = i386-pc-mingw32 arch = i386 os = mingw32 system = i386, mingw32 status major = 1 minor = 6.0 year = 2002 month = 10 day = 01 language = R Windows 98 SE 4.10 (build 2222) A Search Path: .GlobalEnv, package:tools, package:rodbc, package:ctest, Autoloads, package:base -- Christophe DECLERCQ, MD Observatoire Régional de la Santé Nord-Pas-de-Calais 13, rue Faidherbe 59046 LILLE Cedex FRANCE Phone +33 3 20 15 49 24 Fax +33 3 20 55 92 30 E-mail c.declercq@orsnpdc.org -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> In the 'RWeaveLatexSetup' function in the 'tools' package in R 1.6.0 , th > e> code below does not work (pdflatex can't find 'Sweave.sty'): > if (stylepath) > styfile <- file.path(R.home(), "share", "texmf", "Sweave") > else styfile <- "Sweave" > In R 1.5.1, that was: > if(stylepath) > styfile <- file.path(.path.package("tools"), > "Sweave", "Sweave") > else > styfile <- "Sweave" > and that was working. The path is correct (I want to have Sweave.sty in $R_HOME/share/texmf), but the install procedure has a bug: Sweave.sty does not get installed properly when builddir != srcdir. This has been fixed in both the devel and patched version of R. As a quick fix for 1.6.0: please copy Sweave.sty manually to $R_HOME/share/texmf. Thanks a lot for the bug report, Fritz -- ------------------------------------------------------------------- Friedrich Leisch Institut für Statistik Tel: (+43 1) 58801 10715 Technische Universität Wien Fax: (+43 1) 58801 10798 Wiedner Hauptstraße 8-10/1071 Friedrich.Leisch@ci.tuwien.ac.at A-1040 Wien, Austria http://www.ci.tuwien.ac.at/~leisch ------------------------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 11 Oct 2002, Christophe Declercq wrote:> Thanks, Fritz, for your answer. > > > De : Friedrich Leisch [mailto:leisch@galadriel.ci.tuwien.ac.at] > >[...] > > The path is correct (I want to have Sweave.sty in > > $R_HOME/share/texmf), but the install procedure has a bug: Sweave.sty > > does not get installed properly when builddir != srcdir. This has been > > fixed in both the devel and patched version of R. > > Yes, but 'file.path(R.home(), "share", "texmf", "Sweave")' on my MS-Windows > box gives "C:\\R\\RW1060/share/texmf/Sweave". > > With that, you get '\usepackage{C:RRW1060/share/texmf/Sweave}' in the tex > file. The problem seems to be with the 'R.home()' output on MS-Windows.Nope, R.home is correct. The problem is that Sweave is not escaping \'s (nor spaces, although I believe they will not occur in R.home()'s output). Some Windows applications insist on \, but Windows' versions of TeX seem to insist on /, so applications calling TeX need to convert the path to Unix style. Also, Sweave.sty was not installed under Windows in 1.6.0 under any circumstances.> > 'file.path(.path.package("tools"), "Sweave", "Sweave")' was giving > "C:/R/RW1060/library/tools/Sweave/Sweave" which is OK for pdflatex. > > Anyway, thanks a lot for Sweave which is really great (for the moment, as I > need it working, I have just put back the old stylepath code in tools). > > Christophe > -- > Christophe DECLERCQ, MD > Observatoire Régional de la Santé Nord-Pas-de-Calais > 13, rue Faidherbe 59046 LILLE Cedex FRANCE > Phone +33 3 20 15 49 24 > Fax +33 3 20 55 92 30 > E-mail c.declercq@orsnpdc.org > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Brian D. Ripley, ripley@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> Nope, R.home is correct. The problem is that Sweave is not escaping \'s > (nor spaces, although I believe they will not occur in R.home()'s output). > Some Windows applications insist on \, but Windows' versions of TeX seem > to insist on /, so applications calling TeX need to convert the path to > Unix style.I got bitten by that under Cygwin with R in the default c:\Program Files\R. Cygwin's LaTeX (i.e. tetex) then breaks. A location without spaces in the path works fine. Dirk -- According to the latest figures, 43% of all signatures are totally worthless. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._