Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footnote refs #67

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Footnote refs #67

wants to merge 2 commits into from

Conversation

flying-sheep
Copy link
Owner

@flying-sheep flying-sheep commented Mar 1, 2025

Need to rework the numbering logic, probably no way to get around having the parser track state …

It should work this way:

  1. names/refnames are not used
  2. IDs are independent from visible label. Named footnotes have that name as ID, others have footnote-n with an independent running counter in docutils (maybe stick with UUIDs for now). footnote references have footnote-reference-m with a different independent running counter)
  3. the visible label counter depends on footnote order only (not references), so the references [#]_, [#]_ can become [1] [3] if the footnotes are .. [#], .. [#named], .. [#]. that means that we probably need one more pass (1. assign order to numbered (and symbol) footnotes, 2. resolve footnote references, 3. add backrefs to footnotes)

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.

1 participant