kdp-typeset-interior
Installation
SKILL.md
Typesetting the interior
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/build-interior.py
Finds the nearest book.toml, computes geometry from [print], and compiles
templates/interior.typ with every dimension passed in as sys.inputs. The
template needs no editing when the trim or the extent moves.
Why this is not one typst compile
The even page count cannot be decided inside Typst. Printers require an even
leaf count, and the extent is not known until the document is laid out. A
conditional on counter(page).final() oscillates: adding the parity leaf makes
the count even, which makes the condition false, which removes the leaf. The
decision has to be made by something standing outside the document — so the build
compiles, counts, and compiles again.