Change Named Destinations using destlabel option of hyperref

PDF Named-Destinations are made by Hyperref. This shows how to change them by using hyperref option destlabel=true, then redefining using /label. Unfortunately, it does not seem to work. What am I missing?

In Lyx,exporting with pdflatex,hyperref=V6.83m, I have set the hyperref option by document->settings->pdf properties->options adding destnames=true

In the body I can put inline \section{Introduction} \label{intro} \HyperDestRename{section.3}{RenamedIt}

I expect that I should see a NamedDestination of Intro or RenamedIt, but I don't - it is still section.3

I can define NamedDests with either of these: \pdfbookmark{Text of bookmark2}{Anchor_Name2} \hypertarget{HTDest}{Blue}

Is there a way to automatically use the section names to make NamedDests (hypertargets)?


There is an option destlabel, which uses the name of the first \label after the anchor creation to name the anchor:

\ifx\pdfobjcompresslevel\undefined\else\pdfobjcompresslevel=0 \fi % Debug



The first line is just for pdfLaTeX to make it easier to read the PDF file via a text viewer (or editor) to find the destination names in the PDF file (in short, /Catalog/Names/Dests). The /Dests object references object 21 in the generated PDF file:

21 0 obj
/Names [(Doc-Start) 10 0 R (intro) 2 0 R (page.1) 9 0 R]
/Limits [(Doc-Start) (page.1)]

There are three names: Doc-Start is added by hyperref at the begin of the document. page.1 is the automatically created page label (controlled by option pageanchor). The destination for \section{Introduction} is intro, named by \label{intro}.

You can define a macro to contain the destination name.






\section{Development}% new \@currentHref



Category: pdftex Time: 2016-07-30 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.116 (s). 12 q(s)