mirror of
https://github.com/kristoferssolo/LU-DF-Typst-Template.git
synced 2026-02-03 22:12:05 +00:00
docs: add description field and keywords note to readme
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
16
src/lib.typ
16
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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "solo-lu-df"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
entrypoint = "src/lib.typ"
|
||||
authors = ["Kristofers Solo <dev@kristofers.xyz>"]
|
||||
license = "MIT-0"
|
||||
@@ -16,7 +16,7 @@ keywords = [
|
||||
]
|
||||
categories = ["paper"]
|
||||
disciplines = ["computer-science"]
|
||||
compiler = "0.13.0"
|
||||
compiler = "0.14.0"
|
||||
exclude = []
|
||||
|
||||
[template]
|
||||
|
||||
Reference in New Issue
Block a user