Typst 0.15+ is required.
Build the PDF:
New-Item -ItemType Directory -Force build
typst compile --package-path packages main.typ build/notes.pdfBuild the website bundle:
if (Test-Path web/dist) { Remove-Item web/dist -Recurse -Force }
typst compile --features html,bundle --format bundle --package-path packages main.typ web/distThe bundle build emits the HTML pages and shared assets from Typst, and embeds
the prebuilt build/notes.pdf as pdf/notes.pdf. No Python split pipeline is
used.
main.typonly calls the build entrypoint.lib.typis the public math/theorem/helper API used by chapter files.chapters/**/index.typfiles are the author-facing structure and include children in reading order.- Leaf chapter files contain ordinary Typst markup. At the top, they declare
their page metadata with
#show: docs-section.with(...)or the matching page type, then write content directly. - To add a section, add its folder/file with a page-local
#showdeclaration and include it from the nearest parentindex.typ;main.typdoes not need to change. src/components/contains build, style, theorem, math, and graphics internals.src/assets/contains files emitted by bundle export.