python / python/cpython

Use footnotes for numbered notes in tables

Open
#137,742 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

docs type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Documentation

In a few places, the docs include tables with numbered notes, similar to this:

Cheese In Stock
Red Leicester no
Camembert yes (1) (2)

(1) it's a bit runny
(2) the cat's eaten it

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 datetime docs.

The result would look something like this:

Cheese In Stock
Red Leicester no
Camembert yes [^1] [^2]

[^1]: it's a bit runny
[^2]: the cat's eaten it

Linked PRs
  • gh-137743

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the format code tables in the datetime documentation and compare their numbered-note style with the footnotes already used in collections.abc. Convert the relevant notes to Sphinx footnotes where navigation helps, preserving the note content and table meaning; gh-137743 indicates that related work is already underway.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.