0

When I run pdflatex on a tex file foo.tex it creates the following files

  • foo.aux
  • foo.log
  • foo.out
  • foo.pdf

and it always bothers me that the *.aux, *.out and *.log files mess up my directories.

Having this said the following questions arose to me:

  • What is the significance of the *.aux and *.out files?
  • Can I run pdflatex with some options to delete these files after the .pdf file is created or make it prefix them with a dot (like .foo.aux) so they are hidden on NIX-systems?
  • Can I make pdflatex store the *.log file somewhere in /var/log instead?
  • 1
    This is a combination-duplicate of the following: Egad! What are all those files? and Prevent pdflatex from writing a bunch of files... – Werner Apr 4 '15 at 23:47
  • 3
    they are not mess they are an essential part of latex's working, it is possible but highly inadvisable to move them as you then have to configure tex to find them – David Carlisle Apr 4 '15 at 23:47
  • Many of those files are written during one compilation, read on the next run or the run after next or whatever. If they are deleted when the PDF is produced, a correct PDF never will be compiled. You can delete them once your PDF is finalised but, if you make changes to your source, you will need additional runs to compile your PDF again. So you should delete them only when you are done making changes and your PDF is in its final form. – cfr Apr 4 '15 at 23:55
  • Since /var/log should be writeable only by root, you cannot write the log file there unless you are compiling as root which would be an exceptionally stupid thing to do. – cfr Apr 4 '15 at 23:56
  • I understand that they do speed up follow-up compilations. However, I much rather had them hidden from me (e.g. in a .foo directory since they make the directory look kind of messy. Also, I do not simply move them around manually but rather asked if pdflatex provides options to place them in a different fashion. /var/log was meant to be an example for "another place" on the system. For example in a /home/user/.log directory or so. – Simon Fromme Apr 5 '15 at 0:00

Browse other questions tagged or ask your own question.