Compare commits

13 Commits

Author SHA1 Message Date
5ea1cf1190 docs: pin example links to release tag 2026-03-19 18:51:09 +02:00
4c5b829df2 fix(documentary): normalize thesis title before rendering documentary page #2 2026-03-16 16:52:30 +02:00
a67fe5623a chore: bump version number 2026-03-16 16:28:29 +02:00
c19dc32eb8 chore: add GitHub issue templates 2026-03-12 19:45:14 +02:00
c0f765374a fix: remove linebreak and duplicate space from title content 2026-03-06 13:24:33 +02:00
8566c88f6a chore: bump example version numbers 2026-03-05 15:30:30 +02:00
5a202257ba fix(title-page): remove title justification 2026-03-05 15:28:46 +02:00
65393fa204 feat: add master thesis type support 2026-02-25 12:44:26 +02:00
5b28a2b6cc docs: update README with all examples and update thumbnail 2026-02-24 17:15:08 +02:00
9d25c7de18 feat(examples): add bachelor-thesis and course-work examples 2026-02-24 17:13:43 +02:00
11d490b101 feat!: change thesis-type to accept short keys (bachelor/course/qualification)
BREAKING CHANGE: thesis-type now requires "bachelor", "course", or
"qualification" instead of full labels like "Bakalaura darbs". Update
existing documents to use the new format.
2026-02-24 16:43:56 +02:00
dd681be2da feat(documentary-page): make better documentary page for bachelor thesis 2026-02-24 15:42:37 +02:00
d33c6f3145 fix: reviewer field 2026-02-24 14:46:05 +02:00
24 changed files with 851 additions and 92 deletions

63
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Bug Report
description: Something isn't working as expected
labels: ["bug"]
assignees: [kristoferssolo]
body:
- type: markdown
attributes:
value: |
Before submitting, check [existing issues](../../issues) to avoid duplicates.
- type: input
id: typst-version
attributes:
label: Typst Version
description: Run `typst --version`
placeholder: "e.g. typst 0.14.0"
validations:
required: true
- type: input
id: template-version
attributes:
label: Template Version
description: Release tag or commit hash
placeholder: "e.g. v1.0.0 or a3f5c2d"
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Clear and concise description of the bug.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Minimal Reproduction
description: >
A minimal `.typ` snippet that reproduces the issue. Remove everything not necessary to trigger the bug.
render: typst
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Behavior
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Context
description: >
Screenshots, PDF output snippets, compiler errors, or anything else relevant.
validations:
required: false

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1 @@
blank_issues_enabled: true

View File

@@ -0,0 +1,27 @@
name: Documentation
description: Missing, incorrect, or unclear documentation
labels: ["documentation"]
assignees: [kristoferssolo]
body:
- type: input
id: location
attributes:
label: Location
description: File, section, or page where the issue is.
placeholder: "e.g. README.md > Usage, or docs/structure.md"
validations:
required: true
- type: textarea
id: description
attributes:
label: What's Wrong
description: What is missing, incorrect, or unclear?
validations:
required: true
- type: textarea
id: suggestion
attributes:
label: Suggested Improvement
description: How should it read or what should be added?
validations:
required: false

View File

@@ -0,0 +1,39 @@
name: Feature Request
description: Suggest new functionality or an enhancement
labels: ["feature"]
assignees: [kristoferssolo]
body:
- type: markdown
attributes:
value: |
Before submitting, check [existing issues](../../issues) to avoid duplicates.
- type: textarea
id: problem
attributes:
label: Problem / Motivation
description: What problem does this solve? Why is it needed?
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the feature and how it should work.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Any workarounds or other approaches you've considered.
validations:
required: false
- type: checkboxes
id: lu-scope
attributes:
label: Scope
options:
- label: >
This is required or implied by University of Latvia thesis guidelines
- label: This is a general usability or quality-of-life improvement

