Inline Syntax¶
Inline syntax lets you add relations directly in your note content using the :: operator. Relations appear right where they're meaningful, making your notes more readable.
Basic Syntax¶
Prefix Syntax¶
Place the relation name before the link:
This creates a relation from the current file to Parent Note.
Suffix Syntax¶
Place the relation name after the link:
This creates a relation from Child Note to the current file.
Direction Matters
Prefix and suffix create edges in opposite directions:
next::[[B]]→ currentFile -next-> B[[A]]::next→ A -next-> currentFile
Spacing
Spaces around :: are optional: up::[[Note]], up:: [[Note]], up :: [[Note]]
External Edge Syntax¶
Declare relations between other notes from within a MoC or index note:
Triple Syntax¶
Creates an edge from Source to Target, not involving the current file.
Fan-out (Multiple Targets)¶
Add multiple targets from the same source:
Creates: Parent → Child A, Parent → Child B, Parent → Child C
Chain Syntax¶
Use ::-:: to chain from the previous target:
Creates: A → B, B → C, C → D
Mixed Fan-out and Chain¶
Combine both patterns:
Creates: A → B, A → C, C → D
Context and Continuation¶
Patterns with a relation set context that persists across the file. Use ::[[Target]] or ::-::[[Target]] to continue from context.
Fan-out Continuation¶
All phases are children of Project.
Chain Continuation¶
Creates: Ch1 → Ch2 → Ch3 → Ch4
Context Rules¶
- Any pattern with a relation keyword sets new context
::[[X]]uses context source → X (fan-out)::-::[[X]]uses context lastTarget → X (chain)- Context persists until a new relation keyword appears
[[A]]::next # Context: source=A, relation=next
::[[B]] # A → B
::[[C]] # A → C
[[X]]::prev # New context: source=X, relation=prev
::[[Y]] # X → Y
When to Use Each¶
| Syntax | Use Case | Example |
|---|---|---|
Prefix rel::[[A]] |
Declare from current file | up::[[Parent]] |
Suffix [[A]]::rel |
Declare to current file | [[Child]]::down |
Triple [[A]]::rel::[[B]] |
External edge in MoC | [[Ch1]]::next::[[Ch2]] |
Fan-out ::[[B]]::[[C]] |
Multiple targets | [[Parent]]::down::[[A]]::[[B]] |
Chain ::-::[[C]] |
Sequential relations | [[A]]::next::[[B]]::-::[[C]] |
Relation Name Rules¶
Inline relations follow the same naming rules as all relations:
| Allowed | Not Allowed |
|---|---|
up, down, next, prev |
Names with spaces |
parent-note, child_note |
Special characters (except - and _) |
step1, part2 |
Names starting with - or _ alone |
Names are automatically normalized to lowercase:
Limitations¶
Link Aliases¶
The link target is extracted without aliases:
Creates a relation to Note Name, not Display Text.
Wiki Links Only¶
Inline syntax requires wiki-style links:
For plain text targets, use frontmatter syntax instead.
Combining with Frontmatter¶
Inline and frontmatter relations work together:
Both relations are recognized. Trail combines them when building the graph.
Complete Example¶
A Map of Contents note using all syntax features: