/typst-book-template

Primary LanguageTypstMIT LicenseMIT

中文

Typst-book-template

Important

Prerequisites: typst: 0.12.0 or later

Recommend: Fonts (ref fonts download fonts)

Quick Start

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 submodule

git init
git submodule add https://github.com/qujihan/typst-book-template.git typst-book-template

Official Package Manager

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