TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
You can't, really, that's just how it is. See for example What are the situations where you have to compile a document more than once? – Torbjørn T. Apr 10 '13 at 17:31
On the other hand, there are several tools for automatic compilation, so that you only have to press one button, and all necessary compilation runs are made. See Tools for automating document compilation for a list. – Torbjørn T. Apr 10 '13 at 17:35
up vote 10 down vote accepted

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:

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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