refcount

refcount package for

References are not numbers, however they often store numerical data such as section or page numbers. ref or pageref cannot be used for counter assignments or calculations because they are not expandable, generate warnings, or can even be links. The package provides expandable macros to extract the data from references. Packages hyperref, nameref, titleref, and babel are supported.

Download the contents of this package in one zip archive (322.8k).

refcount – Counter operations with label references

Provides commands \setcounterref and \addtocounterref which use the section (or whatever) number from the reference as the value to put into the counter, as in:

      ...\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 to create one.

 Package refcount Bug tracker https://github.com/ho-tex/refcount/issues Repository https://github.com/ho-tex/refcount Version 3.6 2019-12-15 Licenses The LaTeX Project Public License 1.3 Copyright 1998, 2000, 2006, 2008, 2010, 2011 Heiko Oberdiek2016–2019 Oberdiek Package Support Group Maintainer Heiko Oberdiek TDS archive refcount.tds.zip Contained in TeX Live as refcountMiKTeX as refcount Topics Label and References