feat: write template
This commit is contained in:
commit
a0a6d2cf84
98 files changed
+6609
No files matched your search
@@ -0,0 +1,45 @@
|
||||
#let _acronymDict = state("b57641b0-ef4f-4914-9114-20ce81a4a2ab", (:))
|
||||
|
||||
|
||||
#let setDefaults(defaults) = {
|
||||
_acronymDict.update(dict => {
|
||||
for (acronym, explanation) in defaults.pairs() {
|
||||
dict.insert(acronym, explanation)
|
||||
}
|
||||
return dict
|
||||
})
|
||||
}
|
||||
|
||||
#let acronym(acronym, explanation) = {
|
||||
_acronymDict.update(dict => {
|
||||
dict.insert(acronym, explanation)
|
||||
return dict
|
||||
})
|
||||
acronym
|
||||
}
|
||||
|
||||
#let acronymList() = {
|
||||
context {
|
||||
[ = Abkürzungsverzeichnis]
|
||||
terms(tight: true)
|
||||
figure(
|
||||
table(
|
||||
columns: (1fr, 3fr),
|
||||
table.header([Abkürzung], [Bedeutung]),
|
||||
|
||||
.._acronymDict
|
||||
.get()
|
||||
.keys()
|
||||
.sorted(key: lower)
|
||||
.map(key => {
|
||||
return (
|
||||
key,
|
||||
_acronymDict.get().at(key),
|
||||
)
|
||||
})
|
||||
.flatten(),
|
||||
),
|
||||
caption: [Abkürzungsverzeichnis],
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user