# Advanced main-book building [Back to the project README](../../../README.md) The defaults shared by all book builds live in `data/config/build.yaml`. Command-line `--input` values are useful for one-off builds and override the corresponding default selectors without modifying that file. ## Themes Select a theme from `setup/theme/themes.typ`: ```sh typst compile --input theme=steel main.typ main-steel.pdf ``` The default theme is `document.color_scheme` in `data/config/build.yaml`. ## Presets and chapter selection The full preset is used by default. Select another preset with: ```sh typst compile --input preset=player-handbook main.typ player-handbook.pdf ``` The `chapters` input is a comma-separated allow-list. Only the named sections are included: ```sh typst compile \ --input chapters=title,origins,schools,crafting \ main.typ selected-chapters.pdf ``` The `disabled_chapters` input is a comma-separated deny-list: ```sh typst compile \ --input disabled_chapters=geography,bestiary,game-master-help \ main.typ reduced-book.pdf ``` When both inputs are present, a chapter must be in the allow-list and absent from every deny-list. Command-line exclusions are combined with both `build.disabled_chapters` and the selected preset's exclusions; they do not replace them. Unknown preset and chapter IDs stop compilation with an explicit error. The canonical chapter IDs are declared in `setup/build_config.typ` and used by `main.typ`. `origin-lore` and `origin-artwork` are content switches rather than standalone chapters. Include or exclude them through the same inputs to control quotations and artwork inside the origins chapter: ```sh typst compile \ --input chapters=title,origins,origin-artwork \ --input disabled_chapters=origin-lore \ main.typ origins-only.pdf ``` ## Origin and school filters Build only one origin variant, one school, or both: ```sh typst compile \ --input origin=dragon_1 \ --input school=artilleur \ main.typ dragon-artilleur.pdf ``` An empty `origin` or `school` value includes every entry. Origin filters use variant IDs such as `dragon_1`, not family names such as `dragon`. School selectors match the corresponding TSV filename without its extension, such as `franc_tireur` or `mage_bestial`. Invalid selectors fail explicitly instead of silently producing an incomplete book. ## Persistent configuration For settings that should apply to every local build, edit `data/config/build.yaml`: - `document.color_scheme` selects the default theme. - `build.preset` selects the default preset. - `build.origin` and `build.school` provide persistent content filters. - `build.disabled_chapters` adds permanent exclusions. - `build.max_tier_exclusive` includes data whose tier is lower than this value. - `build.warnings` controls the project's Typst warning policy. - `presets` defines reusable editions and their exclusions. The `creature_id` setting is specific to master-bestiary diagnostics and is covered by the [master document guide](../master/README.md). ## Watching and reproducing CI For live rebuilding while editing, use: ```sh typst watch main.typ main.pdf ``` The CI build also generates Git metadata before compiling. To reproduce that locally: ```sh ./tools/pseudo_toolchain.sh typst compile main.typ main.pdf ```