Stylistic changes
This commit is contained in:
parent
8808f32ece
commit
db5c830b5a
1 changed files with 20 additions and 6 deletions
26
lib.typ
26
lib.typ
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#let signature(at: none, date: none, ..signatories) = {
|
||||
let answer = [ _Fait à_ ]
|
||||
|
||||
|
|
@ -15,16 +16,19 @@
|
|||
answer += text(weight: "bold", date.display("[day]/[month]/[year]"))
|
||||
}
|
||||
|
||||
let grid-construction(s) = text(weight: "bold", s.at(0)) + "\n" + text(style: "italic", s.at(1))
|
||||
let g = signatories.pos().map(grid-construction)
|
||||
let names-grid-construction(s) = text(weight: "bold", s.at(0)) + "\n" + text(style: "italic", s.at(1))
|
||||
let sign-grid-construction(s) = if (s.len() >= 3) { align(left, pad(5pt, s.at(2))) } else { [] }
|
||||
let n = signatories.pos().map(names-grid-construction)
|
||||
let s = signatories.pos().map(sign-grid-construction)
|
||||
|
||||
answer += grid(columns: (50%, 50%), rows: (100pt), ..g)
|
||||
answer += grid(columns: (50%, 50%), rows: (auto, 70pt), ..n, ..s)
|
||||
|
||||
block(answer, breakable: false)
|
||||
}
|
||||
|
||||
#let template(body, title: "Title", subtitle: "Subtitle", logo: none, watermark: "", size: 10pt) = {
|
||||
// Apparence du document
|
||||
// Document appearence
|
||||
set document(title: title + " ‑ " + subtitle)
|
||||
set page(columns: 2, margin: 1.5cm, numbering: "1/1")
|
||||
set page(background: rotate(-55deg, text(size: 50pt, rgb(0, 0, 0, 30))[*#watermark*]))
|
||||
|
||||
|
|
@ -34,6 +38,10 @@
|
|||
|
||||
set list(marker: sym.bar.h)
|
||||
|
||||
set enum(numbering: "(i)")
|
||||
|
||||
show link: l => [#text(underline(l), fill: color.blue)]
|
||||
|
||||
// Style des titres
|
||||
let premier(.., last, format: "I") = numbering(format, last) + if last == 1 { super[er] }
|
||||
|
||||
|
|
@ -87,14 +95,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
// Début du document
|
||||
// Start of the document
|
||||
place(
|
||||
top + center,
|
||||
scope: "parent",
|
||||
float: true,
|
||||
align(center)[
|
||||
#if logo != none {
|
||||
image(logo, height: 5em)
|
||||
if type(logo) == str {
|
||||
image(logo, alt: "Logo", height: 5em)
|
||||
} else if type(logo) == content {
|
||||
logo
|
||||
} else {
|
||||
panic("logo is not of type str or content")
|
||||
}
|
||||
}
|
||||
|
||||
#text(size: 2.5em, weight: "extrabold")[#title]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue