19

Sometimes, when I use the longtable package I get a message in the output:

Package longtable Warning: Table widths have changed. Rerun LaTeX.

I read that it can be as often as three times that XeLaTeX must be run until the message disappears. So currently my deploy script re-runs XeLaTeX until the output no longer contains the string Rerun LaTeX.

So, is this the official way (used by all packages) to detect that a re-run is necessary or is there another way like a specific return value? I can already rule out the existence of the .aux file as an indicator, because that file is never deleted.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
AndreKR
  • 1,025

1 Answers1

5

There is no general mechanism in the LaTeX2e kernel for reporting 'rerun LaTeX' or similar to the user. As such, it is down to each package author to decide how to pass on this information. For example, the kernel will issue a message of the form

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

if there are new \label commands in the document, a model followed by the etaremune package which also uses the LaTeX warning mechanism:

LaTeX Warning: Etaremune labels have changed.
               Rerun to get them right.

However, other packages use 'info' messages, write directly to the log, etc.

The logreq package is perhaps the closes there is to a general mechanism to request rerunning. It was written by Philipp Lehman principally to pass information to the user from biblatex to request LaTeX/BibTeX/Biber runs, but is designed to be both general and to provide parsable information in the log for automated systems. Before Philipp 'vanished' from the LaTeX world, he and I had discussed briefly implementing a similar idea for LaTeX3 (expl3), and this remains on my 'to do' list. As with most things, a strong need to sort it out is most likely to get me to do it!

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036