summaryrefslogtreecommitdiff
path: root/docs/typ/book.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
committerGabriel Schneider <[email protected]>2026-10-30 17:35:06 -0300
commit6d8da8721141284cf33bb901168b26135893eb86 (patch)
tree791d63401d4e85fbca1d597a8ce0326e70efd545 /docs/typ/book.typ
parentefd43a3a2cf03bb741366331158b368abf9ac583 (diff)
parentbf6810a8f9d6cc82050e7d9c0cfb06358301b574 (diff)
downloadpardes-6d8da8721141284cf33bb901168b26135893eb86.tar.gz
pardes-6d8da8721141284cf33bb901168b26135893eb86.zip
Merge latest upstream into the macOS branch for Zig 0.17
Retain the macOS branch history and local Acme selection color while adopting upstream's current core and platform changes. Pin Zig and ZLS to 0.17.0, and fetch the existing zstbi compatibility commit through upstream after its original fork was removed.
Diffstat (limited to 'docs/typ/book.typ')
-rw-r--r--docs/typ/book.typ56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/typ/book.typ b/docs/typ/book.typ
new file mode 100644
index 00000000..b2245372
--- /dev/null
+++ b/docs/typ/book.typ
@@ -0,0 +1,56 @@
+// 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, doc-links, tagline
+
+#set document(title: "pardes")
+#doc-links.update(true)
+#set page(paper: "a4", fill: palette.paper, margin: (x: 22mm, y: 24mm))
+#set text(font: "Libertinus Serif", size: 10pt, fill: palette.ink, lang: "en")
+#set par(justify: true, leading: 0.62em, spacing: 1em)
+#set list(spacing: 0.8em)
+#show heading.where(level: 2): set block(above: 2em, below: 0.9em)
+#show heading.where(level: 3): set block(above: 1.5em, below: 0.7em)
+#show raw: set text(font: mono, size: 0.9em)
+#show raw.where(block: true): it => block(
+ width: 100%, fill: palette.tag-bg.transparentize(50%), radius: 2pt,
+ inset: (x: 6pt, y: 5pt), above: 0.9em, below: 0.9em, it)
+#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, tagline)
+ v(10mm)
+ text(size: 11pt, fill: palette.ink)[Built on ideas from #link("https://9p.io/plan9/")[Plan 9] from Bell
+ Labs: #link("https://9p.io/sys/doc/acme/acme.html")[acme]'s text as the interface, and the 9P
+ protocol.]
+ 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) #label("ch-" + ch.id)]
+ 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))