ReStructiredText域¶
Added in version 1.0.
reStructuredText 域(名称 rst )提供以下指令:
- .. rst:directive:: name¶
描述REST指令。这个 name 可以是单个指令名或实际指令语法(..`前缀和 `:: 后缀)参数将以不同的方式呈现。例如::
.. rst:directive:: foo Foo description. .. rst:directive:: .. bar:: baz Bar description.
将呈现为:
- .. foo::¶
FOO描述。
- .. bar:: baz¶
条形图描述。
- .. rst:directive:option:: name¶
描述REST指令的选项。这个 name 可以是单个选项名或带有用冒号分隔的参数的选项名 (
:
)例如::.. 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.
提供这些角色是为了引用所描述的对象: