summaryrefslogtreecommitdiff
path: root/docs/typ/cheatsheet-a4.typ
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 22:33:15 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commit989dcf395be7280240fc501ba1f07f75bacf91a3 (patch)
treed0d5c9901621b13f3bb4520140835ee0dec30ac3 /docs/typ/cheatsheet-a4.typ
parent71c715e10fe85d71b615c8f9a5a2b0c4c95b1a3f (diff)
downloadpardes-989dcf395be7280240fc501ba1f07f75bacf91a3.tar.gz
pardes-989dcf395be7280240fc501ba1f07f75bacf91a3.zip
The cheatsheet draws mouse buttons as a mouse, keys as chips, and pairs as tables
#btn and #chord draw a mouse (left button, wheel, right button) with the pressed part filled; the wheel is a narrow slot on a paper halo, hollow or filled, so it never reads as a button. A chord is the held button, then for each click the held one and that one down, with arrows between; #btn(.., shift: true) adds a ⇧. HTML gets a span with an aria-label. A key is one soft pill with no border: a combination (Ctrl-w) reads Ctrl + w and a sequence (g g, SPC f c) g › g, separators muted inside it; #keys("h", "j", ...) sets alternatives as separate pills. The drift test reads every key a #keys call names. #pairs sets key | meaning content as a two-column table on alternating tints; split: 2 sets the leader map as two such tables side by side. The mouse chords get their own table: cut, paste, copy (B1-B2 then B1-B3, one B1 hold, as mouse.zig says), 2-1 with an argument, 2-3 cancelling. The A4 page draws its own title and drops the content's level-1 heading. docs/typ/README is the function contract for content files. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/typ/cheatsheet-a4.typ')
-rw-r--r--docs/typ/cheatsheet-a4.typ15
1 files changed, 11 insertions, 4 deletions
diff --git a/docs/typ/cheatsheet-a4.typ b/docs/typ/cheatsheet-a4.typ
index 349c77da..26f19f9d 100644
--- a/docs/typ/cheatsheet-a4.typ
+++ b/docs/typ/cheatsheet-a4.typ
@@ -6,7 +6,7 @@
#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 text(font: "Libertinus Serif", size: 8.6pt, 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)
@@ -14,10 +14,14 @@
#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",
+// The title is the page's, not the content's: a level-1 heading in the
+// content is not drawn here.
+#show heading.where(level: 1): none
+#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)
+ text(size: 15pt, weight: "bold", fill: palette.tag-name)[pardes]
+ h(1fr)
+ text(size: 9pt, style: "italic", fill: palette.tag-fg)[acme's tags and three buttons, helix's keys, terminals as panes, the editor as a 9P filesystem]
}))
#show heading.where(level: 2): it => block(
width: 100%, fill: palette.tag-bg, inset: (x: 2pt, y: 2pt), above: 0.75em, below: 0.4em,
@@ -29,4 +33,7 @@
},
)
+#show heading.where(level: 3): it => block(above: 0.6em, below: 0.35em, sticky: true,
+ text(size: 8.4pt, weight: "bold", fill: palette.grip, it.body))
+
#include "cheatsheet.typ"