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