summaryrefslogtreecommitdiff
path: root/docs/typ/book.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/book.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/book.typ')
-rw-r--r--docs/typ/book.typ45
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/typ/book.typ b/docs/typ/book.typ
new file mode 100644
index 00000000..26191fa7
--- /dev/null
+++ b/docs/typ/book.typ
@@ -0,0 +1,45 @@
+// The book: every topic in reading order, then the tutor. Facts live in the
+// content files named by `chapters` in style.typ; this is layout only.
+// typst compile --root . --ignore-system-fonts docs/typ/book.typ
+// (--root . because the tutor is read from src/tutor.txt.)
+#import "style.typ": palette, mono, chapters, tutor-path
+
+#set document(title: "pardes")
+#set page(paper: "a4", fill: palette.paper, margin: (x: 22mm, y: 24mm))
+#set text(font: "Libertinus Serif", size: 10.5pt, fill: palette.ink, lang: "en")
+#set par(justify: true, leading: 0.6em)
+#show raw: set text(font: mono, size: 0.9em)
+#show heading: set text(fill: palette.tag-name)
+#show heading.where(level: 1): it => {
+ pagebreak(weak: true)
+ v(18mm)
+ text(size: 22pt, weight: "bold", it.body)
+ v(8mm)
+}
+
+// title page
+#page(numbering: none, {
+ v(1fr)
+ text(size: 34pt, weight: "bold", fill: palette.tag-name)[pardes]
+ v(4mm)
+ text(size: 13pt, style: "italic", fill: palette.tag-fg)[acme's tags and three buttons, helix's keys, terminals as panes, the editor as a 9P filesystem]
+ v(2fr)
+})
+
+#page(numbering: none, outline(depth: 2))
+
+#set page(numbering: "1")
+#counter(page).update(1)
+
+#for ch in chapters {
+ heading(level: 1, ch.title)
+ if ch.file == none {
+ text(style: "italic", fill: palette.tag-fg)[This chapter is not written yet.]
+ } else {
+ set heading(offset: 1)
+ include ch.file
+ }
+}
+
+= The tutor
+#text(size: 8pt, raw(read(tutor-path), block: true))