Schematex

Mind map

About mind maps

A mind map is a radial diagram that organizes ideas around a central topic, branching outward into subtopics and details. Tony Buzan popularized the format in the 1970s as a note-taking and brainstorming tool; the method has since been adopted widely in education, project planning, meeting facilitation, and knowledge management. The key insight is that non-linear branching mirrors how associative thinking works — faster than outlining, more structured than free-writing.

Schematex mind maps use a Markdown-heading + bullet-list DSL inspired by markmap — a format most people already know. Two layout styles are available: the classic radial map (branches in all directions) and a logic-right horizontal tree. This page documents what the parser accepts today.

mindmap·§
↘ preview
100%
Product Launch Plan map mindmap with 27 nodes Direct competitors Pricing benchmarks Competitive analysis SMB customers Enterprise pilot Target segments Market readiness Core API complete Edge cases resolved Feature freeze Load testing CDN configuration Cache rules Geo routing Infrastructure Engineering Landing page live Email campaign Press outreach TechCrunch pitch Newsletter sponsors Go-to-market Week 1 signups Activation rate NPS at day 30 Success metrics Product Launch Plan
UTF-8 · LF · 33 lines · 515 chars✓ parsed·6.5 ms·14.8 KB SVG

1. Your first mind map

The smallest useful mind map: a central topic with two branches, one with a sub-item.

mindmap·§
↘ preview
100%
Team retrospective map mindmap with 7 nodes Clear sprint goals Good test coverage What went well Slower PR reviews Add a review SLA What to improve Team retrospective
UTF-8 · LF · 11 lines · 149 chars✓ parsed·0.6 ms·3.9 KB SVG

Four rules cover 80% of usage:

  1. Start with an optional mindmap keyword on its own line, then a blank line.
  2. The root is the single # heading — exactly one is allowed.
  3. Use ##, ###, and deeper headings to set branch depth. Heading level equals tree depth.
  4. Use -, *, or + bullets to add sub-items under any heading. Each 2-space indent adds one more depth level.

Comments are not supported. Use %% directives (before the # root) for configuration only.


2. Headings and depth

Heading level maps directly to tree depth. # is always the root (depth 0). ## is depth 1. ### is depth 2, and so on up to ###### (depth 5).

mindmap

# Root
## Branch A         ← depth 1
### Sub-branch      ← depth 2
#### Leaf           ← depth 3
## Branch B

Headings can jump levels — #### after ## is valid and produces a node at depth 3. The tree depth is relative to the root, not to the previous heading.


3. Bullets

Bullets extend a heading branch with further detail. Any of -, *, or + is accepted as the bullet marker. Each 2 spaces of indentation adds one level of depth relative to the enclosing heading.

## Risks
- Technical complexity         ← depth 2 (one level under ## Risks)
  - Legacy integrations        ← depth 3 (2 spaces indent)
    - Auth service             ← depth 4 (4 spaces indent)
- Team availability            ← depth 2 again
mindmap·§
↘ preview
100%
Book outline map mindmap with 14 nodes Why this matters Historical context Current state What you will learn Chapter 1 — Introduction Concept A Definition Examples Concept B Definition Step-by-step walkthrough Worked example Chapter 2 — Core concepts Book outline
UTF-8 · LF · 18 lines · 267 chars✓ parsed·1.1 ms·7.6 KB SVG

4. Inline formatting

Node labels support a subset of Markdown inline formatting. The parser tokenizes labels at parse time; the renderer uses the tokens to emit styled text.

SyntaxEffectExample
**text**Bold**Critical path**
*text*Italic*optional*
`code`Monospace code`npm install`
[text](url)Link[RFC 7519](https://tools.ietf.org/html/rfc7519)
[ ] itemUnchecked task[ ] Write tests
[x] itemChecked task[x] Design review

The checkbox must be at the very start of the label (before any other text). Inline formatting can be nested: **[bold link](url)**.

mindmap·§
↘ preview
100%
Sprint 24 review map mindmap with 12 nodes Auth redesign JWT + refresh tokens API rate limiting per-user Error budget dashboard Completed Mobile push notifications iOS APNs integration Android FCM setup In progress Payment webhook waiting on Stripe team Escalated to account manager Blocked Sprint 24 review
UTF-8 · LF · 17 lines · 380 chars✓ parsed·1.9 ms·9.7 KB SVG

5. Layout styles

The %% style: directive selects the layout algorithm. Place it before the # root heading.

StyleLayoutBest for
map (default)Radial — branches spread in all directions from the centerBrainstorming, concept maps, free-form exploration
logic-rightHorizontal tree — all branches extend to the rightStructured outlines, hierarchies, sequential breakdowns
%% style: map
%% style: logic-right

map (default) — radial layout, branches spread in all directions from the center. Best for brainstorming and concept maps.

mindmap·§
↘ preview
100%
Machine learning map mindmap with 19 nodes Decision tree SVM Neural net Classification Linear Gradient boosting Regression Supervised K-means DBSCAN Clustering PCA t-SNE Reduction Unsupervised Q-learning Policy gradient Reinforcement Machine learning
UTF-8 · LF · 24 lines · 268 chars✓ parsed·1.0 ms·10.3 KB SVG

logic-right — horizontal tree, all branches extend to the right. Best for structured outlines and sequential hierarchies.

mindmap·§
↘ preview
100%
Machine learning logic-right mindmap with 19 nodes Decision tree SVM Neural net Classification Linear Gradient boosting Regression Supervised K-means DBSCAN Clustering PCA t-SNE Reduction Unsupervised Q-learning Policy gradient Reinforcement Machine learning
UTF-8 · LF · 25 lines · 290 chars✓ parsed·3.5 ms·10.2 KB SVG

6. Directives

Directives are %% lines placed before the # root heading. They configure the diagram globally.

DirectiveValuesDefaultEffect
%% style: …map, logic-rightmapLayout algorithm
%% theme: …any string(none)Theme override passed to renderer
%% maxLabelWidth: …integer 80–1000240Max pixel width before label wraps
mindmap
%% style: logic-right
%% maxLabelWidth: 320

# Wide label root
mindmap·§
↘ preview
100%
Schematex features logic-right mindmap with 13 nodes One keyword per diagram AI-friendly syntax CJK support DSL-first design Hand-written parser No D3, no dagre ~KB-level bundle Zero dependencies IEEE for logic gates IEC for circuits McGoldrick for genograms Standards-compliant Schematex features
UTF-8 · LF · 20 lines · 329 chars✓ parsed·0.6 ms·7.3 KB SVG

7. Labels & comments

  • Root title: the text after # on the root heading line.
  • Branch labels: the text after ##, ###, etc.
  • Bullet labels: the text after the - / * / + marker.
  • Inline formatting: **bold**, *italic*, `code`, [text](url), [ ] / [x].
  • Comments: not supported in the body. Use %% directives before the # root for configuration; %% lines in the body are treated as directives (silently ignored if unrecognized).

8. Reserved words & escaping

Reserved at document start: mindmap (optional keyword) and %% (directive prefix).

Reserved as root: exactly one # heading; a second # heading throws a parse error.

Bullet markers: -, *, + followed by a space. A * that is not followed by a space is treated as an italic marker if it appears inside label text.

Inline conflicts: a label beginning with [ ] or [x] is parsed as a checkbox, not a Markdown link. If you need a label that literally starts with [, write \[ — the backslash escapes the bracket.


9. Common mistakes

You wroteParser saysFix
Two # headingsError: multiple # center nodes not allowedUse exactly one # heading as the root
##Branch (no space after ##)Line is not recognized as a heading; silently skippedAlways put a space: ## Branch
Bullet indented 3 spacesDepth = lastHeadingDepth + 1 + floor(3/2) = lastHeadingDepth + 2 — may create an unexpected levelUse multiples of 2 spaces: 0, 2, 4, 6…
%% style: radialUnknown value silently ignored; layout stays mapUse map or logic-right
mindmap keyword mid-documentTreated as a plain text line (the keyword is only recognized on the very first line)Place mindmap on line 1, before any content
[ ]text (no space after bracket)Checkbox not recognized; rendered as literal [ ]text[ ] text — space required after the closing bracket

10. Grammar (EBNF)

document       = ("mindmap" NEWLINE)? (blank | directive)* node*

directive      = "%%" WS key ":" WS value NEWLINE
key            = "style" | "theme" | "maxlabelwidth"

node           = heading | bullet
heading        = INDENT? "#"+ SPACE label NEWLINE
bullet         = SPACE* bullet-marker SPACE label NEWLINE
bullet-marker  = "-" | "*" | "+"

label          = inline-token*
inline-token   = checkbox
               | "**" inline-token* "**"
               | "*" inline-token* "*"
               | "`" code-text "`"
               | "[" inline-token* "]" "(" url ")"
               | plain-text

checkbox       = "[ ]" SPACE | "[x]" SPACE | "[X]" SPACE

INDENT         = WS*    %% headings may have leading whitespace (ignored)
SPACE          = " " | "\t"

Depth rules:

  • Heading # → depth 0 (root)
  • Heading ## → depth 1, ### → depth 2, etc.
  • Bullet at n leading spaces → depth = lastHeadingDepth + 1 + floor(n / 2)

Authoritative source: src/diagrams/mindmap/parser.ts. If this diverges from the parser, the parser wins — please open an issue.


11. Roadmap

Planned — not yet parseable. Do not use these in generated DSL today; the parser will reject or ignore them.

  • %%{init: {…}}%% block — Mermaid-style init block for theme/config; currently only %% line directives are supported.
  • Auto-numbered branches%% numbering: true to prefix each branch with 1., 1.1., etc.
  • Callout / note nodes — a special marker to attach a floating annotation box to any node.
  • Image nodes![alt](url) as an entire node label rendered as an inline image.
  • Collapsed branches%% collapsed: branchId to render a subtree as a single folded indicator.

Track in the GitHub issues if you need any of these sooner.