On 4/10/2008 1:18 PM, Patrick Aboyoun wrote: > Thanks Duncan, > I just did a survey of the BioConductor repository and only 4 of the 354 > .Rnw vignette files contain the \usepackage{Sweave} specification. > Adding this is tedious, but not impossible. If the \usepackage{Sweave} > specification does become recommended, could you add a WARNING to the R > CMD build/check process if a vignette file lacks it? That would help > steer developers in the right direction for cross-platform compatibility > since most R package developers don't use Windows as their primary platform.
I think the Sweave default of inserting the path to Sweave.sty is the problem. I've checked my LaTeX books, and none of them mention this as a possiblity: the argument of \usepackage is supposed to be a package name, not a path to a style file with the .sty chopped off. Obviously some implementations support the syntax of using a path, but this is clearly not well supported: there's no way I can see to specify perfectly legal paths, if they happen to contain characters that LaTeX thinks are special. So I would say the direction we should move is for Sweave to insert just \usepackage{Sweave} (and possibly a comment saying where to go to find it, for people who don't know how to set up the include path properly). But I wouldn't make a change like that at this late date for 2.7.0. Duncan Murdoch > > > Cheers, > Patrick > > > Duncan Murdoch wrote: >> On 4/9/2008 9:50 PM, Patrick Aboyoun wrote: >>> I forgot to mention the BioConductor Windows build machine is running >>> Microsoft Windows Server 2003 R2 >>> Enterprise Edition, SP2 >>> >>> I just checked and this same problem exists if I place R in the >>> standard "C:\Program Files\R" location on this machine. >> >> We're going to roll back that change, so you should be okay with your >> original setup. As far as I know there is no way to get MikTeX to >> work if you have a space in your pathname, so putting R in the >> standard location will fail, unless you follow the advice I give below. >> >>> For now the backup plan is to move to using short path names for >>> BioConductor builds (modifying 100+ vignettes is impractical as well >>> as configuring MiKTeX to handle multiple installs of R that the build >>> machine uses). If there is an alternate configuration that I should >>> be using, just let me know. >> >> I would recommend biting the bullet and adding \usepackage{Sweave} to >> every vignette. It's just a one line addition to them, and it will >> mean that their .tex output will work if you move it to a different >> machine, where the full path to Sweave.sty is different. >> >> Duncan Murdoch >> >>> >>> >>> Cheers, >>> Patrick >>> >>> >>> Duncan Murdoch wrote: >>>> On 09/04/2008 5:23 PM, Patrick Aboyoun wrote: >>>>> Something funky happened to my e-mail. I was trying to paste >>>>> information related to MiKTeX and R into my message and it appears >>>>> to have corrupted the text somehow. Anyway, the message I was >>>>> trying to get across is that the tex file contains the path >>>>> >>>>> \usepackage{E:/paboyoun/BBS-2~1.2-B/R/share/texmf/Sweave} >>>>> >>>>> and MiKTeX 2.7 doesn't know how to resolve it. (The >>>>> Bioconductor.tex file is (hopefully) attached to this e-mail.) >>>> >>>> You should be able to get things to work by explicitly putting >>>> >>>> \usepackage{Sweave} >>>> >>>> somewhere early in your .Rnw file. You may have trouble with MikTeX >>>> finding Sweave.sty, depending how you invoke it: if invoked from R >>>> CMD it should work, but maybe not from your command line unless you >>>> tell it where to look for include files. How you do that changes >>>> all the time; R tries a couple, which is why R CMD probably works. >>>> >>>> Duncan Murdoch >>>> >>>>> >>>>> >>>>> === BEGIN OS BLOCK === >>>>> >>>>> E:\paboyoun>pdflatex --version >>>>> MiKTeX-pdfTeX 2.7.2987 (1.40.7) (MiKTeX 2.7) >>>>> Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh >>>>> TeX is a trademark of the American Mathematical Society. >>>>> >>>>> E:\paboyoun>pdflatex Bioconductor.tex >>>>> This is pdfTeX, Version 3.141592-1.40.7 (MiKTeX 2.7) >>>>> entering extended mode >>>>> (Bioconductor.tex >>>>> LaTeX2e <2005/12/01> >>>>> Babel <v3.8h> and hyphenation patterns for english, dumylang, >>>>> nohyphenation, ge >>>>> rman, ngerman, french, loaded. >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\base\article.cls" >>>>> Document Class: article 2005/09/16 v1.4f Standard LaTeX document class >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\base\size12.clo")) >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\psnfss\times.sty") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\hyperref\hyperref.sty" >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\graphics\keyval.sty") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\oberdiek\hycolor.sty") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\hyperref\pd1enc.def") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\etexcmds.sty" >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\infwarerr.sty")) >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\00miktex\hyperref.cfg") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\oberdiek\kvoptions.sty") >>>>> Implicit mode ON; LaTeX internals redefined >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\ltxmisc\url.sty") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\bitset.sty" >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\intcalc.sty") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\bigintcalc.sty" >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\pdftexcmds.sty"))) >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\kvsetkeys.sty") >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\atbegshi.sty" >>>>> ("C:\Program Files\MiKTeX 2.7\tex\generic\oberdiek\ifpdf.sty"))) >>>>> *hyperref using default driver hpdftex* >>>>> ("C:\Program Files\MiKTeX 2.7\tex\latex\hyperref\hpdftex.def") >>>>> ! Missing \endcsname inserted. >>>>> <to be read again> >>>>> \protect >>>>> l.28 \begin >>>>> {document} >>>>> ? >>>>> >>>>> >>>>> ------------------------------------------------------------------------ >>>>> >>>>> >>>>> ______________________________________________ >>>>> R-devel@r-project.org mailing list >>>>> https://stat.ethz.ch/mailman/listinfo/r-devel >>>> >> ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel