The reStructuredText Domain

Added in version 1.0.

reStructuredText域(名称 rst)提供以下指令:

.. rst:directive:: name

描述reST指令。 名称 可以是单个指令名称或实际指令语法(..`前缀和::` 后缀),其参数将以不同方式呈现。例如:

.. rst:directive:: foo

   Foo description.

.. rst:directive:: .. bar:: baz

   Bar description.

将呈现为:

.. foo::

Foo描述。

.. bar:: baz

Bar 描述。

.. rst:directive:option:: name

描述用于reST指令的选项。 名称 可以是单个单个选项名,也可以是带有冒号(“:”)分隔的参数的选项名。例如:

.. rst:directive:: toctree

   .. rst:directive:option:: caption: caption of ToC

   .. rst:directive:option:: glob

将呈现为:

.. toctree::
:caption: caption of ToC
:glob:

选项

:type: description of argument (text)

描述选项价值的类型。

例如:

.. rst:directive:: toctree

   .. rst:directive:option:: maxdepth
      :type: integer or no value

Added in version 2.1.

.. rst:role:: name

描述reST角色。例如:

.. rst:role:: foo

   Foo description.

将呈现为:

:foo:

Foo描述。

提供这些角色是为了引用所描述的对象:

:rst:dir:
:rst:role: