On Aug 30, 2013, at 2:00 PM, cstrato <cstrato at aon.at> wrote:
> Dear all,
>
> To create a *.pdf file from a *.Rnw file I do:
>
> olddir <- getwd();
> setwd(outdir);
>
> tryCatch({Sweave("QAReport.Rnw");
> tools::texi2pdf("QAReport.tex", clean=TRUE)
> },
> finally = setwd(olddir)
> );
>
> This works fine, however 'clean=TRUE' does only work when:
> outdir <- "Test/inst/doc/"
> but does not remove the files *.aux, *.log, *.toc when:
> outdir <- "Test/"
>
> Why does function texi2pdf() require the directory structure for vignettes
for the deletion of interim files?
>
> (The help file?texi2pdf does not mention that this structure is necessary.)
>
> Best regards
> Christian
In the Details section of ?texi2pdf, there is:
"Despite the name, this is used in R to compile LaTeX files, specifically
those generated from vignettes."
Since it is intended specifically for package vignettes, the path requirement
should not be a surprise. :-)
Regards,
Marc Schwartz