cameronbracken / pgfSweave

Quality graphics and speedy compilation with Sweave
http://r-forge.r-project.org/projects/pgfsweave/
29 stars 6 forks source link

pass ... to `Sweave()` instead of `texi2dvi()`? #34

Open yihui opened 12 years ago

yihui commented 12 years ago

The arguments in texidvi() are rarely used, but those in Sweave() are often very important. In #25 I mentioned changes in the official Sweave, and now I noticed the file encoding might cause problems.

Sweave() was changed so that it will no longer respect options('encoding'); instead, it takes the encoding information from either \usepackage[foo]{inputenc} or Sweave(..., encoding = 'foo'). Since pgfSweave() passes ... to texi2dvi(), it seems to be impossible to pass the encoding directly via command line, so the only way is to use \usepackage[foo]{inputenc}.

I'm not completely sure if this can bring a real problem, but I believe it is more useful to pass ... to Sweave() and more consistent with the usage of Sweave().