1 Introduction
book-mk
is a set of scripts for building books from Markdown source files. Currently, HTML and PDF are supported.
book-mk
is not meant to be installed as a package. Instead, it is intended to be embedded inside a subdirectory of your book’s source tree. You can use Git submodules for this but it is not required and won’t be explained here.
1.1 Requirements
First of all, you need a Unix-like system, because the build system relies heavily on makefiles. Additionally, the following tools are needed:
- GNU Make 4.2.*
- Pandoc 1.18.*.*
- pandoc-citeproc 0.10.*.* (if you don’t use citations, you can just replace this with
sh -c cat
) - pandoc-crossref 0.2.*.* (if you don’t use cross-references, you can just replace this with
sh -c cat
) - Rust 1.17.*
- For PDF output:
- LaTeX 2e (including latexmk 4.52c)
- If you have any SVG images:
The version numbers are advisory: things will probably still work on something a bit older or newer.
The book generator also relies on a patched version of mdBook (see mdbook.patch
in the source tree), but this will be automatically downloaded and installed to ./.local/bin/mdbook
by the build system. The user shouldn’t have to worry about this detail except on airgapped systems.