feat: add display-documentary parameter

Add `display-documentary` parameter determine if documentary page should
be displayed or not.
This commit is contained in:
Kristofers Solo 2025-11-21 17:26:23 +02:00
parent 54f7a8cef8
commit a05dbee1fb
Signed by: kristoferssolo
GPG Key ID: 8687F2D3EEE6F0ED
5 changed files with 24 additions and 20 deletions

View File

@ -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`.
- `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.

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.2": *
#import "@preview/solo-lu-df:0.1.3": *
#import "utils/tables.typ": function-table
#import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process

View File

@ -49,6 +49,7 @@
outline-title: "Saturs",
attachments: (),
attachment-title: "Pielikumi",
display-documentary: true,
body,
) = {
// Set document metadata.
@ -283,6 +284,7 @@
make-attachments(attachment-title, attachments)
if display-documentary {
make-documentary-page(
if type(title) == content {
title
@ -300,4 +302,5 @@
thesis-type,
date,
)
}
}

View File

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

View File

@ -1,6 +1,6 @@
[package]
name = "solo-lu-df"
version = "0.1.2"
version = "0.1.3"
entrypoint = "src/lib.typ"
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
license = "MIT-0"