Skip to content

Admonition Syntax

Admonition Syntax (also referred to as callouts) provides a method to format distinct blocks of content within notes, allowing for the creation of styled boxes such as notes, warnings, and summaries.^[200-學習OB__plugin__admonition.md]

Syntax

The syntax to create an admonition (or callout) follows a specific blockquote pattern^[200-學習OB__plugin__admonition.md].

  1. Start with a standard blockquote marker (>).
  2. Immediately follow with [! followed by the type identifier (e.g., note, info, warning) and a closing ].
  3. Optionally, add a title after the type (e.g., [!note] Custom Title).
  4. The content of the callout is placed on the lines following the header.^[200-學習OB__plugin__admonition.md]

Supported Types

There is a wide variety of identifiers available to categorize the content^[200-學習OB__plugin__admonition.md]:

  • General: note, abstract, summary, tldr, info, todo
  • Positive/Success: tip, hint, important, success, check, done
  • Interrogative: question, help, faq
  • Warning/Critical: warning, caution, attention, failure, fail, missing, danger, error
  • Specific: bug, example, quote, cite

Nesting and Folding

Admonitions can be nested within one another, and their default display state (expanded or collapsed) can be controlled using syntax modifiers^[200-學習OB__plugin__admonition.md].

Folding Control

  • Expanded: Use > (default) or >+[!type]. The content remains visible^[200-學習OB__plugin__admonition.md].
  • Collapsed: Use >-[!type]. This creates a collapsible box that is closed by default^[200-學習OB__plugin__admonition.md].

Nesting

To nest an admonition, simply indent the new callout block within the content area of the parent admonition^[200-學習OB__plugin__admonition.md].

Sources

^[200-學習OB__plugin__admonition.md]