@airmark/quiver 0.32.2 → 0.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -18
- package/package.json +8 -6
- package/quills/af4141/0.1.0/Quill.yaml +1 -1
- package/quills/afmc_moa/0.0.1/Quill.yaml +10 -17
- package/quills/classic_resume/0.0.1/Quill.yaml +361 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/LICENSE +21 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-Bold.ttf +0 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-BoldItalic.ttf +0 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-Italic.ttf +0 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/EBGaramond-Regular.ttf +0 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/fonts/EBGaramond/OFL.txt +94 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/components.typ +181 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/config.typ +53 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/layout.typ +57 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/lib.typ +6 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/src/util.typ +32 -0
- package/quills/classic_resume/0.0.1/packages/ttq-classic-resume/typst.toml +26 -0
- package/quills/classic_resume/0.0.1/plate.typ +143 -0
- package/quills/cyber_ribbon_chart/0.0.1/Quill.yaml +320 -0
- package/quills/cyber_ribbon_chart/0.0.1/plate.typ +428 -0
- package/quills/daf1206/0.1.0/Quill.yaml +1 -2
- package/quills/daf4392/0.1.0/Quill.yaml +15 -1
- package/quills/daf4392/0.1.0/plate.typ +2 -2
- package/quills/usaf_letter/0.1.0/Quill.yaml +214 -0
- package/quills/usaf_letter/0.1.0/assets/dod_seal.png +0 -0
- package/quills/usaf_letter/0.1.0/assets/dow_seal.png +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/.gitignore +7 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/LICENSE +201 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/Cinzel/Cinzel-Regular.ttf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/Cinzel/LICENSE +93 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/CopperplateCC/CopperplateCC-Bold.otf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/CopperplateCC/CopperplateCC-Heavy.otf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/CopperplateCC/LICENSE.md +79 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/LiberationMono/LICENSE +102 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/LiberationMono/LiberationMono-Regular.ttf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/GNU General Public License.txt +340 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-Med.otf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-MedIta.otf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-Reg.otf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/fonts/NimbusRomanNo9L/NimbusRomNo9L-RegIta.otf +0 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/backmatter.typ +32 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/config.typ +45 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/frontmatter.typ +226 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/lib.typ +35 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/mainmatter.typ +140 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/primitives.typ +544 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/src/utils.typ +334 -0
- package/quills/usaf_letter/0.1.0/packages/tonguetoquill-usaf-letter/typst.toml +22 -0
- package/quills/usaf_letter/0.1.0/plate.typ +124 -0
- package/quills/usaf_memo/0.2.0/Quill.yaml +1 -1
- package/quills/usaf_memo/0.2.0/packages/tonguetoquill-usaf-memo/LICENSE +201 -21
- package/quills/usaf_memo/0.2.0/packages/tonguetoquill-usaf-memo/typst.toml +1 -1
- package/quills/usaf_memo/0.3.0/Quill.yaml +62 -43
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/LICENSE +201 -21
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/fonts/Cinzel/Cinzel-Regular.ttf +0 -0
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/backmatter.typ +29 -17
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/body.typ +97 -126
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/config.typ +12 -45
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/frontmatter.typ +81 -87
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/indorsement.typ +58 -66
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/lib.typ +14 -36
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/mainmatter.typ +47 -19
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/primitives.typ +158 -111
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/src/utils.typ +41 -141
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/typst.toml +3 -8
- package/quills/usaf_memo/0.3.0/plate.typ +81 -85
- package/templates/af4141.md +23 -0
- package/templates/appointment_letter.md +58 -0
- package/templates/daf1206.md +23 -0
- package/templates/daf4392.md +34 -0
- package/templates/pass_request.md +48 -0
- package/templates/rebuttal.md +63 -0
- package/templates/templates.json +58 -0
- package/templates/usaf_template.md +30 -0
- package/templates/ussf_template.md +30 -0
- package/quills/usaf_memo/0.3.0/packages/tonguetoquill-usaf-memo/fonts/Cinzel/Cinzel[wght].ttf +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Public API of the USAF personal letter template, which typesets per AFH
|
|
2
|
+
// 33-337 "The Tongue and Quill", "The Personal Letter".
|
|
3
|
+
//
|
|
4
|
+
// The three sections compose in document order: `frontmatter` and `mainmatter`
|
|
5
|
+
// as show rules, `backmatter` as a function.
|
|
6
|
+
//
|
|
7
|
+
// `config.typ`, `utils.typ` and `primitives.typ` are `tonguetoquill-usaf-memo`
|
|
8
|
+
// 5.0.0's, byte for byte, so the letterhead, signature block and closing
|
|
9
|
+
// elements the two documents share are set by one implementation and a sync is
|
|
10
|
+
// a copy. The other files are the letter's own.
|
|
11
|
+
//
|
|
12
|
+
// #import "@preview/tonguetoquill-usaf-letter:0.1.0": (
|
|
13
|
+
// backmatter, frontmatter, mainmatter,
|
|
14
|
+
// )
|
|
15
|
+
//
|
|
16
|
+
// #show: frontmatter.with(
|
|
17
|
+
// letter-from: ("Colonel Jane A. Doe", "Commander", "123d Example Squadron",
|
|
18
|
+
// "1 Example Way", "Placeholder AFB ST 12345-6789"),
|
|
19
|
+
// letter-for: ("Major John B. Smith", "Chief, Plans and Programs",
|
|
20
|
+
// "456th Example Group", "2 Sample Blvd", "Sample AFB ST 98765-4321"),
|
|
21
|
+
// salutation: "Dear Major Smith",
|
|
22
|
+
// )
|
|
23
|
+
// #show: mainmatter
|
|
24
|
+
//
|
|
25
|
+
// Body paragraphs.
|
|
26
|
+
//
|
|
27
|
+
// #backmatter(
|
|
28
|
+
// complimentary-close: "Sincerely",
|
|
29
|
+
// signature-block: ("FIRST M. LAST, Rank, USAF",),
|
|
30
|
+
// )
|
|
31
|
+
|
|
32
|
+
#import "frontmatter.typ": frontmatter
|
|
33
|
+
#import "mainmatter.typ": mainmatter
|
|
34
|
+
#import "backmatter.typ": backmatter
|
|
35
|
+
#import "utils.typ": date-pattern
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// The personal letter's body: AFH 33-337 "For the body of the personal letter,
|
|
2
|
+
// the paragraphs are indented 0.5 inches from the left margin but they are not
|
|
3
|
+
// numbered."
|
|
4
|
+
|
|
5
|
+
#import "config.typ": *
|
|
6
|
+
#import "utils.typ": *
|
|
7
|
+
#import "primitives.typ": render-memo-table
|
|
8
|
+
|
|
9
|
+
// AFH 33-337: a personal letter's paragraphs are indented half an inch from the
|
|
10
|
+
// left margin and carry no number or letter.
|
|
11
|
+
#let paragraph-indent = 0.5in
|
|
12
|
+
|
|
13
|
+
/// Splits content at the closing section: the part this styles as body
|
|
14
|
+
/// paragraphs, and the part that reaches the page untouched.
|
|
15
|
+
///
|
|
16
|
+
/// Applied as a show rule, `mainmatter` is handed the closing section along
|
|
17
|
+
/// with the body, and the body's first-line indent would then displace the
|
|
18
|
+
/// complimentary close and the signature lines. `backmatter` labels its output
|
|
19
|
+
/// to mark the boundary.
|
|
20
|
+
///
|
|
21
|
+
/// Everything from the marker on stays together, prose a caller wrote after the
|
|
22
|
+
/// closing included.
|
|
23
|
+
///
|
|
24
|
+
/// A marker is found on `it` itself, on a direct child, or inside the `styled`
|
|
25
|
+
/// element that a `set` or `show` rule after `#show: mainmatter` wraps the
|
|
26
|
+
/// remainder in; both halves come back under those styles. A marker a caller
|
|
27
|
+
/// nested in a container of their own — a `block`, a `grid` cell — is not
|
|
28
|
+
/// found. A closing section built in a code block or a loop is not nested:
|
|
29
|
+
/// joining content extends the sequence on the left in place, so its marker
|
|
30
|
+
/// stays a direct child.
|
|
31
|
+
///
|
|
32
|
+
/// - it (content): Content handed to `mainmatter`
|
|
33
|
+
/// -> array: the body content and the closing content
|
|
34
|
+
#let split-closing(it) = {
|
|
35
|
+
if it.at("label", default: none) == <usaf-letter-closing> { return ([], it) }
|
|
36
|
+
// `styled` is not a name in scope; its two fields identify it.
|
|
37
|
+
if it.has("child") and it.has("styles") {
|
|
38
|
+
let (body, closing) = split-closing(it.child)
|
|
39
|
+
let restyle = part => (it.func())(part, it.styles)
|
|
40
|
+
return (restyle(body), restyle(closing))
|
|
41
|
+
}
|
|
42
|
+
if not it.has("children") { return (it, []) }
|
|
43
|
+
let children = it.children
|
|
44
|
+
let boundary = children.position(child => child.at("label", default: none) == <usaf-letter-closing>)
|
|
45
|
+
if boundary == none { return (it, []) }
|
|
46
|
+
// `sum` over `join`: an empty half is `none` from a join and `[]` from this.
|
|
47
|
+
(children.slice(0, boundary).sum(default: []), children.slice(boundary).sum(default: []))
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// The body's blocks in order — its own paragraphs, and each list, table and
|
|
51
|
+
// block quote whole — so the last can be found; and how deep in one of those
|
|
52
|
+
// containers the current paragraph sits.
|
|
53
|
+
#let BLOCKS = counter("usaf-letter-blocks")
|
|
54
|
+
#let NESTED = state("usaf-letter-nested", 0)
|
|
55
|
+
|
|
56
|
+
/// Whether a body's last block holds the signature to its page: a sticky block
|
|
57
|
+
/// relocates whole rather than splitting, so one taller than a third of the
|
|
58
|
+
/// text height is left to the break, which leaves its own tail above the
|
|
59
|
+
/// signature.
|
|
60
|
+
///
|
|
61
|
+
/// - it (content): The last block
|
|
62
|
+
/// -> bool
|
|
63
|
+
#let keeps-signature(it) = {
|
|
64
|
+
let budget = (page.height - spacing.margin * 2) / 3
|
|
65
|
+
measure(it, width: page.width - spacing.margin * 2).height <= budget
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/// Counts a container as one block of the body and the paragraphs inside it
|
|
69
|
+
/// as none, and sets it a blank line off the paragraphs around it.
|
|
70
|
+
///
|
|
71
|
+
/// - it (content): The container
|
|
72
|
+
/// -> content
|
|
73
|
+
#let container(it) = context {
|
|
74
|
+
if NESTED.get() > 0 { return it }
|
|
75
|
+
BLOCKS.step()
|
|
76
|
+
NESTED.update(n => n + 1)
|
|
77
|
+
context {
|
|
78
|
+
let last = BLOCKS.get() == BLOCKS.final()
|
|
79
|
+
block(above: par.spacing, sticky: last and keeps-signature(it), it)
|
|
80
|
+
}
|
|
81
|
+
NESTED.update(n => n - 1)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/// Show rule for the personal letter's body.
|
|
85
|
+
///
|
|
86
|
+
/// - it (content): Body content
|
|
87
|
+
/// -> content
|
|
88
|
+
#let mainmatter(it) = {
|
|
89
|
+
let (body, closing) = split-closing(it)
|
|
90
|
+
context {
|
|
91
|
+
// `par.leading` and `par.spacing` are both half an em, so a paragraph break
|
|
92
|
+
// would otherwise land on the page as an ordinary line break. A blank line
|
|
93
|
+
// is what separates one letter paragraph from the next.
|
|
94
|
+
set par(
|
|
95
|
+
first-line-indent: (amount: paragraph-indent, all: true),
|
|
96
|
+
spacing: spacing.line + line-stride(),
|
|
97
|
+
)
|
|
98
|
+
// The indent belongs to the letter's own paragraphs. Inside a list, a
|
|
99
|
+
// quote, or a table cell, a line already sits where its container put it.
|
|
100
|
+
show list: it => {
|
|
101
|
+
set par(first-line-indent: 0pt)
|
|
102
|
+
container(it)
|
|
103
|
+
}
|
|
104
|
+
show enum: it => {
|
|
105
|
+
set par(first-line-indent: 0pt)
|
|
106
|
+
container(it)
|
|
107
|
+
}
|
|
108
|
+
show table: it => {
|
|
109
|
+
set par(first-line-indent: 0pt)
|
|
110
|
+
container(render-memo-table(it))
|
|
111
|
+
}
|
|
112
|
+
// A block quote is the body's unindented block: the author's lines as
|
|
113
|
+
// written, flush with the margin, which is what lets a letter carry a
|
|
114
|
+
// roster of names or an address without the paragraph indent claiming its
|
|
115
|
+
// first line.
|
|
116
|
+
show quote.where(block: true): it => {
|
|
117
|
+
set par(first-line-indent: 0pt)
|
|
118
|
+
container(it.body)
|
|
119
|
+
}
|
|
120
|
+
show raw.where(block: true): container
|
|
121
|
+
// AFH 33-337: "Do not place the signature element on a continuation page
|
|
122
|
+
// by itself." The signature block has no keep-with-previous of its own —
|
|
123
|
+
// Typst has no such property — so the anchor comes from this side: the
|
|
124
|
+
// body's last block, a paragraph or a container, is set sticky, carried
|
|
125
|
+
// onto the next page along with the signature instead of breaking away
|
|
126
|
+
// from it.
|
|
127
|
+
show par: p => context {
|
|
128
|
+
if NESTED.get() > 0 { return p }
|
|
129
|
+
BLOCKS.step()
|
|
130
|
+
context {
|
|
131
|
+
if BLOCKS.get() != BLOCKS.final() { return p }
|
|
132
|
+
// `above` stands in for the paragraph spacing a bare paragraph would
|
|
133
|
+
// have taken from the one before it.
|
|
134
|
+
block(sticky: keeps-signature(p), above: par.spacing, p)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
body
|
|
138
|
+
}
|
|
139
|
+
closing
|
|
140
|
+
}
|