ravenous_typst/setup/model.typ

121 lines
2.0 KiB
Plaintext

// ----- IMPORTS -----
#import "@preview/glossarium:0.5.10": gls, glspl, make-glossary, print-glossary, register-glossary
// Setup glossaries
#import "glossary.typ": glossary
#let model(
variables,
document,
colors,
) = {
set page(
paper: "a4",
margin: (
top: 2.2cm,
bottom: 2.4cm,
left: 2.5cm,
right: 2.5cm,
),
numbering: "1",
)
set text(
font: "Libertinus Serif",
size: 11pt,
lang: "fr",
)
set par(
justify: true,
leading: 0.7em,
first-line-indent: 1em,
spacing: 0.9em,
)
set text(fill: colors.ink)
set heading(numbering: none)
show heading.where(level: 1): set align(center)
show heading.where(level: 1): it => block(
above: 2em,
below: 1.2em,
)[
#text(
font: "Libertinus Serif",
size: 22pt,
weight: "bold",
fill: colors.blood,
)[
#it.body
]
#stack(
dir: ltr,
spacing: 0.4em,
[
#box(width: 1.5cm, height: 0.5pt, fill: colors.gold)
],
[
#text(size: 9pt, fill: colors.gold)[✦]
],
[
#box(width: 1.5cm, height: 0.5pt, fill: colors.gold)
],
)
]
show heading.where(level: 2): it => block(
above: 1.5em,
below: 0.7em,
)[
#text(
size: 16pt,
weight: "bold",
fill: colors.blood,
)[ #it.body ]
]
show heading.where(level: 3): it => block(
above: 1em,
below: 0.4em,
)[
#text(
size: 12pt,
weight: "bold",
fill: colors.gold,
)[ #it.body ]
]
show strong: it => text(
weight: "bold",
fill: colors.blood,
)[#it]
show emph: it => text(
style: "italic",
)[#it]
show link: set text(fill: colors.blood)
set table(
stroke: 0.5pt + rgb("#B8A98E"),
)
show: make-glossary
register-glossary(glossary)
document
[= Glossaire]
// print-glossary(
// symbols,
// shorthands: ("plural", "capitalize", "capitalize-plural", "short", "long"),
// show-all: true,
// )
print-glossary(
glossary,
entry-sortkey: x => x.long,
shorthands: ("plural", "capitalize", "capitalize-plural", "short", "long"),
show-all: true,
)
}
#let class_model() = { }