33
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Question
description: Ask a question about using the template
labels: ["question"]
assignees: [kristoferssolo]
body:
- type: markdown
attributes:
value: |
Check the [README](../../blob/main/README.md) and
[existing issues](../../issues) first.
- type: textarea
id: question
attributes:
label: Question
validations:
required: true
- type: textarea
id: context
attributes:
label: Context
description: >
What are you trying to achieve? What have you already tried?
validations:
required: false
- type: input
id: typst-version
attributes:
label: Typst Version
description: If relevant, run `typst --version`
placeholder: "e.g. typst 0.14.0"
validations:
required: false

View File

@@ -26,7 +26,7 @@ configure the whole document and `attachment` helper function. Important argumen
`code` and may include `location` and `email`.
- `advisors`: Array of advisor dictionaries with `title` and `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`.
- `place`: Place string (e.g., `"Rīga"`).
- `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:
```typst
#import "@preview/solo-lu-df:1.0.0": *
#import "@preview/solo-lu-df:1.1.2": *
#show: ludf.with(
title: "Darba Nosaukums",
@@ -58,7 +58,7 @@ template, you can add a show rule like this at the top of your file:
advisors: (
(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),
place: "Rīga",
bibliography: bibliography("bibliography.yml"),
@@ -83,11 +83,16 @@ template, you can add a show rule like this at the top of your file:
## 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/v1.1.2/examples/qualification-thesis)
- **Course work**: [`examples/course-work/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/v1.1.2/examples/course-work)
- **Bachelor thesis**: [`examples/bachelor-thesis/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/v1.1.2/examples/bachelor-thesis)
- **Master thesis**: [`examples/master-thesis/`](https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/v1.1.2/examples/master-thesis)
The example contains `main.typ`, `bibliography.yml` and small helpers under
Browse all examples on GitHub: <https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/v1.1.2/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.
## Tips

View 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.

View 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

View File

@@ -0,0 +1,100 @@
#import "@preview/solo-lu-df:1.1.2": *
#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)

View 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.

View 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

View File

@@ -0,0 +1,92 @@
#import "@preview/solo-lu-df:1.1.2": *
#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)

View 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.

View 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

View File

@@ -0,0 +1,113 @@
#import "@preview/solo-lu-df:1.1.2": *
#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)

View File

@@ -3,9 +3,9 @@ Qualification thesis example (solo-lu-df)
This folder contains a ready-to-edit qualification-thesis example built with
the `solo-lu-df` Typst template:
- `main.typ` Typst source (the example document).
- `bibliography.yml` example bibliography entries.
- `utils/` helper snippets for diagrams/tables used by the example.
- `main.typ` Typst source (the example document).
- `bibliography.yml` example bibliography entries.
- `utils/` helper snippets for diagrams/tables used by the example.
## How to edit
@@ -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.
This project is licensed under the MIT-0 License see the [LICENSE](./../../LICENSE) file for details.

View File

@@ -7,7 +7,9 @@ typst:
- Haug
- Martin
- 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:
type: Book
title: Programmatūras prasību specifikācijas ceļvedis

View File

@@ -1,5 +1,5 @@
#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/tables.typ": function-table
@@ -7,8 +7,8 @@
#import table: cell, header
#show: ludf.with(
title: "Darba Nosaukums",
thesis-type: "Kvalifikācijas Darbs",
title: "Kvalifikācijas Darba Nosaukums",
thesis-type: "qualification",
authors: (
(
name: "Jānis Bērziņš",
@@ -30,7 +30,8 @@
),
),
reviewer: (
name: "Jānis Ozols",
title: "Prof. Dr. Phys.",
name: "Anna Liepa",
),
date: datetime(
year: 2025,

179
src/documentary-page.typ Normal file
View File

@@ -0,0 +1,179 @@
#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 normalize-title(title) = {
if type(title) != content or "children" not in title.fields() {
return title
}
let children = title
.fields()
.children
.filter(it => it.func() != linebreak)
.fold((), (acc, it) => {
if it == [ ] and (acc.len() == 0 or acc.last() == [ ]) {
acc
} else {
acc + (it,)
}
})
let children = if children.len() > 0 and children.last() == [ ] {
children.slice(0, -1)
} else {
children
}
children.join("")
}
#let make-documentary-page(
title,
authors,
advisors,
reviewer,
thesis-type,
date,
presentation-date,
) = {
set page(numbering: none)
set par(spacing: 2em)
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
make-dokumentary(
normalize-title(title),
authors,
advisors,
reviewer,
thesis-type,
fmt-date(date),
fmt-date(presentation-date),
)
}

