1 Commits
0.1.1 ... main

Author SHA1 Message Date
92a52fb7a1 chore!: bump to 0.1.1
refactor: break up into multiple files
feat: csl style
refactor!: rename variables
Update template, readme, and more
2026-02-06 01:46:07 +02:00
5 changed files with 15 additions and 33 deletions

View File

@@ -25,9 +25,9 @@ This template:
- `hfill` - Fills horizontal space with a filled box instead of just empty space; useful for creating underlines.
- `uline` - Creates underlined fields that need to be filled, such as the name field on the task list.
- `bold` - Inserts bold text inside functional environments.
- `img` - Inserts images with a caption, automatically deriving the label from the image file name (use via `#import "@local/nure:0.1.1": utils` and call `utils.img`).
- `img` - Inserts images with a caption, automatically deriving the label from the image file name.
**Note:** `img()` is provided in `template/utils.typ` so you can copy it into your project root for compatibility, until [path() type](https://github.com/typst/typst/pull/7555) is released.
**Note:** `img()` is provided in `utils.typ` in project's root directory for compatibility, until [path() type](https://github.com/typst/typst/pull/7555) is released.
## Usage
@@ -42,21 +42,20 @@ typst init @local/nure:0.1.1 project-name
```
### As a standalone file
Copy `src/` to your project's root directory, optionally renaming `src/` to `lib/` (then import `src/lib.typ` or `lib/lib.typ` accordingly).
Copy `src/` to your project's root directory, optionally renaming `src/` to `lib/`.
### In your project
```typst
// Import the template either from a local package...
#import "@local/nure:0.1.1": *
#import "@local/nure:0.1.0": *
// ...or by importing a lib.typ directly
// #import "/lib/lib.typ": *
// NOTE: all template arguments use kebab-case.
// 1. Setup the document
// by setting values directly...
#show: pz-lb.with(
title: "Some title",
// etc: "and so on",
// ...
)
// ...or using a yaml/toml file
@@ -74,7 +73,7 @@ Some text
#include "chapters/chapter1.typ"
#include "chapters/chapter2.typ"
// NOTE: if you want to use variables or utils provided by the package,
// you have to import the package or a lib.typ inside a module (e.g. #import "@local/nure:0.1.1": utils).
// you have to import the package or a lib.typ inside a module.
// If you ever need appendices in pz-lb template use the show rule
@@ -82,8 +81,6 @@ Some text
// so it can put bibliography before appendices
#show: style.appendices
// For coursework appendices, pass them via `appendices:` argument instead.
= Quote
#link("https://youtu.be/bJQj1uKtnus")[
The art isn't the art, the art is never the art,
@@ -125,7 +122,7 @@ semester = 4
### Notes:
1. Use `#v(-spacing)` to remove vertical spacing between titles (this cannot be automatically handled by the template). Variable `spacing` used here is imported from the template.
2. When importing `@local/nure:0.1.1` and specifying file paths in functions handled by the package, the path will be relative to the package root, e.g. setting `#show: coursework.with(bib-path: "bibl.yml")` will evaluate to `~/.local/share/typst/packages/local/nure/0.1.1/bibl.yml`. The same applies to `utils.img` unless you copy `template/utils.typ` into your project root and import from there.
2. When importing `@local/nure:0.1.1` and specifying file paths in functions handled by the package, the path will relative to package's root directory, e.g. setting `#show: coursework.with(bib-path: "bibl.yml")` will evaluate to `~/.local/share/typst/packages/local/nure/0.1.1/bibl.yml`, the same is for `#img` function, which makes it quite annoying and forces one to import `lib.typ` file. Please open an issue or contact us in any other way if you have any advice.
### Bibliography Format
The template uses a custom CSL (Citation Style Language) file located at `src/csl/dstu-3008-2015.csl` to format bibliography entries.

View File

@@ -76,18 +76,3 @@
ФІЛ: Філософія
ФВС: Фізичне виховання та спорт
ХТ: Хмарні технології
NoSQL: NoSQL-системи
АПЗ: Архітектура програмного забезпечення
ВSAP: Введення до SAP-технологій
ВМПтФ: Високорівневі мови програмування та фреймворки
ІМпк: Іноземна мова для професійної комунікації
ІНТ: Історія науки і техніки
Лог: Логіка
МППЗ: Менеджмент проектів програмного забезпечення
МОТІ: Методи оптимізації та теорія ігр
ОІДт: Обробка ігрових даних та звітів
ПвІТ: Підприємництво в ІТ
ПВJS: Поглиблене вивчення JavaScript
ПPyt: Програмування мовою Python
РNet: Робота з даними на платформі .Net
РХЗ: Розробка хмарних застосувань в AZURE

View File

@@ -89,12 +89,12 @@
// Select layout variant
let layouts = (
"complex": () => tp.pz-lb.complex(uni, edu-program, subject, type, number, title, authors, mentors),
"ХНУРЕ": () => tp.pz-lb.nure(uni, edu-program, subject, type, number, title, authors, mentors),
"default": () => tp.pz-lb.nure(uni, edu-program, subject, type, number, title, authors, mentors),
"complex": tp.pz-lb.complex(uni, edu-program, subject, type, number, title, authors, mentors),
"ХНУРЕ": tp.pz-lb.nure(uni, edu-program, subject, type, number, title, authors, mentors),
"default": tp.pz-lb.nure(uni, edu-program, subject, type, number, title, authors, mentors),
)
(layouts.at(university, default: layouts.default))()
layouts.at(university, default: layouts.default)
pagebreak(weak: true)

View File

@@ -6,7 +6,7 @@
#let double-half-spacing = spacing * 2.5
/// Ukrainian alphabet for DSTU 3008:2015 numbering
#let ukr-enum = "абвгдежиклмнпрстуфхцшщюя".clusters()
#let ukr-enum = "абвгдежиклмнпрстуфхцшщюя".split("")
/// Helper for level 2/3 heading blocks
#let heading-block(it, num: auto) = {
@@ -40,7 +40,7 @@
set underline(evade: false)
// Lists
set enum(indent: indent-size, body-indent: 0.5cm, numbering: i => ukr-enum.at(i - 1) + ")")
set enum(indent: indent-size, body-indent: 0.5cm, numbering: i => ukr-enum.at(i) + ")")
show enum: it => {
set enum(indent: 0em, numbering: "1)")
it
@@ -106,7 +106,7 @@
context {
let app-letter = upper(ukr-enum.at(counter(heading).get().at(0)))
set heading(numbering: (i, ..n) => upper(ukr-enum.at(i - 1)) + numbering(".1.1", ..n))
set heading(numbering: (i, ..n) => upper(ukr-enum.at(i)) + numbering(".1.1", ..n))
set figure(numbering: i => app-letter + "." + str(i))
set math.equation(numbering: i => app-letter + "." + str(i))
set heading(supplement: [Додаток])

View File

@@ -1,4 +1,4 @@
#import "@local/nure:0.1.1": *
#import "@local/nure:0.1.0": *
#import style: spacing
#import "utils.typ": img