docs / tables-diagrams-math

Tables, diagrams and math.

Notes take more than prose. Tables, diagrams, math and icons are all written as plain text in the markdown, and drawn in place while the caret is elsewhere. Put the caret in one and you see its source, to change it.

Tables

Write a table the GitHub way, with pipes, and a line of dashes under the header:

| Port   | Opens | Tide  |
| :----- | :---: | ----: |
| Leith  | 06:00 | 4.2 m |
| Oban   | 07:30 | 3.1 m |

You don't have to line the pipes up by hand. :format pads every table in the note into columns (see below).

Diagrams

A fenced block marked mermaid is drawn as its diagram:

```mermaid
graph LR
  Draft --> Review --> Published
```

Diagrams are drawn by Mermaid, so its syntax is what you write. They take the note's own colours and font, and follow light and dark.

Diagrams are drawn strictly: no scripts run, and nothing in a diagram is a clickable link.

Math

Write LaTeX between dollar signs, and it's drawn with KaTeX.

Written asShows
$e^{i\pi} + 1 = 0$math inside a sentence
$$ … $$a block of math, on one line or across several
```matha block too, as a fenced block
$$
\int_0^1 x^2 \, dx = \frac{1}{3}
$$

Prices stay prices. Inline math needs a character other than a space straight after the opening $ and straight before the closing one, all on one line, and the closing $ can't be followed by a digit. So $5 and $10 stays as text. Write \$ for a dollar sign that never starts math.

A formula KaTeX can't read stays as its source, dimmed. Hover it to see why.

Icons in the text

Write :icon: and a name to put an icon in a line, at the size and colour of the text around it:

- :icon:camera Photos from the trip
- :icon:list-todo Packing list

The icon starts a word, so a:icon:folder stays as text. A name that isn't in the set stays as text too. With the caret on it, you see what you wrote.

The set is hand-picked, and the same one areas and projects use:

archive book-open bookmark briefcase calendar calendar-clock camera check chevron-right clock code coffee file-text flag folder folder-open globe graduation-cap heart house inbox layers leaf lightbulb list-todo lock minus music notebook pen-line pin plane plus rocket settings square-check star sun tag trash-2 user users waypoints

Tidying: :format

:format tidies the markdown of the note you're in. It changes the shape and never the words.

Lines are never re-wrapped, and code blocks stay as written. Links, tags, mentions and todo markers pass through untouched. If the note can't be read as markdown, :format leaves it exactly as it was rather than tidy half of it.

Zen: :zen

Zen is for writing and for presenting. The sidebar, the header, the gutter, backlinks and the format bar go, and in a note only the part under the caret stays lit. The rest fades.

Key or commandDoes
⌘. or :zenZen on or off
:zen paragraphlight the paragraph you're in (the default)
:zen sentencelight only the sentence you're in
:zen pagelight the whole note, for presenting it
:zen offleave Zen
⇟ / ⇞ (PageDown / PageUp)light the next or previous block, centred
esc, outside the textleave Zen

PageDown and PageUp are what a presenter remote sends, so you can show a note a paragraph at a time. In a list, the lit block is the item you're on.

Zen keeps the scope you last picked for next time. It doesn't last past a quit: Paperkites always starts out of Zen.

Callouts, highlights and more

Paperkites also reads the parts of Obsidian's markdown that notes are made of: callouts, ==highlights==, %%comments%%, footnotes and embeds. They work in any vault. See Obsidian vaults.