Syntax overview
This page lists every piece of syntax Pamphlet understands. The menu on the left maps to it one-to-one: what is in the menu is here, and what is not here is not supported.
A source file is plain .md and still reads fine on GitHub.
Text formatting
Things inside a sentence.
Paragraphs and lists
Things that own a block.
Interactive components
The five things Pamphlet adds on top of standard Markdown, collectively container directives. One rule: :::name[label]{attributes}.
Attribute values: default and open take no value; effect is one of fade-up (default) / fade-in / slide-left / slide-right.
class and id do not error, but are not emitted — the values are dropped silently.
Diagrams
Two ways to write one: Pamphlet's own structured syntax (:::flow and friends — declarations first, relationships second), or a ```mermaid fence. Both are drawn to SVG at compile time and inlined, so the reader downloads no drawing library and makes no network request.
The structured syntax does not render on GitHub; the fence does. Which you want depends on where the source file goes.
Each way has its own pages: the second column below links to the own-syntax page, the third to the Mermaid fence page for the same diagram.
The first thirteen are drawn by Mermaid (installed once); the structured syntax is translated into its source. The last four Mermaid cannot draw — Pamphlet lays those out and emits the SVG itself, with no browser needed at compile time. The other seven engines are each their own package — install the one you need (without it you get DIAG-301 and the build fails). Each has its own page: d2 · Graphviz · MathJax · Vega-Lite · WaveDrom · bytefield-svg · PlantUML; the shared trade-offs live in The other seven engines.
Images have their own page: Images and assets.
Whole-document settings
Not written in the body but between the --- pair at the very top.
Full details in the frontmatter reference.
Not supported
You can also write HTML
HTML in a source file passes through unfiltered — both an escape hatch and the one place that can override the theme system. See Raw HTML.