Math & LLM output
oriel is built to render what large language models and agents actually produce, not just hand-written Markdown.
Math delimiters
Math is rendered client-side by KaTeX. oriel accepts both conventions:
| you write | renders as |
|---|---|
$x^2$ / $$x^2$$ |
classic dollar-math |
\( x^2 \) |
inline — the delimiter LLMs emit |
\[ x^2 \] |
display (centered block) — the LLM display delimiter |
This matters because a note like \[ a_1 + b_2 \] would otherwise be mangled:
Markdown eats \[ as an escaped bracket and turns _1 + b_ into emphasis before
KaTeX ever sees it. oriel rewrites the LLM delimiters to dollar-math before
parsing — but never inside code spans, where \( is a literal. Dollar amounts
like $44 are left as text.
Offline rendering
KaTeX is cached under ~/.oriel/assets/ on the first online run — the stylesheet,
the script, and only the WOFF2 fonts the stylesheet references — and served
locally from then on. So a rendered page makes no external request for math;
the CDN is only the one-time source and the fallback when the machine has never
been online. A static build bundles the same cached
copy under _oriel/, so exported pages render math offline too.
Obsidian wikilinks
Vault-style cross-references resolve automatically — no config:
| you write | becomes |
|---|---|
[[Note Name]] |
a link to that note, by name |
[[Note Name|alias]] |
linked, shown as alias |
[[Note#Heading]] |
a link to that heading |
![[image.png]] |
the image, embedded |
Names resolve against an index of the whole served tree (a bare [[Name]] finds
Name.md wherever it lives). An unresolved link renders as plain text rather than
a dangling 404. Note transclusion (![[note]]) links rather than inlines, for now.
Combined with top-level markdown, that makes a flat Obsidian
vault browsable as-is: oriel serve my-vault.
Why agent output fits
The features line up with what agents leave behind:
- Dated notes (
YYYY-MM-DD_topic.md) → a journal with older/newer navigation. - Generated plots → a figures wall.
\(…\)/\[…\]math → rendered, not mangled.- Run logs / cost events → dashboards via a plugin.
- No build, no config → you glance at throwaway output and move on.
There's a runnable example at
examples/agent-run:
oriel serve examples/agent-run.
Next: Security.