6

The RST documentation quoted by Sphinx as "The authoritative reStructuredText User Documentation" (see here) shows several styles for the formatting of numbered lists, among them the parenthesized style (see here):

(1) foo
(2) bla

However, Sphinx generates a style with dots from such RST source:

1. foo
2. bla

The Sphinx documentation only shows that dotted style (see here).

My question is: Is there any way to make Sphinx create the parenthesized style for the numbers?

barryhunter
  • 20,886
  • 3
  • 30
  • 43
Andreas Maier
  • 2,724
  • 1
  • 26
  • 30

1 Answers1

6
* 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.

See reStructuredText Primer in Sphinx documentation site.

Anthony Petrillo
  • 365
  • 1
  • 4
  • 13
  • 5
    The question is about how to generate a numbered list where the number of each list item is parenthesized. This answer does not show how to do that. – mzjn May 28 '19 at 10:28
  • 2
    Good point. I should have read more carefully. According to http://docutils.sourceforge.net/FAQ.html#why-do-enumerated-lists-only-use-numbers-no-letters-or-roman-numerals the output style is handled by the style sheet. This would require adding custom style sheets. See https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html. – Anthony Petrillo May 29 '19 at 13:09