mirror of
https://github.com/dolanmiu/docx.git
synced 2026-11-30 16:47:55 +01:00
* feat(layout): lay out documents with the compatibility settings Word lays out lines alike with, as Word does docx/layout stopped at any of the schema's compatibility settings turned on, and at Word's allowHyphenationAtTrackBottom and allowTextAfterFloatingTableBreak turned on (decision D4), as several change lines by their definitions. Word's PDFs of word-compat-settings.docx, with each of eight groups of them on, of word-compat-settings2.docx, with each setting of the two groups that changed lines on alone, and of word-compat-settings2-together.docx, with all the others on at once, showed that in compatibility mode 15 only suppressTopSpacing and useFELayout change Word's lines. The other 62, and Word's two settings, at most move the text inside a line of exact height or leave a justified line before a line break unstretched, so they no longer stop the layout. * fix(layout-probes): report only the probe that moves the pages after it, in the settings probe's reader compare took each probe's page shift from its first line and reported any shift, so a probe that added a page made every probe after it read as starting on another page, though its docstring says they don't differ. It now carries on from the page the probe before ended on, and reports a move only where a probe starts somewhere that doesn't explain. Word's PDFs had no such move, so what the reader printed for them is unchanged. * fix(layout-probes): don't report a probe as moved when it is on its own page, in the settings probe's reader A probe whose last line moved onto the next probe's page made that probe read as starting a page early, though it was on the page it had been. compare now reports a move only when a probe starts on another page than it did and the probe before didn't end as many pages later. Its own lines' places are still compared, so a probe pushed down its page reads as such.
12 KiB
12 KiB