[tex4ht] [bug #607] tex4ht with package hyperref and option destlabel creates no ancor

Ulrike Fischer news3 at nililand.de
Mon Aug 21 11:34:33 CEST 2023


Sorry I didn't really follow, but in PDF the destlabel option of hyperref works with a two-pass compilation: 
at the first compilation, the destination in the PDF has the normal name (e.g. section.1), and when the \label is seen, hyperref stores into the aux the new name:

\hyper at newdestlabel{section.1}{special-sec-label}

At the second compilation, hyperref then replaces "section.1" by "special-sec-label".

I don't quite see why it should be difficult for tex4ht to use the info from the aux too.

Ulrike


Guten Tag, Michal Hoftich,

am Montag, 21. August 2023 um 11:19 schrieben Sie:

> Follow-up Comment #5, bug #607 (project tex4ht):

> The solution in the linked answer on TeX.sx is a base for the code that
> make4ht executes by default. I just fixed some errors and issues that I found
> in the meantime.

> On the TeX side, when we add any code to \label, it will always point under
> the section title. This is because of how HTML works. As soon as the section
> is closed, it inserts the </h2> tag, and everything that follows, such as the
> destination anchor for the label, is displayed on another line. It could be
> possible to move the anchor to a section using Lua filters, but it would be
> slower.

> In PDF, it may be possible to insert the destination on the same line, because
> it doesn't insert an implicit line break with the end tag.

>     _______________________________________________________

> Reply to this item at:

>   <http://puszcza.gnu.org.ua/bugs/?607>

> _______________________________________________
>   Message sent via/by Puszcza
>   http://puszcza.gnu.org.ua/





More information about the tex4ht mailing list.