mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2026-02-04 06:22:05 +00:00
feat: add display-documentary parameter
Add `display-documentary` parameter determine if documentary page should be displayed or not.
This commit is contained in:
37
src/lib.typ
37
src/lib.typ
@@ -49,6 +49,7 @@
|
||||
outline-title: "Saturs",
|
||||
attachments: (),
|
||||
attachment-title: "Pielikumi",
|
||||
display-documentary: true,
|
||||
body,
|
||||
) = {
|
||||
// Set document metadata.
|
||||
@@ -283,21 +284,23 @@
|
||||
|
||||
make-attachments(attachment-title, attachments)
|
||||
|
||||
make-documentary-page(
|
||||
if type(title) == content {
|
||||
title
|
||||
.fields()
|
||||
.values()
|
||||
.at(0)
|
||||
.filter(it => it.func() != linebreak and it != [ ])
|
||||
.join(" ")
|
||||
} else {
|
||||
title
|
||||
},
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
)
|
||||
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
|
||||
},
|
||||
authors,
|
||||
advisors,
|
||||
reviewer,
|
||||
thesis-type,
|
||||
date,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user