In Word, a page ends when it runs out of room
In Word, and in any program that lays out one page after another, the question is simple: how many lines fit. When the room runs out, the page ends. That works well in a book without notes. In a book with notes, and even more with commentaries around the text, the decision on one page sets what is left for the next, and the error adds up: a note that didn't fit pushes the next one along, and at the end of the chapter half a page is left empty.
A professional typesetter solves this by hand: takes out a line here, adds a line there, and after every round of proofreading does it all again.
In Ariach, the whole book is laid out at once
Ariach's engine doesn't lay out one page after another. For each page it considers several possible endings, and gives each ending a cost. Then it chooses the cheapest combination for the whole book at once, so a good decision on one page doesn't cost a bad page three pages later. These are the things that carry a cost:
- A loose line
- Wide gaps between the words or the letters. In Tzuras HaDaf it is the last resort: the engine prefers almost anything else.
- A note far from its word
- Every note aims for the page of its word. A note that continues on the next page is an allowed compromise, and it is measured.
- A short column
- Columns that don't end together at the bottom of the page, in the main text and in the notes.
- A widow or orphan
- A single line of a paragraph alone at the top or bottom of a page, or at the top or bottom of a column.
- A page that isn't full
- A gap at the bottom of the page. The engine fills it with vertical spacing and letter width, within the limits set in the design.
When there is no perfect answer, the page tells you why
Some pages have no good ending: a note longer than all the room that is left, a paragraph that doesn't divide well, a heading that falls at the bottom of the page. Instead of fixing it silently, Ariach flags the page for review. The page's card says what happened, and what you can do:
- A change to a setting that you apply with one click, such as one line less on the previous page or a little more spacing.
- The place in the text worth shortening, if that is where the fix is.
The typesetter has the last word
When the typesetter knows better, the typesetter decides: end the page before this word, one line less or one line more, start on the next page. And in the page division screen you drag the bottom of each text on the page itself, and see at once what moved to the next page.
These instructions are anchored to words, not to a place on the page. So they stay correct after the proofreader adds a line on page 3. An instruction whose situation has changed (its word was deleted, for example) is switched off and flagged, not applied silently somewhere else.
And what happens when you correct a word
Correcting a word at the start of the book can change every page after it. Ariach lays out again only what the change touches, so the page updates as you type, even in a large book. The result is always identical to a full layout of the whole book from the start: the same book, the same settings, the same pages. And the PDF is identical to the pages on the screen.
Want to see how this looks on a page of Gemara? The guide to typesetting in Tzuras HaDaf shows the same principles when the commentaries wrap around the text.





