Compare commits

..

No commits in common. "fe82dee5e49a23058e57cf018fcf3da8c4d7e8c6" and "8c1c86f71236711a68cd3af3aa1b4a2abdef6d53" have entirely different histories.

6 changed files with 80 additions and 101 deletions

View File

@ -33,7 +33,6 @@ configure the whole document and `attachment` helper function. Important argumen
`text` (content) and `keywords` (array) as well as `title`, `lang` and `keyword-title`.
- `bibliography`: Result of `bibliography("path/to/file.yml")` or `none`.
- `attachments`: Tuple of `attachment(...)` items (tables, figures).
- `display-documentary`: Whether to display the documentary page at the end. Defaults to `true`.
- Positional argument: the document body follows the `ludf.with(...)` call.
The function also accepts a single, positional argument for the body of the paper.
@ -43,7 +42,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:0.1.4": *
#import "@preview/solo-lu-df:0.1.1": *
#show: ludf.with(
title: "Darba Nosaukums",
@ -69,7 +68,6 @@ template, you can add a show rule like this at the top of your file:
[Column 1], [Column 2],
),
),
),
)
// Your content goes below.

View File

@ -1,6 +1,6 @@
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
#import fletcher.shapes: cylinder, ellipse
#import "@preview/solo-lu-df:0.1.4": *
#import "@preview/solo-lu-df:0.1.1": *
#import "utils/tables.typ": function-table
#import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process

View File

@ -2,6 +2,8 @@
make-abstract, make-attachments, make-documentary-page, make-title,
)
#let indent = 1cm
#let attachment(caption: none, label: none, body) = {
(
content: body,
@ -47,7 +49,6 @@
outline-title: "Saturs",
attachments: (),
attachment-title: "Pielikumi",
display-documentary: true,
body,
) = {
// Set document metadata.
@ -71,14 +72,16 @@
paper: "a4",
)
// Main body.
set par(
justify: true,
leading: 0.65em * 1.5,
spacing: 0.65em * 1.5,
first-line-indent: (amount: 1cm, all: true),
leading: 1.5em,
spacing: 1.5em,
first-line-indent: (amount: indent, all: true),
)
// Configure equation numbering and spacing.
set math.equation(numbering: "(1)")
show math.equation: set block(spacing: 0.65em)
@ -92,10 +95,10 @@
// Headings
set heading(numbering: "1.1.")
show heading: set block(spacing: 0.65em * 2, sticky: true)
show heading: set block(spacing: 2em)
show heading: it => {
if it.level == 1 {
pagebreak()
pagebreak(weak: true)
text(14pt, align(center, upper(it)))
} else {
text(12pt, it)
@ -117,16 +120,12 @@
it
}
set figure(
numbering: it => {
set figure(numbering: it => {
let count = counter(heading).get()
numbering("1.1.", count.first(), it)
},
)
})
show figure: set block(
breakable: true,
) // allow for tables to span to next pages mid sentence
show figure: set block(breakable: true) // allow for tables to span to next pages mid sentence
show figure: set par(justify: false) // disable justify for figures (tables)
show figure.caption: set align(end)
show table.cell.where(y: 0): strong
@ -137,7 +136,6 @@
show figure.where(kind: image): set figure(supplement: "att")
show figure.caption.where(kind: image): set align(start)
show figure.caption: set block(sticky: true)
show figure.caption: set text(size: 11pt)
show figure.where(kind: image): set figure.caption(
position: bottom,
@ -268,7 +266,7 @@
outline(
depth: 3,
indent: 1cm,
indent: indent,
title: text(size: 14pt, outline-title),
)
@ -280,18 +278,8 @@
make-attachments(attachment-title, attachments)
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,
@ -299,4 +287,3 @@
date,
)
}
}

View File

@ -60,31 +60,14 @@
place,
logo,
) = {
align(
center,
upper(
text(
size: 14pt,
[
align(center, upper(text(size: 14pt, [
#university\
#faculty
],
),
),
)
])))
v(1fr)
align(
center,
upper(
text(
16pt,
weight: "bold",
title,
),
),
)
align(center, upper(text(16pt, weight: "bold", title)))
v(0.2fr)
@ -119,51 +102,62 @@
reviewer,
thesis-type,
date,
) = [
#set page(numbering: none)
#let formatted-date = strong(date.display("[day].[month].[year]."))
) = {
let vspace = 1fr
set page(numbering: none)
#heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
#set par(spacing: 2em)
let formatted-date = strong(date.display("[day].[month].[year]."))
heading(level: 1, outlined: false, numbering: none, "Dokumentārā lapa")
[
#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(vspace / 3)
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.
]
#v(0.5fr)
context {
set par(
first-line-indent: 1cm,
hanging-indent: 1cm,
)
v(vspace / 2)
[
#if authors.len() > 1 { "Autori: " } else { "Autors: " }
#(
authors.map(author => [*#author.name, #author.code*]).join(", ")
) ~ #formatted-date
#authors.map(author => [*#author.name, #author.code*]).join(", ")
~ #formatted-date
]
#v(1fr)
v(vspace)
[
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
#advisors.map(advisor => [*#advisor.title #advisor.name*]).join("\n")
~ #formatted-date
]
]
#v(1fr)
v(vspace)
[Recenzents: *#reviewer.name*]
Recenzents: *#reviewer.name*
#v(1fr)
v(vspace)
[
Darbs iesniegts #formatted-date\
#thesis-type.replace("darbs", "darbu") pārbaudīja komisijas sekretārs (elektronisks paraksts)
#v(1fr)
Kvalifikācijas darbu pārbaudījumu komisijas sekretārs (elektronisks paraksts)
]
v(vspace)
}
}
#let make-attachments(title, attachments) = {
if attachments == () {
return

View File

@ -1,4 +1,4 @@
#import "@preview/solo-lu-df:0.1.4": *
#import "@preview/solo-lu-df:0.1.1": *
#show: ludf.with(
title: "Darba Nosaukums",

View File

@ -1,9 +1,9 @@
[package]
name = "solo-lu-df"
version = "0.1.4"
version = "0.1.1"
entrypoint = "src/lib.typ"
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
license = "MIT-0"
license = "MIT"
description = "Write qualification papers, bachelors theses, and masters theses for University of Latvia, Computer Science programme."
repository = "https://github.com/kristoferssolo/LU-DF-Typst-Template"
keywords = [