Contents

Mog Syntax Reference

1 Document Structure

1.1 Paragraphs

A paragraph with soft
wrapped lines.

A blank line starts a new paragraph.

2 Structural Markers

MarkerSemantic Meaning
#Section heading
-Unordered list item
.Ordered list item
>Blockquote
=Free

2.1 Headings

# Level 1
## Level 2
### Level 3

2.2 Lists

- top level        . first
-- deeper          .. deeper first
--- deepest        ... deepest

2.3 Blockquotes

> A quoted line

3 Semantic Delimiters

DelimiterSemantic Meaning
**Bold
__Italic
``Literal text
~~Struck-through text
::Free
#|Table header
-|Table row
||Table cell
[[ ]]Hyperlink target
<< >>Slot link target
(( ))Alternate form
{{ }}Additional note
The quick brown fox jumped over the **lazy dog.**

A paragraph __with
soft wrapping__ in
it.

3.1 Verbatim

Some code with \``python: print("Hello, world!")\``

``python:
def greet(name):
    print(f"Hello, {name}!")
``

3.2 Tables

#| Name       || Type      || Color    ||
-| Apple      || Fruit     || Red      ||
-| **Carrot** || Vegetable || Orange   || Crunchy ||
#| Berries    ||
-| Blueberry  || Fruit     || Blue     ||
[[https://kdl.dev]]      Hyperlink
<<embedded-img.png>>     Slot link

[[#: 3.3 Links]]         Heading namespace
<<$:note.mg>>            Project root namespace

3.4 Annotations

[[https://kdl.dev]]((KDL doc site)){{ a cuddly document language }}

::tomato::((San Marzano tomato))

A note anchored inline{{ indexed by document order }}.

A named anchor ((San Marzano tomato)) for a later note.

{{ A fruit not a vegetable }}((San Marzano tomato))

4 Boundaries

4.1 Blocks

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

4.2 Free

= A free line

=
 A free block
=

The sauce needs ::San Marzano::((a plum tomato)).

4.3 Escapes

\**this is not bold\**
\\**this is bold**
\### this is not a heading

5 Attributes

5.1 Inline

-info: Item with "info" attribute
-size=medium: T-Shirt
-info:green: Attribute chain
-(season)fall,winter:size=medium,small: Knit Beanie

5.2 Verbatim

``attr:
title "My Document"
authors "John Doe"
``

-
 ``attr:
 size large
 ``
 Vintage T-Shirt
-