(Robin's answer moved from the question area)
Here a short abstract of "Latexmk For TeXShop.pdf" by Herbert Schulz
(email@example.com). Reading this and following the explained steps solved my problem. I don't own the right of this text! If you own the rights of this text and aren't ok with the citation contact me, so i can delete it. thx.
1 What is latexmk?
Compiling a tex file containing cross-references, bibliographic
references and/or indexes is a multi-pass process; i.e., you’ve got to
run (pdf/xe)latex multiple times with possible inter- mediate runs of
bibtex and/or makeindex until all references are resolved. The latexmk
perl program, rewritten and presently maintained by John Collins1,
automates this multi-pass process. By default it first runs
(pdf/xe)latex on a source file, determines file dependencies by exam-
ining the log and aux files produced by the run and then automatically
runs bibtex2 and/or makeindex, if needed, and the correct number of
additional runs of (pdf/xe)latex to generate the bibliography, index
and cross-references. Recent versions of latexmk also work correctly
with the nomencl package as well as the glossary and glossaries
packages and other packages that produce multiple bibliographies or
2 Quick Start!
This section will get you started quickly. Unless you are trying to
customize the behavior of the supplied engines or want to use the more
esoteric engines this really is all you need!
2.1 Quick Install.
To activate the latexmk engine files simply move all the files with
extension .engine from ~/ Library/TeXShop/Engines/Inactive/Latexmk/
two folder levels up, to ~/Library/TeXShop/ Engines/, and (re-)start
TEXShop. (Note: ~/Library/ is the Library folder in your HOME folder.)
When you click on the popup engine menu on the Source toolbar the
newly enables engines names should appear; see Figure (1) to see how
that menu changes. Note: the engine names will not appear in the
2.2 Quick Use.
At the top of your Source file place the line
% !TEX TS-program = pdflatexmk
to use the pdflatexmk engine which will use pdflatex to
typeset your document. Substitute latexmk or xelatexmk for pdflatexmk
to use latex or xelatex to typeset your Source. From then simply using
Typeset→Typeset (Cmd-T) will run through the complete process of fully
typesetting your document.