Loading...
Loading...
Typst document creation and package development. Use when: (1) Working with .typ files, (2) User mentions typst, typst.toml, or typst-cli, (3) Creating or using Typst packages, (4) Developing document templates, (5) Converting Markdown/LaTeX to Typst
npx skill4agent add lucifer1004/claude-skill-typst typsttypst --version # Check if installedtypst compile document.typ && echo "Success" || echo "Failed"pdftotext| Error | Cause | Fix |
|---|---|---|
| "unknown variable" | Undefined identifier | Check spelling, ensure |
| "expected X, found Y" | Type mismatch | Check function signature in docs |
| "file not found" | Bad import path | Paths resolve relative to the current file |
| "unknown font" | Font not installed | Use system fonts or web-safe alternatives |
| "maximum function call depth exceeded" | Deep recursion | Limit recursion, use iteration instead |
#set page(paper: "a4", margin: 2cm)
#set text(size: 11pt)
= Title
Content goes here.| Task | Reference |
|---|---|
| Language basics (types, functions, operators) | basics.md |
| State, context, query, XML parsing | advanced.md |
| Templates, styling, set/show rules | template.md |
| Package development, publishing | package.md |
| Converting from Markdown/LaTeX | conversion.md |
| Debugging techniques (pdftotext, repr, measure) | debug.md |
| Performance profiling (timings, hotspots) | perf.md |
--rootstate()contextquery()typst.tomlpdftotextrepr()measure()place()--timings# Compile once
typst compile document.typ
# Watch mode (recompile on changes)
typst watch document.typ
# Specify output file
typst compile document.typ output.pdf
# Set project root (for multi-file projects)
# Root controls where "/path" resolves and security boundary
typst compile src/main.typ --root .--root/#import "/lib/utils.typ"--root| Package | Purpose |
|---|---|
| Code block formatting with syntax highlighting |
| Theorem environments |
| LaTeX math rendering |
| CJK typography utilities |
| BibTeX parsing |
#import "@preview/codly:1.3.0": *examples/| Example | Description |
|---|---|
| basic-document.typ | Complete beginner document with all common elements |
| template-report.typ | Reusable template with headers, counters, note boxes |
| package-example/ | Minimal publishable package with submodules |
brew install typstcargo install typst-cliwinget install typst