mirror of
https://github.com/JustAnyones/ktu-paper.git
synced 2026-11-04 00:30:18 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfac289590
|
||
|
|
1740adfc5a
|
||
|
|
55a236fe8b
|
No files matched your search
@@ -4,9 +4,9 @@ This repository contains a Typst template for academic papers at the Kaunas Univ
|
||||
|
||||
## Initiating the template
|
||||
Install the downloaded template under the following directory:
|
||||
- LINUX: `~/.local/share/typst/packages/local/ktu-paper/0.3.1/`
|
||||
- Linux: `~/.local/share/typst/packages/local/ktu-paper/0.3.2/`
|
||||
|
||||
And then initiate a new project:
|
||||
```sh
|
||||
typst init @local/ktu-paper:0.3.1
|
||||
typst init @local/ktu-paper:0.3.2
|
||||
```
|
||||
+18
-4
@@ -17,6 +17,7 @@
|
||||
#let ktu-author-table(
|
||||
authors: (),
|
||||
alignment: right,
|
||||
namesFirst: true, // if false, roles will be displayed first
|
||||
) = context {
|
||||
// The layout should be a list of lists whose elements are (name, role) pairs.
|
||||
assert(authors.len() > 0, message: "author table must have at least one author")
|
||||
@@ -51,9 +52,13 @@
|
||||
table.header([]),
|
||||
..for author in authors {
|
||||
let (name, role) = author
|
||||
name = [*#name*]
|
||||
if not namesFirst {
|
||||
(role, name) = (name, role)
|
||||
}
|
||||
(align(center)[
|
||||
#set block(below: 8pt)
|
||||
#block[*#name*]
|
||||
#block[#name]
|
||||
#block[#role]
|
||||
|
||||
], [])
|
||||
@@ -67,9 +72,13 @@
|
||||
),
|
||||
..for author in authors {
|
||||
let (name, role) = author
|
||||
name = [*#name*]
|
||||
if not namesFirst {
|
||||
(role, name) = (name, role)
|
||||
}
|
||||
(align(left)[
|
||||
#set block(below: 8pt)
|
||||
#block[*#name*]
|
||||
#block[#name]
|
||||
#block[#role]
|
||||
|
||||
], [], [], [])
|
||||
@@ -140,6 +149,7 @@
|
||||
place: highlight[Kaunas],
|
||||
year: highlight[#datetime.today().year()],
|
||||
centerAuthors: false,
|
||||
authorNamesFirst: true, // if false, roles will be displayed first
|
||||
) = {
|
||||
let subHeaders = (faculty,)
|
||||
if department != none {
|
||||
@@ -155,9 +165,9 @@
|
||||
)
|
||||
v(94pt)
|
||||
if centerAuthors {
|
||||
ktu-author-table(authors: authors, alignment: center)
|
||||
ktu-author-table(authors: authors, namesFirst: authorNamesFirst, alignment: center)
|
||||
} else {
|
||||
ktu-author-table(authors: authors)
|
||||
ktu-author-table(authors: authors, namesFirst: authorNamesFirst)
|
||||
}
|
||||
align(center+bottom, block([*#place, #year*]))
|
||||
}
|
||||
@@ -171,6 +181,7 @@
|
||||
(highlight[Vardenis Pavardenis], highlight[Projekto autorius]),
|
||||
(highlight[Vardenis Pavardenis], highlight[Vadovas]),
|
||||
),
|
||||
authorNamesFirst: true, // if false, roles will be displayed first
|
||||
place: highlight[Kaunas],
|
||||
year: highlight[#datetime.today().year()],
|
||||
) = {
|
||||
@@ -183,6 +194,7 @@
|
||||
place: place,
|
||||
year: year,
|
||||
centerAuthors: true,
|
||||
authorNamesFirst: authorNamesFirst,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -195,6 +207,7 @@
|
||||
(highlight[Vardenis Pavardenis], highlight[Projekto autorius]),
|
||||
(highlight[Vardenis Pavardenis], highlight[Vadovas]),
|
||||
),
|
||||
authorNamesFirst: true, // if false, roles will be displayed first
|
||||
place: highlight[Kaunas],
|
||||
year: highlight[#datetime.today().year()],
|
||||
) = {
|
||||
@@ -207,6 +220,7 @@
|
||||
place: place,
|
||||
year: year,
|
||||
centerAuthors: false,
|
||||
authorNamesFirst: authorNamesFirst,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
#import "config.typ": debug-author-table, enable-heading-experiment, __HEADING_EXPERIMENT, __FIG_PER_SECTION, __UPPERCASE_SECTION_TITLES
|
||||
#import "fragments.typ": (
|
||||
ktu-table,
|
||||
|
||||
// building blocks
|
||||
ktu-author-table, ktu-title-header-block,
|
||||
|
||||
ktu-heading-page, ktu-heading-page-centered, ktu-heading-page-normal,
|
||||
ktu-academic-honestly-declaration-page
|
||||
)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#import "@local/ktu-paper:0.3.1": (
|
||||
#import "@local/ktu-paper:0.3.2": (
|
||||
ktu-paper, setup-code,
|
||||
ktu-table-of-contents, ktu-picture-list, ktu-table-list,
|
||||
ktu-heading-page-normal,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#import "@local/ktu-paper:0.3.1": (
|
||||
#import "@local/ktu-paper:0.3.2": (
|
||||
ktu-paper, setup-code,
|
||||
ktu-table-of-contents, ktu-picture-list, ktu-table-list,
|
||||
ktu-heading-page-normal,
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ktu-paper"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
compiler = "0.15.0"
|
||||
entrypoint = "src/lib.typ"
|
||||
repository = "https://github.com/svetikas/ktu-paper"
|
||||
|
||||
Reference in new issue
Block a user