From ada5bc3f632389e76aae91cf6e7a98c30fa7caba Mon Sep 17 00:00:00 2001 From: JustAnyone Date: Sun, 18 Oct 2026 17:24:57 +0300 Subject: [PATCH] chore: bump version to 0.4.1 --- README.md | 4 +- template/ataskaita.typ | 150 +++++++++++++++++++++++++++++++++++++++++ template/main.typ | 2 +- typst.toml | 2 +- 4 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 template/ataskaita.typ diff --git a/README.md b/README.md index 5706cfc..b7df749 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ This repository contains a Typst template for academic papers at the Kaunas Univ ## Initiating the template Install the downloaded template under the following directory: -- Linux: `~/.local/share/typst/packages/local/ktu-paper/0.4.0/` +- Linux: `~/.local/share/typst/packages/local/ktu-paper/0.4.1/` And then initiate a new project: ```sh -typst init @local/ktu-paper:0.4.0 +typst init @local/ktu-paper:0.4.1 ``` diff --git a/template/ataskaita.typ b/template/ataskaita.typ new file mode 100644 index 0000000..cdc1823 --- /dev/null +++ b/template/ataskaita.typ @@ -0,0 +1,150 @@ +#import "../src/lib.typ": ( + ktu-paper, setup-code, + ktu-table-of-contents, ktu-picture-list, ktu-table-list, ktu-code-list, + ktu-heading-page-normal, + ktu-table, + unnumbered-heading, + custom-ref, ref-no +) + +#show: ktu-paper.with( + font: "Times New Roman", // or Arial + figureNumberingPerSection: true, + figureKinds: ( + veryCustomKind: (supplement: "komanda", ref-name: "komanda"), + ), +) +#show: setup-code.with() + +#show math.equation: it => { + show regex("\d+\.\d+"): it => {show ".": {","+h(0pt)} + it} + it +} + +#ktu-heading-page-normal( + faculty: highlight[Informatikos fakultetas], + title: highlight[Laboratorinio darbo ataskaitos pavadinimas], + subtitles: ( + "Laboratorinio darbo ataskaita", + highlight[Studijų modulio pavadinimas (kodas)] + ), + authors: ( + (highlight[Vardenis Pavardenis], "Ataskaitą parengė"), + (highlight[Pareigų ir mokslo laipsnio sutrumpinimas Vardenis Pavardenis], "Laboratoriniam darbui vadovavo"), + ), + authorNamesFirst: false, + place: "Kaunas", + year: datetime.today().year(), +) +#pagebreak() +#set page(numbering: "1") + +#ktu-table-of-contents() +#pagebreak() + +#ktu-picture-list() +#pagebreak() + +#ktu-table-list() +#pagebreak() + +#ktu-code-list() +#pagebreak() + +#unnumbered-heading[= Įvadas] +#lorem(50) + +#pagebreak() += Skyrius +#lorem(50) + +== Poskyrius +#lorem(50) + +=== Dalis +#lorem(50) + +#pagebreak() += Komponentai + +== Paveikslai +Galima gauti paveikslo numerį #ref-no() arba visą paveikslo nuorodą #custom-ref(). + +#figure( + image("images/santaka.png", width: 70%), + caption: [ + Paveikslo pavadinimas + ], +) + + +== Paveikslų "grid" išdėstymas +Paveikslus taip pat galima sudėti į "grid" išdėstymą, į jį kreiptis kaip numerį #ref-no() arba visą nuorodą #custom-ref(). + +#figure(grid( + columns: 2, + gutter: 2mm, + image("images/santaka.png", width: 100%), + image("images/santaka.png", width: 100%), +), caption: [ + Paveikslėliai "grid'e" +]) + + +== Lentelės + +Galima gauti lentelės numerį /*#ref-no()*/ arba visą lentelės nuorodą #custom-ref(). + +#figure( + ktu-table( + columns: (auto, 1fr, 1fr, 1fr), + align: (x, y) => { horizon + left }, + table.header([*Stulpelio pavadinimas*], [*Stulpelio pavadinimas*], [*Stulpelio pavadinimas*], [*Stulpelio pavadinimas*]), + [Eilutė 1], [...], [...], [...], + [Eilutė 2], [...], [...], [...], + [Eilutė 3], [...], [...], [...], + [Eilutė 4], [...], [...], [...], + ), + caption: [Lentelės pavadinimas], +) + + +== Formulės +Formules galima išreikšti eilutėje, pavyzdžiui $E = m c^2$ arba atskiroje eilutėje, pavyzdžiui: +$ + E = m c^2 +$ + +// TODO: fix +Formulės atskiroje eilutėje numeruojamos besąlygiškai, galima gauti formulės numerį #ref-no() arba visą formulės nuorodą #custom-ref(). + +== Kodo fragmentai +Kodo fragmentus galima išreikšti eilutėje, pavyzdžiui `print("Hello, world!")` arba atskiroje eilutėje, pavyzdžiui: +#figure(```python +def main(): + print("Hello, world!") +if __name__ == "__main__": + main() +```, caption: [ + Python kodas +]) + +Galima gauti kodo fragmento numerį #ref-no() arba visą kodo fragmento nuorodą #custom-ref(). + +== Naudotojo apibrėžtos figūros + +Naudotojai tai pat gali apibrėžti savo figūras, pavyzdžiui, komandų fragmentus. Pavyzdžiui, galima apibrėžti komandų fragmentą su papildoma informacija ir naudoti jį dokumente. Galima gauti kodo fragmento numerį #ref-no() arba visą kodo fragmento nuorodą #custom-ref(). + +#figure( + ```sh + npm install foo + ```, + kind: "veryCustomKind", + supplement: "...", + caption: [Diegimo komanda], +) + +#pagebreak() += Išvados +#lorem(50) \ No newline at end of file diff --git a/template/main.typ b/template/main.typ index 5b3228b..bc20e27 100644 --- a/template/main.typ +++ b/template/main.typ @@ -1,4 +1,4 @@ -#import "@local/ktu-paper:0.4.0": ( +#import "@local/ktu-paper:0.4.1": ( ktu-paper, setup-code, ktu-table-of-contents, ktu-picture-list, ktu-table-list, ktu-heading-page-normal, diff --git a/typst.toml b/typst.toml index daf70bc..a0c31d5 100644 --- a/typst.toml +++ b/typst.toml @@ -1,6 +1,6 @@ [package] name = "ktu-paper" -version = "0.4.0" +version = "0.4.1" compiler = "0.15.0" entrypoint = "src/lib.typ" repository = "https://github.com/svetikas/ktu-paper"