docs(readme): add usage + example

This commit is contained in:
Fabrice Mouhartem 2024-10-19 21:37:21 +02:00
parent a1f2ab7982
commit 45a8a53404
Signed by: fmouhart
GPG Key ID: 2C5033B228CFE4E7

View File

@ -1 +1,42 @@
A simple template for French letters for typst. 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:
```typst
#import "lettre.typ": *
#show link: strong
#show: doc => lettre(
de: [
Sender\
Address
],
pour: [
Recipient\
Address
],
objet: "subject of the letter", // optional
date: "date of sending", // optional
lieu: "location",
introduction: "opening",
cloture: "closing",
signature: "signature",
post: [
post-letter (e.g., post-scriptum)
],
doc
)
```
Now you can fill the letter afterward, and compile your document with:
```bash
typst compile <filename.typ>
```
## Example
An example file is given in the [`exemple.typ`](./exemple.typ) file in the repository.