From 450ce314c18603b045f0ce808f21c8577237ba83 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 22:41:43 -0300 Subject: docs/typ gets book and HTML wrappers over one chapter list style.typ lists the chapters in reading order (guide, cheatsheet, scripting, reference, building), each with its content file or none while unwritten. book.typ sets them as an A4 book with a title page and contents, the tutor read from src/tutor.txt last; html.typ sets them as one HTML page with a nav of anchors. An unwritten chapter shows a placeholder, so both compile before the topics exist. Co-Authored-By: Claude Opus 5.5 --- docs/typ/style.typ | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs/typ/style.typ') diff --git a/docs/typ/style.typ b/docs/typ/style.typ index 64d96064..467577cc 100644 --- a/docs/typ/style.typ +++ b/docs/typ/style.typ @@ -33,6 +33,21 @@ detached: "docs/detached.md", ) +/// The book's and the HTML's reading order. `file` is the content file +/// in docs/typ, or none while the topic is not written yet (the outputs +/// then show a placeholder). Wrappers include each with heading offset 1, +/// so a file's `=` headings sit under its chapter title. +#let chapters = ( + (id: "guide", title: "Guide", file: none), + (id: "cheatsheet", title: "Cheatsheet", file: "cheatsheet.typ"), + (id: "scripting", title: "Scripting", file: none), + (id: "reference", title: "Reference", file: none), + (id: "building", title: "Building", file: none), +) + +/// The tutor, shown as it is in the editor (`Tutor`), from the repo root. +#let tutor-path = "/src/tutor.txt" + #let html-out() = target() == "html" #let span(class, body) = html.elem("span", attrs: (class: class), body) #let m(s, fill: palette.ink) = text(font: mono, size: 0.92em, fill: fill, s) -- cgit v1.3