| Crates.io | mdbook-typst-pdf |
| lib.rs | mdbook-typst-pdf |
| version | 0.6.3 |
| created_at | 2024-08-17 07:51:25.746835+00 |
| updated_at | 2025-06-04 06:44:23.668628+00 |
| description | mdbook typst pdf backend |
| homepage | |
| repository | https://github.com/KaiserY/mdbook-typst-pdf |
| max_upload_size | |
| id | 1341356 |
| size | 211,844 |
A mdBook backend for generate pdf (through typst).
For now the primary use case is convert Rust 程序设计语言 简体中文版 to PDF. It should work for other mdbook project, if not welcome to fire an issue.
cargo install mdbook-typst-pdfAdd follow [output.typst-pdf] section to book.toml then mdbook build
[book]
...
[output.html]
...
[output.typst-pdf]
pdf = true # false for generate typ file only
custom-template = "template.typ" # filename for custom typst template for advanced styling
section-number = true # true for generate chapter head numbering
chapter-no-pagebreak = true # true for not add pagebreak after chapter
rust-book = true # true for enabling rust book specific parsing
see src/assets/template.typ file for more details, for now there are two placeholders:
MDBOOK_TYPST_PDF_TITLE for title/**** MDBOOK_TYPST_PDF_PLACEHOLDER ****/ for content