如何在 Sphinx 中创建没有标题的框文本?

klu*_*udg 2 restructuredtext python-sphinx

Sphinx 中有多个指令可用于创建盒装文本,例如 ex.. note::.. topic::,但它们都包含标题。是否可以创建没有标题的盒装文本?

bad*_*der 5

您可以使用通用警告

在此处输入图片说明

.. 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
Run Code Online (Sandbox Code Playgroud)