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 raw: set text(font: "Inconsolata")
|
||||||
show heading: set block(above: 1.4em, below: 1em)
|
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(
|
grid(
|
||||||
columns: (2fr, 1fr, 2fr),
|
columns: (2fr, 1fr, 2fr),
|
||||||
par(de),
|
par(de),
|
||||||
text[],
|
text[],
|
||||||
text[
|
text[
|
||||||
#lieu
|
#formatLieuDate(lieu, date)
|
||||||
#if date.trim().len() != 0 [, le #date ]
|
|
||||||
] + v(2em),
|
] + v(2em),
|
||||||
text[],
|
text[],
|
||||||
text[],
|
text[],
|
||||||
|
@ -19,7 +19,7 @@ parameters, with the [`lettre.typ`](./lettre.typ) file in the same folder:
|
|||||||
],
|
],
|
||||||
objet: "subject of the letter", // optional
|
objet: "subject of the letter", // optional
|
||||||
date: "date of sending", // optional
|
date: "date of sending", // optional
|
||||||
lieu: "location",
|
lieu: "location", // optional
|
||||||
introduction: "opening",
|
introduction: "opening",
|
||||||
cloture: "closing",
|
cloture: "closing",
|
||||||
signature: "signature",
|
signature: "signature",
|
||||||
|
Loading…
Reference in New Issue
Block a user