tex-utils
Two small Python scripts for the housekeeping a large LaTeX document accumulates.
2014PythonLaTeX
Written while finishing a thesis, which is where the problem comes from: in a document of any size the \\label and \\ref commands drift apart. Labels get renamed and the references pointing at them do not, references survive the section they referred to, and LaTeX reports the damage one warning at a time, if at all.
invalid_labels.py reads a set of .tex files, collects every label and every reference, and reports the mismatches together — references with no label, and labels nothing refers to. data_structures.py is the small helper it uses.
Python 2, and unchanged since 2014; it will need the usual porting to run today.