Admonitions¶
Admonitions are a great way to include side content, without significantly interrupting the document flow. Sphinx provides several different types of admonitions and allows for the inclusion and nesting of arbitrary content.
Basic Usage¶
.. note:: This is what the most basic admonitions look like in reStructuredText.
.. note::
It is *possible* to have multiple paragraphs in the same admonition.
If you really want, you can even have lists, or code, or tables.
Note
This is what the most basic admonitions look like in reStructuredText.
Note
It is possible to have multiple paragraphs in the same admonition.
If you really want, you can even have lists, or code, or tables.
```{note}
This is what the most basic admonitions look like in Markdown.
```
```{note}
It is *possible* to have multiple paragraphs in the same admonition.
If you really want, you can even have lists, or code, or tables.
```
Note
This is what the most basic admonitions look like in Markdown.
Note
It is possible to have multiple paragraphs in the same admonition.
If you really want, you can even have lists, or code, or tables.
Custom Titles¶
.. admonition:: Look ma! A custom title.
It looks different though.
.. admonition:: Another Custom Title
:class: note
Maaa! I made it look the same by setting the class.
Look ma! A custom title.
It looks different though.
Another Custom Title
Maaa! I made it look the same by setting the class.
```{admonition} Look ma! A custom title.
It looks different though.
```
```{admonition} Another Custom Title
:class: note
Maaa! I made it look the same by setting the class.
```
Look ma! A custom title.
It looks different though.
Another Custom Title
Maaa! I made it look the same by setting the class.
Supported types¶
admonitionThe one with the custom titles.
It’s got a certain charm to it.
attentionAttention
Climate change is real.
cautionCaution
Cliff ahead: Don’t drive off it.
dangerDanger
Mad scientist at work!
errorError
Does not compute.
hintHint
Insulators insulate, until they are subject to ______ voltage.
importantImportant
Tech is not neutral, nor is it apolitical.
noteNote
This is a note.
seealsoSee also
Other relevant information.
tipTip
25% if the service is good.
todoThis needs the
sphinx.ext.todoextension.Todo
Figure out why this extension uses
admonition-todoas the class, instead of usingtodo(like every other admonition style in Sphinx).warningWarning
Reader discretion is strongly advised.
Custom Admonitions¶
Todo
Describe the CSS variables needed.