mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2025-12-31 13:42:35 +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:
parent
54f7a8cef8
commit
a05dbee1fb
@ -33,6 +33,7 @@ configure the whole document and `attachment` helper function. Important argumen
|
|||||||
`text` (content) and `keywords` (array) as well as `title`, `lang` and `keyword-title`.
|
`text` (content) and `keywords` (array) as well as `title`, `lang` and `keyword-title`.
|
||||||
- `bibliography`: Result of `bibliography("path/to/file.yml")` or `none`.
|
- `bibliography`: Result of `bibliography("path/to/file.yml")` or `none`.
|
||||||
- `attachments`: Tuple of `attachment(...)` items (tables, figures).
|
- `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.
|
- Positional argument: the document body follows the `ludf.with(...)` call.
|
||||||
|
|
||||||
The function also accepts a single, positional argument for the body of the paper.
|
The function also accepts a single, positional argument for the body of the paper.
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
|
#import "@preview/fletcher:0.5.8" as fletcher: diagram, edge, node
|
||||||
#import fletcher.shapes: cylinder, ellipse
|
#import fletcher.shapes: cylinder, ellipse
|
||||||
#import "@preview/solo-lu-df:0.1.2": *
|
#import "@preview/solo-lu-df:0.1.3": *
|
||||||
#import "utils/tables.typ": function-table
|
#import "utils/tables.typ": function-table
|
||||||
#import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process
|
#import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process
|
||||||
|
|
||||||
|
|||||||
37
src/lib.typ
37
src/lib.typ
@ -49,6 +49,7 @@
|
|||||||
outline-title: "Saturs",
|
outline-title: "Saturs",
|
||||||
attachments: (),
|
attachments: (),
|
||||||
attachment-title: "Pielikumi",
|
attachment-title: "Pielikumi",
|
||||||
|
display-documentary: true,
|
||||||
body,
|
body,
|
||||||
) = {
|
) = {
|
||||||
// Set document metadata.
|
// Set document metadata.
|
||||||
@ -283,21 +284,23 @@
|
|||||||
|
|
||||||
make-attachments(attachment-title, attachments)
|
make-attachments(attachment-title, attachments)
|
||||||
|
|
||||||
make-documentary-page(
|
if display-documentary {
|
||||||
if type(title) == content {
|
make-documentary-page(
|
||||||
title
|
if type(title) == content {
|
||||||
.fields()
|
title
|
||||||
.values()
|
.fields()
|
||||||
.at(0)
|
.values()
|
||||||
.filter(it => it.func() != linebreak and it != [ ])
|
.at(0)
|
||||||
.join(" ")
|
.filter(it => it.func() != linebreak and it != [ ])
|
||||||
} else {
|
.join(" ")
|
||||||
title
|
} else {
|
||||||
},
|
title
|
||||||
authors,
|
},
|
||||||
advisors,
|
authors,
|
||||||
reviewer,
|
advisors,
|
||||||
thesis-type,
|
reviewer,
|
||||||
date,
|
thesis-type,
|
||||||
)
|
date,
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#import "@preview/solo-lu-df:0.1.2": *
|
#import "@preview/solo-lu-df:0.1.3": *
|
||||||
|
|
||||||
#show: ludf.with(
|
#show: ludf.with(
|
||||||
title: "Darba Nosaukums",
|
title: "Darba Nosaukums",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "solo-lu-df"
|
name = "solo-lu-df"
|
||||||
version = "0.1.2"
|
version = "0.1.3"
|
||||||
entrypoint = "src/lib.typ"
|
entrypoint = "src/lib.typ"
|
||||||
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||||
license = "MIT-0"
|
license = "MIT-0"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user