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

Ernst Reissner puszcza-hackers at gnu.org.ua
Wed Aug 16 18:33:01 CEST 2023


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

                 Summary: tex4ht with package hyperref and option destlabel
creates no ancor
                 Project: tex4ht
            Submitted by: reissner
            Submitted on: Wed Aug 16 16:33:01 2023
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I create html from latex with 
htlatex
tex4htStyOptions 	xhtml,uni-html4,2,svg,pic-tabular
tex4htOptions 	’ -cunihtf -utf8’
t4htOptions 	the empty string 

The latex file has in header 
`\usepackage[tex4ht,destlabel]{hyperref}` 
and has a section 

```
\section{Exporting in various formats}\label{sec:stableUsage}
```

As a result, I obtain a html file 
with following headline 

```
<h3 class="sectionHead"><span class="titlemark">3.2</span>
<a id="x8-130003.2"></a>Exporting in various formats</h3>
```

Here, the label in the latex source does not occur. 
Instead there is a generated label which may change, 
e.g. when inserting another section. 

When referencing this, it reads in the output 

```
included and a Section&#x00A0;<a 
href="#x8-130003.2">3.2<!--tex4ht:ref: sec:stableUsage --></a> 
```
and here, the label `sec:stableUsage` occurs, 
i.e. it is know, but it occurs only as a comment. 

I would expect, that there are two anchors, 
one with generated id and an other one with id 
taken from the label in the source. 

I think, i cannot use the reference `file.html#x8-130003.2` 
because it is not stable. 
I could use `file.html#sec:stableUsage`. 




    _______________________________________________________

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.