diff options
Diffstat (limited to 'docs/typ')
| -rw-r--r-- | docs/typ/book.typ | 7 | ||||
| -rw-r--r-- | docs/typ/cheatsheet-a4.pdf | 6 | ||||
| -rw-r--r-- | docs/typ/cheatsheet-a4.typ | 3 | ||||
| -rw-r--r-- | docs/typ/style.typ | 24 |
4 files changed, 26 insertions, 14 deletions
diff --git a/docs/typ/book.typ b/docs/typ/book.typ index 7af907c3..803a65e2 100644 --- a/docs/typ/book.typ +++ b/docs/typ/book.typ @@ -7,8 +7,11 @@ #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: 10.5pt, fill: palette.ink, lang: "en") -#set par(justify: true, leading: 0.6em) +#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 heading: set text(fill: palette.tag-name) #show heading.where(level: 1): it => { diff --git a/docs/typ/cheatsheet-a4.pdf b/docs/typ/cheatsheet-a4.pdf index 7ea41915..d0f7541d 100644 --- a/docs/typ/cheatsheet-a4.pdf +++ b/docs/typ/cheatsheet-a4.pdf @@ -1732,12 +1732,12 @@ x�}��Kq�?�U�X
94%MQKS��N�#Ԧ��Q�v��B�ˡ�h�Fk ������! endstream endobj 479 0 obj -<</Creator(Typst 0.15.1)/ModDate(D:20260930231110-03'00)/CreationDate(D:20260930231110-03'00)>> +<</Creator(Typst 0.15.1)/ModDate(D:20260930231431-03'00)/CreationDate(D:20260930231431-03'00)>> endobj 480 0 obj <</Length 996/Type/Metadata/Subtype/XML>> stream -<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-09-30T23:11:10-03:00</xmp:ModifyDate><xmp:CreateDate>2026-09-30T23:11:10-03:00</xmp:CreateDate><xmpTPg:NPages>1</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>PTk8GgeQgXHy1oXtTDGdSQ==</xmpMM:InstanceID><xmpMM:DocumentID>PTk8GgeQgXHy1oXtTDGdSQ==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?> +<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="xmp-writer"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xmp="http://ns.adobe.com/xap/1.0/" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:xmpTPg="http://ns.adobe.com/xap/1.0/t/pg/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" ><xmp:CreatorTool>Typst 0.15.1</xmp:CreatorTool><dc:language><rdf:Bag><rdf:li>en</rdf:li></rdf:Bag></dc:language><xmp:ModifyDate>2026-09-30T23:14:31-03:00</xmp:ModifyDate><xmp:CreateDate>2026-09-30T23:14:31-03:00</xmp:CreateDate><xmpTPg:NPages>1</xmpTPg:NPages><dc:format>application/pdf</dc:format><xmpMM:InstanceID>yyqGQkCOm2XduNn8/NMQzw==</xmpMM:InstanceID><xmpMM:DocumentID>yyqGQkCOm2XduNn8/NMQzw==</xmpMM:DocumentID><xmpMM:RenditionClass>proof</xmpMM:RenditionClass><pdf:PDFVersion>1.7</pdf:PDFVersion></rdf:Description></rdf:RDF></x:xmpmeta><?xpacket end="r"?> endstream endobj 481 0 obj @@ -2228,7 +2228,7 @@ xref 0000114586 00000 n
0000115659 00000 n
trailer -<</Size 482/Root 481 0 R/Info 479 0 R/ID[(PTk8GgeQgXHy1oXtTDGdSQ==)(PTk8GgeQgXHy1oXtTDGdSQ==)]>> +<</Size 482/Root 481 0 R/Info 479 0 R/ID[(yyqGQkCOm2XduNn8/NMQzw==)(yyqGQkCOm2XduNn8/NMQzw==)]>> startxref 115846 %%EOF
\ No newline at end of file diff --git a/docs/typ/cheatsheet-a4.typ b/docs/typ/cheatsheet-a4.typ index 26f19f9d..5ae8b4be 100644 --- a/docs/typ/cheatsheet-a4.typ +++ b/docs/typ/cheatsheet-a4.typ @@ -2,7 +2,7 @@ // 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 +#import "style.typ": palette, mono, pairs-density #set page(paper: "a4", fill: palette.paper, margin: (x: 9mm, y: 8mm), columns: 3) #set columns(gutter: 4.5mm) @@ -36,4 +36,5 @@ #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)) +#pairs-density.update("tight") #include "cheatsheet.typ" diff --git a/docs/typ/style.typ b/docs/typ/style.typ index 9e98838d..e1bab27d 100644 --- a/docs/typ/style.typ +++ b/docs/typ/style.typ @@ -187,18 +187,26 @@ } } +/// How roomy #pairs tables are: "roomy" (the book, the HTML) or "tight" +/// (the A4 sheet sets it). +#let pairs-density = state("pairs-density", "roomy") + /// Pairs: a thing and what it means, as a two-column table, key column /// first, rows on alternating tints. `split: 2` sets the rows as that many /// tables side by side (on paper; HTML gets one table). #let pairs(split: 1, ..cells) = { let rows = cells.pos().chunks(2) - let one(rows) = table( - columns: (auto, 1fr), stroke: none, inset: (x: 2pt, y: 1.6pt), - fill: (_, y) => if calc.even(y) { palette.tag-bg.transparentize(35%) }, - ..rows.flatten(), - ) - context if html-out() or split == 1 { one(rows) } else { - let n = calc.ceil(rows.len() / split) - grid(columns: (1fr,) * split, column-gutter: 2pt, ..rows.chunks(n).map(one)) + context { + let tight = pairs-density.get() == "tight" + let one(rows) = table( + columns: (auto, 1fr), stroke: none, + inset: if tight { (x: 2pt, y: 1.6pt) } else { (x: 7pt, y: 4pt) }, + fill: (_, y) => if calc.even(y) { palette.tag-bg.transparentize(35%) }, + ..rows.flatten(), + ) + if html-out() or split == 1 { one(rows) } else { + let n = calc.ceil(rows.len() / split) + grid(columns: (1fr,) * split, column-gutter: if tight { 2pt } else { 10pt }, ..rows.chunks(n).map(one)) + } } } |
