Search code examples
rsweave

How to delete the aux/log/out after Sweave has finished compiling


In Ubuntu, suppose in /home/folder1 I have test.Rnw. To generate a pdf I will go (assuming this directory is my getwd) within my R console:

Sweave(test.Rnw)
texi2pdf(test.tex)

Following this there will be unneeded junk of the form test.aux, test.log, test.out, test.toc. Is there something I Sweave that can get rid of this automatically?


Solution

  • The LaTeX system on your machine makes these files, not Sweave. Use clean=TRUE in your texi2pdf call:

    texi2pdf(test.tex, clean=TRUE)