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.

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
add comment

2 Answers

up vote 5 down vote accepted

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

\usepackage{etoolbox}
\makeatletter
\patchcmd{\ecv@totpages}{\ref}{\ref*}{}{}
\makeatother

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

\makeatletter
\def\ecv@totpages{~/~\ref*{TotPages}}
\makeatother
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
add comment

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
add comment

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.