[R] Passing tex parameter via texi2dvi

From: Dieter Menne <dieter.menne_at_menne-biomed.de>
Date: Wed, 23 Mar 2011 19:20:46 +0100

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)

[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


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. Received on Wed 23 Mar 2011 - 18:25:01 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Mar 2011 - 18:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive