mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-06 18:51:26 +00:00
Found with LibreOffice's report templates. Tables: - A table filling the margins (`table:align="margins"`) but wider than them ran off the page. It is now fitted to the text width, its columns in proportion. Checked in LibreOffice, which fits such a table with or without relative column widths; the old test's claim otherwise is corrected. - A table's own space above and below (`fo:margin-top` and `fo:margin-bottom` on the table) was dropped. It is now read into new `TableProps::space_before`/`space_after`, laid out (added to the spacing of the paragraphs around it, as LibreOffice does) and written back. Headers and footers: - A header taller than its band lost its spacing from the body, moving the text up. LibreOffice keeps the spacing below the content unless it is dynamic (`style:dynamic-spacing`, which behaves as Word does). New `SectionProps::header_gap`/`footer_gap` hold it. The layout keeps it past a tall header or footer, and the writer writes it back. Word keeps no gap, so DOCX documents are unchanged. Across the 125-document corpus, the round-trip pixel difference falls from 241k to 185k, and WordCraft's own rendering's difference from LibreOffice's falls from 562k to 484k. No document changes page count or gets worse; one report template falls from 7,646 to 602 pixels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBVQLyDnrG8Tn1yDQcUabC