7.2 \labelformat

Synopsis:

\labelformat{countername}{reftext}

The \labelformat command defines reftext to be output when the countername is referenced with \ref or \Ref. Within reftext, the value of countername can be inserted as #1 (see \newcommand & \renewcommand).

When no \labelformat has been defined, which is commonly the case, then \ref will output just the bare number that is the value of countername, as explained below (see \ref & \Ref).

For example:

\labelformat{section}{section~#1}
...
See \ref{sec:intro} for ...

This will generate something like ‘See section~1 for …’; without the \labelformat, it would output ‘See 1 …’.


Unofficial LaTeX2e reference manual