When using the hyperref package, is it possible to tell LaTeX not to create a link for some references?

In my case the page number is displayed in the footer in

\fancyhf[FC]{\thepage\ of \pageref{pg:end}}


which is what I want. Unfortunately every single page in the document then has a link to the final page, which is a bit silly.

Any ideas on how to fix that?

You can use the starred command: \pageref*{pg:end} to suppress the link for any *ref command.
• @user7091: If you are have to (i would just let all of them link), then you could wrap up your own command, \newcommand{\eqrefb}[1]{(\ref*{#1})} Aug 8, 2011 at 12:11