mirror of
https://github.com/dolanmiu/docx.git
synced 2026-12-01 16:55:59 +01:00
* feat(layout): lay out text around pictures and shapes that it wraps around, as Word does docx/layout stopped at any drawing that text wraps around. Word's PDF of a new probe, word-floats.docx (F1 to F40), showed how Word lays the text out around them, and this follows it: lines beside a drawing have the room beside it, with its distances and effects, on the sides its wrapping says, both sides in rows, a room the next word doesn't fit left empty, and lines with no room below it. Drawings are placed against the page, margins, column, paragraph or line, with offsets, alignments and percentages. The text before a drawing's paragraph on its page goes round it too, a paragraph whose drawing would go past the bottom of the page moves to the next page with it, and a table that doesn't fit beside a drawing goes below it. It keeps stopping where Word hasn't shown its way, such as drawings that overlap, paragraphs kept with the next beside a drawing, and floating tables. A new layout demo, text-around-pictures, checks it against LibreOffice. * fix(layout): put a line below a drawing when its indents leave none of the room beside it The room beside a drawing that a paragraph's indents left nothing of gave the line no room of its own, so it was laid out across the paragraph, over the drawing. It goes below the drawings beside it now, as a line with no room beside them does. Only a paragraph whose indents leave no room even without a drawing keeps its lines as they are. * docs(layout): say what each function of the word-floats reader reads