Hi,
My HTML document has internal hyperlinks.
We use the following to add page number references and it works:
Instead, I would like to change the text to include the closest heading number to the link target.
I can easily capture the heading number in a string using string-set, but I don't know how to retrieve the value of the string at the link taget. It like I need a function similar to target-counter, that returns the value of a string at that point instead of the value of a counter.
Is there a way to do this?
My HTML document has internal hyperlinks.
<a class="aLink" href="#id3765">link text</a>
We use the following to add page number references and it works:
.aLink::after { content: " [See page " target-counter(attr(href), page) "]"; }
Instead, I would like to change the text to include the closest heading number to the link target.
I can easily capture the heading number in a string using string-set, but I don't know how to retrieve the value of the string at the link taget. It like I need a function similar to target-counter, that returns the value of a string at that point instead of the value of a counter.
Is there a way to do this?