If I use TeXShop with pdfLaTeX then the document is automatically compiled as often as necessary to get the TOC and bibliography and all else done.

However, if I use TeXShop with XeLaTeX (I need to use Arial) then the process is run only once.

Is there a setting somewhere to activate automatic multiple passes?

1 Answer 1


The automatic compilation that you are seeing with pdflatex is likely because you have set your default compilation engine to be pdflatemk. The regular pdflatex engine doesn't do multiple combinations automatically. But there are mk versions for all three engines, and you can select them by using a "magic comment" in the first line of your document. You can type these lines yourself, or you can use the Macros->Program menu item to select from the list which will insert the relevant magic comment for you.

For automatic pdflatex compilation:

% !TEX TS-program = pdfLaTeXmk

For automatic xelatex compilation:

% !TEX TS-program = XeLaTexmk

For automatic lualatex compilation:

% !TEX TS-program = LuaLaTeXmk

If these don't work for you, you may need to move the relevant Engines from the Inactive/Latexmk folder to the main Engines folder inside your ~/Library/TeXShop folder, which you can navigate to from within TeXShop from the TeXShop menu item.

For more information on magic comments, see:

  • Thank you! I had just figured it out myself a few minutes ago. Seeing that pdfLaTeX is actually called through pdflatexmk I just tried xelatexmk and it worked!
    – covenant
    Feb 3 at 15:25

You must log in to answer this question.

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