From 9d25c7de189f0bb15ef732658ddb3a52a17b6d50 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Tue, 24 Feb 2026 16:59:36 +0200 Subject: [PATCH] feat(examples): add bachelor-thesis and course-work examples --- examples/bachelor-thesis/README.md | 26 ++++++ examples/bachelor-thesis/bibliography.yml | 26 ++++++ examples/bachelor-thesis/main.typ | 100 ++++++++++++++++++++++ examples/course-work/README.md | 25 ++++++ examples/course-work/bibliography.yml | 26 ++++++ examples/course-work/main.typ | 92 ++++++++++++++++++++ examples/qualification-thesis/README.md | 5 ++ examples/qualification-thesis/main.typ | 5 +- template/main.typ | 4 +- 9 files changed, 305 insertions(+), 4 deletions(-) create mode 100644 examples/bachelor-thesis/README.md create mode 100644 examples/bachelor-thesis/bibliography.yml create mode 100644 examples/bachelor-thesis/main.typ create mode 100644 examples/course-work/README.md create mode 100644 examples/course-work/bibliography.yml create mode 100644 examples/course-work/main.typ diff --git a/examples/bachelor-thesis/README.md b/examples/bachelor-thesis/README.md new file mode 100644 index 0000000..f57a990 --- /dev/null +++ b/examples/bachelor-thesis/README.md @@ -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. diff --git a/examples/bachelor-thesis/bibliography.yml b/examples/bachelor-thesis/bibliography.yml new file mode 100644 index 0000000..ea19de3 --- /dev/null +++ b/examples/bachelor-thesis/bibliography.yml @@ -0,0 +1,26 @@ +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 diff --git a/examples/bachelor-thesis/main.typ b/examples/bachelor-thesis/main.typ new file mode 100644 index 0000000..4e65ca3 --- /dev/null +++ b/examples/bachelor-thesis/main.typ @@ -0,0 +1,100 @@ +#import "@preview/solo-lu-df:1.1.0": * + +#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( + 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) diff --git a/examples/course-work/README.md b/examples/course-work/README.md new file mode 100644 index 0000000..0766856 --- /dev/null +++ b/examples/course-work/README.md @@ -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. diff --git a/examples/course-work/bibliography.yml b/examples/course-work/bibliography.yml new file mode 100644 index 0000000..ea19de3 --- /dev/null +++ b/examples/course-work/bibliography.yml @@ -0,0 +1,26 @@ +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 diff --git a/examples/course-work/main.typ b/examples/course-work/main.typ new file mode 100644 index 0000000..a1b3e21 --- /dev/null +++ b/examples/course-work/main.typ @@ -0,0 +1,92 @@ +#import "@preview/solo-lu-df:1.1.0": * + +#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( + 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) diff --git a/examples/qualification-thesis/README.md b/examples/qualification-thesis/README.md index 0f7b82c..7129f66 100644 --- a/examples/qualification-thesis/README.md +++ b/examples/qualification-thesis/README.md @@ -18,6 +18,11 @@ and attachments. The example demonstrates: - Attachments (tables) - 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 This project is licensed under the MIT-0 License - see the [LICENSE](./../../LICENSE) file for details. diff --git a/examples/qualification-thesis/main.typ b/examples/qualification-thesis/main.typ index 4ff5387..dde57e3 100644 --- a/examples/qualification-thesis/main.typ +++ b/examples/qualification-thesis/main.typ @@ -7,7 +7,7 @@ #import table: cell, header #show: ludf.with( - title: "Darba Nosaukums", + title: "Kvalifikācijas Darba Nosaukums", thesis-type: "qualification", authors: ( ( @@ -30,7 +30,8 @@ ), ), reviewer: ( - name: "Jānis Ozols", + title: "Prof. Dr. Phys.", + name: "Anna Liepa", ), date: datetime( year: 2025, diff --git a/template/main.typ b/template/main.typ index 0e6cec1..7baf180 100644 --- a/template/main.typ +++ b/template/main.typ @@ -18,8 +18,8 @@ ), advisors: ( ( - title: "Mg. dat.", - name: "Ivars Ozoliņš", + title: "Prof. Dr. Phys.", + name: "Anna Liepa", ), ), date: datetime(