Whenever I press CMD+T in TexShop, the PDF created is not always updated correctly. I usually have to re-compile it to update the Table Of Contents and other changes I have made. How can I fix this ?

Using MACOSX 10.8 - TEXSHOP 3.11


2 Answers 2


You can't. LaTeX has to build the .aux file to store the table of content (ToC) and such, because when typesetting the ToC it can't know beforehand what sections will occur. LaTeX works sequentially.

  • First run: collect all sections and such and store it in .aux file.
  • Second run: Use .aux file to typeset the ToC.

Actually it does both things at once: typset with the already existing .aux file (which can be empty or non-existant) and create an updated one for the next run.

There exist tools that "simulate" a "one-compile-all-get" behaviour, like Texify from MiKTeX for Windows. But normally all they do is just run the compiler twice in a row (maybe with bibtex inbetween if you use it).

Thanks to Torbjørn T. here are the links from his comments:


This behaviour is normal for any TeX engine (as explained in Foo Bar's answer), but Tools for automating document compilation might automate the multiple runs of creating a LaTeX document when required.

I'd suggest user friendly automation tool arara: the manual is very well written for newbies! In particular, I'd like to point out that, it is possible to integrate arara with TeXShop, cf. section 4.4 pg. 41 of the linked manual.

Ben Lu's Answer to "Run multiple commands in TeXShop"

PS: This package is maintained by the author, Paulo, who is also a distinguished member of TeX.SX community.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .