1

I rarely need the ancillary files TeX produces when compiling a document (.aux, .log, .out, .synctex.gz). In fact, I've only ever had to read the .log, and that's only a few times. Is there a way to write them to a separate directory, so that my working directory only contains .tex and .pdf files?

  • 1
    pdflatex -output-directory=<folder> myfile should do the job. I think there's a question that addresses this somewhere... it's probably worth creating a little clean up script that you can run to get rid of the 'cruft' – cmhughes Dec 3 '13 at 19:32
  • Perhaps you don't need those auxiliary files, but the compiler does provisionally. – Thorsten Donig Dec 3 '13 at 20:15
  • Yeah, that's my concern. I don't want to delete them outright; I just don't want them cluttering up my working directory. – crmdgn Dec 3 '13 at 20:38
  • In my experience moving these just creates problems, if you tell latex to put them somewhere else, you then need to tell latex and all auxiliary programs where they are, and that is a frequent source of errors and questions on sites like this. It writes those files because they are needed by something. – David Carlisle Dec 3 '13 at 21:18

Browse other questions tagged or ask your own question.