2.7. rst的指令和角色(directive and role)¶
directive说明:http://docutils.sourceforge.net/docs/ref/rst/directives.html
role说明:http://docutils.sourceforge.net/docs/ref/rst/roles.html
rst使用directive和role进行特殊操作。
2.7.1. 指令¶
directive的格式为:
.. directive名:: 参数
:参数:
:参数:
2.7.2. 角色¶
role的格式为:
:role名: 内容
2.7.3. 元信息标记¶
.. sectionauthor:: name <email>
标识当前部分的作者。该论点应包括作者的姓名, 以便它可用于演示文稿和电子邮件地址。地址的域名部分应为小写。例:
.. sectionauthor:: Guido van Rossum <guido@python.org>
默认情况下, 此标记不会以任何方式反映在输出中(它有助于跟踪贡献), 但您可以将配置值 show_authors 设置为 True 以使它们生成一个段落输出。
.. codeauthor:: name <email>
codeauthor 指令, 可以多次出现, 命名所描述代码的作者, 就像 sectionauthor 命名一篇文档的作者。 如果 show_authors 配置值为 True , 它也只产生输出。