Crates.io | mdbook-typst |
lib.rs | mdbook-typst |
version | 0.1.7 |
source | src |
created_at | 2023-12-01 17:04:31.5043 |
updated_at | 2024-10-29 02:07:12.723866 |
description | An mdBook backend to output Typst markup, pdf, png, or svg |
homepage | |
repository | |
max_upload_size | |
id | 1055364 |
size | 64,178 |
mdbook-typst
mdbook-typst
is a
backend for
mdBook. The backend converts the book to
Typst markup and can output any format Typst can (currently
pdf
, png
, svg
, and raw Typst markup).
First, install the Typst cli:
cargo install --git https://github.com/typst/typst
Next, install mdbook-typst
(this project):
cargo install mdbook-typst
Then, add an entry to your book.toml:
[output.typst]
Finally, build your book via mdBook:
mdbook build
By default mdbook-typst
will output raw Typst markup to book/typst/book.typst
.
Pdf and other formats can be output instead of raw Typst markup. In your book.toml set the format
value of the output
config section:
[output.typst.output]
format = "pdf"
By default mdbook-typst
will output to book/typst/book.[format]
.
mdbook-typst
is fairly configurable. Check out the configuration
code for a complete list of options.
If you want more control, consider creating your own formatter and/or preprocessing the book using the pullup project.