【发布时间】:2019-07-06 08:54:31
【问题描述】:
我在 Sphinx 中创建了一个自定义指令“限制”,其中提到了某个产品的“限制”。我希望将限制写在一个类似于“note”或“warning”指令的彩色框中,其中“limitation”作为标题而不是“note”或“warning”。我希望这由我的自定义指令“限制”本身来处理。
有什么办法吗?
【问题讨论】:
标签: python-sphinx custom-directive
我在 Sphinx 中创建了一个自定义指令“限制”,其中提到了某个产品的“限制”。我希望将限制写在一个类似于“note”或“warning”指令的彩色框中,其中“limitation”作为标题而不是“note”或“warning”。我希望这由我的自定义指令“限制”本身来处理。
有什么办法吗?
【问题讨论】:
标签: python-sphinx custom-directive
您可以直接从 Docutils 使用 admonition:
.. admonition:: Limitation
Description of the limitations ...
查看http://docutils.sourceforge.net/docs/ref/rst/directives.html了解更多信息。
【讨论】: