From 41dcbeb1ec8299c9d832805e0ef482f1972516d6 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 13 Mar 2025 12:37:58 +0200 Subject: [PATCH] feat!: bump version to 0.1.0 fix: adjust templates style: reformat lib.typ w/ 120 column width --- README.md | 6 +++--- lib.typ | 19 +++++-------------- template/coursework.typ | 6 +++--- template/lab.typ | 10 +++++----- typst.toml | 2 +- 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 0b04cdc..137d0af 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ This template: ### As a local typst package 1. Clone this repository into ~/.local/share/typst/packages/: ```bash -git clone https://gitea.linerds.us/pencelheimer/typst_nure_template.git ~/.local/share/typst/packages/local/nure/0.0.0 +git clone https://gitea.linerds.us/pencelheimer/typst_nure_template.git ~/.local/share/typst/packages/local/nure/0.1.0 ``` 2. Init your project with Typst: ```bash -typst init @local/nure:0.0.0 project-name +typst init @local/nure:0.1.0 project-name ``` ### As a standalone file @@ -42,7 +42,7 @@ Copy `lib.typ` to your project's root directory. ### In your project ```typst // Import the template either from a local package... -#import "@local/nure:0.0.0": * +#import "@local/nure:0.1.0": * // ...or by importing a lib.typ directly // #import "/lib.typ": * diff --git a/lib.typ b/lib.typ index b6b886e..19eb311 100644 --- a/lib.typ +++ b/lib.typ @@ -403,9 +403,7 @@ grid( columns: (1fr, 1fr, 1fr), gutter: 0.3fr, - [#bold[Курс] #uline(2)], - [#bold[Група] #uline(author.group)], - [#bold[Семестр] #uline(3)], + [#bold[Курс] #uline(2)], [#bold[Група] #uline(author.group)], [#bold[Семестр] #uline(3)], ) linebreak() @@ -526,21 +524,17 @@ #{ let keywords = abstract.keywords.map(upper) - let is_cyrillic = word => word - .split("") - .any(char => ("А" <= char and char <= "я")) + let is_cyrillic = word => word.split("").any(char => ("А" <= char and char <= "я")) let n = keywords.len() for i in range(n) { for j in range(0, n - i - 1) { if ( ( - not is_cyrillic(keywords.at(j)) - and is_cyrillic(keywords.at(j + 1)) + not is_cyrillic(keywords.at(j)) and is_cyrillic(keywords.at(j + 1)) ) or ( - is_cyrillic(keywords.at(j)) == is_cyrillic(keywords.at(j + 1)) - and keywords.at(j) > keywords.at(j + 1) + is_cyrillic(keywords.at(j)) == is_cyrillic(keywords.at(j + 1)) and keywords.at(j) > keywords.at(j + 1) ) ) { (keywords.at(j), keywords.at(j + 1)) = ( @@ -617,10 +611,7 @@ } context { - for (i, citation) in query(ref.where(element: none)) - .map(r => str(r.target)) - .dedup() - .enumerate() { + for (i, citation) in query(ref.where(element: none)).map(r => str(r.target)).dedup().enumerate() { enum.item( i + 1, format-entry(bib_data.at(citation)), diff --git a/template/coursework.typ b/template/coursework.typ index e32b4c0..b18949f 100644 --- a/template/coursework.typ +++ b/template/coursework.typ @@ -9,9 +9,9 @@ ) #let mentors = ( - (name: "Черепанова Ю. Ю.", gender: "f", degree: "Ст. викл. каф. ПІ"), - (name: "Русакова Н. Є.", gender: "f", degree: "Доц. каф. ПІ"), - (name: "Широкопетлєва М. С.", gender: "f", degree: "Ст. викл. каф. ПІ"), + (name: "Черепанова Ю. Ю.", degree: "Ст. викл. каф. ПІ"), + (name: "Русакова Н. Є.", degree: "Доц. каф. ПІ"), + (name: "Широкопетлєва М. С.", degree: "Ст. викл. каф. ПІ"), ) #let task_list = ( diff --git a/template/lab.typ b/template/lab.typ index 4dabe14..4268ae1 100644 --- a/template/lab.typ +++ b/template/lab.typ @@ -1,10 +1,11 @@ -#import "@local/nure:0.0.0": * +#import "@local/nure:0.1.0": * #show: pz-lb-template.with( doctype: "ЛБ", - edu_program_short: "ПЗПІ", + edu_program: "ПЗПІ", + subject: "БД", + worknumber: 1, title: "Інформаційна система «Помічник класного керівника». Керування класом", - subject_short: "БД", authors: ( ( name: "Ситник Є. С.", @@ -15,9 +16,8 @@ ), ), mentors: ( - (name: "Черепанова Ю. Ю.", gender: "f", degree: "Ст. викл. каф. ПІ"), + (name: "Черепанова Ю. Ю.", degree: "Ст. викл. каф. ПІ", gender: "f"), ), - worknumber: 1, ) #v(-spacing) diff --git a/typst.toml b/typst.toml index de71a78..c09a9d5 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "nure" -version = "0.0.0" +version = "0.1.0" entrypoint = "lib.typ" authors = ["linerds"] license = "GPL-3.0"