summaryrefslogtreecommitdiff
path: root/docs/typ/style.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 22:41:43 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit450ce314c18603b045f0ce808f21c8577237ba83 (patch)
tree73ad649da0a1e10af22effa40ff70d5c4d40e0b4 /docs/typ/style.typ
parent989dcf395be7280240fc501ba1f07f75bacf91a3 (diff)
downloadpardes-450ce314c18603b045f0ce808f21c8577237ba83.tar.gz
pardes-450ce314c18603b045f0ce808f21c8577237ba83.zip
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 <[email protected]>
Diffstat (limited to 'docs/typ/style.typ')
-rw-r--r--docs/typ/style.typ15
1 files changed, 15 insertions, 0 deletions
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)