Markdown math, rendered on your device
Formulas inside your notes — typeset locally, source untouched.
Notes with math usually force a choice: a plain-text editor that mangles formulas, or a heavyweight tool with an account and a cloud. Typehall takes the middle path for Markdown notes: write LaTeX-style math inline with the prose, and Preview typesets it on your device — no account, no server, no connection needed after the first cached visit.
Inline relation $E = mc^2$ inside a sentence.
Display block on its own lines:
$$
\int_0^1 x^2 dx
$$
Price guard: costs $5 total, and $100 and $200 stay literal.How the notation behaves
$…$renders inline math inside a sentence;$$…$$on its own lines renders a centered display block.- Math inside fenced code blocks and inline code spans stays literal source — documentation about math never accidentally typesets.
- Malformed or unclosed expressions stay literal instead of breaking the preview.
- Escaped dollars (
\$) always stay literal.
Local rendering, source preserved
- Rendering runs entirely in your browser with a bundled math library (KaTeX) — no CDN, no remote fonts, no external requests.
- Your Markdown source is never rewritten: save, reopen, history, backup, restore, and
.mdexport keep every dollar sign byte-identical. - Exporting as
.htmlembeds the typeset math so the file is self-contained.
Math beside everything else
Math coexists with the rest of the note: highlighted code fences, Mermaid diagrams, tables, checklists, and links all render in the same Preview and split view. A formula in a code comment stays code; a formula in prose typesets. Mermaid diagrams pair naturally with math in technical drafts — see the AI Markdown workflow for reviewing generated content that mixes both.
Questions
How do I write math in a note?
In a Markdown note, wrap inline math in single dollars ($E = mc^2$) and display math in double dollars ($$...$$ on its own lines). Preview renders it; the source stays exactly as typed.
Will prices like $5 turn into math?
No. Dollar amounts adjacent to digits — $5, $100, 5$, $1.99 — are left literal by design, as are escaped dollars and unclosed expressions.
Does rendering need the internet?
No. Math renders with a bundled local library (KaTeX), with no CDN or remote fonts. After the first visit caches the app, math renders offline too.
Open the notepad and try $E = mc^2$ in a Markdown note. To learn the notation step by step, see the LaTeX math lesson. The full editing model is on Markdown notepad.