Use footnotes for numbered notes in tables
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 datetime 文档中的格式代码表开始,将其编号注释样式与 collections.abc 中已经使用的脚注进行比较。在有助于导航的地方,将相关注释转换为 Sphinx 脚注,同时保留注释内容和表格含义;gh-137743 表明相关工作已经在进行中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100