Deep link anchor for HTML headings with docbook-xsl
Martin <[email protected]> Wed, 13 Dec 2023 15:39:49 +0100
| Newsgroups | gmane.text.docbook.apps |
|---|---|
| Message-ID | <20231213153949.Horde.hYD7LHPHbZ2WNCTXKkc8jna@webmail.in-berlin.de> |
Dears,
I'm probably not the first one who would like a "deep link" icon
after HTML headings (and maybe figure and table titles, too).
In some wikis (here: Trac) it's implemented like this:
<h2 class="section" id="Something">
Something
<a class="anchor" href="#Something"
title="Link to this section"> ΒΆ</a>
</h2>
The paragraph symbol is typically hidden and only visible when
hovering:
* > .anchor:link, * > .anchor:visited {
visibility: hidden;
}
h1:hover .anchor, h2:hover .anchor, h3:hover .anchor,
h4:hover .anchor, h5:hover .anchor, h6:hover .anchor,
span:hover .anchor {
visibility: visible;
}
Has someone already created an XSL template to get the same
effect with DocBook and can share it here?
Thank you!
Martin