Stop reading here if you do not like stupid yet amusing challenges.
Challenge: produces the shortest document yielding
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
No matter how many times it is run through
I presume there is a cheating solution by which you mess up with the reference information as read from the
.aux file. It would be nice to see one.
The challenge in producing the shortest "non-cheating" solution might be in clever ways of searching for a needle in an enormously huge haystack: Those rare documents in which setting changing a referenced label, say from
2 manages, through the delicate layout algorithm, to change the referenced label back, i.e., from '2' to '1'.
EDIT: In view of Document requiring infinitely many compiler passes?, which essentially solves the problem by a different kind of "cheating": forcing in and out text and blocks, using macros, I would rephrase:
- The shortest
LaTeXdocument that requests forever: "rerun to get cross-references right", but please do so by using text only. It is okay to use text generated by, e.g.,
\lipsum, but it is not okay to sneak in loops.
If memory serves me right, Lamport said in his book that the probability of such an incident is infinitesimal.