[Rd] Problem Sweaving vignettes: MiKTeX's texi2dvi reports errors

Friedrich.Leisch@tuwien.ac.at Friedrich.Leisch at tuwien.ac.at
Mon Oct 3 17:53:21 CEST 2005


>>>>> On Mon, 3 Oct 2005 16:30:24 +0100 (BST),
>>>>> Prof Brian Ripley (PBR) wrote:

  > On Mon, 3 Oct 2005, Peter G. Warren wrote:
  >> Hi, Prof. Ripley,
  >> 
  >> Yes, indeed, that was my problem - thank you! I made the mistake of
  >> installing in the default path of C:\Program Files\R. I just now reinstalled
  >> in C:\R, and everything worked fine. However, if anyone else runs into this,
  >> you cannot just go off and run texi2dvi on an existing .tex file after
  >> installing in a non-space path: you should rerun the whole Sweave example,
  >> which forces a number of additional required items to be downloaded.

  > Indeed as the path is hardcoded in the .tex file generated by Sweave.  In 
  > my case

  > % -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
  > \documentclass[a4paper]{article}

  > \title{A Test File}
  > \author{Friedrich Leisch}


  > \usepackage{a4wide}

  > \usepackage{d:/R/svn/trunk/share/texmf/Sweave}

  >> Let that process complete, then rerun again. It works fine! The finished 
  >> pdf file sure looks sweet.

  > Good.  We should try to fix this at R level if we can.  To Fritz Leisch: I 
  > presume this is coming from RweaveLatexSetup's

  >      if(stylepath){
  >          styfile <- file.path(R.home("share"), "texmf", "Sweave")
  >          if(.Platform$OS.type == "windows")
  >              styfile <- gsub("\\\\", "/", styfile)
  >          if(any(grep(" ", styfile)))
  >              warning(gettextf("path to '%s' contains spaces,\n", styfile),
  >                      gettext("this may cause problems when running LaTeX"),
  >                      domain = NA)
  >      }
  >      else
  >          styfile <- "Sweave"


Yes.


  > So, there should have been a warning that seems not to have been seen. 
  > However, if we added the opposite of normalizePath() to form the short 
  > path, would that fix this?

Actually, thinking about it again makes me wonder if the best solution
isn't to simply copy the few lines I need to the .tex file if no
\usepackage[...]{Sweave} is found.

Too late for 2.2.0 but I would consider the problem a bug, so could
try to fix it for 2.2.1.

Best,
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
A-1040 Wien, Austria             http://www.ci.tuwien.ac.at/~leisch



More information about the R-devel mailing list