The first engine that automatically lays out the most complex pages in publishing — Vilna-style multi-commentary books that took master compositors months, now set in seconds.
The problem
For centuries, the hardest pages in print — the Vilna Talmud daf with Rashi and Tosafot wrapping the text, מקראות גדולות with five commentaries, a Mishnah Berurah page — were composed by hand, by experts, over months per volume. No software ever automated it. InDesign has no model for commentaries at all. Competing tools need constant manual balancing. BookPress is the first engine to do it automatically, at print quality.
How it works
Traditional systems place notes onto pages. BookPress inverts it: each commentary declares its relationship to the main text, and notes assemble themselves by scope. Two page assemblies cover the canon — surround for the Vilna daf, stack-with-foot for commentary-under-text pages — and line breaking uses Knuth–Plass extended with Hebrew microtypography: scribe-style letter widening, the Hebrew window, keri/ketiv handling.
Pagination is deterministic — integer costs, no floats. The same inputs always produce byte-identical output, which is what makes derived tables of contents, snapshot regression tests, and reproducible builds possible.
By the numbers
Cold layout of complete, real books (measured, not estimated):
Editing is incremental: a keystroke re-breaks one paragraph and reflows only the affected pages — about 3 ms for main-text edits and 8–9 ms for note edits on a 2,000-page book. It feels like live editing.
What it sets
Vilna surround
Centre column with commentaries wrapping both sides. Tries every page shape — centre widening under the sides, sides under the centre, stairs — and keeps the best. Glosses sit level with their markers in the margins.
Stacked commentary
Main text above, note flows below: multi-column feet, run-in notes, feet side by side, commentaries on commentaries, long notes that may lag pages behind their markers.
Mikraot Gedolot
Onkelos set beside each verse, per-section column widths chosen to balance the pair, then Rashi, Ramban, Ibn Ezra and more flowing beneath — five commentaries composed on one page, automatically.
Hebrew microtypography
Loose lines filled by widening letters as a scribe does, the Hebrew window, catchwords under overleaf text, petucha/setuma spacing, full niqqud and te'amim support.
Derived front & back matter
Title page, contents with dot leaders, and indexes are generated from the finished layout — every page number read from where its line actually landed.
Printer-ready output
PDF/X-4 with the printer's CMYK profile, bleed and crop marks, plus automated preflight: hairlines, trim, image resolution, font embedding.
For developers
A whole book is one declarative file. This is a real configuration that builds a real volume:
[[compositor]]
id = "oc"
style = "page"
main = "shulchan-aruch"
feet = ["mishnah-berurah", "biur-halacha"]
[compositor_styles.page]
assembly = "stack-with-foot"
page = { width = 432, height = 648 } # 6 x 9 in
margins = { top = 54, bottom = 54, inside = 60, outside = 45 }
- Scripting API + MCP server — JavaScript modules and AI agents drive the engine directly: read texts, set styles, render pages, export PDF.
- Command line —
build,check,preflight,bench,pack. Fits in any pipeline. - Docs generated from code — the complete settings reference is rendered from the engine's schema, and CI refuses any change that lets docs and code disagree.
- Deterministic builds — byte-identical PDFs across native and WebAssembly; every page snapshot-regression tested.
Built by an agent studio
BookPress was built by an autonomous studio of 20+ AI agents working in parallel lanes — research, implementation, and two-stage review with signed approvals — under one human expert's eye. Over 400 pull requests in its first three days, every one reviewed, every one gated on tests, page snapshots, and speed budgets.
Status: the engine is proven on real books. First printed volumes — a complete Orach Chaim, then a Vilna tractate — are in progress, with blind comparison against hand-set editions as the bar.
Talk to us
For licensing, publishing partnerships, or building on the engine: shmuky.dev