如何在 ReStructuredText 中创建嵌套列表?

我试图使用以下代码创建一个正确的嵌套列表(以下是 狮身人面像文件文档) :

1. X


a. U
b. V
c. W


2. Y
3. Z

我希望这会导致两个 OL,但是我得到了以下输出:

<ol class="arabic simple">
<li>X</li>
</ol>


<blockquote>
<div>
<ol class="loweralpha simple">
<li>U</li>
<li>V</li>
<li>W</li>
</ol>
</div>
</blockquote>


<ol class="arabic simple" start="2">
<li>Y</li>
<li>Z</li>
</ol>

我做错了什么? 不可能得到以下结果吗?

<ol class="arabic simple">
<li>X
<ol class="loweralpha simple">
<li>U</li>
<li>V</li>
<li>W</li>
</ol>
</li>
<li>Y</li>
<li>Z</li>
</ol>
37735 次浏览

Make sure the nested list is indented to the same level as the text of the parent list (or three characters, whichever is greater), like this:

1. X


a. U
b. V
c. W


2. Y
3. Z

Then you'll get the output you expected.

If you want Sphinx to take care of the numbering for you, do this.

#. X
#. Y


#. u
#. v


#. Z