LaTeX math
Formulas in assistant replies are typeset with KaTeX - no setting to hunt for. Display and inline delimiters, ```math fences and the loose TeX symbols models sprinkle into prose all render as you would expect, while a $ that means money stays money.
What renders
- Display math -
$$…$$and\[…\]. One written on a single line is promoted to a centred display block when it sits on that line alone; in the middle of a sentence it renders inline. - Inline math -
\(…\)and$…$(subject to the currency rule below). - Math fences - a fenced code block tagged
mathrenders as a display block instead of code. Other tags, such as```latex, stay code. - Loose symbols - a common single TeX command in prose, such as
\rightarrow,\alphaor\sum, is rewritten to the equivalent Unicode character (arrows, set and logic symbols, relations, operators and Greek letters); commands it doesn’t know are left alone. This is always on, even in a reply with no formulas, and runs over the parsed document, so code blocks, inline code and anything already inside math delimiters are left byte-for-byte intact.
Rendering applies to assistant replies in regular chats and in Private Chat. Your own messages show the TeX exactly as you typed it, and release notes in the Updates panel and the Library’s item preview never typeset math. TeX that does not parse degrades to showing its own source, with the parse error on hover, rather than flashing an error - which keeps a half-typed formula quiet while it is still streaming. Links inside a formula (\href, \url) render as inert text, and oversized lengths are capped so a formula can’t blow out the layout.
Currency-safe $…$
$ doubles as a currency sign, so a single-dollar span only typesets when it actually reads as math: the content must hug both delimiters, stay on one line and run no longer than 200 characters, not follow a word character and not be chased by a digit. In practice:
- Stays prose - “it costs $5 and $10”, “between $5-$10”, “US$5”.
- Renders -
$x^2$or$\frac{a}{b}$, the delimiter most models actually emit for inline math. - Always literal -
\$is a dollar sign, never a delimiter.
If you need the ambiguous case typeset, ask the model for $$…$$, \(…\) or a ```math fence.
Bundled, lazy and offline
KaTeX ships inside the installer like the rest of the app - the script, its stylesheet and its fonts. Nothing is fetched over the network; the window’s content-security policy would block it if anything tried. What is deferred is only when the engine is read from disk and parsed: it loads the first time a reply in that session looks like it contains math, so a launch that never renders a formula never pays for one. The deferral is per session, so the engine loads again after the next launch.
Math never typesets inside fenced code blocks, indented code or inline code, so generated code containing $ or backslashes stays exactly as the model wrote it - and Copy, Export and the canvas get it verbatim. If a formula shows as raw TeX, see Troubleshooting → Sending & receiving messages.