Using Label instead of Order in a Footnote #584

Open
opened 2026-01-29 14:40:23 +00:00 by claunia · 1 comment
Owner

Originally created by @omer-iqbal on GitHub (Dec 11, 2022).

I am working with documents and Islamic commentaries. My goal is to preserve the original footnote numbers or labels so they can be searched and found by the users and so users can also cite the original footnote when needed. So I need to preserve the original footnote.

There are two issues:

  1. For larger works, like books and commentaries, the original text is broken into multiple sections (which can be hundreds or even thousands for multi-volume works) and each section will be stored in its own markdown.
  2. Some works have footnotes that use non-numeric labels. For example, this Quran commentary book (e.g. page 112) uses letters a, b etc. for footnotes.

Based on that, it looks like footnotes need a feature where Footnote.Label can be used in the markup instead of the Footnote.Order property.

Then, based on an option provided, HtmlFootnoteGroupRenderer will either use Order or Label (without the ^ prefix).

If this proposal seems acceptable, I can try to make a pull request (not sure though what the time frame might look like).

Comments/suggestions/feedback welcome.

I looked at this list of issues and didn't find a similar issue.

Originally created by @omer-iqbal on GitHub (Dec 11, 2022). I am working with documents and Islamic commentaries. My goal is to preserve the original footnote numbers or labels so they can be searched and found by the users and so users can also cite the original footnote when needed. So I need to preserve the original footnote. There are two issues: 1) For larger works, like books and commentaries, the original text is broken into multiple sections (which can be hundreds or even thousands for multi-volume works) and each section will be stored in its own markdown. 2) Some works have footnotes that use non-numeric labels. For example, [this Quran commentary book](https://www.cpsglobal.org/books/Quran-Commentary-English.pdf) (e.g. page 112) uses letters *a*, *b* etc. for footnotes. Based on that, it looks like footnotes need a feature where [`Footnote.Label`](https://github.com/xoofx/markdig/blob/master/src/Markdig/Extensions/Footnotes/Footnote.cs#L25) can be used in the markup instead of the [`Footnote.Order`](https://github.com/xoofx/markdig/blob/master/src/Markdig/Extensions/Footnotes/Footnote.cs#L30) property. Then, based on an option provided, [`HtmlFootnoteGroupRenderer`](https://github.com/xoofx/markdig/blob/master/src/Markdig/Extensions/Footnotes/HtmlFootnoteGroupRenderer.cs) will either use `Order` or `Label` (without the \^ prefix). If this proposal seems acceptable, I can try to make a pull request (not sure though what the time frame might look like). Comments/suggestions/feedback welcome. I looked at [this list of issues](https://github.com/xoofx/markdig/issues?q=footnote) and didn't find a similar issue.
claunia added the question label 2026-01-29 14:40:23 +00:00
Author
Owner

@xoofx commented on GitHub (Jan 24, 2023):

Based on that, it looks like footnotes need a feature where Footnote.Label can be used in the markup instead of the [Footnote.Order]
(https://github.com/xoofx/markdig/blob/master/src/Markdig/Extensions/Footnotes/Footnote.cs#L30) property.

I'm confused, because Footnote in markdig do support using label instead of order here in the specs, so why this is not working for your case?

@xoofx commented on GitHub (Jan 24, 2023): > Based on that, it looks like footnotes need a feature where [Footnote.Label](https://github.com/xoofx/markdig/blob/master/src/Markdig/Extensions/Footnotes/Footnote.cs#L25) can be used in the markup instead of the [Footnote.Order] (https://github.com/xoofx/markdig/blob/master/src/Markdig/Extensions/Footnotes/Footnote.cs#L30) property. I'm confused, because Footnote in markdig do support using label instead of order [here in the specs](https://github.com/xoofx/markdig/blob/master/src/Markdig.Tests/Specs/FootnotesSpecs.md), so why this is not working for your case?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#584