Interactive authoring
Check code examples, inspect content manifests, and edit scientific references.
Figure and equation navigation
The sidebar separates figures and equations, preserving document order within each section. Optional label="…" metadata gives each entry a short title without changing its caption or number. Mass–energy equivalence, , appears in Equation (1). Repeating Equation (1) still produces one navigation entry.
For a spring, Hooke’s law relates restoring force to displacement, as shown in Equation (2).
Checked examples
These full type and assertion checks run through check_document() when the
static site builds. Choose a case to inspect its actual result.
```ts check
const count: number = 1
``` Passed · 1 checked · 0 assertions passed
Run these checks in your project
import { readFile } from 'node:fs/promises'
import { assert_ok, create_markdown } from 'svelte-widgets/markdown'
import { check_document } from 'svelte-widgets/markdown/check'
const engine = create_markdown()
const document = assert_ok(await engine.parse(await readFile('guide.md', 'utf8'), { filename: 'guide.md' }))
assert_ok(await check_document(document)) Try the Svelte syntax checker
Edit the component below and check it in your browser. This uses the real Svelte compiler; it checks syntax and compiler warnings, not TypeScript semantics.
Content manifests
Edit frontmatter, headings, links, or fences, then run the compiler. A title is
required. The sample inventory contains /next.md#details and /plot.svg; try breaking a link or changing the title to a number. Expand
the tree to inspect source positions, TOC, search records, and checked fences. See the content manifest API guide.
Incremental compilation
Unchanged examples reuse their syntax highlights during development. To try hot reload, open the live Markdown counter, increment it, and edit its source. CSS-only edits preserve the counter; page edits may reset it. See the incremental compilation guide for module identity and caching behavior.
Scientific references
Figures, equations, and citations share a validated reference graph. Labels can appear after their first reference; numbering and the bibliography follow automatically. See the scientific reference API guide for syntax and configuration.
Edit a label, equation, or caption and render it again. The bibliography includes guide. Unresolved references fail with source locations; rendered HTML stays in an isolated
frame.