fix(template): fix the display of location and date
- extra space - without the location, the comma still appeared - docs(readme): add the optional comment for the sending location
This commit is contained in:
parent
be06465111
commit
9af1dcb98b
BIN
exemple.pdf
BIN
exemple.pdf
Binary file not shown.
14
lettre.typ
14
lettre.typ
@ -17,13 +17,23 @@
|
||||
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]
|
||||
else []
|
||||
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[],
|
||||
|
@ -19,7 +19,7 @@ parameters, with the [`lettre.typ`](./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",
|
||||
|
Loading…
Reference in New Issue
Block a user