Python sphinx 在Sphinx中将类添加到表中?
我在rst中有一个表,当使用Sphinx编译为HTML时,我想向其中添加一个类。根据,添加一个Python sphinx 在Sphinx中将类添加到表中?,python-sphinx,restructuredtext,Python Sphinx,Restructuredtext,我在rst中有一个表,当使用Sphinx编译为HTML时,我想向其中添加一个类。根据,添加一个。。类::指令,该指令在表之前应将类添加到表中,但它会添加一个定义列表 表格代码为: .. class:: special == == == a b c 1 2 3 == == == 其结果是: <dl class="class"> <dt id="special"> <em class="property">class </em><co
。。类::
指令,该指令在表之前应将类添加到表中,但它会添加一个定义列表
表格代码为:
.. class:: special
== == ==
a b c
1 2 3
== == ==
其结果是:
<dl class="class">
<dt id="special">
<em class="property">class </em><code class="descname">special</code><a class="headerlink" href="#special" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>a</td>
<td>b</td>
<td>c</td>
</tr>
<tr class="row-even"><td>1</td>
<td>2</td>
<td>3</td>
</tr>
</tbody>
</table>
class特殊
A.
B
C
1.
2.
3.
我做错了什么?我使用的是Sphinx1.3.1Sphinx的默认域是Python,它包含一个
类
指令,该指令与同名的原始Docutils指令相关联
要使其正常工作,请改用rst类
:
.. rst-class:: special
== == ==
a b c
1 2 3
== == ==
请参阅。或者,您可以用
来包装您的表。。表::
指令并使用其:类:
选项:
.. table::
:class: special
== == ==
a b c
1 2 3
== == ==
请参阅相应的docutils
docs