mirror of
https://github.com/dolanmiu/docx.git
synced 2026-11-30 16:47:55 +01:00
* feat(layout): lay out words longer than their table can make room for, and long words beside space between cells, as Word does Word's PDF of word-stops-long-words.docx (lay-stops2's batch) settles most of the work's line 9: - Where a table's columns' widest words don't fit in the room, and it has no width of its own in twips, Word gives each column's text a share of the room in proportion to its widest word, whatever width its cells give it, and breaks the words (LW1a to LW1l, LW4d; also L7, TW12 and TW13, which had been read as fitting no rule). - A long word with more text beside it in a cell merged across columns widens them as its line does (LW2a, LW2b). - With space between cells, a column with a long word is widened for it, and a table wider than its columns has them widened in proportion to fill it, the space aside (LW3a to LW3f, LW4a to LW4c); rows that give a column different widths are evened out as without the space (LW5c). A table whose width is a share of more than the width it is in now stops: the batch's probes of shares gave 50 times what they meant, and Word laid those out three ways. word-stops-long-words2.ts asks again for the next batch, with the shares meant. * fix(layout): stop at a table whose cells' margins are wider than the room for it Sharing the room among the columns in proportion to their widest words gave widths that weren't numbers for empty cells, and below nothing for others, where the cells' margins alone are wider than the room, such as a table in a narrow cell. master stopped there, and what Word does hasn't been seen, so the layout stops again, sizing each column as wide as its widest word for a layout that guesses past it.