Skip to content

Conversation

@jeffkreeftmeijer
Copy link
Owner

@jeffkreeftmeijer jeffkreeftmeijer commented Nov 14, 2025

Newer versions of Org1 uses footnote labels as their anchors.

Hello, world![fn:labeled]

[fn:labeled] A footnote.

In previous versions, the example above would produce a footnote with fn.1 as the anchor:

<ol>
  <li id=\"fn.1\" class=\"footdef\" role=\"doc-footnote\" tabindex=\"-1\">
    <p class=\"footpara\">A footnote.</p>
    <p class=\"footpara\">\nWith a second paragraph.\n</p>
    <a href=\"#fnr.1\" role=\"doc-backlink\">↩&#65038;</a>
  </li>
</ol>

This produced broken links, as Org now uses fn.labeled when linking to this footnote from the footnote reference.

This patch uses the label if available and falls back to numbered foonotes. The example above now produces a "labeled" footnote:

<ol>
  <li id=\"fn.labeled\" class=\"footdef\" role=\"doc-footnote\" tabindex=\"-1\">
    <p class=\"footpara\">A footnote.</p>
    <p class=\"footpara\">\nWith a second paragraph.\n</p>
    <a href=\"#fnr.labeled\" role=\"doc-backlink\">↩&#65038;</a>
  </li>
</ol>

1 ox-html-markdown-style-footnotes now targets Emacs 30.2, which bundles with Org 9.7.13.

@jeffkreeftmeijer jeffkreeftmeijer force-pushed the footnote-labels branch 3 times, most recently from 5f242d7 to cf896c2 Compare November 15, 2025 09:18
@jeffkreeftmeijer jeffkreeftmeijer changed the title Footnote labels Add support for "labeled" footnotes Nov 15, 2025
@jeffkreeftmeijer jeffkreeftmeijer marked this pull request as ready for review November 15, 2025 09:58
@jeffkreeftmeijer jeffkreeftmeijer merged commit 0fff5e7 into main Nov 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants