Guide

Syntax

The Markdown syntax Marxdown can show. The source is on the left and the result on the right.

Basics

Marxdown follows CommonMark. Write as you would on GitHub, and it looks the same.

Headings

The number of # at the start of a line sets the level. Headings also appear in the Outline.

Source
# Heading 1## Heading 2### Heading 3
Result

Heading 1

Heading 2

Heading 3

Paragraphs and line breaks

Separate paragraphs with a blank line. By default, line breaks inside a paragraph are joined. End a line with two spaces or \ to break it. Turn on “Keep Line Breaks in Paragraphs” in Settings to keep every line break.

Source
This is the first paragraph.This line joins the previous one.This is the second paragraph.\This starts a new line.
Result

This is the first paragraph. This line joins the previous one.

This is the second paragraph.
This starts a new line.

Emphasis

In the editor, toggle them with Ctrl+B (bold), Ctrl+I (italic), and Ctrl+Shift+X (strikethrough).

Source
**Bold**, *italic*, ~~strikethrough~~, `inline code`
Result

Bold, italic, strikethrough, inline code

Lists

Start a line with - or a number. Indent to nest. In the editor, Tab and Shift+Tab indent and outdent.

Source
- Apples- Oranges  - Mandarin  - Navel1. Read2. Write3. Save
Result
  • Apples
  • Oranges
    • Mandarin
    • Navel
  1. Read
  2. Write
  3. Save

Blockquotes

Start a line with >. In the editor, toggle it with Ctrl+Shift+.

Source
> Readability you can adjust.>> > Quotes can be nested.
Result

Readability you can adjust.

Quotes can be nested.

Code blocks

