mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2026-03-22 00:26:23 +00:00
Compare commits
7 Commits
65393fa204
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ea1cf1190 | |||
| 4c5b829df2 | |||
| a67fe5623a | |||
| c19dc32eb8 | |||
| c0f765374a | |||
| 8566c88f6a | |||
| 5a202257ba |
63
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal file
63
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
Normal 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
1
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
blank_issues_enabled: true
|
||||
27
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal file
27
.github/ISSUE_TEMPLATE/documentation.yml
vendored
Normal 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
|
||||
39
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
39
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal 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
33
.github/ISSUE_TEMPLATE/question.yml
vendored
Normal 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
|
||||
12
README.md
12
README.md
@@ -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.1.0": *
|
||||
#import "@preview/solo-lu-df:1.1.2": *
|
||||
|
||||
#show: ludf.with(
|
||||
title: "Darba Nosaukums",
|
||||
@@ -85,12 +85,12 @@ template, you can add a show rule like this at the top of your file:
|
||||
|
||||
Ready-to-edit examples for different thesis types are included:
|
||||
|
||||
- **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)
|
||||
- **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)
|
||||
|
||||
View the examples on GitHub: <https://github.com/kristoferssolo/LU-DF-Typst-Template/tree/main/examples>
|
||||
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.
|
||||
|
||||
@@ -3,8 +3,8 @@ 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).
|
||||
- `main.typ` – Typst source (the example document).
|
||||
- `bibliography.yml` – example bibliography entries (create as needed).
|
||||
|
||||
## How to edit
|
||||
|
||||
@@ -23,4 +23,4 @@ documentary page for bachelor theses.
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#import "@preview/solo-lu-df:1.1.0": *
|
||||
#import "@preview/solo-lu-df:1.1.2": *
|
||||
|
||||
#show: ludf.with(
|
||||
title: "Bakalaura Darba Nosaukums",
|
||||
|
||||
@@ -3,8 +3,8 @@ 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).
|
||||
- `main.typ` – Typst source (the example document).
|
||||
- `bibliography.yml` – example bibliography entries (create as needed).
|
||||
|
||||
## How to edit
|
||||
|
||||
@@ -22,4 +22,4 @@ 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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#import "@preview/solo-lu-df:1.1.0": *
|
||||
#import "@preview/solo-lu-df:1.1.2": *
|
||||
|
||||
#show: ludf.with(
|
||||
title: "Kursa Darba Nosaukums",
|
||||
|
||||
@@ -3,8 +3,8 @@ 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).
|
||||
- `main.typ` – Typst source (the example document).
|
||||
- `bibliography.yml` – example bibliography entries (create as needed).
|
||||
|
||||
## How to edit
|
||||
|
||||
@@ -25,4 +25,4 @@ instead of "bakalaura" in the footer).
|
||||
|
||||
## 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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#import "@preview/solo-lu-df:1.1.0": *
|
||||
#import "@preview/solo-lu-df:1.1.2": *
|
||||
|
||||
#show: ludf.with(
|
||||
title: "Maģistra Darba Nosaukums",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,4 +25,4 @@ 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.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
|
||||
#import "@preview/solo-lu-df:1.1.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
|
||||
|
||||
|
||||
@@ -127,6 +127,32 @@
|
||||
]
|
||||
}
|
||||
|
||||
#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,
|
||||
@@ -137,11 +163,11 @@
|
||||
presentation-date,
|
||||
) = {
|
||||
set page(numbering: none)
|
||||
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
||||
set par(spacing: 2em)
|
||||
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
|
||||
|
||||
make-dokumentary(
|
||||
title,
|
||||
normalize-title(title),
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
@@ -150,3 +176,4 @@
|
||||
fmt-date(presentation-date),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
11
src/lib.typ
11
src/lib.typ
@@ -295,16 +295,7 @@
|
||||
|
||||
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,
|
||||
|
||||
@@ -1,6 +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 }
|
||||
@@ -63,6 +62,7 @@
|
||||
place,
|
||||
logo,
|
||||
) = {
|
||||
set par(justify: false)
|
||||
align(
|
||||
center,
|
||||
upper(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#import "@preview/solo-lu-df:1.1.0": *
|
||||
#import "@preview/solo-lu-df:1.1.2": *
|
||||
|
||||
#show: ludf.with(
|
||||
title: "Darba Nosaukums",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solo-lu-df"
|
||||
version = "1.1.0"
|
||||
version = "1.1.2"
|
||||
entrypoint = "src/lib.typ"
|
||||
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||
license = "MIT-0"
|
||||
|
||||
Reference in New Issue
Block a user