generated from templates/typst-grammar
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.3 KiB
64 lines
1.3 KiB
#let conf(
|
|
clong-title: "",
|
|
title: "",
|
|
author: "Annwan",
|
|
date: datetime.today().display(),
|
|
main-font: (font: "Andika", stylistic-set: 13),
|
|
clong-font: it => text(font: "Charis SIL", it),
|
|
doc
|
|
) = {
|
|
set text(..main-font)
|
|
set par(justify: true)
|
|
set heading(numbering: "I.1.1.1")
|
|
show heading.where(level: 1): it => align(center, it)
|
|
align(horizon, {
|
|
align(center, text(20pt)[*#title*])
|
|
if clong-title != "" {
|
|
align(center, clong-font(text(18pt)[*#clong-title*]))
|
|
}
|
|
align(center, author)
|
|
align(center, date)
|
|
})
|
|
|
|
pagebreak()
|
|
outline(
|
|
fill: repeat([#h(1em).])
|
|
)
|
|
pagebreak(weak: true)
|
|
set page(
|
|
footer: [
|
|
#h(1fr)
|
|
#context counter(page).get().at(0)
|
|
#h(1fr)
|
|
]
|
|
)
|
|
counter(page).update(1)
|
|
doc
|
|
}
|
|
#let dict(
|
|
data: (),
|
|
key: it => it.at("w"),
|
|
wformat: it => [*#it*]
|
|
) = {
|
|
pagebreak(weak: true)
|
|
set page(
|
|
footer: [
|
|
#h(1fr)
|
|
#context numbering("i", counter(page).get().at(0))
|
|
#h(1fr)
|
|
]
|
|
)
|
|
counter(page).update(1)
|
|
set heading(
|
|
numbering: none, outlined: false
|
|
)
|
|
[= Dictionary]
|
|
|
|
columns(2, {
|
|
let sorted_data = data.sorted(key: key)
|
|
for word in sorted_data [
|
|
#wformat(word.at("w")) /#word.at("i")/ _#word.at("p")_ #eval(word.at("n"), mode: "markup") \
|
|
]
|
|
})
|
|
}
|
|
|