mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2026-03-22 00:26:23 +00:00
Compare commits
9 Commits
c97aaca839
...
v1.1.1
| Author | SHA1 | Date | |
|---|---|---|---|
| c0f765374a | |||
| 8566c88f6a | |||
| 5a202257ba | |||
| 65393fa204 | |||
| 5b28a2b6cc | |||
| 9d25c7de18 | |||
| 11d490b101 | |||
| dd681be2da | |||
| d33c6f3145 |
17
README.md
17
README.md
@@ -26,7 +26,7 @@ configure the whole document and `attachment` helper function. Important argumen
|
|||||||
`code` and may include `location` and `email`.
|
`code` and may include `location` and `email`.
|
||||||
- `advisors`: Array of advisor dictionaries with `title` and `name`.
|
- `advisors`: Array of advisor dictionaries with `title` and `name`.
|
||||||
- `reviewer`: Reviewer dictionary with `name`.
|
- `reviewer`: Reviewer dictionary with `name`.
|
||||||
- `thesis-type`: e.g., `"Bakalaura darbs"`, `"Kvalifikācijas Darbs"`.
|
- `thesis-type`: Type of thesis - `"bachelor"`, `"master"`, `"course"`, or `"qualification"`. The documentary page adapts its content based on this value.
|
||||||
- `date`: `datetime(...)` value for the thesis date. Defaults to `today`.
|
- `date`: `datetime(...)` value for the thesis date. Defaults to `today`.
|
||||||
- `place`: Place string (e.g., `"Rīga"`).
|
- `place`: Place string (e.g., `"Rīga"`).
|
||||||
- `abstract`: A record with `primary` and `secondary` abstracts. Each has
|
- `abstract`: A record with `primary` and `secondary` abstracts. Each has
|
||||||
@@ -48,7 +48,7 @@ function in a show rule. If you want to change an existing project to use this
|
|||||||
template, you can add a show rule like this at the top of your file:
|
template, you can add a show rule like this at the top of your file:
|
||||||
|
|
||||||
```typst
|
```typst
|
||||||
#import "@preview/solo-lu-df:1.0.0": *
|
#import "@preview/solo-lu-df:1.1.1": *
|
||||||
|
|
||||||
#show: ludf.with(
|
#show: ludf.with(
|
||||||
title: "Darba Nosaukums",
|
title: "Darba Nosaukums",
|
||||||
@@ -58,7 +58,7 @@ template, you can add a show rule like this at the top of your file:
|
|||||||
advisors: (
|
advisors: (
|
||||||
(title: "Mg. dat.", name: "Ivars Ozoliņš"),
|
(title: "Mg. dat.", name: "Ivars Ozoliņš"),
|
||||||
),
|
),
|
||||||
reviewer: (name: "Prof. Anna Liepa"),
|
reviewer: (title: "", name: "Prof. Anna Liepa"),
|
||||||
date: datetime(year: 2025, month: 1, day: 1),
|
date: datetime(year: 2025, month: 1, day: 1),
|
||||||
place: "Rīga",
|
place: "Rīga",
|
||||||
bibliography: bibliography("bibliography.yml"),
|
bibliography: bibliography("bibliography.yml"),
|
||||||
@@ -83,11 +83,16 @@ template, you can add a show rule like this at the top of your file:
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
A ready-to-edit qualification thesis example is included in the repository:
|
Ready-to-edit examples for different thesis types are included:
|
||||||
|
|
||||||
View the example on GitHub: <https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples/qualification-thesis>
|
- **Qualification thesis**: [`examples/qualification-thesis/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples/qualification-thesis)
|
||||||
|
- **Course work**: [`examples/course-work/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples/course-work)
|
||||||
|
- **Bachelor thesis**: [`examples/bachelor-thesis/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples/bachelor-thesis)
|
||||||
|
- **Master thesis**: [`examples/master-thesis/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples/master-thesis)
|
||||||
|
|
||||||
The example contains `main.typ`, `bibliography.yml` and small helpers under
|
View the examples on GitHub: <https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples>
|
||||||
|
|
||||||
|
The qualification thesis example contains `main.typ`, `bibliography.yml` and small helpers under
|
||||||
`utils/`. Use it as a starting point or copy it into a new project.
|
`utils/`. Use it as a starting point or copy it into a new project.
|
||||||
|
|
||||||
## Tips
|
## Tips
|
||||||
|
|||||||
26
examples/bachelor-thesis/README.md
Normal file
26
examples/bachelor-thesis/README.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
Bachelor thesis example (solo-lu-df)
|
||||||
|
|
||||||
|
This folder contains a ready-to-edit bachelor thesis example built with
|
||||||
|
the `solo-lu-df` Typst template:
|
||||||
|
|
||||||
|
- `main.typ` — Typst source (the example document).
|
||||||
|
- `bibliography.yml` — example bibliography entries (create as needed).
|
||||||
|
|
||||||
|
## How to edit
|
||||||
|
|
||||||
|
Open `examples/bachelor-thesis/main.typ` and modify the `ludf.with(...)`
|
||||||
|
call to change title, authors, advisors, reviewer, date, place, abstract,
|
||||||
|
and bibliography. The example demonstrates:
|
||||||
|
|
||||||
|
- Title/author/advisor metadata
|
||||||
|
- Reviewer for bachelor thesis
|
||||||
|
- Primary and secondary abstracts with keywords
|
||||||
|
|
||||||
|
## Thesis type
|
||||||
|
|
||||||
|
This example uses `thesis-type: "bachelor"` which generates the appropriate
|
||||||
|
documentary page for bachelor theses.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the MIT-0 License - see the [LICENSE](./../../LICENSE) file for details.
|
||||||
28
examples/bachelor-thesis/bibliography.yml
Normal file
28
examples/bachelor-thesis/bibliography.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
typst:
|
||||||
|
type: Web
|
||||||
|
title: Typst
|
||||||
|
author:
|
||||||
|
- Mädje
|
||||||
|
- Laurenz
|
||||||
|
- Haug
|
||||||
|
- Martin
|
||||||
|
- Typst Projekta Izstrādātāji
|
||||||
|
url:
|
||||||
|
value: "https://typst.app/"
|
||||||
|
date: 2025-01-01
|
||||||
|
lvs_68:
|
||||||
|
type: Book
|
||||||
|
title: Programmatūras prasību specifikācijas ceļvedis
|
||||||
|
author: Institūcija SIA "Latvijas standarts"
|
||||||
|
issue: 68
|
||||||
|
date: 1996-03-27
|
||||||
|
organization: Latvijas Nacionālais standartizācijas un metroloģijas centrs
|
||||||
|
page-total: 22
|
||||||
|
lvs_72:
|
||||||
|
type: Book
|
||||||
|
title: Ieteicamā prakse programmatūras projektējuma aprakstīšanai
|
||||||
|
author: Institūcija SIA "Latvijas standarts"
|
||||||
|
issue: 72
|
||||||
|
date: 1996-03-27
|
||||||
|
organization: Latvijas Nacionālais standartizācijas un metroloģijas centrs
|
||||||
|
page-total: 13
|
||||||
100
examples/bachelor-thesis/main.typ
Normal file
100
examples/bachelor-thesis/main.typ
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
#import "@preview/solo-lu-df:1.1.1": *
|
||||||
|
|
||||||
|
#show: ludf.with(
|
||||||
|
title: "Bakalaura Darba Nosaukums",
|
||||||
|
thesis-type: "bachelor",
|
||||||
|
authors: (
|
||||||
|
(
|
||||||
|
name: "Jānis Bērziņš",
|
||||||
|
code: "jb12345",
|
||||||
|
location: [Riga, Latvia],
|
||||||
|
email: "jb12345@edu.lu.lv",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
advisors: (
|
||||||
|
(
|
||||||
|
title: "Mg. dat.",
|
||||||
|
name: "Ivars Ozoliņš",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
reviewer: (
|
||||||
|
title: "Prof. Dr. Phys.",
|
||||||
|
name: "Anna Liepa",
|
||||||
|
),
|
||||||
|
date: datetime(
|
||||||
|
year: 2025,
|
||||||
|
month: 1,
|
||||||
|
day: 1,
|
||||||
|
),
|
||||||
|
place: "Rīga",
|
||||||
|
bibliography: bibliography("bibliography.yml"),
|
||||||
|
abstract: (
|
||||||
|
primary: (
|
||||||
|
text: [
|
||||||
|
#lorem(50)
|
||||||
|
|
||||||
|
#lorem(30)
|
||||||
|
|
||||||
|
#lorem(20)
|
||||||
|
],
|
||||||
|
keywords: (
|
||||||
|
"Foo",
|
||||||
|
"Bar",
|
||||||
|
"Baz",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
secondary: (
|
||||||
|
text: [
|
||||||
|
#lorem(20)
|
||||||
|
|
||||||
|
#lorem(30)
|
||||||
|
|
||||||
|
#lorem(50)
|
||||||
|
],
|
||||||
|
keywords: (
|
||||||
|
"foo",
|
||||||
|
"bar",
|
||||||
|
"baz",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
attachments: (
|
||||||
|
attachment(
|
||||||
|
caption: "Attachment table",
|
||||||
|
label: <table-1>,
|
||||||
|
table(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
[foo], [bar],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
attachment(
|
||||||
|
caption: "Another table",
|
||||||
|
table(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
[Column 1], [Column 2],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
= Ievads
|
||||||
|
#lorem(100)
|
||||||
|
|
||||||
|
= Teorētiskais pamatojums
|
||||||
|
#lorem(80)
|
||||||
|
|
||||||
|
== Teorijas apraksts
|
||||||
|
#lorem(60)
|
||||||
|
|
||||||
|
= Prakse
|
||||||
|
#lorem(80)
|
||||||
|
|
||||||
|
== Risinājuma apraksts
|
||||||
|
#lorem(60)
|
||||||
|
|
||||||
|
= Rezultāti
|
||||||
|
#lorem(50)
|
||||||
|
|
||||||
|
= Secinājumi
|
||||||
|
#lorem(30)
|
||||||
25
examples/course-work/README.md
Normal file
25
examples/course-work/README.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
Course work example (solo-lu-df)
|
||||||
|
|
||||||
|
This folder contains a ready-to-edit course work example built with
|
||||||
|
the `solo-lu-df` Typst template:
|
||||||
|
|
||||||
|
- `main.typ` — Typst source (the example document).
|
||||||
|
- `bibliography.yml` — example bibliography entries (create as needed).
|
||||||
|
|
||||||
|
## How to edit
|
||||||
|
|
||||||
|
Open `examples/course-work/main.typ` and modify the `ludf.with(...)`
|
||||||
|
call to change title, authors, advisors, date, place, abstract,
|
||||||
|
and bibliography. The example demonstrates:
|
||||||
|
|
||||||
|
- Title/author/advisor metadata
|
||||||
|
- Primary and secondary abstracts with keywords
|
||||||
|
|
||||||
|
## Thesis type
|
||||||
|
|
||||||
|
This example uses `thesis-type: "course"` which generates the appropriate
|
||||||
|
documentary page for course works.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the MIT-0 License - see the [LICENSE](./../../LICENSE) file for details.
|
||||||
28
examples/course-work/bibliography.yml
Normal file
28
examples/course-work/bibliography.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
typst:
|
||||||
|
type: Web
|
||||||
|
title: Typst
|
||||||
|
author:
|
||||||
|
- Mädje
|
||||||
|
- Laurenz
|
||||||
|
- Haug
|
||||||
|
- Martin
|
||||||
|
- Typst Projekta Izstrādātāji
|
||||||
|
url:
|
||||||
|
value: "https://typst.app/"
|
||||||
|
date: 2025-01-01
|
||||||
|
lvs_68:
|
||||||
|
type: Book
|
||||||
|
title: Programmatūras prasību specifikācijas ceļvedis
|
||||||
|
author: Institūcija SIA "Latvijas standarts"
|
||||||
|
issue: 68
|
||||||
|
date: 1996-03-27
|
||||||
|
organization: Latvijas Nacionālais standartizācijas un metroloģijas centrs
|
||||||
|
page-total: 22
|
||||||
|
lvs_72:
|
||||||
|
type: Book
|
||||||
|
title: Ieteicamā prakse programmatūras projektējuma aprakstīšanai
|
||||||
|
author: Institūcija SIA "Latvijas standarts"
|
||||||
|
issue: 72
|
||||||
|
date: 1996-03-27
|
||||||
|
organization: Latvijas Nacionālais standartizācijas un metroloģijas centrs
|
||||||
|
page-total: 13
|
||||||
92
examples/course-work/main.typ
Normal file
92
examples/course-work/main.typ
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
#import "@preview/solo-lu-df:1.1.1": *
|
||||||
|
|
||||||
|
#show: ludf.with(
|
||||||
|
title: "Kursa Darba Nosaukums",
|
||||||
|
thesis-type: "course",
|
||||||
|
authors: (
|
||||||
|
(
|
||||||
|
name: "Jānis Bērziņš",
|
||||||
|
code: "jb12345",
|
||||||
|
location: [Riga, Latvia],
|
||||||
|
email: "jb12345@edu.lu.lv",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
advisors: (
|
||||||
|
(
|
||||||
|
title: "Mg. dat.",
|
||||||
|
name: "Ivars Ozoliņš",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
reviewer: (
|
||||||
|
title: "Prof. Dr. Phys.",
|
||||||
|
name: "Anna Liepa",
|
||||||
|
),
|
||||||
|
date: datetime(
|
||||||
|
year: 2025,
|
||||||
|
month: 1,
|
||||||
|
day: 1,
|
||||||
|
),
|
||||||
|
place: "Rīga",
|
||||||
|
bibliography: bibliography("bibliography.yml"),
|
||||||
|
abstract: (
|
||||||
|
primary: (
|
||||||
|
text: [
|
||||||
|
#lorem(50)
|
||||||
|
|
||||||
|
#lorem(30)
|
||||||
|
|
||||||
|
#lorem(20)
|
||||||
|
],
|
||||||
|
keywords: (
|
||||||
|
"Foo",
|
||||||
|
"Bar",
|
||||||
|
"Baz",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
secondary: (
|
||||||
|
text: [
|
||||||
|
#lorem(20)
|
||||||
|
|
||||||
|
#lorem(30)
|
||||||
|
|
||||||
|
#lorem(50)
|
||||||
|
],
|
||||||
|
keywords: (
|
||||||
|
"foo",
|
||||||
|
"bar",
|
||||||
|
"baz",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
attachments: (
|
||||||
|
attachment(
|
||||||
|
caption: "Attachment table",
|
||||||
|
label: <table-1>,
|
||||||
|
table(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
[foo], [bar],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
attachment(
|
||||||
|
caption: "Another table",
|
||||||
|
table(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
[Column 1], [Column 2],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
#set heading(numbering: none)
|
||||||
|
= Apzīmējumu saraksts
|
||||||
|
/ Docs: Typst dokumentācija.#footnote[https://typst.com/docs/]
|
||||||
|
/ Universe: Typst kopienas paketes un šabloni.#footnote[https://typst.app/universe/]
|
||||||
|
|
||||||
|
= Ievads
|
||||||
|
#lorem(80)
|
||||||
|
|
||||||
|
= Teorijas apraksts
|
||||||
|
#lorem(60)
|
||||||
|
|
||||||
|
= Secinājumi
|
||||||
|
#lorem(20)
|
||||||
28
examples/master-thesis/README.md
Normal file
28
examples/master-thesis/README.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Master thesis example (solo-lu-df)
|
||||||
|
|
||||||
|
This folder contains a ready-to-edit master thesis example built with
|
||||||
|
the `solo-lu-df` Typst template:
|
||||||
|
|
||||||
|
- `main.typ` — Typst source (the example document).
|
||||||
|
- `bibliography.yml` — example bibliography entries (create as needed).
|
||||||
|
|
||||||
|
## How to edit
|
||||||
|
|
||||||
|
Open `examples/master-thesis/main.typ` and modify the `ludf.with(...)`
|
||||||
|
call to change title, authors, advisors, reviewer, date, place, abstract,
|
||||||
|
and bibliography. The example demonstrates:
|
||||||
|
|
||||||
|
- Title/author/advisor metadata
|
||||||
|
- Multiple advisors for master thesis
|
||||||
|
- Reviewer for master thesis
|
||||||
|
- Primary and secondary abstracts with keywords
|
||||||
|
|
||||||
|
## Thesis type
|
||||||
|
|
||||||
|
This example uses `thesis-type: "master"` which generates the appropriate
|
||||||
|
documentary page for master theses (similar to bachelor, but with "maģistra"
|
||||||
|
instead of "bakalaura" in the footer).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This project is licensed under the MIT-0 License - see the [LICENSE](./../../LICENSE) file for details.
|
||||||
28
examples/master-thesis/bibliography.yml
Normal file
28
examples/master-thesis/bibliography.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
typst:
|
||||||
|
type: Web
|
||||||
|
title: Typst
|
||||||
|
author:
|
||||||
|
- Mädje
|
||||||
|
- Laurenz
|
||||||
|
- Haug
|
||||||
|
- Martin
|
||||||
|
- Typst Projekta Izstrādātāji
|
||||||
|
url:
|
||||||
|
value: "https://typst.app/"
|
||||||
|
date: 2025-01-01
|
||||||
|
lvs_68:
|
||||||
|
type: Book
|
||||||
|
title: Programmatūras prasību specifikācijas ceļvedis
|
||||||
|
author: Institūcija SIA "Latvijas standarts"
|
||||||
|
issue: 68
|
||||||
|
date: 1996-03-27
|
||||||
|
organization: Latvijas Nacionālais standartizācijas un metroloģijas centrs
|
||||||
|
page-total: 22
|
||||||
|
lvs_72:
|
||||||
|
type: Book
|
||||||
|
title: Ieteicamā prakse programmatūras projektējuma aprakstīšanai
|
||||||
|
author: Institūcija SIA "Latvijas standarts"
|
||||||
|
issue: 72
|
||||||
|
date: 1996-03-27
|
||||||
|
organization: Latvijas Nacionālais standartizācijas un metroloģijas centrs
|
||||||
|
page-total: 13
|
||||||
113
examples/master-thesis/main.typ
Normal file
113
examples/master-thesis/main.typ
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
#import "@preview/solo-lu-df:1.1.1": *
|
||||||
|
|
||||||
|
#show: ludf.with(
|
||||||
|
title: "Maģistra Darba Nosaukums",
|
||||||
|
thesis-type: "master",
|
||||||
|
authors: (
|
||||||
|
(
|
||||||
|
name: "Jānis Bērziņš",
|
||||||
|
code: "jb12345",
|
||||||
|
location: [Riga, Latvia],
|
||||||
|
email: "jb12345@edu.lu.lv",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
advisors: (
|
||||||
|
(
|
||||||
|
title: "Dr. phys.",
|
||||||
|
name: "Ivars Ozoliņš",
|
||||||
|
),
|
||||||
|
(
|
||||||
|
title: "Mg. dat.",
|
||||||
|
name: "Anna Zariņa",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
reviewer: (
|
||||||
|
title: "Prof. Dr. Phys.",
|
||||||
|
name: "Anna Liepa",
|
||||||
|
),
|
||||||
|
date: datetime(
|
||||||
|
year: 2025,
|
||||||
|
month: 6,
|
||||||
|
day: 15,
|
||||||
|
),
|
||||||
|
place: "Rīga",
|
||||||
|
bibliography: bibliography("bibliography.yml"),
|
||||||
|
abstract: (
|
||||||
|
primary: (
|
||||||
|
text: [
|
||||||
|
#lorem(50)
|
||||||
|
|
||||||
|
#lorem(30)
|
||||||
|
|
||||||
|
#lorem(20)
|
||||||
|
],
|
||||||
|
keywords: (
|
||||||
|
"Foo",
|
||||||
|
"Bar",
|
||||||
|
"Baz",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
secondary: (
|
||||||
|
text: [
|
||||||
|
#lorem(20)
|
||||||
|
|
||||||
|
#lorem(30)
|
||||||
|
|
||||||
|
#lorem(50)
|
||||||
|
],
|
||||||
|
keywords: (
|
||||||
|
"foo",
|
||||||
|
"bar",
|
||||||
|
"baz",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
attachments: (
|
||||||
|
attachment(
|
||||||
|
caption: "Attachment table",
|
||||||
|
label: <table-1>,
|
||||||
|
table(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
[foo], [bar],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
attachment(
|
||||||
|
caption: "Another table",
|
||||||
|
table(
|
||||||
|
columns: (1fr, 1fr),
|
||||||
|
[Column 1], [Column 2],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
= Ievads
|
||||||
|
#lorem(120)
|
||||||
|
|
||||||
|
= Teorētiskais pamatojums
|
||||||
|
#lorem(100)
|
||||||
|
|
||||||
|
== Pamatjēdzieni
|
||||||
|
#lorem(80)
|
||||||
|
|
||||||
|
== Līdzīgie risinājumi
|
||||||
|
#lorem(60)
|
||||||
|
|
||||||
|
= Izstrāde
|
||||||
|
#lorem(100)
|
||||||
|
|
||||||
|
== Arhitektūra
|
||||||
|
#lorem(80)
|
||||||
|
|
||||||
|
== Implementācija
|
||||||
|
#lorem(60)
|
||||||
|
|
||||||
|
= Testēšana
|
||||||
|
#lorem(80)
|
||||||
|
|
||||||
|
= Rezultāti un analīze
|
||||||
|
#lorem(100)
|
||||||
|
|
||||||
|
= Secinājumi
|
||||||
|
#lorem(40)
|
||||||
@@ -18,6 +18,11 @@ and attachments. The example demonstrates:
|
|||||||
- Attachments (tables)
|
- Attachments (tables)
|
||||||
- Simple DPD/ER diagrams via `fletcher` or external images and local helpers
|
- Simple DPD/ER diagrams via `fletcher` or external images and local helpers
|
||||||
|
|
||||||
|
## Thesis type
|
||||||
|
|
||||||
|
This example uses `thesis-type: "qualification"` which generates the appropriate
|
||||||
|
documentary page for course works.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the MIT-0 License - see the [LICENSE](./../../LICENSE) file for details.
|
This project is licensed under the MIT-0 License - see the [LICENSE](./../../LICENSE) file for details.
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ typst:
|
|||||||
- Haug
|
- Haug
|
||||||
- Martin
|
- Martin
|
||||||
- Typst Projekta Izstrādātāji
|
- Typst Projekta Izstrādātāji
|
||||||
url: {value: "https://typst.app/", date: 2025-01-01}
|
url:
|
||||||
|
value: "https://typst.app/"
|
||||||
|
date: 2025-01-01
|
||||||
lvs_68:
|
lvs_68:
|
||||||
type: Book
|
type: Book
|
||||||
title: Programmatūras prasību specifikācijas ceļvedis
|
title: Programmatūras prasību specifikācijas ceļvedis
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
|
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
|
||||||
#import "@preview/solo-lu-df:1.0.0": *
|
#import "@preview/solo-lu-df:1.1.1": *
|
||||||
#import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process
|
#import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process
|
||||||
#import "utils/tables.typ": function-table
|
#import "utils/tables.typ": function-table
|
||||||
|
|
||||||
@@ -7,8 +7,8 @@
|
|||||||
#import table: cell, header
|
#import table: cell, header
|
||||||
|
|
||||||
#show: ludf.with(
|
#show: ludf.with(
|
||||||
title: "Darba Nosaukums",
|
title: "Kvalifikācijas Darba Nosaukums",
|
||||||
thesis-type: "Kvalifikācijas Darbs",
|
thesis-type: "qualification",
|
||||||
authors: (
|
authors: (
|
||||||
(
|
(
|
||||||
name: "Jānis Bērziņš",
|
name: "Jānis Bērziņš",
|
||||||
@@ -30,7 +30,8 @@
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
reviewer: (
|
reviewer: (
|
||||||
name: "Jānis Ozols",
|
title: "Prof. Dr. Phys.",
|
||||||
|
name: "Anna Liepa",
|
||||||
),
|
),
|
||||||
date: datetime(
|
date: datetime(
|
||||||
year: 2025,
|
year: 2025,
|
||||||
|
|||||||
152
src/documentary-page.typ
Normal file
152
src/documentary-page.typ
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
#let signature-line(length: 6em) = box(
|
||||||
|
width: length,
|
||||||
|
stroke: (bottom: 0.5pt),
|
||||||
|
height: 0.65em,
|
||||||
|
)
|
||||||
|
|
||||||
|
#let fmt-date(date) = strong(date.display("[day].[month].[year]."))
|
||||||
|
|
||||||
|
#let thesis-config = (
|
||||||
|
bachelor: (
|
||||||
|
label: "Bakalaura darbs",
|
||||||
|
intro-suffix: "",
|
||||||
|
make-footer: (date, presentation-date) => [
|
||||||
|
Darbs iesniegts Datorikas nodaļā #date \
|
||||||
|
Pilnvarotā persona: vecākā metodiķe: Ārija Sproģe ~#signature-line()
|
||||||
|
|
||||||
|
#v(1fr)
|
||||||
|
|
||||||
|
Darbs aizstāvēts bakalaura gala pārbaudījuma komisijas sēdē ~#signature-line() \
|
||||||
|
#presentation-date prot. Nr. #signature-line(length: 4em) \
|
||||||
|
Komisijas sekretārs(-e): #signature-line(length: 15em)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
master: (
|
||||||
|
label: "Maģistra darbs",
|
||||||
|
intro-suffix: "",
|
||||||
|
make-footer: (date, presentation-date) => [
|
||||||
|
Darbs iesniegts Datorikas nodaļā #date \
|
||||||
|
Pilnvarotā persona: vecākā metodiķe: Ārija Sproģe ~#signature-line()
|
||||||
|
|
||||||
|
#v(1fr)
|
||||||
|
|
||||||
|
Darbs aizstāvēts maģistra gala pārbaudījuma komisijas sēdē ~#signature-line() \
|
||||||
|
#presentation-date prot. Nr. #signature-line(length: 4em) \
|
||||||
|
Komisijas sekretārs(-e): #signature-line(length: 15em)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
course: (
|
||||||
|
label: "Kursa darbs",
|
||||||
|
intro-suffix: "",
|
||||||
|
make-footer: (date, _) => [
|
||||||
|
Darbs iesniegts Datorikas nodaļā #date \
|
||||||
|
Kursa darbu pārbaudīja komisijas sekretārs (elektronisks paraksts)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
qualification: (
|
||||||
|
label: "Kvalifikācijas darbs",
|
||||||
|
intro-suffix: " un/vai recenzentam uzrādītajai darba versijai",
|
||||||
|
make-footer: (date, _) => [
|
||||||
|
Darbs iesniegts Datorikas nodaļā #date \
|
||||||
|
Kvalifikācijas darbu pārbaudījumu komisijas sekretārs (elektronisks paraksts)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
|
#let get-thesis-label(thesis-type) = (
|
||||||
|
thesis-config
|
||||||
|
.at(thesis-type, default: (
|
||||||
|
label: str(thesis-type),
|
||||||
|
))
|
||||||
|
.label
|
||||||
|
)
|
||||||
|
|
||||||
|
#let get-thesis-config(thesis-type) = {
|
||||||
|
thesis-config.at(thesis-type, default: (
|
||||||
|
label: str(thesis-type),
|
||||||
|
intro-suffix: "",
|
||||||
|
make-footer: (date, _) => [],
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
#let make-author-lines(authors, date) = {
|
||||||
|
if authors.len() > 1 [Autori:\ ] else [Autors: ]
|
||||||
|
authors.map(it => [*#it.name, #it.code* ~#signature-line()~ #date]).join(", ")
|
||||||
|
}
|
||||||
|
|
||||||
|
#let make-advisor-lines(advisors, date) = {
|
||||||
|
if advisors.len() > 0 [
|
||||||
|
#if advisors.len() > 1 [Vadītāji:\ ] else [Vadītājs:]
|
||||||
|
#(
|
||||||
|
advisors
|
||||||
|
.map(it => [*#it.title #it.name* ~#signature-line()~ #date])
|
||||||
|
.join("\n")
|
||||||
|
)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
#let make-dokumentary(
|
||||||
|
title,
|
||||||
|
authors,
|
||||||
|
advisors,
|
||||||
|
reviewer,
|
||||||
|
thesis-type,
|
||||||
|
date,
|
||||||
|
presentation-date,
|
||||||
|
) = {
|
||||||
|
let cfg = get-thesis-config(thesis-type)
|
||||||
|
|
||||||
|
[
|
||||||
|
#cfg.label "*#title*" izstrādāts
|
||||||
|
Latvijas Universitātes Eksakto zinātņu un tehnoloģiju fakultātē.
|
||||||
|
|
||||||
|
Ar savu parakstu apliecinu, ka darbs izstrādāts patstāvīgi, izmantoti tikai
|
||||||
|
tajā norādītie informācijas avoti un iesniegtā darba elektroniskā kopija
|
||||||
|
atbilst izdrukai#cfg.intro-suffix.
|
||||||
|
#set par(hanging-indent: 1cm)
|
||||||
|
|
||||||
|
#v(0.2fr)
|
||||||
|
|
||||||
|
#make-author-lines(authors, date)
|
||||||
|
|
||||||
|
#v(1fr)
|
||||||
|
|
||||||
|
Rekomendēju/nerekomendēju darbu aizstāvēšanai _(nederīgo svītro vadītājs)_\
|
||||||
|
#make-advisor-lines(advisors, date)
|
||||||
|
|
||||||
|
#v(1fr)
|
||||||
|
|
||||||
|
#if reviewer != none [
|
||||||
|
Recenzents: *#reviewer.title #reviewer.name*
|
||||||
|
#v(1fr)
|
||||||
|
]
|
||||||
|
|
||||||
|
#(cfg.make-footer)(date, presentation-date)
|
||||||
|
|
||||||
|
#v(1fr)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
#let make-documentary-page(
|
||||||
|
title,
|
||||||
|
authors,
|
||||||
|
advisors,
|
||||||
|
reviewer,
|
||||||
|
thesis-type,
|
||||||
|
date,
|
||||||
|
presentation-date,
|
||||||
|
) = {
|
||||||
|
set page(numbering: none)
|
||||||
|
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
||||||
|
set par(spacing: 2em)
|
||||||
|
|
||||||
|
make-dokumentary(
|
||||||
|
title,
|
||||||
|
authors,
|
||||||
|
advisors,
|
||||||
|
reviewer,
|
||||||
|
thesis-type,
|
||||||
|
fmt-date(date),
|
||||||
|
fmt-date(presentation-date),
|
||||||
|
)
|
||||||
|
}
|
||||||
42
src/lib.typ
42
src/lib.typ
@@ -18,7 +18,7 @@
|
|||||||
// location, and email. Everything but but the `name` and `code` is optional.
|
// location, and email. Everything but but the `name` and `code` is optional.
|
||||||
authors: (),
|
authors: (),
|
||||||
advisors: (),
|
advisors: (),
|
||||||
reviewer: (name: ""),
|
reviewer: (title: "", name: ""),
|
||||||
// The paper's abstract. Can be omitted if you don't have one.
|
// The paper's abstract. Can be omitted if you don't have one.
|
||||||
abstract: (
|
abstract: (
|
||||||
primary: (
|
primary: (
|
||||||
@@ -40,8 +40,9 @@
|
|||||||
bibliography: none,
|
bibliography: none,
|
||||||
university: "Latvijas Universitāte",
|
university: "Latvijas Universitāte",
|
||||||
faculty: [Eksakto zinātņu un tehnoloģiju fakultāte\ Datorikas nodaļa],
|
faculty: [Eksakto zinātņu un tehnoloģiju fakultāte\ Datorikas nodaļa],
|
||||||
thesis-type: "Bakalaura darbs",
|
thesis-type: "bachelor",
|
||||||
date: datetime.today(),
|
date: datetime.today(),
|
||||||
|
presentation-date: datetime.today(),
|
||||||
place: none,
|
place: none,
|
||||||
logo: none,
|
logo: none,
|
||||||
outline-title: "Saturs",
|
outline-title: "Saturs",
|
||||||
@@ -93,13 +94,11 @@
|
|||||||
set math.equation(numbering: "(1)")
|
set math.equation(numbering: "(1)")
|
||||||
show math.equation: set block(spacing: 0.65em)
|
show math.equation: set block(spacing: 0.65em)
|
||||||
|
|
||||||
|
|
||||||
// Configure lists and terms.
|
// Configure lists and terms.
|
||||||
set list(marker: ([•], [--], [\*], [·]))
|
set list(marker: ([•], [--], [\*], [·]))
|
||||||
set enum(numbering: "1aiA)")
|
set enum(numbering: "1aiA)")
|
||||||
set terms(separator: [ -- ])
|
set terms(separator: [ -- ])
|
||||||
|
|
||||||
|
|
||||||
// Headings
|
// Headings
|
||||||
set heading(numbering: "1.1.")
|
set heading(numbering: "1.1.")
|
||||||
show heading: set block(spacing: 0.65em * 2, sticky: true)
|
show heading: set block(spacing: 0.65em * 2, sticky: true)
|
||||||
@@ -112,7 +111,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Style bibliography.
|
// Style bibliography.
|
||||||
set std.bibliography(title: "Izmantotā literatūra un avoti")
|
set std.bibliography(title: "Izmantotā literatūra un avoti")
|
||||||
|
|
||||||
@@ -157,7 +155,6 @@
|
|||||||
show figure.where(kind: "attachment"): set figure(numbering: "1.")
|
show figure.where(kind: "attachment"): set figure(numbering: "1.")
|
||||||
show figure.where(kind: "attachment"): set figure.caption(separator: ". ")
|
show figure.where(kind: "attachment"): set figure.caption(separator: ". ")
|
||||||
|
|
||||||
|
|
||||||
// Adapt supplement in caption independently from supplement used for references.
|
// Adapt supplement in caption independently from supplement used for references.
|
||||||
show figure: fig => {
|
show figure: fig => {
|
||||||
let numbers = numbering(fig.numbering, ..fig.counter.at(fig.location()))
|
let numbers = numbering(fig.numbering, ..fig.counter.at(fig.location()))
|
||||||
@@ -173,7 +170,6 @@
|
|||||||
fig
|
fig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Custom show rule for references
|
// Custom show rule for references
|
||||||
show ref: it => {
|
show ref: it => {
|
||||||
let el = it.element
|
let el = it.element
|
||||||
@@ -233,7 +229,6 @@
|
|||||||
it
|
it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Code blocks
|
// Code blocks
|
||||||
show raw: set text(
|
show raw: set text(
|
||||||
font: (
|
font: (
|
||||||
@@ -248,7 +243,6 @@
|
|||||||
spacing: 100%,
|
spacing: 100%,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
make-title(
|
make-title(
|
||||||
title,
|
title,
|
||||||
authors,
|
authors,
|
||||||
@@ -264,7 +258,6 @@
|
|||||||
// Start page numbering
|
// Start page numbering
|
||||||
set page(numbering: "1", number-align: center)
|
set page(numbering: "1", number-align: center)
|
||||||
|
|
||||||
|
|
||||||
// Display abstract and keywords.
|
// Display abstract and keywords.
|
||||||
if abstract != none {
|
if abstract != none {
|
||||||
make-abstract("primary", abstract.primary)
|
make-abstract("primary", abstract.primary)
|
||||||
@@ -300,23 +293,32 @@
|
|||||||
|
|
||||||
make-attachments(attachment-title, attachments)
|
make-attachments(attachment-title, attachments)
|
||||||
|
|
||||||
|
let title-text = if type(title) == content and "children" in title.fields() {
|
||||||
|
title
|
||||||
|
.fields()
|
||||||
|
.children
|
||||||
|
.filter(it => it.func() != linebreak)
|
||||||
|
.fold((), (acc, it) => {
|
||||||
|
if it == [ ] and acc.last() == [ ] {
|
||||||
|
acc
|
||||||
|
} else {
|
||||||
|
acc + (it,)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.join("")
|
||||||
|
} else {
|
||||||
|
title
|
||||||
|
}
|
||||||
|
|
||||||
if display-documentary {
|
if display-documentary {
|
||||||
make-documentary-page(
|
make-documentary-page(
|
||||||
if type(title) == content {
|
title-text,
|
||||||
title
|
|
||||||
.fields()
|
|
||||||
.values()
|
|
||||||
.at(0)
|
|
||||||
.filter(it => it.func() != linebreak and it != [ ])
|
|
||||||
.join(" ")
|
|
||||||
} else {
|
|
||||||
title
|
|
||||||
},
|
|
||||||
authors,
|
authors,
|
||||||
advisors,
|
advisors,
|
||||||
reviewer,
|
reviewer,
|
||||||
thesis-type,
|
thesis-type,
|
||||||
date,
|
date,
|
||||||
|
presentation-date,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
#import "documentary-page.typ": get-thesis-label, make-documentary-page
|
||||||
|
|
||||||
|
|
||||||
#let merge(a, b) = {
|
#let merge(a, b) = {
|
||||||
let result = a
|
let result = a
|
||||||
for (k, v) in b { result.at(k) = v }
|
for (k, v) in b { result.at(k) = v }
|
||||||
@@ -60,6 +63,7 @@
|
|||||||
place,
|
place,
|
||||||
logo,
|
logo,
|
||||||
) = {
|
) = {
|
||||||
|
set par(justify: false)
|
||||||
align(
|
align(
|
||||||
center,
|
center,
|
||||||
upper(
|
upper(
|
||||||
@@ -88,7 +92,7 @@
|
|||||||
|
|
||||||
v(0.2fr)
|
v(0.2fr)
|
||||||
|
|
||||||
align(center, upper(text(size: 14pt, thesis-type)))
|
align(center, upper(text(size: 14pt, get-thesis-label(thesis-type))))
|
||||||
|
|
||||||
v(1fr)
|
v(1fr)
|
||||||
|
|
||||||
@@ -112,58 +116,6 @@
|
|||||||
align(center, upper([#place #date.year()]))
|
align(center, upper([#place #date.year()]))
|
||||||
}
|
}
|
||||||
|
|
||||||
#let make-documentary-page(
|
|
||||||
title,
|
|
||||||
authors,
|
|
||||||
advisors,
|
|
||||||
reviewer,
|
|
||||||
thesis-type,
|
|
||||||
date,
|
|
||||||
) = [
|
|
||||||
#set page(numbering: none)
|
|
||||||
#let formatted-date = strong(date.display("[day].[month].[year]."))
|
|
||||||
|
|
||||||
#heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
|
||||||
|
|
||||||
#set par(spacing: 2em)
|
|
||||||
|
|
||||||
#thesis-type "*#title*" ir
|
|
||||||
izstrādāts Latvijas Universitātes Eksakto zinātņu un tehnoloģiju fakultātē,
|
|
||||||
Datorikas nodaļā.
|
|
||||||
|
|
||||||
Ar savu parakstu apliecinu, ka darbs izstrādāts patstāvīgi, izmantoti tikai
|
|
||||||
tajā norādītie informācijas avoti un iesniegtā darba elektroniskā kopija
|
|
||||||
atbilst izdrukai un/vai recenzentam uzrādītajai darba versijai.
|
|
||||||
#set par(hanging-indent: 1cm)
|
|
||||||
|
|
||||||
#v(0.5fr)
|
|
||||||
|
|
||||||
#if authors.len() > 1 { "Autori: " } else { "Autors: " }
|
|
||||||
#(
|
|
||||||
authors.map(author => [*#author.name, #author.code*]).join(", ")
|
|
||||||
) ~ #formatted-date
|
|
||||||
|
|
||||||
#v(1fr)
|
|
||||||
Rekomendēju darbu aizstāvēšanai\
|
|
||||||
#if advisors.len() > 0 [
|
|
||||||
Darba #if advisors.len() > 1 { "vadītāji:" } else { "vadītājs:" }
|
|
||||||
#(
|
|
||||||
advisors.map(advisor => [*#advisor.title #advisor.name*]).join("\n")
|
|
||||||
) ~ #formatted-date
|
|
||||||
]
|
|
||||||
|
|
||||||
#v(1fr)
|
|
||||||
|
|
||||||
Recenzents: *#reviewer.name*
|
|
||||||
|
|
||||||
#v(1fr)
|
|
||||||
|
|
||||||
Darbs iesniegts #formatted-date \
|
|
||||||
#thesis-type.replace("darbs", "darbu") pārbaudīja komisijas sekretārs (elektronisks paraksts)
|
|
||||||
|
|
||||||
#v(1fr)
|
|
||||||
]
|
|
||||||
|
|
||||||
#let make-attachments(title, attachments) = {
|
#let make-attachments(title, attachments) = {
|
||||||
if attachments == () {
|
if attachments == () {
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#import "@preview/solo-lu-df:1.0.0": *
|
#import "@preview/solo-lu-df:1.1.1": *
|
||||||
|
|
||||||
#show: ludf.with(
|
#show: ludf.with(
|
||||||
title: "Darba Nosaukums",
|
title: "Darba Nosaukums",
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
),
|
),
|
||||||
advisors: (
|
advisors: (
|
||||||
(
|
(
|
||||||
title: "Mg. dat.",
|
title: "Prof. Dr. Phys.",
|
||||||
name: "Ivars Ozoliņš",
|
name: "Anna Liepa",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
date: datetime(
|
date: datetime(
|
||||||
|
|||||||
BIN
thumbnail.png
BIN
thumbnail.png
Binary file not shown.
|
Before Width: | Height: | Size: 391 KiB After Width: | Height: | Size: 350 KiB |
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solo-lu-df"
|
name = "solo-lu-df"
|
||||||
version = "1.0.0"
|
version = "1.1.1"
|
||||||
entrypoint = "src/lib.typ"
|
entrypoint = "src/lib.typ"
|
||||||
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||||
license = "MIT-0"
|
license = "MIT-0"
|
||||||
|
|||||||
Reference in New Issue
Block a user