Browse Source

Template

main
Annwan 2 months ago
commit
22740805bd
  1. 1
      .gitignore
  2. 2
      Makefile
  3. 0
      README
  4. 64
      annwan-grammar.typ
  5. 4
      dictionnary.yml
  6. 4
      main.typ

1
.gitignore

@ -0,0 +1 @@
main.pdf

2
Makefile

@ -0,0 +1,2 @@
main.pdf: annwan-grammar.typ main.typ
typst c main.typ

0
README

64
annwan-grammar.typ

@ -0,0 +1,64 @@
#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") \
]
})
}

4
dictionnary.yml

@ -0,0 +1,4 @@
- w: Word In Language Goes Here
i: Pronounciation Goes Here
p: Part Of Speech Goes Here
n: Definition Goes Here

4
main.typ

@ -0,0 +1,4 @@
#import "annwan-grammar.typ": *
#show: it => conf(title: "", clong-title: "",clong-font: it => text(font: "Charis SIL", it), it)
#dict(data: yaml("dictionnary.yml"), wformat: it => text(font: "Charis SIL", [*#it*]))
Loading…
Cancel
Save