Syntax ReferenceD. Bott
Adrift Labs
April 2026
Mog Syntax Reference

1. Document Structure

1.1. Metadata

--
title "My Document"
authors "John" "Jane"
date "2026-04-15"
version 1
--

2. Structural Markers

2.1. Headings

# Level 1
## Level 2
### Level 3
 ## Level 2 with leading whitespace
  # Level 1 with leading whitespace

2.2. Lists

- top level        . first
-- nested          .. nested first
--- deeper         ... deeper

2.3. Tasks

- [~] Grocery shopping
-- [x] Eggs
-- [~] Milk
-- [?] Oat or almond?
- [ ] Clean kitchen
- [!] Call dentist
- [-] Return sweater

2.4. Blocks

- Reading notes
--
Chapter 3 was particularly relevant:
 >
  ...quote from chapter 3...
 >
--

3. Semantic Delimiters

DelimiterMeaning
**Bold
__Italic
``Verbatim
~~Strikethrough
$$Math
#|Table header
-|Table row
||Table cell
[[ ]]Link target
(( ))Link name
{{ }}Footnote content
The quick brown fox jumped over the **lazy dog.**

**
The quick brown fox jumped over the lazy dog.
**

A paragraph **with
soft wrapping** in
it.

3.1. Math

Einstein's famous equation $$E = m c^2$$ changed physics.

$$
E^2 = (m c^2)^2 + (p c)^2
$$

3.2. Tables

#| Name       || Type      || Color    ||
-| Apple      || Fruit     || Red      ||
-| **Carrot** || Vegetable || Orange   ||
-| Blueberry  || Fruit     || Blue     ||

3.3. Links

- [[https://kdl.dev]]
- [[https://kdl.dev]]((KDL))
- [[https://kdl.dev]]((KDL)){{ A node-based document language }}
[[recipe]]               Document reference
[[#:Ingredients]]        Heading in current document
[[https://kdl.dev]]      External via protocol attribute

Footnotes

A good marinara starts with San Marzano
[[tomato]]((tomatoes)) and a generous amount
of olive oil.

[[tomato]]{{ A fruit not a vegetable }}
A good marinara starts with San Marzano
tomato{{ A fruit not a vegetable }} and a generous amount
of olive oil.

4. Attributes

4.1. Basic

##heading1:My Heading

##heading2: My Heading

-list-attribute: list item with **red: BOLD** content

4.2. Chains

##attribute1:attribute2: My Heading

##upcase:red: My Heading

4.3. Janet Forms

-{:key "value"}: Table attribute
-["item 1" "item 2"]: List attribute

5. Escape Sequences

\**this is not bold\**