3

I have created a custom directive 'limitation' in Sphinx which mentions "Limitation" of a certain product. I want that the limitation be written within a colored box that is similar to 'note' or 'warning' directives with 'limitation' written as the title instead of 'note' or 'warning'. I want this to be handled by my custom directive 'limitation' itself.

Is there any way to do this?

barryhunter
  • 20,886
  • 3
  • 30
  • 43
  • Possible duplicate of [How to change format of Warning admonition or add Caution in Sphinx HTML output](https://stackoverflow.com/questions/34498027/how-to-change-format-of-warning-admonition-or-add-caution-in-sphinx-html-output) – Steve Piercy Feb 12 '19 at 18:44

1 Answers1

3

You can use admonition directly from Docutils:

 .. admonition:: Limitation

    Description of the limitations ...

Check http://docutils.sourceforge.net/docs/ref/rst/directives.html for more information.

Yao Yue
  • 31
  • 2