Compare commits
36 Commits
612e70a897
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5be6cea4fb | |||
| 5bc79a196e | |||
| c1ad952c7c | |||
| dc3358d986 | |||
| 6bf37099b4 | |||
| bf00b3de5d | |||
| c049a9a3ce | |||
| 22fb1de736 | |||
| 1db499dad4 | |||
| 41dcbeb1ec | |||
| 429f632841 | |||
| b3214e2150 | |||
| d60d3a9c89 | |||
| 63dbd82e4d | |||
| 0b8ceda4f1 | |||
| cf10e0fbdc | |||
| 33d067b67e | |||
| 0e0dc20e9b | |||
| b8a309ad2c | |||
|
f36b513a2d
|
|||
| d7c26debfd | |||
| f940d16e06 | |||
| 09b4d3aa44 | |||
| 0d526d4f58 | |||
| efa56f1fec | |||
|
0e6f2ce25e
|
|||
|
394d4b1fcf
|
|||
|
09fc15a8c9
|
|||
| a761f36a02 | |||
| b12627d888 | |||
| 2d67b11f48 | |||
| c2fd8f6ad0 | |||
| 63720d0068 | |||
| 8cabd1c779 | |||
| a6ec38abee | |||
| bc78371fce |
+1
-1
@@ -1 +1 @@
|
||||
template.pdf
|
||||
*.pdf
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
# Typst Template for NURE Works
|
||||
|
||||
> [!WARNING]
|
||||
> This template relies on functionality added in [Typst v0.13.0-rc1](https://github.com/typst/typst/releases/tag/v0.13.0-rc1). To install it use the following command:
|
||||
> ```bash
|
||||
> cargo install --git https://github.com/typst/typst --branch 0.13 --locked typst-cli
|
||||
> ```
|
||||
|
||||
## TODO
|
||||
- Add more information about the template.
|
||||
|
||||
## General Info
|
||||
|
||||
This project contains two template functions and some utilities for writing NURE works. All functions include documentation comments inside them, so you can explore all possibilities using LSP.
|
||||
@@ -18,7 +9,7 @@ This project contains two template functions and some utilities for writing NURE
|
||||
#### `pz-lb-template` - For Laboratory and Practical Works
|
||||
This template:
|
||||
- Sets up document styles;
|
||||
- Formats the title page according to NURE guidelines.
|
||||
- Formats the title page according to NURE/DSTU guidelines.
|
||||
|
||||
#### `cw-template` - For Course Works
|
||||
This template:
|
||||
@@ -35,21 +26,45 @@ This template:
|
||||
|
||||
## Usage
|
||||
|
||||
To use the template, include it in your project and utilize the provided functions:
|
||||
### As a local typst package
|
||||
1. Clone this repository into ~/.local/share/typst/packages/:
|
||||
```bash
|
||||
git clone -b 0.1.0 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.1.0 project-name
|
||||
```
|
||||
|
||||
### As a standalone file
|
||||
Copy `lib.typ` to your project's root directory.
|
||||
|
||||
### In your project
|
||||
```typst
|
||||
// Import the template
|
||||
#import "path/to/template.typ": *
|
||||
// Import the template either from a local package...
|
||||
#import "@local/nure:0.1.0": *
|
||||
// ...or by importing a lib.typ directly
|
||||
// #import "/lib.typ": *
|
||||
|
||||
// Setup the document
|
||||
#show: lab-pz-template.with(
|
||||
#show: pz-lb-template.with(
|
||||
title: "Some title",
|
||||
// etc: "and so on",
|
||||
// ...
|
||||
)
|
||||
// this template automatically inserts a `=title`
|
||||
|
||||
// Write your content
|
||||
#v(-spacing)
|
||||
// Write your content...
|
||||
#v(-spacing) // remove spacing between headings
|
||||
== Purpose
|
||||
Some text
|
||||
|
||||
// ...or include your modules
|
||||
#include "src/intro.typ"
|
||||
#include "src/chapter1.typ"
|
||||
#include "src/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.
|
||||
```
|
||||
|
||||
### Notes:
|
||||
@@ -57,12 +72,28 @@ Some text
|
||||
|
||||
### Example Project Structure
|
||||
```
|
||||
project-folder/
|
||||
├── main.typ
|
||||
├── template.typ
|
||||
├── images/
|
||||
│ ├── figure1.png
|
||||
│ ├── figure2.png
|
||||
│ ├── ...
|
||||
├── ...
|
||||
project/
|
||||
├── main.typ -- for boilerplate code and importing everything
|
||||
├── config/
|
||||
│ ├── doc.yaml -- for things that don't change across works, i.e. author and mentor metadata
|
||||
│ ├── universities.yaml -- for user-specific configuration, i.e. education programs and disciplines
|
||||
│ └── ...
|
||||
├── src/
|
||||
│ ├── intro.typ
|
||||
│ ├── chapter1.typ
|
||||
│ ├── chapter2.typ
|
||||
│ └── ...
|
||||
├── figures/
|
||||
│ ├── chapter1/
|
||||
│ │ ├── figure1.png
|
||||
│ │ ├── figure2.png
|
||||
│ │ ├── figure3.png
|
||||
│ │ └── ...
|
||||
│ ├── chapter2/
|
||||
│ │ ├── figure1.png
|
||||
│ │ ├── figure2.png
|
||||
│ │ ├── figure3.png
|
||||
│ │ └── ...
|
||||
│ └── ...
|
||||
└── ...
|
||||
```
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
ХНУРЕ:
|
||||
name: "Харківський національний університет радіоелектроніки"
|
||||
edu_programs:
|
||||
ПЗПІ:
|
||||
name_long: "Інженерія програмного забезпечення"
|
||||
department_gen: "Програмної інженерії"
|
||||
code: 121 # TODO = ПЗПІ is "F2" now
|
||||
КУІБ:
|
||||
name_long: "Управління інформаційною безпекою"
|
||||
department_gen: "Інфокомунікацій"
|
||||
code: 125
|
||||
subjects:
|
||||
БД: "Бази даних"
|
||||
БЖД: "Безпека життєдіяльності"
|
||||
ОІМ: "Основи IP-мереж"
|
||||
"ОПНJ": "Основи програмування на Java"
|
||||
ОС: "Операційні системи"
|
||||
ОТК: "Основи теорії кіл"
|
||||
ПП: "Проектний практикум"
|
||||
ПРОГ: "Програмування"
|
||||
СПМ: "Скриптові мови програмування"
|
||||
УФМ: "Українське фахове мовлення"
|
||||
Ф: "Філософія"
|
||||
ФІЗ: "Фізика"
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,36 +0,0 @@
|
||||
#import "template.typ": *
|
||||
|
||||
#show: lab-pz-template.with(
|
||||
doctype: "ЛБ",
|
||||
title: "Інформаційна система «Помічник класного керівника». Керування класом",
|
||||
subject_shorthand: "БД",
|
||||
department_gen: "Програмної інженерії",
|
||||
authors: (
|
||||
(
|
||||
name: "Ситник Є. С.",
|
||||
full_name_gen: "Ситника Єгора Сергійовича",
|
||||
variant: 13,
|
||||
group: "ПЗПІ-23-2",
|
||||
gender: "m",
|
||||
),
|
||||
),
|
||||
mentor: (
|
||||
name: "Черепанова Ю. Ю.",
|
||||
gender: "f",
|
||||
degree: "Ст. викл. каф. ПІ",
|
||||
),
|
||||
worknumber: 1,
|
||||
)
|
||||
|
||||
#v(-spacing)
|
||||
|
||||
== Мета роботи
|
||||
Супер важлива мета
|
||||
|
||||
== Висновки
|
||||
Супер важливий висновок
|
||||
|
||||
== Хід роботи
|
||||
|
||||
== Контрольні запитання
|
||||
Супер важливі контрольні запитання
|
||||
+238
-163
@@ -1,9 +1,18 @@
|
||||
|
||||
// Academic aliases {{{1
|
||||
|
||||
#let universities = yaml("config/universities.yaml")
|
||||
|
||||
// Template formatting functions {{{1
|
||||
|
||||
/// numberless heading
|
||||
#let nheading(title) = heading(depth: 1, numbering: none, title)
|
||||
|
||||
/// fill horizontal space with a box and not an empty space
|
||||
#let hfill(width) = box(width: width, repeat(" ")) // NOTE: This is a HAIR SPACE (U+200A), not a regular space
|
||||
#let hfill(width) = box(
|
||||
width: width,
|
||||
repeat(" "),
|
||||
) // NOTE: This is a HAIR SPACE (U+200A), not a regular space
|
||||
|
||||
/// make underlined cell with filled value
|
||||
#let uline(align: center, content) = underline[
|
||||
@@ -15,55 +24,7 @@
|
||||
/// bold text
|
||||
#let bold(content) = text(weight: "bold")[#content]
|
||||
|
||||
/// captioned image with label derived from path:
|
||||
/// - "image.png" = @image
|
||||
/// - "img/image.png" = @image
|
||||
/// - "img/foo/image.png" = @foo_image
|
||||
/// - "img/foo/foo_image.png" = @foo_image
|
||||
/// the caption will be modified based on a conditional value:
|
||||
/// - `none`: no change
|
||||
/// - some value: [#caption (за даними #value)]
|
||||
/// - no value: caption + " (рисунок виконано самостійно)"
|
||||
#let img(path, caption, ..sink) = {
|
||||
let parts = path.split(".").first().split("/")
|
||||
|
||||
let label_string = if parts.len() <= 2 or parts.at(-1).starts-with(parts.at(-2)) {
|
||||
// ("image",), (_, "image") and (.., "img", "img_image")
|
||||
parts.last()
|
||||
} else {
|
||||
// (.., "img", "image") = "img_image"
|
||||
parts.at(-2) + "_" + parts.at(-1)
|
||||
}.replace(" ", "_")
|
||||
|
||||
let caption = if sink.pos().len() == 0 {
|
||||
caption + " (рисунок виконано самостійно)"
|
||||
} else if sink.pos().first() == none {
|
||||
caption
|
||||
} else {
|
||||
[#caption (за даними #sink.pos().first())]
|
||||
}
|
||||
|
||||
[#figure(image(path), caption: caption) #label(label_string)]
|
||||
}
|
||||
|
||||
/// subjects list
|
||||
#let subjects = (
|
||||
"БД": "Бази даних",
|
||||
"ОПНJ": "Основи програмування на Java",
|
||||
"ОС": "Операційні системи",
|
||||
"ПП": "Проектний практикум",
|
||||
"СПМ": "Скриптові мови програмування",
|
||||
"Ф": "Філософія",
|
||||
)
|
||||
|
||||
/// education programs list
|
||||
#let edu_programs = (
|
||||
"ПЗПІ": (
|
||||
name: "Інженерія програмного забезпечення",
|
||||
number: 121,
|
||||
),
|
||||
)
|
||||
|
||||
/// month name from its number
|
||||
#let month_gen(month) = (
|
||||
"січня",
|
||||
"лютого",
|
||||
@@ -79,7 +40,51 @@
|
||||
"грудня",
|
||||
).at(month - 1)
|
||||
|
||||
/// spacing between lines
|
||||
// Helper functions {{{1
|
||||
|
||||
/// captioned image with label derived from path:
|
||||
/// - "image.png" = @image
|
||||
/// - "img/image.png" = @image
|
||||
/// - "img/foo/image.png" = @foo_image
|
||||
/// - "img/foo/foo_image.png" = @foo_image
|
||||
/// the caption will be modified based on a conditional positional value:
|
||||
/// - `none`: no change
|
||||
/// - some value: "`caption` (за даними `value`)"
|
||||
/// - no value: "`caption` (рисунок виконано самостійно)"
|
||||
/// additional named arguments will be passed to original `image` function
|
||||
#let img(path, caption, ..sink) = {
|
||||
let parts = path.split(".").first().split("/")
|
||||
|
||||
let label_string = if (
|
||||
parts.len() <= 2 or parts.at(-1).starts-with(parts.at(-2))
|
||||
) {
|
||||
// ("image",), (_, "image") and (.., "img", "img_image")
|
||||
parts.last()
|
||||
} else {
|
||||
// (.., "img", "image") = "img_image"
|
||||
parts.at(-2) + "_" + parts.at(-1)
|
||||
}.replace(" ", "_")
|
||||
|
||||
let caption = if sink.pos().len() == 0 {
|
||||
caption + " (рисунок виконано самостійно)"
|
||||
} else if sink.pos().first() == none {
|
||||
caption
|
||||
} else {
|
||||
[#caption (за даними #sink.pos().first())]
|
||||
}
|
||||
|
||||
[#figure(
|
||||
image(path, ..sink.named()),
|
||||
caption: caption,
|
||||
) #label(label_string)]
|
||||
}
|
||||
|
||||
// Styling {{{1
|
||||
/// NOTE: may be wrong
|
||||
#let ua_alpha_numbering = "абвгдежиклмнпрстуфхцшщюя".split("") // 0 = "", 1 = "а"
|
||||
|
||||
// general outlook {{{2
|
||||
// spacing between lines
|
||||
#let spacing = 0.95em
|
||||
|
||||
#let style(it) = {
|
||||
@@ -94,7 +99,12 @@
|
||||
},
|
||||
)
|
||||
|
||||
set text(font: ("Times New Roman", "Liberation Serif"), size: 14pt, hyphenate: false, lang: "uk")
|
||||
set text(
|
||||
font: ("Times New Roman", "Liberation Serif"),
|
||||
size: 14pt,
|
||||
hyphenate: false,
|
||||
lang: "uk",
|
||||
)
|
||||
set par(justify: true, first-line-indent: (amount: 1.25cm, all: true))
|
||||
set underline(evade: false)
|
||||
|
||||
@@ -103,17 +113,12 @@
|
||||
set par(spacing: spacing)
|
||||
set par(leading: spacing)
|
||||
|
||||
// enums and lists
|
||||
let ua_alph_numbering() = {
|
||||
// INFO: This alphabet is not full, maybe it should be extended or maybe not.
|
||||
// I cant remember nor find proper formatting rules.
|
||||
// "абвгґдеєжзиіїйклмнопрстуфхцчшщьюя" (full alphabet)
|
||||
|
||||
let alphabet = "абвгдежиклмнпрстуфхцшщюя".split("")
|
||||
i => { alphabet.at(i) + ")" }
|
||||
}
|
||||
|
||||
set enum(numbering: ua_alph_numbering(), indent: 1.25cm, body-indent: 0.5cm)
|
||||
// enums and lists {{{2
|
||||
set enum(
|
||||
numbering: i => { ua_alpha_numbering.at(i) + ")" },
|
||||
indent: 1.25cm,
|
||||
body-indent: 0.5cm,
|
||||
)
|
||||
show enum: it => {
|
||||
set enum(indent: 0em, numbering: "1)")
|
||||
it
|
||||
@@ -121,7 +126,7 @@
|
||||
|
||||
set list(indent: 1.35cm, body-indent: 0.5cm, marker: [--])
|
||||
|
||||
// figures
|
||||
// figures {{{2
|
||||
show figure: it => {
|
||||
v(spacing * 2, weak: true)
|
||||
it
|
||||
@@ -140,10 +145,22 @@
|
||||
counter(figure.where(kind: raw)).update(0)
|
||||
it
|
||||
}
|
||||
set math.equation(numbering: (..num) => numbering("(1.1)", counter(heading).get().at(0), num.pos().first()))
|
||||
set figure(numbering: (..num) => numbering("1.1", counter(heading).get().at(0), num.pos().first()))
|
||||
set math.equation(
|
||||
numbering: (..num) => numbering(
|
||||
"(1.1)",
|
||||
counter(heading).get().at(0),
|
||||
num.pos().first(),
|
||||
),
|
||||
)
|
||||
set figure(
|
||||
numbering: (..num) => numbering(
|
||||
"1.1",
|
||||
counter(heading).get().at(0),
|
||||
num.pos().first(),
|
||||
),
|
||||
)
|
||||
|
||||
// appearance of references to images and tables
|
||||
// appearance of references to images and tables {{{2
|
||||
set ref(
|
||||
supplement: it => {
|
||||
if it == none or not it.has("kind") {
|
||||
@@ -170,7 +187,7 @@
|
||||
[(#it)]
|
||||
}
|
||||
|
||||
// headings
|
||||
// headings {{{2
|
||||
set heading(numbering: "1.1")
|
||||
|
||||
show heading.where(level: 1): it => {
|
||||
@@ -193,7 +210,19 @@
|
||||
v(spacing * 2, weak: true)
|
||||
}
|
||||
|
||||
// listings
|
||||
show heading.where(level: 3): it => {
|
||||
set text(size: 14pt, weight: "regular")
|
||||
|
||||
v(spacing * 2, weak: true)
|
||||
block(width: 100%, spacing: 0em)[
|
||||
#h(1.25cm)
|
||||
#counter(heading).display(it.numbering)
|
||||
#it.body
|
||||
]
|
||||
v(spacing * 2, weak: true)
|
||||
}
|
||||
|
||||
// listings {{{2
|
||||
show raw: it => {
|
||||
let new_spacing = 0.5em
|
||||
set block(spacing: new_spacing)
|
||||
@@ -201,7 +230,11 @@
|
||||
spacing: new_spacing,
|
||||
leading: new_spacing,
|
||||
)
|
||||
set text(size: 11pt, font: "Courier New", weight: "semibold")
|
||||
set text(
|
||||
size: 11pt,
|
||||
font: ("Iosevka NFM", "Courier New"),
|
||||
weight: "semibold",
|
||||
)
|
||||
|
||||
v(spacing * 2.5, weak: true)
|
||||
pad(it, left: 1.25cm)
|
||||
@@ -211,32 +244,33 @@
|
||||
it
|
||||
}
|
||||
|
||||
// Coursework template {{{1
|
||||
|
||||
/// DSTU 3008:2015 Template for NURE
|
||||
/// -> content
|
||||
/// - doc (content): Content to apply the template to.
|
||||
/// - title (str): Title of the document.
|
||||
/// - subject_shorthand (str): Subject short name.
|
||||
/// - department_gen (str): Department name in genitive form.
|
||||
/// - authors ((name: str, full_name_gen: str, variant: int, group: str, gender: str),): List of Authors dicts.
|
||||
/// - mentors ((name: str, gender: str, degree: str),): List of mentors dicts.
|
||||
/// - edu_program_shorthand (str): Education program shorthand.
|
||||
/// - subject (str): Subject short name.
|
||||
/// - authors ((name: str, full_name_gen: str, variant: int, course: int, semester: int, group: str, gender: str),): List of authors.
|
||||
/// - mentors ((name: str, degree: str),): List of mentors.
|
||||
/// - edu_program (str): Education program shorthand.
|
||||
/// - task_list (done_date: datetime, initial_date: datetime, source: (content | str), content: (content | str), graphics: (content | str)): Task list object.
|
||||
/// - calendar_plan ( plan_table: (content | str), approval_date: datetime): Calendar plan object.
|
||||
/// - abstract (keywords: (str, ), text: (content | str)): Abstract object.
|
||||
/// - bib_path path: Path to the bibliography yaml file.
|
||||
/// - appendices ((title: str, content: content, ): List of appendices objects.
|
||||
/// - appendices (content): Content with appendices.
|
||||
#let cw-template(
|
||||
doc,
|
||||
title: "NONE",
|
||||
subject_shorthand: "NONE",
|
||||
department_gen: "Програмної інженерії",
|
||||
title: none,
|
||||
subject: none,
|
||||
university: "ХНУРЕ",
|
||||
author: (),
|
||||
mentors: (),
|
||||
edu_program_shorthand: "ПЗПІ",
|
||||
edu_program: none,
|
||||
task_list: (),
|
||||
calendar_plan: (),
|
||||
abstract: (),
|
||||
bib_path: "bibl.yml",
|
||||
bib_path: none,
|
||||
appendices: (),
|
||||
) = {
|
||||
set document(title: title, author: author.name)
|
||||
@@ -255,27 +289,24 @@
|
||||
|
||||
|
||||
let head_mentor = mentors.at(0)
|
||||
let edu_program = edu_programs.at(edu_program_shorthand)
|
||||
let uni = universities.at(university)
|
||||
let edu_prog = uni.edu_programs.at(edu_program)
|
||||
|
||||
// page 1
|
||||
// page 1 {{{2
|
||||
[
|
||||
#set align(center)
|
||||
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ
|
||||
|
||||
ХАРКІВСЬКИЙ НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ РАДІОЕЛЕКТРОНІКИ
|
||||
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ\
|
||||
#upper(uni.name)
|
||||
|
||||
\
|
||||
|
||||
Кафедра Програмної інженерії
|
||||
Кафедра #edu_prog.department_gen
|
||||
|
||||
\
|
||||
|
||||
ПОЯСНЮВАЛЬНА ЗАПИСКА
|
||||
|
||||
ДО КУРСОВОЇ РОБОТИ
|
||||
|
||||
з дисципліни: "#subjects.at(subject_shorthand, default: "NONE")"
|
||||
|
||||
ПОЯСНЮВАЛЬНА ЗАПИСКА\
|
||||
ДО КУРСОВОЇ РОБОТИ\
|
||||
з дисципліни: "#uni.subjects.at(subject, default: "NONE")"\
|
||||
Тема роботи: "#title"
|
||||
|
||||
\ \ \
|
||||
@@ -283,7 +314,7 @@
|
||||
#columns(2, gutter: 4cm)[
|
||||
#set align(left)
|
||||
|
||||
#if author.gender == "m" { [Виконав\ ] } else { [Виконала\ ] } ст. гр. #author.group
|
||||
#if author.gender == "m" { [Виконав\ ] } else { [Виконала\ ] } ст. гр. #edu_program\-#author.group
|
||||
|
||||
\
|
||||
Керівник:\
|
||||
@@ -324,34 +355,35 @@
|
||||
|
||||
#pagebreak()
|
||||
]
|
||||
//
|
||||
|
||||
// page 2
|
||||
// page 2 {{{2
|
||||
{
|
||||
uline([Харківський національний університет радіоелектроніки])
|
||||
uline[#uni.name]
|
||||
|
||||
linebreak()
|
||||
linebreak()
|
||||
|
||||
grid(
|
||||
columns: (100pt, 1fr),
|
||||
bold([
|
||||
bold[
|
||||
Кафедра
|
||||
Дисципліна
|
||||
Спеціальність
|
||||
]),
|
||||
],
|
||||
{
|
||||
uline(align: left, department_gen)
|
||||
uline(align: left, edu_prog.department_gen)
|
||||
linebreak()
|
||||
uline(align: left, subjects.at(subject_shorthand))
|
||||
uline(align: left, uni.subjects.at(subject))
|
||||
linebreak()
|
||||
uline(align: left, [#edu_program.number #edu_program.name])
|
||||
uline(align: left, [#edu_prog.code #edu_prog.name_long])
|
||||
},
|
||||
)
|
||||
grid(
|
||||
columns: (1fr, 1fr, 1fr),
|
||||
gutter: 0.3fr,
|
||||
[#bold("Курс") #uline(2)], [#bold("Група") #uline(author.group)], [#bold("Семестр") #uline(3)],
|
||||
[#bold[Курс] #uline(author.course)],
|
||||
[#bold[Група] #uline([#edu_program\-#author.group])],
|
||||
[#bold[Семестр] #uline(author.semester)],
|
||||
)
|
||||
|
||||
linebreak()
|
||||
@@ -404,9 +436,10 @@
|
||||
pagebreak()
|
||||
}
|
||||
|
||||
// page 3
|
||||
// page 3 {{{2
|
||||
{
|
||||
align(center, bold[КАЛЕНДАРНИЙ ПЛАН])
|
||||
set par(first-line-indent: 0pt)
|
||||
|
||||
linebreak()
|
||||
|
||||
@@ -444,23 +477,25 @@
|
||||
pagebreak()
|
||||
}
|
||||
|
||||
// page 4 {{{
|
||||
// page 4 {{{2
|
||||
[
|
||||
#align(center, bold([РЕФЕРАТ])) \
|
||||
#align(center, bold[РЕФЕРАТ]) \
|
||||
|
||||
#context [
|
||||
#let pages = counter(page).final().at(0)
|
||||
#let tables = counter(figure.where(kind: table)).final().at(0)
|
||||
// alternative: query(figure.where(kind: image)).len()
|
||||
#let images = counter(figure.where(kind: image)).final().at(0)
|
||||
#let images = query(figure.where(kind: image)).len()
|
||||
#let tables = query(figure.where(kind: table)).len()
|
||||
#let bibs = bib-count.final().dedup().len()
|
||||
/* TODO: why this stopped working?
|
||||
#let tables = counter(figure.where(kind: table)).final().at(0)
|
||||
#let images = counter(figure.where(kind: image)).final().at(0)*/
|
||||
|
||||
#let counters = ()
|
||||
|
||||
#if pages != 0 { counters.push([#pages с.]) }
|
||||
#if tables != 0 { counters.push([#tables табл.]) }
|
||||
#if images != 0 { counters.push([#images рис.]) }
|
||||
#if bibs != 0 { counters.push([#bibs джерел]) }
|
||||
#if pages != 0 { counters.push[#pages с.] }
|
||||
#if tables != 0 { counters.push[#tables табл.] }
|
||||
#if images != 0 { counters.push[#images рис.] }
|
||||
#if bibs != 0 { counters.push[#bibs джерел] }
|
||||
|
||||
Пояснювальна записка до курсової роботи: #counters.join(", ").
|
||||
]
|
||||
@@ -475,12 +510,17 @@
|
||||
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)
|
||||
)
|
||||
) {
|
||||
(keywords.at(j), keywords.at(j + 1)) = (keywords.at(j + 1), keywords.at(j))
|
||||
(keywords.at(j), keywords.at(j + 1)) = (
|
||||
keywords.at(j + 1),
|
||||
keywords.at(j),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -492,9 +532,8 @@
|
||||
|
||||
#abstract.text
|
||||
]
|
||||
// }}}
|
||||
|
||||
// page 5
|
||||
// page 5 {{{2
|
||||
outline(
|
||||
title: [
|
||||
ЗМІСТ
|
||||
@@ -506,7 +545,7 @@
|
||||
|
||||
doc
|
||||
|
||||
// bibliography
|
||||
// bibliography {{{2
|
||||
{
|
||||
heading(depth: 1, numbering: none)[Перелік джерел посилання]
|
||||
|
||||
@@ -529,7 +568,7 @@
|
||||
)
|
||||
[
|
||||
#citation.title.
|
||||
_#{citation.author}_. // TODO: remove italic case, issue #7
|
||||
#citation.author.
|
||||
URL: #citation.url.value (дата звернення: #date.display("[day].[month].[year]")).
|
||||
]
|
||||
} else if citation.type == "Book" [
|
||||
@@ -544,6 +583,7 @@
|
||||
}
|
||||
|
||||
show enum.item: it => {
|
||||
set par(first-line-indent: 0pt)
|
||||
box(width: 1.25cm)
|
||||
box(width: 1em + 0.5cm)[#it.number.]
|
||||
it.body
|
||||
@@ -560,73 +600,93 @@
|
||||
}
|
||||
}
|
||||
|
||||
// appendices
|
||||
// appendices {{{2
|
||||
{
|
||||
counter(heading).update(0)
|
||||
|
||||
for (i, appendix) in appendices.enumerate() [
|
||||
#set heading(
|
||||
numbering: i => [
|
||||
Додаток #"АБВГДЕЖИКЛМНПРСТУФХЦШЩЮЯ".split("").at(i)
|
||||
],
|
||||
)
|
||||
set heading(
|
||||
numbering: (i, ..nums) => {
|
||||
let char = upper(ua_alpha_numbering.at(i))
|
||||
if nums.pos().len() == 0 { char } else {
|
||||
char + "." + nums.pos().map(str).join(".")
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
#show heading: it => {
|
||||
set align(center)
|
||||
set text(size: 14pt, weight: "regular")
|
||||
show heading.where(level: 1): it => {
|
||||
set align(center)
|
||||
set text(size: 14pt, weight: "regular")
|
||||
|
||||
pagebreak(weak: true)
|
||||
bold(upper(counter(heading).display(it.numbering)))
|
||||
linebreak()
|
||||
it.body
|
||||
v(spacing * 2, weak: true)
|
||||
}
|
||||
#heading(appendix.title)
|
||||
#appendix.content
|
||||
]
|
||||
pagebreak(weak: true)
|
||||
bold[ДОДАТОК #counter(heading).display(it.numbering)]
|
||||
linebreak()
|
||||
it.body
|
||||
v(spacing * 2, weak: true)
|
||||
}
|
||||
|
||||
show heading.where(level: 2): it => {
|
||||
set text(size: 14pt, weight: "regular")
|
||||
|
||||
v(spacing * 2, weak: true)
|
||||
block(width: 100%, spacing: 0em)[
|
||||
#h(1.25cm)
|
||||
#counter(heading).display(it.numbering)
|
||||
#it.body
|
||||
]
|
||||
v(spacing * 2, weak: true)
|
||||
}
|
||||
|
||||
appendices
|
||||
}
|
||||
}
|
||||
|
||||
// Laboratory work template {{{1
|
||||
|
||||
/// DSTU 3008:2015 Template for NURE
|
||||
/// -> content
|
||||
/// - doc (content): Content to apply the template to.
|
||||
/// - doctype ("ЛБ" | "ПЗ"): Document type.
|
||||
/// - edu_program (str): Education program shorthand.
|
||||
/// - title (str): Title of the document.
|
||||
/// - subject_shorthand (str): Subject short name.
|
||||
/// - department_gen (str): Department name in genitive form.
|
||||
/// - worknumber (int): Number of the work, can be omitted.
|
||||
/// - authors ((name: str, full_name_gen: str, variant: int, group: str, gender: str),): List of Authors dicts.
|
||||
/// - mentor (name: str, gender: str, degree: str): Mentors objects.
|
||||
#let lab-pz-template(
|
||||
/// - subject (str): Subject shorthand.
|
||||
/// - authors ((name: str, full_name_gen: str, group: str, gender: str, variant: int or none),): List of authors.
|
||||
/// - mentors ((name: str, degree: str, gender: str or none),): List of mentors.
|
||||
/// - worknumber (int or none): Number of the work. Optional.
|
||||
#let pz-lb-template(
|
||||
doc,
|
||||
doctype: "NONE",
|
||||
title: "NONE",
|
||||
subject_shorthand: "NONE",
|
||||
department_gen: "Програмної інженерії",
|
||||
worknumber: 1,
|
||||
doctype: none,
|
||||
university: "ХНУРЕ",
|
||||
edu_program: none,
|
||||
title: none,
|
||||
subject: none,
|
||||
worknumber: none,
|
||||
authors: (),
|
||||
mentor: (),
|
||||
mentors: (),
|
||||
) = {
|
||||
set document(title: title, author: authors.at(0).name)
|
||||
|
||||
show: style
|
||||
|
||||
context counter(heading).update(worknumber - 1)
|
||||
|
||||
let uni = universities.at(university)
|
||||
let edu_prog = uni.edu_programs.at(edu_program)
|
||||
// page 1 {{{2
|
||||
align(center)[
|
||||
МІНІСТЕРСТВО ОСВІТИ І НАУКИ УКРАЇНИ \
|
||||
ХАРКІВСЬКИЙ НАЦІОНАЛЬНИЙ УНІВЕРСИТЕТ РАДІОЕЛЕКТРОНІКИ
|
||||
#upper(uni.name)
|
||||
|
||||
\ \
|
||||
Кафедра #department_gen
|
||||
Кафедра #edu_prog.department_gen
|
||||
|
||||
\ \ \
|
||||
Звіт \
|
||||
з
|
||||
#if doctype == "ЛБ" [лабораторної роботи] else [практичної роботи]
|
||||
#if worknumber != none [№ #worknumber]
|
||||
#if worknumber != none {
|
||||
context counter(heading).update(worknumber - 1)
|
||||
[№#worknumber]
|
||||
}
|
||||
|
||||
з дисципліни: "#subjects.at(subject_shorthand, default: "UNLNOWN SUBJECT, PLEASE OPEN AN ISSUE")"
|
||||
з дисципліни: "#uni.subjects.at(subject, default: "UNKNOWN SUBJECT, PLEASE OPEN AN ISSUE")"
|
||||
|
||||
з теми: "#title"
|
||||
|
||||
@@ -639,22 +699,37 @@
|
||||
let author = authors.at(0)
|
||||
if author.gender == "m" [Виконав:\ ] else [Виконала:\ ]
|
||||
[
|
||||
ст. гр. #author.group\
|
||||
ст. гр. #edu_program\-#author.group\
|
||||
#author.name\
|
||||
]
|
||||
if author.variant != none [Варіант: №#author.variant]
|
||||
} else [
|
||||
Виконали:\
|
||||
ст. гр. #authors.at(0).group\
|
||||
#authors.map(a => [ #a.name\ ])
|
||||
ст. гр. #edu_program\-#authors.at(0).group\
|
||||
#for author in authors [#author.name\ ]
|
||||
]
|
||||
|
||||
#colbreak()
|
||||
#set align(right)
|
||||
|
||||
#if mentor.gender == "m" { [Перевірив:\ ] } else { [Перевірила:\ ] }
|
||||
#mentor.degree #if mentor.degree.len() >= 15 [\ ]
|
||||
#mentor.name\
|
||||
#if mentors.len() == 1 {
|
||||
let mentor = mentors.at(0)
|
||||
if mentor.gender == none [Перевірили:\ ] else if (
|
||||
mentor.gender == "m"
|
||||
) [Перевірив:\ ] else [Перевірилa:\ ]
|
||||
[
|
||||
#mentor.degree\
|
||||
#mentor.name\
|
||||
]
|
||||
} else [
|
||||
Перевірили:\
|
||||
#for mentor in mentors {
|
||||
[
|
||||
#mentor.degree\
|
||||
#mentor.name\
|
||||
]
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
#v(1fr)
|
||||
@@ -668,4 +743,4 @@
|
||||
doc
|
||||
}
|
||||
|
||||
// vim:sts=2:sw=2
|
||||
// vim:sts=2:sw=2:fdl=0:fdm=marker:cms=/*%s*/
|
||||
@@ -0,0 +1,22 @@
|
||||
title: Потiк керування та алгоритмічні структури Bash
|
||||
subject: СПМ
|
||||
doctype: ЛБ
|
||||
worknumber: 2
|
||||
mentors:
|
||||
- name: Шевченко Т. Г.
|
||||
degree: Доцент кафедри ПІ
|
||||
gender: m
|
||||
- name: Франко І. Я.
|
||||
degree: Асистент кафедри ПІ
|
||||
gender: m
|
||||
edu_program: &EDU ПЗПІ
|
||||
university: ХНУРЕ
|
||||
authors:
|
||||
- name: Косач Л. П.
|
||||
full_name_gen: Косач Лариси Петрівни
|
||||
course: 2
|
||||
edu: *EDU
|
||||
gender: f
|
||||
group: 23-2
|
||||
semester: 4
|
||||
variant: 8
|
||||
@@ -1,29 +1,19 @@
|
||||
#import "template.typ": *
|
||||
#import "@local/nure:0.1.0": *
|
||||
|
||||
#let author = (
|
||||
name: "Ситник Є. С.",
|
||||
full_name_gen: "Ситника Єгора Сергійовича",
|
||||
course: 2,
|
||||
semester: 3,
|
||||
variant: 13,
|
||||
group: "ПЗПІ-23-2",
|
||||
group: "23-2",
|
||||
gender: "m",
|
||||
)
|
||||
|
||||
#let mentors = (
|
||||
(
|
||||
name: "Черепанова Ю. Ю.",
|
||||
gender: "f",
|
||||
degree: "Ст. викл. каф. ПІ",
|
||||
),
|
||||
(
|
||||
name: "Русакова Н. Є.",
|
||||
gender: "f",
|
||||
degree: "Доц. каф. ПІ",
|
||||
),
|
||||
(
|
||||
name: "Широкопетлєва М. С.",
|
||||
gender: "f",
|
||||
degree: "Ст. викл. каф. ПІ",
|
||||
),
|
||||
(name: "Черепанова Ю. Ю.", degree: "Ст. викл. каф. ПІ"),
|
||||
(name: "Русакова Н. Є.", degree: "Доц. каф. ПІ"),
|
||||
(name: "Широкопетлєва М. С.", degree: "Ст. викл. каф. ПІ"),
|
||||
)
|
||||
|
||||
#let task_list = (
|
||||
@@ -69,34 +59,48 @@
|
||||
"SQL",
|
||||
),
|
||||
text: [
|
||||
Мета даної роботи -- проєктування та розробка інформаційної системи «Помічник класного керівника. Керування класом», яка спрямована на автоматизацію процесів управління класом, облік даних про учнів, планування та аналіз навчального процесу. Основна задача інформаційної системи – спростити роботу класного керівника, забезпечити ефективну організацію документації та взаємодію з учасниками освітнього процесу.
|
||||
Мета даної роботи -- проєктування та розробка інформаційної системи «Помічник
|
||||
класного керівника. Керування класом», яка спрямована на автоматизацію процесів
|
||||
управління класом, облік даних про учнів, планування та аналіз навчального
|
||||
процесу. Основна задача інформаційної системи – спростити роботу класного
|
||||
керівника, забезпечити ефективну організацію документації та взаємодію з
|
||||
учасниками освітнього процесу.
|
||||
|
||||
Для реалізації системи було використано сучасний стек технологій, а саме: Go -- як основна мова програмування для створення серверної логіки, HTMX -- для динамічного оновлення інтерфейсу без використання складних фреймворків, MySQL -- як СУБД для зберігання даних про учнів, їх оцінки та розклад, Neovim -- як середовище для швидкої та ефективної розробки коду, Go Echo -- веб-фреймворк для створення REST API, Go SQLx -- бібліотека для роботи з базою даних, що забезпечує зручність і гнучкість.
|
||||
Для реалізації системи було використано сучасний стек технологій, а саме: Go --
|
||||
як основна мова програмування для створення серверної логіки, HTMX -- для
|
||||
динамічного оновлення інтерфейсу без використання складних фреймворків, MySQL --
|
||||
як СУБД для зберігання даних про учнів, їх оцінки та розклад, Neovim -- як
|
||||
середовище для швидкої та ефективної розробки коду, Go Echo -- веб-фреймворк для
|
||||
створення REST API, Go SQLx -- бібліотека для роботи з базою даних, що
|
||||
забезпечує зручність і гнучкість.
|
||||
|
||||
Результат роботи – веб-додаток, який дозволяє обліковувати особисті дані учнів та їхніх опікунів, включаючи інформацію про успішність, відвідуваність та інші показники; планувати розклад занять; генерувати звіти про успішність учнів та переглядати різну статистику. Інтерфейс, створений з використанням HTMX, легко адаптується під потреби користувача.
|
||||
Результат роботи – веб-додаток, який дозволяє обліковувати особисті дані учнів
|
||||
та їхніх опікунів, включаючи інформацію про успішність, відвідуваність та інші
|
||||
показники; планувати розклад занять; генерувати звіти про успішність учнів та
|
||||
переглядати різну статистику. Інтерфейс, створений з використанням HTMX, легко
|
||||
адаптується під потреби користувача.
|
||||
],
|
||||
)
|
||||
|
||||
#let appendices = (
|
||||
(
|
||||
title: "Приклад звіту 1",
|
||||
content: [test],
|
||||
),
|
||||
(
|
||||
title: "Приклад звіту 2",
|
||||
content: [test],
|
||||
),
|
||||
(
|
||||
title: "Приклад звіту 3",
|
||||
content: [test],
|
||||
),
|
||||
)
|
||||
#let appendices = [
|
||||
= Приклад звіту 1
|
||||
#v(-spacing)
|
||||
== Частина 1
|
||||
#lorem(100)
|
||||
== Частина2
|
||||
#lorem(200)
|
||||
|
||||
= Приклад звіту 2
|
||||
#lorem(200)
|
||||
|
||||
= Приклад звіту 3
|
||||
#lorem(200)
|
||||
]
|
||||
|
||||
#show: cw-template.with(
|
||||
title: "Інформаційна система «Помічник класного керівника». Керування класом",
|
||||
subject_shorthand: "БД",
|
||||
department_gen: "Програмної інженерії",
|
||||
edu_program_shorthand: "ПЗПІ",
|
||||
subject_short: "БД",
|
||||
edu_program_short: "ПЗПІ",
|
||||
author: author,
|
||||
mentors: mentors,
|
||||
task_list: task_list,
|
||||
@@ -105,3 +109,16 @@
|
||||
bib_path: "bibl.yml",
|
||||
appendices: appendices,
|
||||
)
|
||||
|
||||
= Моделювання
|
||||
#lorem(250)
|
||||
|
||||
= Імплементація
|
||||
#v(-spacing)
|
||||
== Підоготовка
|
||||
#lorem(200)
|
||||
== Процес
|
||||
#lorem(500)
|
||||
|
||||
= Тестування
|
||||
#lorem(300)
|
||||
@@ -0,0 +1,31 @@
|
||||
#import "@local/nure:0.1.0": *
|
||||
|
||||
#show: pz-lb-template.with(..yaml("config/doc.yaml"))
|
||||
|
||||
#v(-spacing)
|
||||
|
||||
== Мета роботи
|
||||
#lorem(100)
|
||||
|
||||
== Хід роботи
|
||||
#v(-spacing)
|
||||
=== Підготовка
|
||||
#lorem(150)
|
||||
|
||||
=== Виконання дослідження
|
||||
#lorem(300)
|
||||
|
||||
=== Підрахунок результатів
|
||||
#lorem(250)
|
||||
|
||||
== Висновки
|
||||
#lorem(100)
|
||||
|
||||
== Контрольні запитання
|
||||
#lorem(100):
|
||||
- #lorem(20);
|
||||
- #lorem(30);
|
||||
- #lorem(15);
|
||||
- #lorem(25);
|
||||
- #lorem(42);
|
||||
- #lorem(27).
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "nure"
|
||||
version = "0.1.0"
|
||||
entrypoint = "lib.typ"
|
||||
authors = ["linerds"]
|
||||
license = "GPL-3.0"
|
||||
description = "Typst NURE package"
|
||||
|
||||
[template]
|
||||
path = "template"
|
||||
entrypoint = "lab.typ"
|
||||
Reference in New Issue
Block a user