For AI agents: the complete documentation index is available at https://lazygophers.github.io/pamphlet/en/llms.txt, the full documentation bundle is available at https://lazygophers.github.io/pamphlet/en/llms-full.txt, and this page is available as Markdown at https://lazygophers.github.io/pamphlet/en/write/index.md.

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.

WriteLooks likeNotes
Headings# one … ###### sixSix levels; the first # is the document title and skips the ToC
Paragraphs and breaksblank line separatesIn-paragraph break: trailing backslash
Emphasis**bold** *italic* ~~struck~~Asterisks, not underscores, inside non-Latin runs
Inline code`code`Verbatim; nothing inside is syntax
Escaping\* \# |Show a character as itself

Paragraphs and lists

Things that own a block.

WriteLooks likeNotes
Block quotes> quotedEvery line needs >, blank ones included
Lists- item / 1. item / - [x] itemUnordered, ordered, task; nestable
Code blocks```ts around linesHighlighted at compile time
Tables| col | col |Column alignment; no merged cells
Thematic breaks--- alone on a line--- at the very top is config, not a rule

Interactive components

The five things Pamphlet adds on top of standard Markdown, collectively container directives. One rule: :::name[label]{attributes}.

DirectiveWhat it doesLabelAttributes
info tip warn dangerFour kinds of calloutoptionalnone
tabs / tabTabbed panelstab requireddefault
collapseCollapsible blockrequiredopen
stepsNumbered steps—none
revealReveal on scroll—effect

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.

To drawOwn syntaxThe Mermaid fence
Flowcharts:::flowflowchart LR
Sequence:::sequencesequenceDiagram
State:::statestateDiagram-v2
Class:::classclassDiagram
ER:::ererDiagram
Gantt:::ganttgantt
Pie:::piepie
Architecture:::architecturearchitecture-beta
System context:::c4C4Context
Data flow:::dataflowflowchart LR
Mind maps:::mindmapmindmap
Branch graphs:::gitgraphgitGraph
Block:::blockblock-beta
Swimlane:::swimlane— Mermaid cannot
Network topology:::topology— Mermaid cannot
Data charts:::chart— Mermaid cannot
Org charts:::orgchart— Mermaid cannot

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.

FieldWhat it does
titleThe output's browser-tab title
themeWhich built-in theme to use
tocTable of contents: on/off, depth, side or inline
langThe output's language attribute
specMinimum compiler version this document needs

Full details in the frontmatter reference.

Not supported

If you write it
Footnotes [^1]DOC-105, an error. Dropping them silently would make your notes vanish, so it errors instead. Use a parenthetical or a :::info block
Inline maths $x$Not supported; only the block-level ```math fence (install the MathJax engine)
:::calloutDIR-201 warning. callout is the collective name for the four callouts, not a directive
Single-line directives ::name[content]DIR-202. All nine directives are container directives

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.