mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-31 05:47:00 -06:00
Multiple line spacing above single puts its extra leading below the text, and Word lets that leading of a page's last line run into the bottom margin: only the text has to fit. WordCraft required the whole line box to fit, so multiple-spaced pages ended up to a line early (one line fewer per page in many double-spaced documents). Observed black-box with synthetic pages pushed down step by step: at double spacing (14 steps), 1.15 and 1.5 (12 steps each) Word holds one more line than WordCraft did whenever the last line's leading crosses the margin; with this change all 38 page breaks match Word's. Only the bottom margin takes the leading: a footer taller than the margin, or footnotes, still keep the whole line clear (a document with a four-line footer kept Word's page breaks only with this limit). Tests: a_page_ends_when_a_multiple_spaced_lines_text_no_longer_fits (1.15, 1.5 and double; fails before this change). space_after_may_overflow_the_bottom_margin_without_notes now checks the last line's text against the margin, since the leading may run past it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>