Compare commits
5 Commits
dccd6c9d6d
...
main
Author | SHA1 | Date | |
---|---|---|---|
63acdd1397
|
|||
1961298f00
|
|||
9af1dcb98b
|
|||
be06465111
|
|||
5235b3a891
|
BIN
exemple.pdf
BIN
exemple.pdf
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
#import "lettre.typ": *
|
||||
#show link: strong
|
||||
|
||||
#show: doc => lettre(
|
||||
#show: lettre.with(
|
||||
de: [
|
||||
Ex Péditeur,\
|
||||
12 rue des Sept Nains\
|
||||
@ -21,7 +21,6 @@
|
||||
post: [
|
||||
#emph("PS: Finalement, rien.")
|
||||
],
|
||||
doc
|
||||
)
|
||||
|
||||
je soussigné, Ex Péditeur, atteste par la présente sur l’honneur que ce document
|
||||
|
13
lettre.typ
13
lettre.typ
@ -17,13 +17,22 @@
|
||||
show raw: set text(font: "Inconsolata")
|
||||
show heading: set block(above: 1.4em, below: 1em)
|
||||
|
||||
let formatLieuDate(lieu, date) = {
|
||||
let isDate = date.trim().len() > 0;
|
||||
let isLieu = lieu.trim().len() > 0;
|
||||
if isLieu [#lieu]
|
||||
if isDate {
|
||||
if isLieu [, ]
|
||||
[le #date]
|
||||
}
|
||||
}
|
||||
|
||||
grid(
|
||||
columns: (2fr, 1fr, 2fr),
|
||||
par(de),
|
||||
text[],
|
||||
text[
|
||||
#lieu
|
||||
#if date.trim().len() != 0 [, le #date ]
|
||||
#formatLieuDate(lieu, date)
|
||||
] + v(2em),
|
||||
text[],
|
||||
text[],
|
||||
|
@ -3,13 +3,12 @@ A simple template for French letters for typst.
|
||||
## Usage
|
||||
|
||||
To create a letter, write a typst document while defining the following
|
||||
parameters, with the `lettre.typ` file in the same folder:
|
||||
parameters, with the [`lettre.typ`](./lettre.typ) file in the same folder:
|
||||
|
||||
```typst
|
||||
#import "lettre.typ": *
|
||||
#show link: strong
|
||||
|
||||
#show: doc => lettre(
|
||||
#show: lettre.with(
|
||||
de: [
|
||||
Sender\
|
||||
Address
|
||||
@ -20,14 +19,13 @@ parameters, with the `lettre.typ` file in the same folder:
|
||||
],
|
||||
objet: "subject of the letter", // optional
|
||||
date: "date of sending", // optional
|
||||
lieu: "location",
|
||||
lieu: "location", // optional
|
||||
introduction: "opening",
|
||||
cloture: "closing",
|
||||
signature: "signature",
|
||||
post: [
|
||||
post-letter (e.g., post-scriptum)
|
||||
],
|
||||
doc
|
||||
)
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user