I assume you did the obvious checks:
- there is no Rerun to get cross references right in the log file,
- and no warnings about duplicate labels.
Do you use \pagenumbering{..}
? (It should still work). Rerun LaTeX as indicated. Theoretically it is possible that you never reach a fix point but that is very unlikely. I am not sure, but at most three runs of pdflatex
after bibtex
should suffice.
hyperref
points its hyperlink to the last anchor, and this anchor is set via the macro \refstepcounter
. Indeed, hyperref
redefines the traditional \refstepcounter
to insert the appropriate anchor (see \hyper@refstepcounter
in hyperref.dtx
).
This is important from the point of view of the hyperlink. Here is a showcase that highlights the motivation:
\documentclass{article}
\usepackage{hyperref}
\newcommand{\hlabel}{\phantomsection\label}
\begin{document}
\section{A section}\label{sec:hyp1}
See section~\ref{sec:hyp1}.
\section{Another section}\hlabel{sec:hyp2}
See section~\ref{sec:hyp2}.
\end{document}
In the above example \hlabel
has been deliberately made to insert an anchor (thereby ignoring whatever other anchors are set), in-line with your request. This anchor is set using \phantomsection
.
Clicking on the link sec:hyp1
jumps you back to the actual section title. Hey, that's awesome! Clicking on sec:hyp2
jumps you to just below the sectional title. Not so awesome, since you don't know which section the jump is in. Of course, this discussion might seem trivial and depend on your PDF zoom level, but I hope the point is made clear.
As such, there is a separation between the placement of the anchor and the placement of the \label
. If need be, it allows you to gauge your own destination for the hyperlink. However, in general, the hyperlink should typically jump to where the counter was stepped.
As an aside, the predictability of floats with \caption
s (in terms of the their structure) is exactly the reason why the package hypcap
was born. That is, by clicking on the hyperlink associated with the caption/float counter stepping, you can jump to where the float actually starts.
Best Answer
You have to redefine the command
\pagedeclaration
defined by\nomencl
. Please note that the original definition of\pagedeclaration
depends on your selected language.