python / python/cpython

Use footnotes for numbered notes in tables

Aperta
#137,742 4 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

docs type-feature
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalle tabelle dei codici di formato nella documentazione di datetime e confronta il loro stile di note numerate con le note a piè di pagina già utilizzate in collections.abc. Converti le note pertinenti in note a piè di pagina Sphinx quando questo facilita la navigazione, preservando il contenuto delle note e il significato delle tabelle; gh-137743 indica che il lavoro correlato è già in corso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.