mirror of
https://github.com/JustAnyones/ktu-paper.git
synced 2026-11-04 00:30:18 +00:00
feat: support specifying department in heading page fragment
This commit is contained in:
2 files changed
+56
-23
No files matched your search
+54
-22
@@ -128,8 +128,43 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#let ktu-heading-page(
|
||||||
|
faculty: highlight[Fakulteto pavadinimas],
|
||||||
|
department: none, // optional
|
||||||
|
title: highlight[Rašto darbo pavadinimas],
|
||||||
|
subtitles: highlight[Praktikos ataskaita / referatas ir pan. (įrašyti rašto darbo tipą)],
|
||||||
|
authors: (
|
||||||
|
(highlight[Vardenis Pavardenis], highlight[Projekto autorius]),
|
||||||
|
(highlight[Vardenis Pavardenis], highlight[Vadovas]),
|
||||||
|
),
|
||||||
|
place: highlight[Kaunas],
|
||||||
|
year: highlight[#datetime.today().year()],
|
||||||
|
centerAuthors: false,
|
||||||
|
) = {
|
||||||
|
let subHeaders = (faculty,)
|
||||||
|
if department != none {
|
||||||
|
subHeaders = (faculty, department)
|
||||||
|
}
|
||||||
|
if type(subtitles) != array {
|
||||||
|
subtitles = (subtitles,)
|
||||||
|
}
|
||||||
|
ktu-title-header-block(
|
||||||
|
subHeaders: subHeaders,
|
||||||
|
bigTitle: title,
|
||||||
|
subTitles: subtitles,
|
||||||
|
)
|
||||||
|
v(94pt)
|
||||||
|
if centerAuthors {
|
||||||
|
ktu-author-table(authors: authors, alignment: center)
|
||||||
|
} else {
|
||||||
|
ktu-author-table(authors: authors)
|
||||||
|
}
|
||||||
|
align(center+bottom, block([*#place, #year*]))
|
||||||
|
}
|
||||||
|
|
||||||
#let ktu-heading-page-centered(
|
#let ktu-heading-page-centered(
|
||||||
faculty: highlight[Fakulteto pavadinimas],
|
faculty: highlight[Fakulteto pavadinimas],
|
||||||
|
department: none, // optional
|
||||||
title: highlight[Rašto darbo pavadinimas],
|
title: highlight[Rašto darbo pavadinimas],
|
||||||
subtitles: highlight[Praktikos ataskaita / referatas ir pan. (įrašyti rašto darbo tipą)],
|
subtitles: highlight[Praktikos ataskaita / referatas ir pan. (įrašyti rašto darbo tipą)],
|
||||||
authors: (
|
authors: (
|
||||||
@@ -139,22 +174,21 @@
|
|||||||
place: highlight[Kaunas],
|
place: highlight[Kaunas],
|
||||||
year: highlight[#datetime.today().year()],
|
year: highlight[#datetime.today().year()],
|
||||||
) = {
|
) = {
|
||||||
let isArr = type(subtitles) == array
|
ktu-heading-page(
|
||||||
if not isArr {
|
faculty: faculty,
|
||||||
subtitles = (subtitles,)
|
department: department,
|
||||||
}
|
title: title,
|
||||||
ktu-title-header-block(
|
subtitles: subtitles,
|
||||||
subHeaders: (faculty,),
|
authors: authors,
|
||||||
bigTitle: title,
|
place: place,
|
||||||
subTitles: subtitles,
|
year: year,
|
||||||
|
centerAuthors: true,
|
||||||
)
|
)
|
||||||
v(94pt)
|
|
||||||
ktu-author-table(authors: authors, alignment: center)
|
|
||||||
align(center+bottom, block([*#place, #year*]))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#let ktu-heading-page-normal(
|
#let ktu-heading-page-normal(
|
||||||
faculty: highlight[Fakulteto pavadinimas],
|
faculty: highlight[Fakulteto pavadinimas],
|
||||||
|
department: none, // optional
|
||||||
title: highlight[Rašto darbo pavadinimas],
|
title: highlight[Rašto darbo pavadinimas],
|
||||||
subtitles: highlight[Praktikos ataskaita / referatas ir pan. (įrašyti rašto darbo tipą)],
|
subtitles: highlight[Praktikos ataskaita / referatas ir pan. (įrašyti rašto darbo tipą)],
|
||||||
authors: (
|
authors: (
|
||||||
@@ -164,18 +198,16 @@
|
|||||||
place: highlight[Kaunas],
|
place: highlight[Kaunas],
|
||||||
year: highlight[#datetime.today().year()],
|
year: highlight[#datetime.today().year()],
|
||||||
) = {
|
) = {
|
||||||
let isArr = type(subtitles) == array
|
ktu-heading-page(
|
||||||
if not isArr {
|
faculty: faculty,
|
||||||
subtitles = (subtitles,)
|
department: department,
|
||||||
}
|
title: title,
|
||||||
ktu-title-header-block(
|
subtitles: subtitles,
|
||||||
subHeaders: (faculty,),
|
authors: authors,
|
||||||
bigTitle: title,
|
place: place,
|
||||||
subTitles: subtitles,
|
year: year,
|
||||||
|
centerAuthors: false,
|
||||||
)
|
)
|
||||||
v(94pt)
|
|
||||||
ktu-author-table(authors: authors)
|
|
||||||
align(center+bottom, block([*#place, #year*]))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#let ktu-academic-honestly-declaration-page(
|
#let ktu-academic-honestly-declaration-page(
|
||||||
|
|||||||
+2
-1
@@ -2,7 +2,8 @@
|
|||||||
#import "config.typ": debug-author-table, enable-heading-experiment, __HEADING_EXPERIMENT, __FIG_PER_SECTION, __UPPERCASE_SECTION_TITLES
|
#import "config.typ": debug-author-table, enable-heading-experiment, __HEADING_EXPERIMENT, __FIG_PER_SECTION, __UPPERCASE_SECTION_TITLES
|
||||||
#import "fragments.typ": (
|
#import "fragments.typ": (
|
||||||
ktu-table,
|
ktu-table,
|
||||||
ktu-heading-page-centered, ktu-heading-page-normal, ktu-academic-honestly-declaration-page
|
ktu-heading-page, ktu-heading-page-centered, ktu-heading-page-normal,
|
||||||
|
ktu-academic-honestly-declaration-page
|
||||||
)
|
)
|
||||||
#import "figures.typ": (
|
#import "figures.typ": (
|
||||||
__fig-supplement,
|
__fig-supplement,
|
||||||
|
|||||||
Reference in new issue
Block a user