Compare commits
2 Commits
81556b418b
...
a1f2ab7982
Author | SHA1 | Date | |
---|---|---|---|
a1f2ab7982 | |||
77805c2826 |
BIN
exemple.pdf
Normal file
BIN
exemple.pdf
Normal file
Binary file not shown.
30
exemple.typ
Normal file
30
exemple.typ
Normal file
|
@ -0,0 +1,30 @@
|
|||
#import "lettre.typ": *
|
||||
#show link: strong
|
||||
|
||||
#show: doc => lettre(
|
||||
de: [
|
||||
Ex Péditeur,\
|
||||
12 rue des Sept Nains\
|
||||
12340, Bozouls, France
|
||||
],
|
||||
pour: [
|
||||
Dest I’nataire,\
|
||||
77 avenue du Moulin,\
|
||||
56780, Île aux Moines, Bretagne
|
||||
],
|
||||
objet: "Attestation sur l’honneur",
|
||||
date: "10 septembre 2024",
|
||||
lieu: "Bozouls",
|
||||
introduction: "Monsieur",
|
||||
cloture: "Cordialement,",
|
||||
signature: "Ex P.",
|
||||
post: [
|
||||
#emph("PS: Finalement, rien.")
|
||||
],
|
||||
doc
|
||||
)
|
||||
|
||||
je soussigné, Ex Péditeur, atteste par la présente sur l’honneur que ce document
|
||||
a été réalisé avec #link("https://typst.app/")[Typst].
|
||||
|
||||
Les sources sont disponibles à l’adresse suivante: #link("https://git.epheme.re/fmouhart/typst-lettre").
|
54
lettre.typ
Normal file
54
lettre.typ
Normal file
|
@ -0,0 +1,54 @@
|
|||
#let lettre(
|
||||
de: "",
|
||||
pour: "",
|
||||
objet: "",
|
||||
date: "",
|
||||
lieu: "",
|
||||
introduction: "",
|
||||
cloture: "",
|
||||
signature: "",
|
||||
post: "",
|
||||
doc
|
||||
) = {
|
||||
set page(margin: 1.5in)
|
||||
set par(leading: 0.55em, first-line-indent: 2em, justify: true, spacing: 0.55em)
|
||||
set text(font: "Libertinus Serif", size: 12pt)
|
||||
set document(title: objet, author: signature)
|
||||
show raw: set text(font: "Inconsolata")
|
||||
show heading: set block(above: 1.4em, below: 1em)
|
||||
|
||||
grid(
|
||||
columns: (2fr, 1fr, 2fr),
|
||||
par(de),
|
||||
text[],
|
||||
text[
|
||||
#lieu
|
||||
#if date.trim().len() != 0 [, le #date ]
|
||||
] + v(2em),
|
||||
text[],
|
||||
text[],
|
||||
par(pour)
|
||||
)
|
||||
v(1em)
|
||||
if objet.trim().len() > 0 {
|
||||
heading(level: 3, text("Objet: " + objet))
|
||||
v(1em)
|
||||
}
|
||||
par(first-line-indent: 0pt, text(introduction + ","))
|
||||
v(1em)
|
||||
doc
|
||||
v(1em)
|
||||
par(first-line-indent: 0pt, text(cloture))
|
||||
v(.7em)
|
||||
grid(
|
||||
columns: (2fr, 1fr),
|
||||
text[],
|
||||
text(signature)
|
||||
)
|
||||
v(1em)
|
||||
post
|
||||
}
|
||||
|
||||
#let er = [#super[er]]
|
||||
#let ème = [#super[ème]]
|
||||
#let no(num) = { text([n°~] + num) }
|
Loading…
Reference in New Issue
Block a user