6

This question already has an answer here:

When I use pdflatex, I get a bunch of files:

test.aux  
test.log  
test.out  
test.pdf  
test.tex  
test.toc

The .tex file and the .pdf file have an obvious use, but what do the other files do?

Thanks in advance.

marked as duplicate by Andrew Swann, Masroor, Reinstate Monica - M. Schröder, Jesse, Peter Jansson Jan 3 '14 at 16:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Jan 3 '14 at 15:38

This question came from our site for professional and enthusiast programmers.

  • The best thing is to open these files with some text editor. For example log file contains logs from compiler, toc file is something like 'table of chapters' because as you can see there is a chapters' and sections' list used in a tex file and so on. I have additionally lof file (list of figures) and lot file (list of tables). – wawek Dec 29 '13 at 11:49
  • 1
    Welcome to TeX.SX! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Torbjørn T. Jan 3 '14 at 15:46
7
  • .aux is the the "auxiliary" file and is used for (among other things) tracking cross-references made with \label and \ref. This file is why you need to run pdflatex twice to make the references resolve. The first pass writes data about the references to the .aux file and the second reads the .aux file and uses that to generate the necessary references. Generally, anything that needs to wait for the entire document to be generated (like page numbers) is written to .aux so it can be added in on a later pass.
  • .log contains a log of what pdflatex did. You can find things like error messages and a list of what packages got loaded in here.
  • .out is used to store extra information for the PDF. For example the bookmarks in the PDF file are generated using this file.
  • .toc is like .aux but only used for the table of contents, since the proper page numbers can't be known until the PDF has been generated. There are likewise .lof and .lot files for lists of figures and lists of tables.

Except for the .tex file these are all generated by pdflatex and can be safely deleted.

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