deplog(head); // reads the latex log
head.update();
- // 0.5
+ // 1
// At this point we must run external programs if needed.
// makeindex will be run if a .idx file changed or was generated.
// And if there were undefined citations or changes in references
updateBibtexDependencies(head, bibtex_info);
}
- // 1
+ // 2
// we know on this point that latex has been run once (or we just
// returned) and the question now is to decide if we need to run
// it any more. This is done by asking if any of the files in the
// run latex once more and
// update the dependency structure
// -> if not changed:
- // we does nothing at this point
+ // we do nothing at this point
//
if (rerun || head.sumchange()) {
rerun = false;
} else {
LYXERR(Debug::DEPEND, "Dep. file has NOT changed");
}
+
+ // 3
+ // rerun bibtex?
+ // Complex bibliography packages such as Biblatex require
+ // an additional bibtex cycle sometimes.
+ if (scanres & UNDEF_CIT) {
+ // Here we must scan the .aux file and look for
+ // "\bibdata" and/or "\bibstyle". If one of those
+ // tags is found -> run bibtex and set rerun = true;
+ // no checks for now
+ LYXERR(Debug::LATEX, "Running BibTeX.");
+ message(_("Running BibTeX."));
+ updateBibtexDependencies(head, bibtex_info);
+ rerun |= runBibTeX(bibtex_info);
+ }
- // 1.5
- // The inclusion of files generated by external programs like
+ // 4
+ // The inclusion of files generated by external programs such as
// makeindex or bibtex might have done changes to pagenumbering,
// etc. And because of this we must run the external programs
// again to make sure everything is redone correctly.
if (head.haschanged(glofile))
rerun |= runMakeIndexNomencl(file, ".glo", ".gls");
- // 2
+ // 5
// we will only run latex more if the log file asks for it.
// or if the sumchange() is true.
// -> rerun asked for: