mirror of
https://github.com/dolanmiu/docx.git
synced 2026-12-01 16:55:59 +01:00
* feat(layout): lay out documents that hyphenate their words, and stop where Word may hyphenate, as Word does docx/layout stopped at any document with automatic hyphenation. Word hyphenates by its own dictionaries, which the layout can't have, so it now lays out each line where Word certainly leaves the word after it whole, and stops at a line Word may end with a part of a word and a hyphen. Word's PDFs of word-hyphenation.docx and its -zone, -limit and -manual versions showed that in compatibility mode 15 Word keeps no hyphenation zone, hyphenates wherever a part of two letters or more fits, breaks no word of fewer than five letters, nor numbers, nor text not checked for spelling or in no language, leaves capitals whole with doNotHyphenateCaps, squeezes a word onto a justified line rather than hyphenate it, breaks a word with soft hyphens where its dictionary does too, and sizes a table's columns to the parts of the words it hyphenates. consecutiveHyphenLimit leaves soft hyphens' breaks as they are. * docs(layout): say why a word partly in text Word doesn't hyphenate stops the layout Word's probes haven't shown how it hyphenates a word whose runs differ in proofing, so the layout takes it as one Word may break from its first characters, rather than assume Word never breaks inside the part it leaves whole.
47 KiB
47 KiB