[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_
From: |
Protesilaos Stavrou |
Subject: |
Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)] |
Date: |
Fri, 12 Apr 2024 10:05:34 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Date: Wed, 10 Apr 2024 14:31:22 +0000
>
> Protesilaos Stavrou <info@protesilaos.com> writes:
>
>> Though I should have clarified my intent earlier: the idea is to use the
>> label as a fixed reference to the footnote, so that the link does not
>> change between exports. This is the same principle as what we do with
>> links to headings that have a CUSTOM_ID.
>>
>> As such, the anchor text can still be the way it is now as an
>> automatically generated number sequence (^1, ^2, etc.), but the HTML
>> "id" and "href" values will be constructed based on the label of the
>> footnote, NOT its number in the sequence.
>>
>> What do you think?
>
> That may work. One may simply change the anchors for footnote references
> and footnotes when they are labeled. However, we should be careful when
> labels are duplicated (multiple references to the same named footnote) -
> only a single back-reference is possible from the footnote definition
> back to footnote reference.
I think the issue of labelling the footnotes is separate from
disambiguating them and avoiding duplicates. Of course, having the
latter is nice. But the part about the labels should be limited to the
use of the data we already have to keep the patch/change small (maybe
subject to an opt-in user option to not disrupt any existing workflow).
With regard to the disambiguation scheme, I am playing around with
various scenaria to see how Org HTML export behaves. Using the
following:
* Heading
This is test 1 [fn:hello]
This is test 2 [fn:hello]
This is another test [fn:1]
This is test 3 [fn:hello]
* Footnotes
[fn:1]
[fn:hello] Hello
We get this excerpt from the HTML output:
This is test 1 <sup><a id="fnr.1" class="footref" href="#fn.1"
role="doc-backlink">1</a></sup>
This is test 2 <sup><a id="fnr.1.100" class="footref" href="#fn.1"
role="doc-backlink">1</a></sup>
This is another test <sup><a id="fnr.2" class="footref" href="#fn.2"
role="doc-backlink">2</a></sup>
This is test 3 <sup><a id="fnr.1.100" class="footref" href="#fn.1"
role="doc-backlink">1</a></sup>
Notice that the 100 in the ID is not incremented further. I guess this
is something that can be worked on but, again, I think it is separate
from the issue of using the label for the ID and HREF.
Any thoughts?
--
Protesilaos Stavrou
https://protesilaos.com
- [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Protesilaos Stavrou, 2024/04/05
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Ihor Radchenko, 2024/04/05
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Protesilaos Stavrou, 2024/04/10
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Ihor Radchenko, 2024/04/10
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)],
Protesilaos Stavrou <=
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Ihor Radchenko, 2024/04/13
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Protesilaos Stavrou, 2024/04/26
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Protesilaos Stavrou, 2024/04/26
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Max Nikulin, 2024/04/26
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Ihor Radchenko, 2024/04/28
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Ihor Radchenko, 2024/04/28
- Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)], Ihor Radchenko, 2024/04/28