Section numbering resets after LaTeX upgrade: diagnosing \label/\ref behavior
0 reputation · 02 Apr 2023, 10:40 UTC
Goal
After upgrading to TeX Live 2025, the document’s section numbers no longer match the cross‑references produced by \label and \ref. The intention is to maintain consistent numbering across all parts, sections, and subsections while keeping hyperlinks intact via hyperref.
Constraints
Using pdflatex with the default article class, optional amsmath for mathematical typesetting, and hyperref for clickable links. The manuscript contains \part commands that reset the section counter, and \setcounter is sometimes used to adjust numbering manually.
Uncertainty
It is unclear whether the placement of \label relative to \section or the use of \setcounter after an upgrade causes the counter value stored in the .aux file to diverge from the displayed section number. Additionally, potential changes in hyperref or amsmath that affect counter handling are not documented.
Questions
- Does
\labelalways capture the current section counter value regardless of optional arguments or preceding\setcountercommands? - Are there known changes in TeX Live 2025 that modify
\label/\refbehavior whenamsmathorhyperrefare loaded? - What is the recommended sequence of compilation passes or command‑line options to guarantee that cross‑references reflect the correct section numbers after a distribution upgrade?