# mermaid

    .mermaid caption:{InlineMarkdownContent? = null} \
                 ref:{String? = null} \
                code:{EvaluableString}
    -> Node

Content copied to clipboard

Creates a Mermaid diagram.

If either caption or ref is set, the diagram will be numbered as a figure.

    .mermaid
        graph TD
            A --> B
            B --> C

Content copied to clipboard

Content can also be loaded from a file via read:

    .mermaid
        .read {path/to/diagram.mmd}

Content copied to clipboard

#### Return

a new Figure node

#### Parameters

caption

- Optional
- Likely named

optional caption

ref

- Optional

optional ID for cross-referencing via reference

code

- Likely a body argument

the Mermaid code of the diagram