diff --git a/README.md b/README.md index 7bd3e79..705e035 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,11 @@ configure the whole document and `attachment` helper function. Important argumen - `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`. +- `description`: Document description for PDF metadata. Defaults to `none`. - Positional argument: the document body follows the `ludf.with(...)` call. +**Note:** The template automatically extracts keywords from both `primary` and `secondary` abstracts and sets them as PDF document metadata. + The function also accepts a single, positional argument for the body of the paper. The template will initialize your package with a sample call to the `ludf` @@ -43,7 +46,7 @@ function in a show rule. If you want to change an existing project to use this template, you can add a show rule like this at the top of your file: ```typst -#import "@preview/solo-lu-df:0.1.4": * +#import "@preview/solo-lu-df:0.1.5": * #show: ludf.with( title: "Darba Nosaukums", diff --git a/examples/qualification-thesis/main.typ b/examples/qualification-thesis/main.typ index aff9521..90e1bd0 100644 --- a/examples/qualification-thesis/main.typ +++ b/examples/qualification-thesis/main.typ @@ -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.4": * +#import "@preview/solo-lu-df:0.1.5": * #import "utils/tables.typ": function-table #import "utils/diagrams.typ": data-store, dpd-database, dpd-edge, process diff --git a/src/lib.typ b/src/lib.typ index 425a210..26eb35e 100644 --- a/src/lib.typ +++ b/src/lib.typ @@ -48,10 +48,20 @@ attachments: (), attachment-title: "Pielikumi", display-documentary: true, + description: none, body, ) = { // Set document metadata. - set document(title: title, author: authors.map(author => author.name)) + set document( + title: title, + author: authors.map(author => author.name), + keywords: abstract + .values() + .map(it => it.keywords) + .flatten() + .filter(it => it != none and it != ""), + description: description, + ) // Set the body font. set text( @@ -124,9 +134,7 @@ }, ) - show figure: set block( - breakable: true, - ) // allow for tables to span to next pages mid sentence + show figure: set block(breakable: true) // allow for tables to span to next pages mid sentence show figure: set par(justify: false) // disable justify for figures (tables) show figure.caption: set align(end) show table.cell.where(y: 0): strong diff --git a/template/main.typ b/template/main.typ index 268ce6b..c3cc279 100644 --- a/template/main.typ +++ b/template/main.typ @@ -1,4 +1,4 @@ -#import "@preview/solo-lu-df:0.1.4": * +#import "@preview/solo-lu-df:0.1.5": * #show: ludf.with( title: "Darba Nosaukums", diff --git a/typst.toml b/typst.toml index a3d3459..77f839c 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "solo-lu-df" -version = "0.1.4" +version = "0.1.5" entrypoint = "src/lib.typ" authors = ["Kristofers Solo "] license = "MIT-0" @@ -16,7 +16,7 @@ keywords = [ ] categories = ["paper"] disciplines = ["computer-science"] -compiler = "0.13.0" +compiler = "0.14.0" exclude = [] [template]