This repo currently contains only 1 template. Perhaps there'll be more in the future.
Clone this repo under the path ~/.local/share/typst/packages/
.
You can name it to the name you like.
As for me, I use local
.
mkdir -p ~/.local/share/typst/packages
git clone https://github.com/Alan-Kuan/typst-templates.git ~/.local/share/typst/packages/<the name you like>
First, import. Then, show.
The following is an example to use the hw-report
template:
#import "@local/hw-report:1.0.0": *
#show: project.with(
title: "A title",
authors: (
(name: "your name", id: "your student id"),
),
font: ("Times New Roman")
)
Parameter | Type | Description | Default |
---|---|---|---|
lang |
str |
passed as the text() 's lang parameter |
"en" |
title |
str |
title of the document | "" |
authors |
array |
authors of the document | () |
font |
str or array |
passed as the text() 's font parameter |
"Noto Serif TC" |
size |
length |
passed as the text() 's size parameter |
12pt |
numbering |
none or str or function |
passed as the page() 's numbering parameter |
none |
Type: dictionary
Key | Type | Description |
---|---|---|
name |
str |
author's name |
id |
str |
author's student ID |