Suppose I have the following in document A:



\section{First Section}\newpage
\section{Link Section}\label{mylabel}

and the following in document B:



Link 1: Please see \href{docA.pdf#mylabel}{this section}.

Link 2: Please see \hyperref{docA.pdf}{section}{2}{this section}.

Link 1 works when I have the destlabel option set and link 2 works when I don't set this option. How can I make both links work?

The reason that I want both of these methods to work simultaneously is that I do not want to use absolute references myself (because of sections that get inserted or deleted later on), but I do want to allow people from the outside to link to (sections in) my PDF's without them having to know the new destination names that were replaced by the destlabel option. Is this possible?

The documentation of hyperref did not clarify it. In fact, I thought the following bit of text in the documentation implied that both should work simultaneously:

The renaming is done by a redefinition of \HyperDestNameFilter. That leaves the old destination names intact.

  • 1
    Don't show only a few snippets, make complete test documents. Commented Jun 13, 2018 at 15:15
  • Related: tex.stackexchange.com/a/321671/134641
    – Coby Viner
    Commented Jun 13, 2018 at 15:57
  • 1
    I added an MWE to my question instead of the snippets. I did read related articles on my problem, but that's just what they are: related, not duplicates. Unfortunately, they didn't help much.
    – Ivo
    Commented Jun 14, 2018 at 19:14


You must log in to answer this question.

Browse other questions tagged .