How to add custom title to admonitions #834
-
Is there a way to add a custom title to admonitions? For instance:
Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Not an expert but I think: If you do this with the generic But for the
That's because |
Beta Was this translation helpful? Give feedback.
Not an expert but I think:
If you do this with the generic
admonition
directive then the text right after the directive will become the title. This is the way to add a custom title.https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html?highlight=admonition#admonitions
https://docutils.sourceforge.io/docs/ref/doctree.html#admonition
But for the
note
directive there's no arguments -- see how it's an example for how you can cram directives onto one line here.https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#how-directives-parse-content
That's because
note
is a more sp…