4

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?

user2763361
  • 3,789
  • 11
  • 45
  • 81
  • 1
    I'm not sure you can do something from within R, apart from deleting the files manually. But you can take a look here : http://stackoverflow.com/questions/3745908/i-dont-want-the-aux-log-and-synctex-gz-files-when-using-pdflatex – juba Oct 22 '13 at 14:01
  • @juba Yes looking for a solution aside from deleting manually since I can do that myslf – user2763361 Oct 22 '13 at 14:01
  • By manually, I meant a bunch of `unlink()` commands. – juba Oct 22 '13 at 14:02

1 Answers1

4

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

texi2pdf(test.tex, clean=TRUE)
James
  • 65,548
  • 14
  • 155
  • 193