在 Sphinx 中有几个指令可以创建一个带框的文本,例如 .. note::
或 .. topic::
,但它们都包含一个标题。是否可以创建没有标题的盒装文本?
最佳答案
您可以使用 Generic Admonition .
.. admonition:: \ \
You can use a `Generic Admonition`_
.. hint::
| Generic Admonition still requires a title, but an escaped whitespace can be used!
|
| This can be convenient, because the box uses a style consistent with other admonitions.
|
| And might spare you from having to fiddle with CSS while Rome burns :)
.. _Generic Admonition: https://docutils.sourceforge.io/docs/ref/rst/directives.html#generic-admonition
关于python-sphinx - 如何在 Sphinx 中创建没有标题的盒装文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61435028/