From f2833b62c6f650ee09de9860488bc7cc0f6dc9d5 Mon Sep 17 00:00:00 2001 From: Sytnyk Yehor Date: Fri, 14 Feb 2025 01:48:34 +0200 Subject: [PATCH 1/3] added general info and removed unnecessary code --- README.md | 21 +++++++++++---------- coursework_example.typ | 3 --- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d464c95..6b35dae 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,17 @@ # Typst Template for NURE Works -> [!INFO] -> Needs more work, but it is functional and ready for use. +> [!WARNING] +> This branch is using the Typst 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/IntelliSense. +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. ### Templates @@ -35,23 +38,22 @@ This template: To use the template, include it in your project and utilize the provided functions: ```typst -#import "path/to/template.typ": * // Import the template -#import "@preview/indenta:0.0.3": fix-indent // Import indentation fix utility +// Import the template +#import "path/to/template.typ": * +// Setup the document #show: pz-lb-template.with( title: "Some title", ) -#show: fix-indent() - +// Write your content #v(-spacing) == Purpose Some text ``` ### Notes: -1. You must use the `fix-indent` function from `@preview/indenta` to correct indentation after the title. -2. Use `#v(-spacing)` to remove vertical spacing between titles (this cannot be automatically handled by the template). Notice that the `spacing` variable used here is imported from the template. +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. ### Example Project Structure ``` @@ -64,4 +66,3 @@ project-folder/ │ ├── ... ├── ... ``` -This setup ensures that `main.typ` includes and applies the template correctly. diff --git a/coursework_example.typ b/coursework_example.typ index 1cddb77..35a8ea0 100644 --- a/coursework_example.typ +++ b/coursework_example.typ @@ -1,5 +1,4 @@ #import "template.typ": * -#import "@preview/indenta:0.0.3": fix-indent #let author = ( name: "Ситник Є. С.", @@ -106,5 +105,3 @@ bib_path: "bibl.yml", appendices: appendices, ) - -#show: fix-indent() -- 2.47.2 From 9758b5473559a906abb91ac8769bc9dd01feac5b Mon Sep 17 00:00:00 2001 From: Sytnyk Yehor Date: Fri, 14 Feb 2025 01:48:47 +0200 Subject: [PATCH 2/3] fixed par indent --- template.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.typ b/template.typ index 49ecdbe..5b066c2 100644 --- a/template.typ +++ b/template.typ @@ -87,7 +87,7 @@ ) set text(font: ("Times New Roman", "Liberation Serif"), size: 14pt, hyphenate: false, lang: "ua") - set par(justify: true, first-line-indent: 1.25cm) + set par(justify: true, first-line-indent: (amount: 1.25cm, all: true)) set underline(evade: false) // set 1.5 line spacing -- 2.47.2 From 84e83c6f39f3cd7184930e932eb11bad26bbc2de Mon Sep 17 00:00:00 2001 From: Anton Bilous Date: Fri, 14 Feb 2025 09:37:11 +0200 Subject: [PATCH 3/3] change text.font.lang from ua to uk May also need to rework bibliography handling. --- template.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template.typ b/template.typ index 5b066c2..73656d7 100644 --- a/template.typ +++ b/template.typ @@ -86,7 +86,7 @@ }, ) - set text(font: ("Times New Roman", "Liberation Serif"), size: 14pt, hyphenate: false, lang: "ua") + 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) -- 2.47.2