Repository navigation
Use footnotes for numbered notes in tables #137742
Description
Activity
- addedtype-featureA feature request or enhancementA feature request or enhancement
on Aug 14, 2025 - The formatting of the footnotes and links above is a bit different than it would be in the docs. See collections.abc link above. In the note list, number is backlinks, unless there are multiple backlinks. In the latter case, the note # is followed by backlinked number, as in
[1](1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) These ABCs override ...in the example.
2 A slight downside given multiple tables with footnote is that footnotes are numbered 1,2,3,... throughout the whole file instead of restarting with 1 for each table. The example file does not have another table. The preview for the PR file has 3. I think people can adjust.
Reacted by Brian Schubert- The formatting of the footnotes and links above is a bit different than it would be in the docs. See collections.abc link above. In the note list, number is backlinks, unless there are multiple backlinks. In the latter case, the note # is followed by backlinked number, as in
I wonder if we should use named notes instead, with little identifier-like mnemonics; something like:
Cheese In Stock Red Leicester No. Camembert Yes. [runny, cat] Notes:
[runny]: it's a bit runny
[cat]: the cat's eaten itThat would certainly help me match the entries with the content when reading :)
Regular links don't have the backlinks, but I guess that's OK?
Sphinx citations render a like this, but aren't the correct element to use.
Reacted by Éric(My comment is specifically for the datetime case)
little identifier-like mnemonics
I don't think these are the best here. Mnemonics have a similar issue as the footnotes for the whole file, although rather than changing the numbering (which I would like to preserve) we remove it entirely. I also think it is quite hard to come up with a single word to match some of the notes. And, lastly, the format code table is already quite width constricted, and with some rows having two notes, words would take up space we don't have.
The other tables in the file are shorter than the format code one, what if we only add the footnotes for the last table (which I would assume is most-read), preserving the numbering? We could then use Petr's mnemonics idea for the shorter (and wider, as we have less columns) tables.
Other tables are two-column “operation” & “its result” tables; these might be better presented as definition lists or
.. describe::entries.Reacted by Stan Ulbrych
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo
Documentation
In a few places, the docs include tables with numbered notes, similar to this:
Often the notes are written using simple numbered lists, which notably don't create links between the note references and their definitions. This can make viewing the notes somewhat tedious, particularly when the table is very long or when the same notes are shared by multiple tables.
Another way to format these notes is using Sphinx footnotes. Footnotes have the benefit of creating bi-directional links between the note entries and their references, which makes viewing a note and then navigating back to where you were much easier. The footnote definitions can be placed anywhere in the docs, so in particular they can be placed immediately after the table that references them. This is already done for a few tables in the current docs, e.g. in
collections.abc.I propose migrating some of the existing table notes to footnotes in cases where having the extra navigation links would be helpful. In particular, I think this would be useful for the format code tables in the
datetimedocs.The result would look something like this:
Linked PRs
datetimedocs #137743Footnotes
it's a bit runny ↩
the cat's eaten it ↩