Important
Prerequisites: typst: 0.12.0 or later
Recommend: Fonts (ref fonts download fonts)
- cjk font: Source Han Serif SC
- latin font: Lora
- code font: CaskaydiaCove Nerd Font
Tip
You can use submodule or directly download the code, so you can keep up with the updates in a timely manner.
And you can also use the official package manager, which will be more convenient. (coming soon)
git init
git submodule add https://github.com/qujihan/typst-book-template.git typst-book-template
main.typ
#import "typst-book-template/book.typ": *
#show: book.with(info: (
name: "author",
title: "typst-book-template demo",
))
#include "src/chapter1.typ"
src/chapter1.typ
#import "../typst-book-template/book.typ": *
// Please refer to the examples in the `example` directory for how to use `path-prefix`.
#let path-prefix = figure-root-path + "src/pics/"
= chapter 1
== section 1