forked from pencelheimer/typst_nure_template
update readme
This commit is contained in:
@@ -25,6 +25,8 @@ This template:
|
|||||||
- `bold` - Inserts bold text inside functional environments.
|
- `bold` - Inserts bold text inside functional environments.
|
||||||
- `img` - Inserts images with a caption, automatically deriving the label from the image file name.
|
- `img` - Inserts images with a caption, automatically deriving the label from the image file name.
|
||||||
|
|
||||||
|
**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
|
## Usage
|
||||||
|
|
||||||
### As a local typst package
|
### As a local typst package
|
||||||
@@ -38,14 +40,14 @@ typst init @local/nure:0.1.0 project-name
|
|||||||
```
|
```
|
||||||
|
|
||||||
### As a standalone file
|
### As a standalone file
|
||||||
Copy `lib.typ` to your project's root directory.
|
Copy `src/` to your project's root directory, optionally renaming `src/` to `lib/`.
|
||||||
|
|
||||||
### In your project
|
### In your project
|
||||||
```typst
|
```typst
|
||||||
// Import the template either from a local package...
|
// Import the template either from a local package...
|
||||||
#import "@local/nure:0.1.0": *
|
#import "@local/nure:0.1.0": *
|
||||||
// ...or by importing a lib.typ directly
|
// ...or by importing a lib.typ directly
|
||||||
// #import "/lib.typ": *
|
// #import "/lib/lib.typ": *
|
||||||
|
|
||||||
// 1. Setup the document
|
// 1. Setup the document
|
||||||
// by setting values directly...
|
// by setting values directly...
|
||||||
@@ -65,9 +67,9 @@ Copy `lib.typ` to your project's root directory.
|
|||||||
Some text
|
Some text
|
||||||
|
|
||||||
// ...or include your modules
|
// ...or include your modules
|
||||||
#include "src/intro.typ"
|
#include "chapters/intro.typ"
|
||||||
#include "src/chapter1.typ"
|
#include "chapters/chapter1.typ"
|
||||||
#include "src/chapter2.typ"
|
#include "chapters/chapter2.typ"
|
||||||
// NOTE: if you want to use variables or utils provided by the package,
|
// 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.
|
// you have to import the package or a lib.typ inside a module.
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@ Some text
|
|||||||
// If you ever need appendices in pz-lb template use the show rule
|
// If you ever need appendices in pz-lb template use the show rule
|
||||||
// WARNING: when using coursework template use its own argument,
|
// WARNING: when using coursework template use its own argument,
|
||||||
// so it can put bibliography before appendices
|
// so it can put bibliography before appendices
|
||||||
#show: appendices-style
|
#show: style.appendices
|
||||||
|
|
||||||
= Quote
|
= Quote
|
||||||
#link("https://youtu.be/bJQj1uKtnus")[
|
#link("https://youtu.be/bJQj1uKtnus")[
|
||||||
@@ -86,10 +88,13 @@ Some text
|
|||||||
|
|
||||||
And a TOML file would look like this:
|
And a TOML file would look like this:
|
||||||
```toml
|
```toml
|
||||||
title = "Потiк керування та алгоритмічні структури Bash"
|
# university = "ХНУРЕ" # "ХНУРЕ" is the default
|
||||||
|
# edu_program = "ПЗПІ" # can be null, sourced from authors.first() by default
|
||||||
|
|
||||||
subject = "СМП"
|
subject = "СМП"
|
||||||
doctype = "ЛБ"
|
doctype = "ЛБ"
|
||||||
worknumber = 2
|
worknumber = 2
|
||||||
|
title = "Потiк керування та алгоритмічні структури Bash"
|
||||||
|
|
||||||
[[mentors]]
|
[[mentors]]
|
||||||
name = "Шевченко Т. Г."
|
name = "Шевченко Т. Г."
|
||||||
@@ -101,18 +106,16 @@ name = "Франко І. Я."
|
|||||||
degree = "Асистент кафедри ПІ"
|
degree = "Асистент кафедри ПІ"
|
||||||
gender = "m"
|
gender = "m"
|
||||||
|
|
||||||
edu_program = "ПЗПІ"
|
|
||||||
university = "ХНУРЕ"
|
|
||||||
|
|
||||||
[[authors]]
|
[[authors]]
|
||||||
name = "Косач Л. П."
|
name = "Косач Л. П."
|
||||||
|
edu_program = "ПЗПІ"
|
||||||
|
group = "23-2"
|
||||||
|
gender = "f"
|
||||||
|
variant = 8
|
||||||
|
# For coursework
|
||||||
full_name_gen = "Косач Лариси Петрівни"
|
full_name_gen = "Косач Лариси Петрівни"
|
||||||
course = 2
|
course = 2
|
||||||
edu = "ПЗПІ"
|
|
||||||
gender = "f"
|
|
||||||
group = "23-2"
|
|
||||||
semester = 4
|
semester = 4
|
||||||
variant = 8
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Notes:
|
### Notes:
|
||||||
@@ -124,10 +127,8 @@ variant = 8
|
|||||||
project/
|
project/
|
||||||
├── doc.toml -- for things that don't change across works, i.e. author and mentor metadata
|
├── doc.toml -- for things that don't change across works, i.e. author and mentor metadata
|
||||||
├── main.typ -- for boilerplate code and importing everything
|
├── main.typ -- for boilerplate code and importing everything
|
||||||
├── config/
|
├── utils.typ -- for helper functions
|
||||||
│ ├── universities.yaml -- for user-specific configuration, i.e. education programs and disciplines
|
├── chapters/
|
||||||
│ └── ...
|
|
||||||
├── src/
|
|
||||||
│ ├── intro.typ
|
│ ├── intro.typ
|
||||||
│ ├── chapter1.typ
|
│ ├── chapter1.typ
|
||||||
│ ├── chapter2.typ
|
│ ├── chapter2.typ
|
||||||
|
|||||||
Reference in New Issue
Block a user