【问题标题】:How to create numbered lists in (#) style with Sphinx如何使用 Sphinx 创建 (#) 样式的编号列表
【发布时间】:2018-09-04 10:29:02
【问题描述】:

Sphinx 引用的 RST 文档为“权威的 reStructuredText 用户文档”(请参阅​​ here)显示了几种格式化编号列表的样式,其中包括括号样式(请参阅 here):

(1) foo
(2) bla

但是,Sphinx 会从此类 RST 源生成带有点的样式:

1. foo
2. bla

Sphinx 文档仅显示了这种虚线样式(请参阅 here)。

我的问题是:有什么方法可以让 Sphinx 为数字创建带括号的样式?

【问题讨论】:

  • 您的第一个示例应该按原样工作。你能澄清一下你实际看到的吗?
  • @StevePiercy 我看到的正是上面第二个示例部分中显示的内容,即点样式。因此我的问题。
  • 是的,使用自定义 CSS。 stackoverflow.com/a/1636635/2214933 和一个例子 jsfiddle jsfiddle.net/Lasomd8t

标签: python-sphinx restructuredtext


【解决方案1】:
* This is a bulleted list.
* It has two items, the second
  item uses two lines.

1. This is a numbered list.
2. It has two items too.

#. This is a numbered list.
#. It has two items too.

请参阅 Sphinx 文档站点中的 reStructuredText Primer

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-10-23
  • 2013-09-27
  • 2015-05-18
  • 1970-01-01
相关资源
最近更新 更多