Как создать коробочный текст без заголовка в Sphinx? - PullRequest
1 голос
/ 26 апреля 2020

В Sphinx есть несколько директив для создания коробочного текста, например .. note:: или .. topic::, но все они содержат заголовок. Можно ли создать коробочный текст без заголовка?

1 Ответ

2 голосов
/ 05 мая 2020

Вы можете использовать Generi c Admonition .

enter image description here

.. 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
...