I face a problem when I compile pdf file I got many files in the working directory, for example, the files Untitled.tex and Untitled.toc along which my files Untitled.pdf and Untitled.Rnw.

Can anyone help me how to avoid these files (Untitled.tex and Untitled.toc), please.


In RStudio it should be > Tools > Global Options... > Sweave > Check Clean auxiliary output after compile > Apply > OK but for some reason actually do not clean that files.

Funnily, that happen with .Rnw but not .Rmd files, although both are finally converted to LaTeX.

| improve this answer | |
  • Thank you very much for your reply. I did that and I saw it is already Check Clean auxiliary output after compile, what do you think the problem? – Hanan Alahmadi Jul 18 '19 at 12:06
  • I guess that compilation was stopped for some reason, so withouch reach to the clean step, but doing it again without error should remove that files. – Fran Jul 18 '19 at 13:05
  • sorry I do not understand you, could you please explain more,. – Hanan Alahmadi Jul 18 '19 at 14:19
  • I mean that the auxiliar files are created to make the PDF and should be removed after the pdf creation, but if that process is stopped for some reason (a power failure,let's say ), then the auxiliar will be left un-removed in the hard disk, right? But really is not that. I noticed now that I have the same problem. Seem a bug of Rstudio. – Fran Jul 19 '19 at 4:11
  • See Customizing LaTeX Options. .aux and .out files are removed. .log files are preserved if an error is detected. Other files e.g. synctex.gz and .tex are retained. – Ross Jul 19 '19 at 5:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.