Fence code with ``` and add a language name for syntax highlighting. Supported: Bash, C, C++, C#, CSS, Diff, Go, INI / TOML, Java, JavaScript, JSON, Markdown, Python, Rust, SQL, TypeScript, HTML / XML, and YAML.

Source
```rustfn main() {    let name = "Marxdown";    println!("Hello, {name}!");}```
Result
fn main() {
    let name = "Marxdown";
    println!("Hello, {name}!");
}

Horizontal rules

A line with only --- becomes a horizontal rule.

Source
One topic---Another topic
Result

One topic


Another topic

HTML

You can write HTML. Scripts and event attributes like onclick are removed and never run.

Source
<details><summary>Click to open</summary>This was folded.</details>Save with <kbd>Ctrl</kbd>+<kbd>S</kbd>
Result
Click to open

This was folded.

Save with Ctrl+S

GitHub extensions

GitHub Flavored Markdown extensions and GitHub alerts are supported.

Tables

The position of : in the second row sets the alignment. In the editor, Tab moves to the next cell and Shift+Alt+F aligns the columns. Choose how borders are drawn with “Table Borders” in Settings.

Source
| Strategy | p95 | Cost || :--- | ---: | :---: || No cache | 240ms | Low || TTL | 22ms | Low || Stale-While-Revalidate | 18ms | Medium |
Result
Strategy p95 Cost
No cache 240ms Low
TTL 22ms Low
Stale-While-Revalidate 18ms Medium

Task lists

In the editor, Ctrl+Enter toggles the check.

Source
- [x] Compare strategies- [ ] Add expiry metrics- [ ] Load testing
Result
  • Compare strategies
  • Add expiry metrics
  • Load testing

Alerts

The same five kinds as GitHub.

Source
> [!NOTE]> Useful information.> [!TIP]> Helpful advice.> [!IMPORTANT]> Key information.> [!WARNING]> Needs attention.> [!CAUTION]> Risky consequences.
Result

Note

Useful information.

Tip

Helpful advice.

Important

Key information.

Warning

Needs attention.

Caution

Risky consequences.

Footnotes

Footnotes are collected at the end of the document.

Source
Marxdown is built with Tauri[^1].[^1]: A framework for apps running on Rust and a WebView.
Result

Marxdown is built with Tauri[1].


  1. A framework for apps running on Rust and a WebView. ↩︎

Math and diagrams

Math

Wrap with $ for inline math, or $$ for a block, rendered with KaTeX. Amounts like $5 and $10 do not become math.

Source
The mean latency is about $\bar{t} = h \cdot t_c + (1 - h) \cdot t_m$.$$\sum_{k=1}^{n} k = \frac{n(n+1)}{2}$$
Result

The mean latency is about tˉ=h⋅tc+(1−h)⋅tm\bar{t} = h \cdot t_c + (1 - h) \cdot t_m.

∑k=1nk=n(n+1)2\sum_{k=1}^{n} k = \frac{n(n+1)}{2}

Diagrams (Mermaid)

A mermaid code block is shown as a diagram. Flowcharts, sequence diagrams, Gantt charts, and every other Mermaid diagram work.

Source
```mermaidsequenceDiagram  Terminal->>Marxdown: marxdown README.md  Marxdown-->>Terminal: Prompt returns right away  Marxdown->>Marxdown: Open as a tab```
Result
sequenceDiagram Terminal->>Marxdown: marxdown README.md Marxdown-->>Terminal: Prompt returns right away Marxdown->>Marxdown: Open as a tab

Document settings

Front matter

YAML fenced with --- at the top is shown as a table, apart from the body. Use “Front Matter” in Settings to show it as YAML or hide it.

Source
---title: Design notestags: [cache, api]---# Design notes
Result
titleDesign notes
tags
  • cache
  • api

Design notes

Marp slides

Put marp: true in the front matter to show the document as Marp slides. Separate slides with ---. Load your own themes with “Marp Themes” in Settings.

Source
---marp: truetheme: defaultpaginate: true---# Caching strategyLowering the p95 of the search API---## DecisionAdopt Stale-While-Revalidate
Slide preview

Caching strategy

Lowering the p95 of the search API

1

Decision

Adopt Stale-While-Revalidate

2

Shown as slides, one at a time.

Extra syntax

Non-standard syntax. To keep your documents from changing unexpectedly, all of them are off by default. Turn them on one by one in the Syntax section of Settings.

Highlights

markdown.marks

Shows ==text== as if marked with a highlighter.

Source
The answer is ==Stale-While-Revalidate==.
Result

The answer is Stale-While-Revalidate.

Insertions

markdown.insertions

Shows ++text++ underlined, as inserted text.

Source
The p95 is now ++18ms++.
Result

The p95 is now 18ms.

Superscript

markdown.superscript

Shows text wrapped in ^ as superscript.

Source
E = mc^2^
Result

E = mc2

Subscript

markdown.subscript

Shows text wrapped in ~ as subscript.

Source
H~2~O
Result

H2O

Definition lists

markdown.definitionLists

Start the line after a term with : to make a definition list.

Source
TTL: Expires entries after a fixed timeStale-While-Revalidate: Returns the stale response while refreshing in the background
Result
TTL
Expires entries after a fixed time
Stale-While-Revalidate
Returns the stale response while refreshing in the background

Abbreviations

markdown.abbreviations

Words defined as *[ABBR]: Description show the description on hover.

Source
CSP restricts what can be loaded.*[CSP]: Content Security Policy
Result

CSP restricts what can be loaded.

Multiline tables

markdown.multilineTables

Put \ after the last | of a row to continue the same cells on the next line. The continued lines are read together as Markdown, so a cell can hold a list. A cell containing ^^ merges with the cell above it.

Source
| Strategy | Traits | Cost || --- | --- | --- || TTL | - Expires after a fixed time | Low |\|     | - Easy to build | || No cache | Always fresh | ^^ || SWR | Returns stale data while refreshing | Medium |
Result
Strategy Traits Cost

TTL

  • Expires after a fixed time
  • Easy to build

Low

No cache Always fresh
SWR Returns stale data while refreshing Medium
↑↓ to select · Enter to go · Esc to close