emacs-orgmode
[Top][All Lists]
Advanced

[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: Ihor Radchenko
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, 05 Apr 2024 14:33:49 +0000

Protesilaos Stavrou <info@protesilaos.com> writes:

> I have an Org file with contents like the following:
>
>     This is a test 1 [fn:n24aa:These are the contents] and here is more.
>
> When I do an HTML export, the footnote's label (n24aa) is not preserved
> in the exported HTML. Is this intended behaviour? I was expecting it to
> keep the label as a user-defined unique identifier.

Yes, this is indented behaviour, AFAIU.

> I looked into the ox.el and noticed that the export data does include
> the labels. But 'org-html-footnote-reference' does not have a call to
> get the label: it assigns a number outright. To experiment with
> retrieving the data, I tried this:
> ...
>        (let* ((n (or
>                   (org-export-get-footnote-label footnote-reference)
>                   (org-export-get-footnote-number footnote-reference info)))
> ...
> Can we have footnotes with their label preserved? Or maybe is this going
> to break a lot of functionality? I am aware the above not work for
> footnote definitions, as those also get the number.

The problem arises when only some footnotes have a label:

    This is a test 1 [fn:n24aa:These are the contents] and here is 
more[fn::another one].

What to do with the unlabelled ones? Assign a number? If yes, what kind
of number? `org-export-get-footnote-number' counts all the footnotes,
including labelled ones; so that returned number will be 2 in the above
example, leading to awkward ^n24aa followed by ^2 footnote.
But even without `org-export-get-footnote-number', ^n24aa ^1 mixture
might be awkward.

One way could be only using footnote labels when _all_ the footnotes
are labelled.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]