Skip to content

typst-doc-cn/tutorial

Repository files navigation

Tutorial

Typst 中文教程

下载最新版本 (latest 版本)

下载最新版本 (0.1.0 版本)

安装字体

git submodule update --init --recursive

托管为静态网站

shiroa serve --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ -w . ./src/

编译为静态网站

shiroa build --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ -w . ./src/

编译电子书

typst compile --root . --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ ./src/ebook.typ

编译单独章节

选择一个章节文件,比如 第一章.typ,然后执行:

typst compile --root . --font-path ./assets/typst-fonts/ --font-path ./assets/fonts/ 章节文件.typ

复现 Artifacts

生成typst-docs-v0.11.0.json

cargo install --git https://github.com/typst/typst --locked typst-docs --features="cli" --tag v0.11.0
typst-docs --out-file ./assets/artifacts/typst-docs-v0.11.0.json --assets-dir target/typst-docs/assets