I have a huge LaTeX document with my lecture notes for a maths course; every now and then I change the order of the sections.
I want to make sure that all cross-references to, for instance, theorems are in "chronological order": referring in section 7 to stuff from section 5 is fine, but I don't want to use in a proof of section 5 references to results that won't be proved until section 7.
Is there a package that checks whether cross-references are to labels defined earlier or later in the document than that particular reference?