Skip to content

The engine

The engine is what turns your manuscript into a book: Pandoc, the Lua filters and handlers that interpret Keystone's markup, TeX Live, and bundled fonts — all inside the Keystone image. Every template runs the same engine; some carry its source in your project, some run it from a prebuilt image.

Most authors never need this section. Writing, Configuration and Shortcuts cover making a book and styling it. Come here to understand what happens during a build, or to change how it happens.

Keystone is built to be extended rather than edited. A shortcut composes new markup, a hook brings in a tool of your own, and in a template that carries the source, a new handler is a directory the dispatcher finds. None of that asks the engine to change, so it comes through an upgrade intact — you reconcile config and rewrite nothing. Editing a file the engine ships is the other path, and from then on each upgrade brings changes that are yours to merge in.

The build

  • Build pipeline — the path from make publish to a finished artifact, and the order the stages run in.
  • Sandboxing — the locked-down container every build runs in, and what that buys you: reproducible builds, and safety when the source isn't yours.
  • The runtime image — what the image contains, how it's assembled, and how a LaTeX package is added to it.

The code

Changing any of it takes a template that carries the source under .pandoc/, where make image rebuilds the image from your edits; Choosing a template marks the ones that do.