Automatic detection¶
Options set to auto (the default) are worked out from the document.
Engine¶
- The magic comment
% !TEX program = <engine>in the main file, if there is one. - Otherwise
xelatex, if the preamble loadsfontspec,polyglossiaorunicode-math, or if a.sty/.clsfile in the directory of the main file loads them (beamer theme, custom class…). - Otherwise
pdflatex.
Commented-out lines are ignored.
Bibliography¶
ktex looks at the files produced by the first pass:
biberif biblatex wrote a.bcffile;bibtexif the.auxcontains\bibdata;- otherwise, no bibliography.
Passes¶
In auto mode, ktex runs a first pass, then the bibliography, then:
- one pass (two for BibTeX);
- then more passes as long as the auxiliary files (
.aux,.toc,.nav…) change or the log asks for another pass (Rerun to get…,Label(s) may have changed,Please rerun LaTeX…), up tomax_passes.
The build directory is kept between builds, so rebuilding after a small change often takes only one or two passes.