...\label{sec:foo} ... \setcounterref{foonum}{sec:foo}Commands \setcounterpageref and \addtocounterpageref do the corresponding thing with the page reference of the label. No .ins file is distributed; process the .dtx with plain TeX to create one. The package is part of the