18

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?

24

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

  • 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 Aug 8 '11 at 9:00
  • 1
    @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})} – Mikael Öhman Aug 8 '11 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 Aug 13 '11 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.