summaryrefslogtreecommitdiff
path: root/docs/typ/cheatsheet-a4.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 21:05:07 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commitdb2a259a18b9247edc23b1128dcfda703858f120 (patch)
tree11a877ab15b552be8fe7d79a4f1402a54b9f3d58 /docs/typ/cheatsheet-a4.typ
parent68dd567218505838814d73473460a0c0ff8e97b3 (diff)
downloadpardes-db2a259a18b9247edc23b1128dcfda703858f120.tar.gz
pardes-db2a259a18b9247edc23b1128dcfda703858f120.zip
A one-page A4 cheatsheet, the first file of a Typst docs corpus in docs/typ
docs/typ/cheatsheet.typ holds the facts as semantic calls (#key, #btn, #chord, #word, #tag, #addr, #file, #cmd, #doc); docs/typ/style.typ defines those once, drawing them for paged output and emitting HTML elements under --features html; docs/typ/cheatsheet-a4.typ is the page. `zig build cheatsheet` renders it when typst is on PATH. A config.zig test reads every .typ in docs/typ and fails when one names a builtin, key binding or default tag pardes no longer has. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ/cheatsheet-a4.typ')
-rw-r--r--docs/typ/cheatsheet-a4.typ32
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/typ/cheatsheet-a4.typ b/docs/typ/cheatsheet-a4.typ
new file mode 100644
index 00000000..349c77da
--- /dev/null
+++ b/docs/typ/cheatsheet-a4.typ
@@ -0,0 +1,32 @@
+// The printable cheatsheet: one A4 side, three columns. The facts are in
+// cheatsheet.typ and the elements' look in style.typ; this is page,
+// type and headings only.
+// typst compile --ignore-system-fonts docs/typ/cheatsheet-a4.typ
+#import "style.typ": palette, mono
+
+#set page(paper: "a4", fill: palette.paper, margin: (x: 9mm, y: 8mm), columns: 3)
+#set columns(gutter: 4.5mm)
+#set text(font: "Libertinus Serif", size: 8.8pt, fill: palette.ink, lang: "en")
+#set par(leading: 0.42em, spacing: 0.55em, justify: false)
+#set list(indent: 0pt, body-indent: 3pt, spacing: 0.42em, marker: text(fill: palette.grip)[▸])
+#set terms(separator: h(0.5em), spacing: 0.42em, hanging-indent: 0.8em)
+#set table(stroke: none, inset: (x: 1.5pt, y: 1.6pt))
+#show raw: set text(font: mono, size: 0.92em)
+#show strong: set text(fill: palette.tag-name)
+
+#show heading.where(level: 1): it => place(top + left, float: true, scope: "parent",
+ block(width: 100%, inset: (bottom: 2pt), stroke: (bottom: 0.6pt + palette.grip), {
+ show emph: set text(size: 9pt, weight: "regular", fill: palette.tag-fg)
+ text(size: 15pt, weight: "bold", fill: palette.tag-name, it.body)
+ }))
+#show heading.where(level: 2): it => block(
+ width: 100%, fill: palette.tag-bg, inset: (x: 2pt, y: 2pt), above: 0.75em, below: 0.4em,
+ sticky: true,
+ {
+ box(fill: palette.col-grip, width: 0.55em, height: 0.75em, baseline: 0.1em)
+ h(3pt)
+ text(size: 9pt, weight: "bold", fill: palette.tag-name, it.body)
+ },
+)
+
+#include "cheatsheet.typ"