[R] Passing tex parameter via texi2dvi

Dieter Menne dieter.menne at menne-biomed.de
Wed Mar 23 19:20:46 CET 2011


I am trying to pass a additional argument to texi2dvi, for example to use
the aux-directory. Looks like this is not possible via options:

options(texi2dvi='texi2dvi --tex-option="-aux-directory=auxdir"')
texi2dvi(file = "GBPL3.tex", pdf = TRUE)

#Error in system(paste(shQuote(texi2dvi), "--version"), intern = TRUE) : 
#  '"texi2dvi --tex-option=\"-aux-directory=auxdir\""' not found

Because --version come in the way, and extra is there, but not really used.
	
     extra <- ""
#### ??? --version does not like tex-options
        ver <- system(paste(shQuote(texi2dvi), "--version"), 
            intern = TRUE)
        if (length(grep("MiKTeX", ver[1L]))) {
            texinputs <- c(texinputs0, Rtexinputs, Rbstinputs)
            texinputs <- gsub("\\", "/", texinputs, fixed = TRUE)
            paths <- paste("-I", shQuote(texinputs))

            extra <- paste(extra, paste(paths, collapse = " "))
        }
   
Is there any other workaround beside copy/change/rename/paste of texi2dvi?

MikTeX and Windows

version 2.12.2 (2011-02-25)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

Dieter



More information about the R-help mailing list