# How to precisely tell from log-file whether to rerun LaTeX

There is a bit of discussion in related questions about automated LaTeX (re)compilation (e.g., here and here) and elsewhere on the web on rerunning the latex command in order to resolve all references.

Now how can I precisely determine from visual inspection (or a search query) in the log-file whether all references are resolved? That is, what is the precise set of messages that indicates that there are unresolved references? A regular-expression-like answer will be good.

(I know that I can mine the solutions to the above-cited SE.TeX post for an educated guess of an answer, but it seems like having an expert answer this and having that answer in one place in this forum will be useful for many people.)

-

The most common, standard "rerun warning" from LaTeX is:

LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.

However, other messages may also occur and is most likely package dependent.

rerunfilecheck under PDFLaTeX provides you to tailor the rerun warning using \RerunFileCheck.

-
My log-file contains the text "<some path>\rerunfilecheck.sty" Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO); I think hyperref loads this. Towards the end of my log-file I get text like this: Package rerunfilecheck Info: File `<my source filename>.out' has not changed. (rerunfilecheck) Checksum: <some checksum>. Is this a definitive indication that no rerun is necessary? –  Lover of Structure Sep 23 '12 at 3:21
From the rerunfilecheck documentation: "Since version 1.30.0 pdfTeX provides \pdfmdfivesum and \pdffilesize. These features are also available in LuaTeX, provided by package pdftexcmds. Thus this package rerunfilecheck uses these features to detect file changes. This saves the packages from keeping the whole files in memory or in file copies. The drawback are different files with the same size and the same MD5 checksum (seldom, hopefully)." –  Werner Sep 23 '12 at 3:27
@user14996, constancy of the .out file means only that. There could be other files that have changed. You can keep track of a larger set of these (but not necessarily all of them), by loading rerunfilecheck with options: \usepackage[mainaux,starttoc,partaux]{rerunfilecheck} –  Lev Bishop Sep 23 '12 at 3:47
If/when you have time, latexmk may provide a good alternative solution where you just "don't have to worry". –  Brent.Longborough Sep 23 '12 at 14:42
@user14996: See my answer in How can I force LyX to rebuild intermediate files for clean PDF display? that shows a different warning issued by etaremune. Others may also exist. –  Werner Oct 7 '12 at 15:01