Hi,

It seems (unless I am missing something) that hyperlinks in the table of
contents for the exported html are incorrect when `reference` is set.

Minimal(-ish) working example:
_________________________________
\setupbackend[export=yes]
\setupinteraction[state=start]

\starttext

\placecontent

\startchapter[title=Chapter 1]
Blahblah
\stopchapter

\startchapter[title=Chapter 2, reference=chapter_2]
Blahblahblah
\stopchapter
\stoptext
_________________________________

Annotated relevant part of the generated `.html`:

...
<div>
 <div class="list">
  <div class="listitem chapter" href="#aut-1"
onclick="location.href=&apos;#aut-1&apos;"> <!-- THis is correct -->
   <div class="listtag">1</div>
   <div class="listcontent">Chapter 1</div>
   <div class="listpage">2</div>
   </div>
  <div class="listitem chapter" href="#aut-2"
onclick="location.href=&apos;#aut-2&apos;"> <!-- I think "#aut-2" should
read "#chapter_2" -->
   <div class="listtag">2</div>
   <div class="listcontent">Chapter 2</div>
   <div class="listpage">3</div>
   </div>
 </div>
 <div class="section chapter level-2" id="aut-1">
  <div class="sectioncaption">
   <div class="sectionnumber">1</div>
   <div class="sectiontitle">Chapter 1</div>
  </div>
  <div class="sectioncontent">
Blahblah   </div>
 </div>
 <div class="section chapter level-2" id="chapter_2">
  <div class="sectioncaption">
   <div class="sectionnumber">2</div>
   <div class="sectiontitle">Chapter 2</div>
  </div>
  <div class="sectioncontent">
Blahblahblah  </div>
 </div>
</div>
...

Would someone be aware of a workaround (apart from using ‘aut-2’ as
reference in this case) or other solution?

Best regards,
Florent
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to