# Using varioref and cleveref, does cleveref diagnose a document that LaTeX always wants to re-run?

I've got a large document that LaTeX always wants to re-run. Using the technique described at How to diagnose a permanent "Label(s) may have changed" warning?, I traced the problem to some \vrefs. But I expected the problematic \vrefs to be flagged for me by the varioref package. The documentation for package varioref states,

Defining commands like the ones described above poses some interesting problems. Suppose, for example, that a generated text like ‘on the next page’ gets broken across pages. If this happens it is very difficult to find an acceptable solution and in fact can even result in a document that will always change from one state to an- other (i.e., inserting one string, finding that this is wrong, inserting another string on the next run which makes the first string correct again, inserting . . . ). The current implementation of varioref therefore issues an error message whenever the generated text is broken across page boundaries, e.g.,

table 5 on the current hpage break i page


would would result in an error, which needs to be resolved by the user by replacing the \vref command with an ordinary \ref just before the final run. This is not completely satisfactory but in such case no solution really is.

The cleveref package, which I have (correctly) loaded after varioref, claims that it implements \vref correctly. But is cleveref supposed to replicate this diagnostic capability? I need to figure out whether to report a bug or a feature request, and to what maintainer :-)

I have tried and failed to produce a MWE that has a \vref in exactly the right place to reproduce the issue.

• It's not clear to me what you mean by "diagnosis". As you note, cleveref makes some changes to the innards of varioref so that \vref works "as expected" if cleveref is loaded too. (Aside: Loading cleveref also resolves some deep-seated conflicts between varioref and hyperref.) But "as expected" contains the caveat that page-related labels may change from run to run without ever settling down. It is not the job of cleveref -- and the package certainly makes no claim to this effect -- to improve on the job varioref's does and come up with a better page-related algorithm.
– Mico
Aug 15, 2019 at 7:47

cleveref disables the checking for cross-references being broken across pages when redefining the varioref commands for its own use. So you can argue it is cleverefs fault, but there is a reason for this in the current implementation of the package.
I'm currently working with Toby to get to a better co-existence between the two packages and also with the hyperref package. Once this is in place, such issues should be correctly diagnosed again.
The varioref improvements for this will probably not make it into the fall release of LaTeX, but should become available with the winter release.