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?

1 Answer 1


You can use the starred command: \pageref*{pg:end} to suppress the link for any *ref command.

  • 2
    Thanks, that worked fine for the \pageref command, but not so for the \eqref. I would like to disable the hyperlinking for some of those as well, as it is a bit over the top linking to the same page the user is already on...
    – D.Roepo
    Commented Aug 8, 2011 at 9:00
  • 3
    @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})} Commented Aug 8, 2011 at 12:11
  • Yes, I ended up going for that option. Links to the same page are a bit too much. Now that I started implementing footnotes I see that I have the same problem there. How would I turn the hyperlinking of those off?
    – D.Roepo
    Commented Aug 13, 2011 at 18:52
  • Works also with \ref*{}
    – flymg
    Commented Apr 5, 2023 at 10:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .