bundles / papyri 0.0.10 / papyri / ts / _auto_number_footnotes
function
papyri.ts:_auto_number_footnotes
source: /papyri/ts.py :1084
Signature
def _auto_number_footnotes ( sections : list[Section] ) → None Summary
Resolve # and #name footnote labels to concrete numbers.
Extended Summary
RST allows three kinds of label: explicit (1), auto-numbered anonymous (#), and auto-numbered named (#name). The anonymous form is ambiguous on its own — the renderer keys anchors on the label, so multiple # footnotes would collide. Resolve to sequential integers (skipping any explicitly-used numbers) so each definition gets a unique anchor and each reference points at the matching definition.
Aliases
-
papyri.ts._auto_number_footnotes