https://github.com/gztimewalker/gz-typst-templates
Typst Templates for my personal usage.
https://github.com/gztimewalker/gz-typst-templates
Last synced: over 1 year ago
JSON representation
Typst Templates for my personal usage.
- Host: GitHub
- URL: https://github.com/gztimewalker/gz-typst-templates
- Owner: GZTimeWalker
- License: mit
- Created: 2023-04-20T11:36:03.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-18T13:40:27.000Z (over 1 year ago)
- Last Synced: 2025-02-23T03:41:47.490Z (over 1 year ago)
- Language: Typst
- Homepage:
- Size: 215 KB
- Stars: 18
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GZ Typst Templates
For my personal usage.
个人使用的 Typst 模板,用于写作业和实验报告。
## Fonts
Install the fonts by yourself.
你可能需要自己安装一些字体,当然,这只是个人习惯(
- text: ("CMU Serif", "Source Han Serif SC"),
- sans: ("Source Han Sans SC"),
- code: ("JetBrains Mono", "Consolas"),
## Usage
- Install [Typst](https://typst.app)
- Clone this repo to any directory
- Link the repo to your project by `ln -s /path/to/repo/ ./base`
- Use this template in Typst (e.g. `#import "./base/templates/report.typ": *`)
- 安装 [Typst](https://typst.app)
- 将本仓库克隆到任意目录
- 通过 `ln -s /path/to/repo/ ./base` 将本仓库链接到你的项目
- 在 Typst 中使用模板(例如 `#import "./base/templates/report.typ": *`)
You can view the example in [usage.typ](./usage.typ).
你可以在 [usage.typ](./usage.typ) 中查看示例。
Suggestions: use relative path for the link, because Typst uses the directory of the compiled file as the root directory by default.
建议使用链接,因为 Typst 默认以编译文件所在目录为根目录。
## Templates
### Report
Use for writing lab reports.
用来写实验报告的模板,有封面。
```typ
#import "./base/templates/report.typ": *
#show: report.with(
title: "实验报告实验",
subtitle: "尝试使用 Typst 编写实验报告",
name: "张三",
stdid: "22223333",
classid: "实验二班",
major: "实验报告编写技术",
school: "实验报告学院",
time: "2022~2023 学年第二学期",
banner: "../images/sysu.png" // 图片路径,相对于 report.typ 所在目录
)
```
### Homework
Use for writing homework.
这个模板用来写作业(数学作业),就是每一页最上面会有一些信息。
```typ
#import "./base/templates/homework.typ": *
#show: report.with(
subject: "量子计算",
title: "作业二",
name: "张三",
stdid: "22223333",
)
```