View File

@@ -18,7 +18,7 @@
// location, and email. Everything but but the `name` and `code` is optional.
authors: (),
advisors: (),
reviewer: (name: ""),
reviewer: (title: "", name: ""),
// The paper's abstract. Can be omitted if you don't have one.
abstract: (
primary: (
@@ -40,8 +40,9 @@
bibliography: none,
university: "Latvijas Universitāte",
faculty: [Eksakto zinātņu un tehnoloģiju fakultāte\ Datorikas nodaļa],
thesis-type: "Bakalaura darbs",
thesis-type: "bachelor",
date: datetime.today(),
presentation-date: datetime.today(),
place: none,
logo: none,
outline-title: "Saturs",
@@ -93,13 +94,11 @@
set math.equation(numbering: "(1)")
show math.equation: set block(spacing: 0.65em)
// Configure lists and terms.
set list(marker: ([], [--], [\*], [·]))
set enum(numbering: "1aiA)")
set terms(separator: [ -- ])
// Headings
set heading(numbering: "1.1.")
show heading: set block(spacing: 0.65em * 2, sticky: true)
@@ -112,7 +111,6 @@
}
}
// Style bibliography.
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.caption(separator: ". ")
// Adapt supplement in caption independently from supplement used for references.
show figure: fig => {
let numbers = numbering(fig.numbering, ..fig.counter.at(fig.location()))
@@ -173,7 +170,6 @@
fig
}
// Custom show rule for references
show ref: it => {
let el = it.element
@@ -233,7 +229,6 @@
it
}
// Code blocks
show raw: set text(
font: (
@@ -248,7 +243,6 @@
spacing: 100%,
)
make-title(
title,
authors,
@@ -264,7 +258,6 @@
// Start page numbering
set page(numbering: "1", number-align: center)
// Display abstract and keywords.
if abstract != none {
make-abstract("primary", abstract.primary)
@@ -302,21 +295,13 @@
if display-documentary {
make-documentary-page(
if type(title) == content {
title
.fields()
.values()
.at(0)
.filter(it => it.func() != linebreak and it != [ ])
.join(" ")
} else {
title
},
title,
authors,
advisors,
reviewer,
thesis-type,
date,
presentation-date,
)
}
}

View File

@@ -1,3 +1,5 @@
#import "documentary-page.typ": get-thesis-label, make-documentary-page
#let merge(a, b) = {
let result = a
for (k, v) in b { result.at(k) = v }
@@ -60,6 +62,7 @@
place,
logo,
) = {
set par(justify: false)
align(
center,
upper(
@@ -88,7 +91,7 @@
v(0.2fr)
align(center, upper(text(size: 14pt, thesis-type)))
align(center, upper(text(size: 14pt, get-thesis-label(thesis-type))))
v(1fr)
@@ -112,58 +115,6 @@
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) = {
if attachments == () {
return

View File

@@ -1,4 +1,4 @@
#import "@preview/solo-lu-df:1.0.0": *
#import "@preview/solo-lu-df:1.1.2": *
#show: ludf.with(
title: "Darba Nosaukums",
@@ -18,8 +18,8 @@
),
advisors: (
(
title: "Mg. dat.",
name: "Ivars Ozoliņš",
title: "Prof. Dr. Phys.",
name: "Anna Liepa",
),
),
date: datetime(

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 KiB

After

Width:  |  Height:  |  Size: 350 KiB

View File

@@ -1,6 +1,6 @@
[package]
name = "solo-lu-df"
version = "1.0.0"
version = "1.1.2"
entrypoint = "src/lib.typ"
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
license = "MIT-0"