> From: Ihor Radchenko > Date: Sun, 28 Apr 2024 10:37:58 +0000 > > Protesilaos Stavrou writes: > >> Since we are now using labels for the HTML export, I think it makes >> sense to optionally use those for the anchor tags as well. >> >> See the attached patch for a possible way of doing this. >> >> As always, you are welcome to make any further changes. > > We can indeed add such option, but is it of any practical use? > Do you have examples of workflows when such new option will be useful? An important purpose of using labels is sustainability. If the document changes, the labels remain (as would CUSTOM_ID). The problem when numbers are used in the anchor text is that if others want to make a reference to the footnote (cite it), they will use what they see (not the ID, which appears in the source only). And if the document changes, their references will be broken. Now, the problem with labels is that their are not visually appealing, especially the longer they get. Another approach is to have a string for the anchor text of the footnote references. Something like "[^]" with a hover/tooltip effect, which shows the full label. [ Of course, the hover/tooltip text can be further enhanced with CSS and JavaScript, but we are keeping it simple for now. Though I think that would ultimately be the best user experience. ] For a proof of concept, see the attached patch, which expands on the previous proposal. While clicking around the footnotes, I noticed that we can also improve the user experience by adding a CSS ":focus" state so that it is easier to spot where we are after following an internal link. I can send this as a separate patch/thread. -- Protesilaos Stavrou https://protesilaos.com