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 am using the hyperref package that comes without the destlabel option (I tried to use the most recent version of hyperref, but it doesn't work with my LaTeX version).

So to be able to create named destinations in my PDF whose names are fixed, I use \hyperdef{cat}{name}{}. However, it is placed at a different location than a corresponding \label{name}. The following illustrates my problem

\subsection{General Introduction}
\label{foo}\hyperdef{bar}{foo}{}

The end result I get is (sorry for the ASCII art)

{Here is the \label destination in the PDF}
7.9.5 General Introduction
{Here is the \hyperdef destination in the PDF}

I would like to have the \hyperdef to be at the position that the \label takes. How can I make this happen?

share|improve this question
add comment

1 Answer

You could use option destlabel of hyperref 2012/07/28 v6.82u or later. Then hyperref uses the first label name for the anchor name and you would not need an additional \hyperdef.

share|improve this answer
    
The OP stated that he uses an older version of hyperref. (Maybe the "correct" answer is that he should upgrade or install the current version locally.) –  lockstep Nov 22 '12 at 12:56
    
i tried that. See my initial note "I am using the hyperref package that comes without the destlabel option (I tried to use the most recent version of hyperref, but it doesn't work with my LaTeX version)" :) I am really lost :/ –  Johannes Schaub - litb Nov 22 '12 at 13:08
    
I wonder whether i could just apply a patch that just adds "destlabel" without anything else? –  Johannes Schaub - litb Nov 22 '12 at 13:48
1  
If you want to have a feature that an older version does not provide, but a newer version supports, then update. –  Heiko Oberdiek Nov 22 '12 at 14:11
    
hmm fair game. i guess i have to go that route :( –  Johannes Schaub - litb Nov 22 '12 at 14:34
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.