Rendering guide
Everything in the preview is produced on this machine: the parse happens in Rust, and the highlighter and the formula typesetter load inside the app on demand. None of it uses the network, and none of it is collected.
Code fences
Name a language on the fence and it is highlighted as that language:
```rust
fn main() { println!("hello"); }
```
- About 50 grammars ship with the app (Rust, Python, JavaScript / TypeScript, Go, Java, C / C++, C#, PHP, Ruby, SQL, Shell, PowerShell, Dockerfile, YAML, TOML, JSON, INI, Diff, Markdown, LaTeX and more), and they load on demand: a document with no code fence pays nothing for them.
- A language that is not shipped stays plain text — no error, no badge, nothing in the status bar. Aliases (
js,ts,yml,c++,sh…) match Prism's own list. - When the fence names a diagram engine (
mermaid/dot/graphviz/d2) the block becomes a diagram card instead — see the diagram guide.
Formulas
Inline $…$ and a paragraph of its own starting $$…$$ are typeset by KaTeX, chemistry (\ce{}) included:
| Written | Rendered |
|---|---|
$a^2 + b^2 = c^2$ |
an inline formula |
$$ on a paragraph of its own |
a centred display block |
$$ sharing a paragraph with text |
inline — a centred block in the middle of a sentence breaks that sentence |
Math is off by default; turn it on in Settings → math. The reason is specific: enabling it takes $ away from ordinary text, and Revenue rose from $13B to $24B. should stay a sentence about money. While it is off, $…$ shows as written. A formula that will not parse keeps its place on the line with KaTeX's own error marker, and the reason is in its tooltip.
Footnotes
[^1] becomes a numbered reference in the text, and every note is collected into one section at the end of the document, each with a ↩ back to the citation that cited it — a note cited more than once gets one back-link per citation (↩, ↩2, …).
- Notes are numbered by the order their references appear, not by where the definitions are written.
- A definition nothing refers to is not printed, and a reference with no definition reverts to the literal
[^1]instead of leaving a dead link.
Tables and task lists
GFM tables hug their content (a wide one scrolls horizontally instead of stretching the page), the header tint and the zebra stripes follow the theme, and alignment comes from :--- / :---: / ---:. Task-list checkboxes carry no bullet marker and are read-only — change the [x] in the source view.