Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 12 down vote accepted

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

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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