95 lines
2.1 KiB
Markdown
95 lines
2.1 KiB
Markdown
# Unofficial KFU Typst letter template
|
|
|
|

|
|
|
|
## Installation (Linux only)
|
|
|
|
#### Using [`typship`](https://github.com/sjfhsjfh/typship)
|
|
|
|
```bash
|
|
typship download -n local https://imsc.uni-graz.at/git/gjankowiak/typst-kfu-letter
|
|
```
|
|
|
|
#### Manually
|
|
|
|
```bash
|
|
mkdir -p ~/.local/share/typst/packages/local/kfu-letter/
|
|
cd ~/.local/share/typst/packages/local/kfu-letter/
|
|
curl https://imsc.uni-graz.at/git/gjankowiak/typst-kfu-letter/archive/0.1.0.tar.gz | tar zx --xform 's/typst-kfu-letter/0.1.0/'
|
|
```
|
|
|
|
## Quickstart (CLI)
|
|
|
|
```sh
|
|
typst init @local/kfu-letter letter
|
|
```
|
|
|
|
|
|
## Template
|
|
|
|
```typst
|
|
#import "@local/kfu-letter:0.1.0": letter
|
|
|
|
#letter(
|
|
lang: "de",
|
|
|
|
place: "Graz",
|
|
// the date is not automatically localized in Typst,
|
|
// you have to date care of that.
|
|
date: datetime.today().display("[day].[month].[year]"),
|
|
|
|
title: "Dr.",
|
|
firstname: "John",
|
|
lastname: "Doe",
|
|
|
|
departement: [Institut für Mathematik und Wissenschaftliches Rechnen],
|
|
|
|
address: "Heinrichstraße 36, 8010 Graz",
|
|
|
|
phone: 1234,
|
|
|
|
homepage: "https://imsc.uni-graz.at/doe",
|
|
|
|
subject: [The letter subject should fit on one line.],
|
|
|
|
signature: none,
|
|
// [Mit freundlichen Grüßen
|
|
//
|
|
// Dr. John Doe
|
|
// #image("signature.png")],
|
|
[
|
|
This is the letter' first page's body.
|
|
|
|
#lorem(200)
|
|
|
|
#lorem(200)
|
|
])
|
|
|
|
// The CD manual of the KFU [1] requires the contact information of the sender to be placed in the footer
|
|
// except for the first page, where it is placed above the date. This is not naturally doable in Typst.
|
|
// On way is to provide the content of the other pages separately with the `body` option, as follows:
|
|
//
|
|
// [1] https://static.uni-graz.at/fileadmin/presse/Sonstiges/Corporate_Design_Manual_Uni_Graz_2023.pdf
|
|
//
|
|
// #letter( /* your options here */
|
|
// date: datetime.today().display("[day].[month].[year]"),
|
|
// [
|
|
// This is the content of the first page, you have to make sure it does not overflows to the second page.
|
|
// ],
|
|
// body: [
|
|
// This is the content of the following pages. It will always start with a page break.
|
|
//
|
|
// #lorem(200)
|
|
//
|
|
// #lorem(200)
|
|
// ])
|
|
```
|
|
|
|
|
|
Compile with
|
|
|
|
```sh
|
|
typst compile letter.typ
|
|
```
|
|
|
|
Tested typst version: `0.14.2`.
|