Skip to main content

Syntax Reference

Published October 30, 2025
Reading time 8 minutes
Word count 1521 words

Quick copy-paste reference for all Ametrine syntax features. Each example shows both the markdown source and the rendered result.

[[Quick Start]]

Result: Quick Start

[[Configuration Guide|customize your site]]

Result: customize your site

[[Deployment Guide#Netlify]]

Result: Deployment Guide

Section with Alias

[[Configuration Guide#Theme Customization|theme colors]]

Result: theme colors

Highlights

Text Highlighting

This is ==highlighted text== in your note.

Result: This is highlighted text in your note.

Multiple Highlights

==First highlight== and ==second highlight== in one sentence.

Result: First highlight and second highlight in one sentence.

Marginalia

Basic Margin Note

This is regular text{{This appears in the margin}}.

Result: This is regular text1This appears in the margin.

Multiple Margin Notes

First point{{First note}} and second point{{Second note}}.

Result: First point2First note and second point3Second note.

Margin Note with Markdown

Regular text{{**Bold**, _italic_, and `code` in margins}}.

Result: Regular text4Bold, italic, and code in margins.

See Marginalia Demo for comprehensive examples.

Callouts

Note Callout

> [!note] Title
> This is a note callout.

Result:

Title

This is a note callout.

Tip Callout

> [!tip] Pro Tip
> Use callouts to highlight important information.

Result:

Pro Tip

Use callouts to highlight important information.

Warning Callout

> [!warning] Watch Out
> This is important to note.

Result:

Watch Out

This is important to note.

Error Callout

> [!error] Error
> Something went wrong.

Result:

Error

Something went wrong.

Example Callout

> [!example] Example
> Here's how to do it.

Result:

Example

Here’s how to do it.

Question Callout

> [!question] Did You Know?
> Callouts support markdown.

Result:

Did You Know?

Callouts support markdown.

Success Callout

> [!success] Complete
> Task finished successfully.

Result:

Complete

Task finished successfully.

Callout without Title

> [!note]
> You can omit the title.

Result:

Note

You can omit the title.

Multi-paragraph Callout

> [!tip] Multiple Paragraphs
> First paragraph here.
>
> Second paragraph here.
>
> - List item 1
> - List item 2

Result:

Multiple Paragraphs

First paragraph here.

Second paragraph here.

  • List item 1
  • List item 2

See Obsidian Features Demo for more examples.

Mermaid Diagrams

Flowchart

```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[End]
B -->|No| D[Loop]
D --> B
```

Result:

graph TD
A[Start] --> B{Decision}
B -->|Yes| C[End]
B -->|No| D[Loop]
D --> B

Sequence Diagram

```mermaid
sequenceDiagram
participant User
participant System
User->>System: Request
System->>User: Response
```

Result:

sequenceDiagram
participant User
participant System
User->>System: Request
System->>User: Response

Class Diagram

```mermaid
classDiagram
class Note {
+String title
+String[] tags
+render()
}
```

Result:

classDiagram
class Note {
+String title
+String[] tags
+render()
}

See Obsidian Features Demo for more diagram types.

Math (LaTeX)

Inline Math

The equation $E = mc^2$ is famous.

Result: The equation is famous.

Block Math

$$
\int_0^\infty e^{-x^2} dx = \frac{\sqrt{\pi}}{2}
$$

Result:

Common Math Symbols

- Greek: $\alpha, \beta, \gamma, \delta$
- Operators: $\sum, \int, \prod, \lim$
- Relations: $\leq, \geq, \neq, \approx$
- Sets: $\in, \subset, \cup, \cap$

Result:

  • Greek:
  • Operators:
  • Relations:
  • Sets:

Citations

Basic Citation

This is cited[@key2023].

Result: This is cited[@key2023].

Multiple Citations

Multiple sources[@key1; @key2; @key3].

Result: Multiple sources[@key1; @key2; @key3].

Citation with Page

Quote from source[@key2023, p. 42].

Result: Quote from source[@key2023, p. 42].

Bibliography Required

Citations require a bibliography.bib file. See Configuration Guide.

Code Blocks

Inline Code

Use `const x = 42` for constants.

Result: Use const x = 42 for constants.

JavaScript

```javascript
function greet(name) {
console.log(`Hello, ${name}!`);
}
```

Result:

function greet(name) {
console.log(`Hello, ${name}!`);
}

TypeScript

```typescript
interface User {
id: number;
name: string;
}
```

Result:

interface User {
id: number;
name: string;
}

Python

```python
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
```

Result:

def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)

Bash

```bash
bun run dev
bun run build
```

Result:

Terminal window
bun run dev
bun run build

JSON

```json
{
"name": "ametrine",
"version": "1.0.0"
}
```

Result:

{
"name": "ametrine",
"version": "1.0.0"
}

Standard Markdown

Headings

# Heading 1
## Heading 2
### Heading 3
#### Heading 4

Text Formatting

**Bold text**
*Italic text*
***Bold and italic***
~~Strikethrough~~

Result: Bold text, Italic text, Bold and italic, Strikethrough

Lists

Unordered Lists

- Item 1
- Item 2
- Nested item
- Another nested
- Item 3

Result:

  • Item 1
  • Item 2
    • Nested item
    • Another nested
  • Item 3

Ordered Lists

1. First item
2. Second item
3. Third item
1. Nested numbered
2. Another nested

Result:

  1. First item
  2. Second item
  3. Third item
    1. Nested numbered
    2. Another nested

Task Lists

- [x] Completed task
- [ ] Incomplete task
- [ ] Another task

Result:

  • Completed task
  • Incomplete task
  • Another task
[Google](https://google.com)

Result: Google

https://google.com

Result: https://google.com

Images

![Alt text](/ametrine/ametrine.png)

Result:

Example image

Blockquotes

> This is a quote.
> It can span multiple lines.

Result:

This is a quote. It can span multiple lines.

Horizontal Rule

---

Result:


Tables

| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1 | Data | More |
| Row 2 | Data | More |

Result:

Column 1Column 2Column 3
Row 1DataMore
Row 2DataMore

Footnotes

Here's a sentence with a footnote[^1].
[^1]: This is the footnote content.

Result: Here’s a sentence with a footnote1.

Combining Features

You can combine multiple features:

This ==highlighted text== has a margin note{{Important!}} and links to [[Quick Start]].
> [!tip] Combined Features
> You can use **bold**, *italic*, `code`, ==highlights==, and {{marginalia}}
> all together in callouts!

Result: This highlighted text has a margin note5Important! and links to Quick Start.

Combined Features

You can use bold, italic, code, highlights, and 6marginalia all together in callouts!

Frontmatter

Every note should start with frontmatter:

---
title: My Note
description: What this note is about
tags: [topic1, topic2]
date: 2025-10-30
author: Your Name
---

See Frontmatter Reference for all available fields.

Keyboard Shortcuts

  • Cmd/Ctrl+K - Open search

Graph

  • Cmd/Ctrl+G - Toggle global graph
  • ↑↓←→ - Pan graph
  • +/- - Zoom
  • Tab - Next element
  • Shift+Tab - Previous element
  • Esc - Close modals

Tips and Tricks

Escaping Characters

To show literal syntax without rendering:

Inline Code

Use `[[wikilink]]` to create links.

Result: Use [[wikilink]] to create links.

Code Blocks

Use 4 backticks to show 3-backtick code blocks:

````markdown
```javascript
code here
```
````

Line Breaks

Two spaces at end of line for soft break:

Line 1
Line 2

Empty line for paragraph break:

Paragraph 1
Paragraph 2

Special Characters

Escape with backslash:

\* Not italic \*
\[ Not a link \]

Configuration

Enable/disable features in src/config.ts:

{
marginalia: { enable: true },
gfm: { enableSmartyPants: true },
citations: { enable: true },
// ... more options
}

See Configuration Guide for details.

Resources

Learn More

References

Quick Template

Copy this template for new notes:

---
title:
description:
tags: []
date: 2025-10-30
---
#
## Overview
Content here...
## Key Points
- Point 1
- Point 2
## Related
- [[Related Note 1]]
- [[Related Note 2]]

Happy writing!

Footnotes

  1. This is the footnote content.

Notes

  1. 1. This appears in the margin
  2. 2. First note
  3. 3. Second note
  4. 4. Bold, italic, and code in margins
  5. 5. Important!
  6. 6. marginalia