TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been searching like hell for this, trying to hack the totpages and/or the hyperref packages but to no avail...

The totpages package automatically creates link on every reference to the total number of pages in a document. I'm doing my CV with the europecv package and this places a Page X / TOTAL on the footer of every page and the totpages package automatically creates a link (if hyperref is also being used) on TOTAL always linking to the last page. This seems a bit pointless to me.

So far I've "disabled" this by setting the border color to white, the link still works, there's just no visual indication that it's a link. But this is not acceptable because this does not allow me to have visual indications on internal links I manually create.

I also tried \usepackage[anchorpages=false]{hyperref}, it seems to be the option to disable such linking, but it doesn't work.

Any other solution?

share|improve this question
up vote 6 down vote accepted

One needs to patch an internal command of europecv.cls. Put the following in your preamble


Alternatively, just rewrite the definition of the command using \ref* instead of \ref:

share|improve this answer
I knew something like this was possible, I should have posted the question sooner. I tried to do it myself but I still consider myself a mediocre LaTeX user. – Ricardo Amaral Sep 5 '12 at 21:08
@RicardoAmaral Don't worry: we all learn from this site. Surely I've learnt a lot. – egreg Sep 5 '12 at 21:16
It works for \pageref*{LastPage}, too! – cfr Apr 22 '14 at 17:15

Just use \ref*{TotPages} instead of \ref{TotPages}. Package hyperref adds a star form for \ref for references without hyperlinks.

share|improve this answer
I can't do that as simple as that. I never use {TotPages} directly, that's handled by the europecv package. – Ricardo Amaral Sep 5 '12 at 19:46

Your Answer


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.