book.typ
Note: This main file must be named book.typ
book.typ
.
The book.typ
book.typ
consists of many meta sections describing your book project. If you are familiar with mdbook
mdbook
, the book.typ
book.typ
file is similar to the book.toml
book.toml
with summary.md
summary.md
file.
The main file is used by shiroa
shiroa
to know what chapters to include, in what order they should appear, what their hierarchy is and where the source files are. Without this file, there is no book.
Since the book.typ
book.typ
is merely a typst source file, you can import them everywhere, which could be quite useful. For example, to export project to a single PDF file, an ebook file can aggregate all source files of this project according to the imported book-meta.summary
book-meta.summary
metadata from book.typ
book.typ
.
Specify general metadata of the book project. For example:
In this example, you specify following fields for the book project:
- title
string
string
(optional): Specify the title of the book. - authors
array<string>
array<string>
(optional): Specify the author(s) of the book. - summary
content
content
(required): Summarize of the book.
See Book Metadata for more details.
Specify build metadata of the book project. For example:
When you set build-meta.dest-dir
build-meta.dest-dir
to ../dist
../dist
, shiroa
shiroa
will output the generated content to parent/to/book.typ/../../dist
parent/to/book.typ/../../dist
or parent/dist
parent/dist
.
See Build Metadata for more details.