chore(glossy): format with typestyle
This commit is contained in:
28 files changed
+668
-532
No files matched your search
@@ -6,10 +6,11 @@
|
||||
tps: (
|
||||
short: "TPS",
|
||||
long: "test procedure specification",
|
||||
description: "A document on how to run all the test procedures"),
|
||||
description: "A document on how to run all the test procedures",
|
||||
),
|
||||
)
|
||||
|
||||
#show: init-glossary.with(myGlossary, show-term: (body) => [#emph(body)])
|
||||
#show: init-glossary.with(myGlossary, show-term: body => [#emph(body)])
|
||||
|
||||
#set heading(numbering: "1.1")
|
||||
#set page(numbering: "1")
|
||||
@@ -43,8 +44,15 @@ Now make sure I get your @tps:short reports by 2pm!
|
||||
These modifiers are semantically mutually exclusive. When multiple are used,
|
||||
`glossy` throws an error to the compiler, explaining the problem.
|
||||
|
||||
#import "/src/gloss.typ": __gls, __default-format-term
|
||||
#let manual-gls(key, mods) = __gls(key, modes-modifiers: mods, format-term: __default-format-term, show-term: (body) => [#strong(body)], term-links: false, display-text: none)
|
||||
#import "/src/gloss.typ": __default-format-term, __gls
|
||||
#let manual-gls(key, mods) = __gls(
|
||||
key,
|
||||
modes-modifiers: mods,
|
||||
format-term: __default-format-term,
|
||||
show-term: body => [#strong(body)],
|
||||
term-links: false,
|
||||
display-text: none,
|
||||
)
|
||||
#assert-panic(manual-gls.with("tps", ("short", "long")))
|
||||
#let msg-short-long = "panicked with: \"Cannot mix modes \", (\"short\", \"long\"), \", pick one.\""
|
||||
#let msg-short-both = "panicked with: \"Cannot mix modes \", (\"short\", \"both\"), \", pick one.\""
|
||||
@@ -55,14 +63,29 @@ These modifiers are semantically mutually exclusive. When multiple are used,
|
||||
columns: 2,
|
||||
table.header([*Input*], [*Error*]),
|
||||
|
||||
[`@tps:short:long` ], [#assert.eq(catch(manual-gls.with("tps", ("short", "long"))),
|
||||
msg-short-long)#msg-short-long],
|
||||
[`@tps:short:both` ], [#assert.eq(catch(manual-gls.with("tps", ("short", "both"))),
|
||||
msg-short-both)#msg-short-both],
|
||||
[`@tps:long:both` ], [#assert.eq(catch(manual-gls.with("tps", ("long", "both"))),
|
||||
msg-long-both)#msg-long-both],
|
||||
[`@tps:short:long:both`], [#assert.eq(catch(manual-gls.with("tps", ("short", "long", "both"))),
|
||||
msg-short-long-both)#msg-short-long-both],
|
||||
[`@tps:short:long` ],
|
||||
[#assert.eq(
|
||||
catch(manual-gls.with("tps", ("short", "long"))),
|
||||
msg-short-long,
|
||||
)#msg-short-long],
|
||||
|
||||
[`@tps:short:both` ],
|
||||
[#assert.eq(
|
||||
catch(manual-gls.with("tps", ("short", "both"))),
|
||||
msg-short-both,
|
||||
)#msg-short-both],
|
||||
|
||||
[`@tps:long:both` ],
|
||||
[#assert.eq(
|
||||
catch(manual-gls.with("tps", ("long", "both"))),
|
||||
msg-long-both,
|
||||
)#msg-long-both],
|
||||
|
||||
[`@tps:short:long:both`],
|
||||
[#assert.eq(
|
||||
catch(manual-gls.with("tps", ("short", "long", "both"))),
|
||||
msg-short-long-both,
|
||||
)#msg-short-long-both],
|
||||
)
|
||||
|
||||
#let my-theme = (
|
||||
@@ -88,12 +111,10 @@ These modifiers are semantically mutually exclusive. When multiple are used,
|
||||
block(
|
||||
grid(
|
||||
columns: (auto, 1fr, auto),
|
||||
output,
|
||||
repeat([#h(0.25em) . #h(0.25em)]),
|
||||
entry.pages.join(", "),
|
||||
)
|
||||
output, repeat([#h(0.25em) . #h(0.25em)]), entry.pages.join(", "),
|
||||
),
|
||||
)
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
#glossary(theme: my-theme)
|
||||
Reference in new issue
Block a user