diff --git a/api/classes/charts.ChartDataPatch.html b/api/classes/charts.ChartDataPatch.html
index 0d2bd40135..64394f18cd 100644
--- a/api/classes/charts.ChartDataPatch.html
+++ b/api/classes/charts.ChartDataPatch.html
@@ -45,7 +45,7 @@ placeholder in the document's text is left as it is.
diff --git a/api/classes/index.AbstractNumbering.html b/api/classes/index.AbstractNumbering.html
index 2f7c1dbba1..465aa62323 100644
--- a/api/classes/index.AbstractNumbering.html
+++ b/api/classes/index.AbstractNumbering.html
@@ -35,7 +35,7 @@ Each abstract definition can contain up to 9 levels.
diff --git a/api/classes/index.Body.html b/api/classes/index.Body.html
index 1e046e7a4c..7fd73e98ed 100644
--- a/api/classes/index.Body.html
+++ b/api/classes/index.Body.html
@@ -37,7 +37,7 @@ section. The last section's properties are stored as a direct child of the body
diff --git a/api/classes/index.Bookmark.html b/api/classes/index.Bookmark.html
index b32e95b441..069e142033 100644
--- a/api/classes/index.Bookmark.html
+++ b/api/classes/index.Bookmark.html
@@ -31,7 +31,7 @@ of a start marker, content, and an end marker.
diff --git a/api/classes/index.BookmarkEnd.html b/api/classes/index.BookmarkEnd.html
index 4a0ffb26ab..0d5bd6badf 100644
--- a/api/classes/index.BookmarkEnd.html
+++ b/api/classes/index.BookmarkEnd.html
@@ -35,7 +35,7 @@ taken from bookmarkUniqueNumericId (see BookmarkStart)
diff --git a/api/classes/index.BookmarkStart.html b/api/classes/index.BookmarkStart.html
index c4c2c879eb..610c55b1e0 100644
--- a/api/classes/index.BookmarkStart.html
+++ b/api/classes/index.BookmarkStart.html
@@ -37,7 +37,7 @@ same as a Bookmark's.
diff --git a/api/classes/index.CellMerge.html b/api/classes/index.CellMerge.html
index 1b04f1c8d6..e2e1559697 100644
--- a/api/classes/index.CellMerge.html
+++ b/api/classes/index.CellMerge.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.CellMergeAttributes.html b/api/classes/index.CellMergeAttributes.html
index 50fd7b29f5..3502f238ec 100644
--- a/api/classes/index.CellMergeAttributes.html
+++ b/api/classes/index.CellMergeAttributes.html
@@ -30,7 +30,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.CheckBoxSymbolElement.html b/api/classes/index.CheckBoxSymbolElement.html
index dad79f8538..e9715453ec 100644
--- a/api/classes/index.CheckBoxSymbolElement.html
+++ b/api/classes/index.CheckBoxSymbolElement.html
@@ -33,7 +33,7 @@ specifying the Unicode character and font to render.
diff --git a/api/classes/index.CheckBoxUtil.html b/api/classes/index.CheckBoxUtil.html
index 0b4f058820..94e41cced6 100644
--- a/api/classes/index.CheckBoxUtil.html
+++ b/api/classes/index.CheckBoxUtil.html
@@ -33,7 +33,7 @@ including its checked state and the symbols used for checked and unchecked state
diff --git a/api/classes/index.CommentRangeEnd.html b/api/classes/index.CommentRangeEnd.html
index c4a3c458df..da26e90ba4 100644
--- a/api/classes/index.CommentRangeEnd.html
+++ b/api/classes/index.CommentRangeEnd.html
@@ -36,7 +36,7 @@ Must be paired with a CommentRangeStart with the same ID.
diff --git a/api/classes/index.CommentRangeStart.html b/api/classes/index.CommentRangeStart.html
index 86944d0c56..8bdcd04edf 100644
--- a/api/classes/index.CommentRangeStart.html
+++ b/api/classes/index.CommentRangeStart.html
@@ -36,7 +36,7 @@ Must be paired with a CommentRangeEnd with the same ID.
diff --git a/api/classes/index.CommentReference.html b/api/classes/index.CommentReference.html
index 5246b0adb7..5a2ff22d2b 100644
--- a/api/classes/index.CommentReference.html
+++ b/api/classes/index.CommentReference.html
@@ -36,7 +36,7 @@ It should be placed after the CommentRangeEnd element.
diff --git a/api/classes/index.Comments.html b/api/classes/index.Comments.html
index 44135338f0..8fd7483f98 100644
--- a/api/classes/index.Comments.html
+++ b/api/classes/index.Comments.html
@@ -35,7 +35,7 @@ threading is activated and thread data is generated for commentsExtended.xml.
diff --git a/api/classes/index.CommentsIds.html b/api/classes/index.CommentsIds.html
index b793ba81c6..2db34b467d 100644
--- a/api/classes/index.CommentsIds.html
+++ b/api/classes/index.CommentsIds.html
@@ -27,7 +27,7 @@ to a stable w16cid:durableId preserved by Word across edits.
diff --git a/api/classes/index.ConcreteHyperlink.html b/api/classes/index.ConcreteHyperlink.html
index 5a8d51ea86..76d005ad6c 100644
--- a/api/classes/index.ConcreteHyperlink.html
+++ b/api/classes/index.ConcreteHyperlink.html
@@ -30,7 +30,7 @@ Use InternalHyperlink or ExternalHyperlink for creating hyperlinks in documents.
diff --git a/api/classes/index.DeletedTableCell.html b/api/classes/index.DeletedTableCell.html
index 6f92e287fc..b1c68947ec 100644
--- a/api/classes/index.DeletedTableCell.html
+++ b/api/classes/index.DeletedTableCell.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.DeletedTableRow.html b/api/classes/index.DeletedTableRow.html
index f4ede19fdf..2ea121a91b 100644
--- a/api/classes/index.DeletedTableRow.html
+++ b/api/classes/index.DeletedTableRow.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.DocumentDefaults.html b/api/classes/index.DocumentDefaults.html
index 1c8c6aee8f..5ead819200 100644
--- a/api/classes/index.DocumentDefaults.html
+++ b/api/classes/index.DocumentDefaults.html
@@ -34,7 +34,7 @@ paragraphs and runs in a document unless overridden by a style or direct formatt
diff --git a/api/classes/index.DrawingPatch.html b/api/classes/index.DrawingPatch.html
index eb4ad92bfd..abc3f48dbe 100644
--- a/api/classes/index.DrawingPatch.html
+++ b/api/classes/index.DrawingPatch.html
@@ -27,7 +27,7 @@ is one: it replaces the data of a chart made in Word.
diff --git a/api/classes/index.EndnoteIdReference.html b/api/classes/index.EndnoteIdReference.html
index 73db7648c6..d8dd040232 100644
--- a/api/classes/index.EndnoteIdReference.html
+++ b/api/classes/index.EndnoteIdReference.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.EndnoteReferenceRunAttributes.html b/api/classes/index.EndnoteReferenceRunAttributes.html
index 9227695b3b..465fe889e1 100644
--- a/api/classes/index.EndnoteReferenceRunAttributes.html
+++ b/api/classes/index.EndnoteReferenceRunAttributes.html
@@ -30,7 +30,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.Endnotes.html b/api/classes/index.Endnotes.html
index 9a1710f4f9..be159080e2 100644
--- a/api/classes/index.Endnotes.html
+++ b/api/classes/index.Endnotes.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.ExternalHyperlink.html b/api/classes/index.ExternalHyperlink.html
index b0e73e0cdc..d2c9df3894 100644
--- a/api/classes/index.ExternalHyperlink.html
+++ b/api/classes/index.ExternalHyperlink.html
@@ -37,7 +37,7 @@ is converted to a ConcreteHyperlink with the relationship ID.
diff --git a/api/classes/index.FileChild.html b/api/classes/index.FileChild.html
index 11781b0116..4a637c780d 100644
--- a/api/classes/index.FileChild.html
+++ b/api/classes/index.FileChild.html
@@ -28,7 +28,7 @@ to the document body. Examples include Paragraph and Table.
diff --git a/api/classes/index.FootNotes.html b/api/classes/index.FootNotes.html
index 3cc9054352..1a5d100db0 100644
--- a/api/classes/index.FootNotes.html
+++ b/api/classes/index.FootNotes.html
@@ -36,7 +36,7 @@ line used when footnotes continue across pages.
diff --git a/api/classes/index.FooterWrapper.html b/api/classes/index.FooterWrapper.html
index 979dce9dc6..b104010192 100644
--- a/api/classes/index.FooterWrapper.html
+++ b/api/classes/index.FooterWrapper.html
@@ -29,7 +29,7 @@ Each section can have multiple footers for different page types.
diff --git a/api/classes/index.FootnoteReference.html b/api/classes/index.FootnoteReference.html
index be7e0f797d..9585d76c08 100644
--- a/api/classes/index.FootnoteReference.html
+++ b/api/classes/index.FootnoteReference.html
@@ -27,7 +27,7 @@ and the footnote content by using a unique identifier.
diff --git a/api/classes/index.GridSpan.html b/api/classes/index.GridSpan.html
index a30928e8a3..b72b0a8723 100644
--- a/api/classes/index.GridSpan.html
+++ b/api/classes/index.GridSpan.html
@@ -34,7 +34,7 @@ in the table grid. This is used to merge cells horizontally (column span).
diff --git a/api/classes/index.HeaderWrapper.html b/api/classes/index.HeaderWrapper.html
index e241107d37..f6bdf63f58 100644
--- a/api/classes/index.HeaderWrapper.html
+++ b/api/classes/index.HeaderWrapper.html
@@ -29,7 +29,7 @@ Each section can have multiple headers for different page types.
diff --git a/api/classes/index.HpsMeasureElement.html b/api/classes/index.HpsMeasureElement.html
index 899d16aab3..dc653042a0 100644
--- a/api/classes/index.HpsMeasureElement.html
+++ b/api/classes/index.HpsMeasureElement.html
@@ -33,7 +33,7 @@ Values can be specified as numbers (interpreted as half-points) or with explicit
diff --git a/api/classes/index.IgnoreIfEmptyXmlComponent.html b/api/classes/index.IgnoreIfEmptyXmlComponent.html
index 8f41220ba8..b51ada38ea 100644
--- a/api/classes/index.IgnoreIfEmptyXmlComponent.html
+++ b/api/classes/index.IgnoreIfEmptyXmlComponent.html
@@ -39,7 +39,7 @@ to be excluded from the output.
diff --git a/api/classes/index.ImageRun.html b/api/classes/index.ImageRun.html
index 42335eabdb..af29e182dc 100644
--- a/api/classes/index.ImageRun.html
+++ b/api/classes/index.ImageRun.html
@@ -33,7 +33,7 @@ including JPG, PNG, GIF, BMP, and SVG. Optionally wraps the run in
diff --git a/api/classes/index.ImportedXmlComponent.html b/api/classes/index.ImportedXmlComponent.html
index 47dc61700d..e78a38ef25 100644
--- a/api/classes/index.ImportedXmlComponent.html
+++ b/api/classes/index.ImportedXmlComponent.html
@@ -30,7 +30,7 @@ templates or when you need to include pre-existing XML fragments.
diff --git a/api/classes/index.InitializableXmlComponent.html b/api/classes/index.InitializableXmlComponent.html
index e102926f0b..68c4b066a0 100644
--- a/api/classes/index.InitializableXmlComponent.html
+++ b/api/classes/index.InitializableXmlComponent.html
@@ -30,7 +30,7 @@ create a new component that shares or extends the children of an existing compon
diff --git a/api/classes/index.InsertedTableCell.html b/api/classes/index.InsertedTableCell.html
index b40564c319..d5fd066b36 100644
--- a/api/classes/index.InsertedTableCell.html
+++ b/api/classes/index.InsertedTableCell.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.InsertedTableRow.html b/api/classes/index.InsertedTableRow.html
index b1a9b35076..08e2c16be5 100644
--- a/api/classes/index.InsertedTableRow.html
+++ b/api/classes/index.InsertedTableRow.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.InsertedTextRun.html b/api/classes/index.InsertedTextRun.html
index 3ce75f42e5..d06fdb86f6 100644
--- a/api/classes/index.InsertedTextRun.html
+++ b/api/classes/index.InsertedTextRun.html
@@ -37,7 +37,7 @@ made the insertion and when.
diff --git a/api/classes/index.InternalHyperlink.html b/api/classes/index.InternalHyperlink.html
index 2551c36124..e90790b0e7 100644
--- a/api/classes/index.InternalHyperlink.html
+++ b/api/classes/index.InternalHyperlink.html
@@ -36,7 +36,7 @@ The bookmark must exist in the document for the hyperlink to function.
diff --git a/api/classes/index.LastRenderedPageBreak.html b/api/classes/index.LastRenderedPageBreak.html
index 22bf2ebbb7..7416d51962 100644
--- a/api/classes/index.LastRenderedPageBreak.html
+++ b/api/classes/index.LastRenderedPageBreak.html
@@ -23,7 +23,7 @@ This is typically generated by Word and not created manually.
diff --git a/api/classes/index.MathDegree.html b/api/classes/index.MathDegree.html
index 4b7e28b098..ac46b10d76 100644
--- a/api/classes/index.MathDegree.html
+++ b/api/classes/index.MathDegree.html
@@ -28,7 +28,7 @@ For square roots, this element is typically hidden.
diff --git a/api/classes/index.MathFunctionName.html b/api/classes/index.MathFunctionName.html
index 4ef44e07cc..9c7667fe44 100644
--- a/api/classes/index.MathFunctionName.html
+++ b/api/classes/index.MathFunctionName.html
@@ -28,7 +28,7 @@ that appears before the function argument.
diff --git a/api/classes/index.MathFunctionProperties.html b/api/classes/index.MathFunctionProperties.html
index 0bf2e0a384..a51f612444 100644
--- a/api/classes/index.MathFunctionProperties.html
+++ b/api/classes/index.MathFunctionProperties.html
@@ -28,7 +28,7 @@ such as function name alignment and spacing.
diff --git a/api/classes/index.MathLimitUpper.html b/api/classes/index.MathLimitUpper.html
index 964cb970df..4f49f55969 100644
--- a/api/classes/index.MathLimitUpper.html
+++ b/api/classes/index.MathLimitUpper.html
@@ -36,7 +36,7 @@ commonly used for mathematical notation like lim with conditions above.
diff --git a/api/classes/index.MathPreSubSuperScript.html b/api/classes/index.MathPreSubSuperScript.html
index cfd9fb7819..9cc4210e1a 100644
--- a/api/classes/index.MathPreSubSuperScript.html
+++ b/api/classes/index.MathPreSubSuperScript.html
@@ -36,7 +36,7 @@ positioned before (to the left of) the base, commonly used in tensor notation.
diff --git a/api/classes/index.MathRadicalProperties.html b/api/classes/index.MathRadicalProperties.html
index b9196c9754..a925eb890c 100644
--- a/api/classes/index.MathRadicalProperties.html
+++ b/api/classes/index.MathRadicalProperties.html
@@ -28,7 +28,7 @@ such as whether to hide the degree (for square roots).
diff --git a/api/classes/index.MathRun.html b/api/classes/index.MathRun.html
index 36ee2cfcc5..cab7b8c974 100644
--- a/api/classes/index.MathRun.html
+++ b/api/classes/index.MathRun.html
@@ -36,7 +36,7 @@ similar to how Run contains text in regular paragraphs.
diff --git a/api/classes/index.MathSubSuperScript.html b/api/classes/index.MathSubSuperScript.html
index 590f72a1f5..4bbc46ed46 100644
--- a/api/classes/index.MathSubSuperScript.html
+++ b/api/classes/index.MathSubSuperScript.html
@@ -36,7 +36,7 @@ commonly used for tensor notation or indexed variables with exponents.
diff --git a/api/classes/index.Media.html b/api/classes/index.Media.html
index f1f27faf23..d7be504389 100644
--- a/api/classes/index.Media.html
+++ b/api/classes/index.Media.html
@@ -24,7 +24,7 @@ is stored with a unique key for retrieval.
diff --git a/api/classes/index.NextAttributeComponent.html b/api/classes/index.NextAttributeComponent.html
index e58f51b0dd..eada8aea9b 100644
--- a/api/classes/index.NextAttributeComponent.html
+++ b/api/classes/index.NextAttributeComponent.html
@@ -34,7 +34,7 @@ This gives more control but is more verbose than XmlAttributeComponent.
diff --git a/api/classes/index.OnOffElement.html b/api/classes/index.OnOffElement.html
index 4a0c1dd856..52ac4b3b3e 100644
--- a/api/classes/index.OnOffElement.html
+++ b/api/classes/index.OnOffElement.html
@@ -34,7 +34,7 @@ it is explicitly disabled. When the value is true, the attribute is often omitte
diff --git a/api/classes/index.Packer.html b/api/classes/index.Packer.html
index 6009379d97..3939a6df48 100644
--- a/api/classes/index.Packer.html
+++ b/api/classes/index.Packer.html
@@ -26,7 +26,7 @@ of the document structure into OOXML format and compression into a .docx ZIP arc
diff --git a/api/classes/index.PageBorders.html b/api/classes/index.PageBorders.html
index c191ff170d..0a927b1f4d 100644
--- a/api/classes/index.PageBorders.html
+++ b/api/classes/index.PageBorders.html
@@ -34,7 +34,7 @@ including which pages display the borders and how they are positioned.
diff --git a/api/classes/index.PageTextDirection.html b/api/classes/index.PageTextDirection.html
index 6ddac25e83..96f0318a52 100644
--- a/api/classes/index.PageTextDirection.html
+++ b/api/classes/index.PageTextDirection.html
@@ -30,7 +30,7 @@ for all pages in a section.
diff --git a/api/classes/index.Paragraph.html b/api/classes/index.Paragraph.html
index 723c148abf..66acf61d90 100644
--- a/api/classes/index.Paragraph.html
+++ b/api/classes/index.Paragraph.html
@@ -36,7 +36,7 @@ various inline elements such as text runs, images, hyperlinks, and bookmarks.
diff --git a/api/classes/index.ParagraphPropertiesChange.html b/api/classes/index.ParagraphPropertiesChange.html
index 12802e4e16..8ce4b4fd44 100644
--- a/api/classes/index.ParagraphPropertiesChange.html
+++ b/api/classes/index.ParagraphPropertiesChange.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.ParagraphPropertiesDefaults.html b/api/classes/index.ParagraphPropertiesDefaults.html
index 66b9229c1a..63f28e7af8 100644
--- a/api/classes/index.ParagraphPropertiesDefaults.html
+++ b/api/classes/index.ParagraphPropertiesDefaults.html
@@ -34,7 +34,7 @@ to all paragraphs in the document unless overridden.
diff --git a/api/classes/index.PositionalTab.html b/api/classes/index.PositionalTab.html
index f8f6552303..cf2e8cb67f 100644
--- a/api/classes/index.PositionalTab.html
+++ b/api/classes/index.PositionalTab.html
@@ -37,7 +37,7 @@ an exact alignment and position within the paragraph.
diff --git a/api/classes/index.RunPropertiesDefaults.html b/api/classes/index.RunPropertiesDefaults.html
index 8204af1688..f5b2754a6a 100644
--- a/api/classes/index.RunPropertiesDefaults.html
+++ b/api/classes/index.RunPropertiesDefaults.html
@@ -34,7 +34,7 @@ to all text runs in the document unless overridden by styles or direct formattin
diff --git a/api/classes/index.SectionProperties.html b/api/classes/index.SectionProperties.html
index c4df16b5c6..8b71185c1c 100644
--- a/api/classes/index.SectionProperties.html
+++ b/api/classes/index.SectionProperties.html
@@ -35,7 +35,7 @@ A document can contain multiple sections with different properties.
diff --git a/api/classes/index.SectionPropertiesChange.html b/api/classes/index.SectionPropertiesChange.html
index 219806c08b..44de9970ff 100644
--- a/api/classes/index.SectionPropertiesChange.html
+++ b/api/classes/index.SectionPropertiesChange.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.SimpleField.html b/api/classes/index.SimpleField.html
index 97be86fb59..9ef2c4549f 100644
--- a/api/classes/index.SimpleField.html
+++ b/api/classes/index.SimpleField.html
@@ -40,7 +40,7 @@ Simple fields are typically used for fields that don't require complex nesting.<
diff --git a/api/classes/index.SimpleMailMergeField.html b/api/classes/index.SimpleMailMergeField.html
index 9835dc1223..73c09ebd8d 100644
--- a/api/classes/index.SimpleMailMergeField.html
+++ b/api/classes/index.SimpleMailMergeField.html
@@ -30,7 +30,7 @@ It creates a MERGEFIELD that will be populated with data during mail merge.
diff --git a/api/classes/index.StringContainer.html b/api/classes/index.StringContainer.html
index 1cf1e008cb..6c28e34195 100644
--- a/api/classes/index.StringContainer.html
+++ b/api/classes/index.StringContainer.html
@@ -30,7 +30,7 @@ rather than an attribute.
diff --git a/api/classes/index.StringEnumValueElement.html b/api/classes/index.StringEnumValueElement.html
index 7b21133770..eee5b9ddae 100644
--- a/api/classes/index.StringEnumValueElement.html
+++ b/api/classes/index.StringEnumValueElement.html
@@ -33,7 +33,7 @@ type parameter to enforce type safety for enum values.
diff --git a/api/classes/index.StyleForParagraph.html b/api/classes/index.StyleForParagraph.html
index 9d0d66787f..52d67855f3 100644
--- a/api/classes/index.StyleForParagraph.html
+++ b/api/classes/index.StyleForParagraph.html
@@ -35,7 +35,7 @@ run-level properties (font, size, color) for text within the paragraph.
diff --git a/api/classes/index.StyleLevel.html b/api/classes/index.StyleLevel.html
index dc3c1d1fca..6aa8fa54a2 100644
--- a/api/classes/index.StyleLevel.html
+++ b/api/classes/index.StyleLevel.html
@@ -20,7 +20,7 @@ custom styles to be included in the table of contents at specific levels.
diff --git a/api/classes/index.Styles.html b/api/classes/index.Styles.html
index 4c1f82dddd..af575a1a25 100644
--- a/api/classes/index.Styles.html
+++ b/api/classes/index.Styles.html
@@ -35,7 +35,7 @@ a way to define consistent formatting across a document.
diff --git a/api/classes/index.TDirection.html b/api/classes/index.TDirection.html
index c01d565266..7545d73a4d 100644
--- a/api/classes/index.TDirection.html
+++ b/api/classes/index.TDirection.html
@@ -34,7 +34,7 @@ useful for creating rotated text or supporting different writing systems.
diff --git a/api/classes/index.Table.html b/api/classes/index.Table.html
index e4537a871c..bcd6ab07e6 100644
--- a/api/classes/index.Table.html
+++ b/api/classes/index.Table.html
@@ -36,7 +36,7 @@ Tables are used to organize content into a grid structure.
diff --git a/api/classes/index.TableCellBorders.html b/api/classes/index.TableCellBorders.html
index 1898627990..9cd7b64ab5 100644
--- a/api/classes/index.TableCellBorders.html
+++ b/api/classes/index.TableCellBorders.html
@@ -34,7 +34,7 @@ can be configured independently with different styles, colors, and widths.
diff --git a/api/classes/index.TableRow.html b/api/classes/index.TableRow.html
index 8e75762dd9..66fb851fb0 100644
--- a/api/classes/index.TableRow.html
+++ b/api/classes/index.TableRow.html
@@ -36,7 +36,7 @@ one or more table cells that hold the actual content.
diff --git a/api/classes/index.TableRowProperties.html b/api/classes/index.TableRowProperties.html
index a5f0b68812..4ee963f038 100644
--- a/api/classes/index.TableRowProperties.html
+++ b/api/classes/index.TableRowProperties.html
@@ -30,7 +30,7 @@ whether it can split across pages, and whether it's a header row.
diff --git a/api/classes/index.TableRowPropertiesChange.html b/api/classes/index.TableRowPropertiesChange.html
index 8082370976..d8a2b407b1 100644
--- a/api/classes/index.TableRowPropertiesChange.html
+++ b/api/classes/index.TableRowPropertiesChange.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.VerticalMerge.html b/api/classes/index.VerticalMerge.html
index 6b17c189fa..e0a21374ef 100644
--- a/api/classes/index.VerticalMerge.html
+++ b/api/classes/index.VerticalMerge.html
@@ -35,7 +35,7 @@ This is used to create row spans in tables.
diff --git a/api/classes/index.WpsShapeRun.html b/api/classes/index.WpsShapeRun.html
index aad3c09353..2a1e7b40c6 100644
--- a/api/classes/index.WpsShapeRun.html
+++ b/api/classes/index.WpsShapeRun.html
@@ -28,7 +28,7 @@ options for fills, lines, effects and text layout, and can be any of the preset
diff --git a/api/classes/index.XmlAttributeComponent.html b/api/classes/index.XmlAttributeComponent.html
index f5af680718..a24fde3b36 100644
--- a/api/classes/index.XmlAttributeComponent.html
+++ b/api/classes/index.XmlAttributeComponent.html
@@ -41,7 +41,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.XmlComponent.html b/api/classes/index.XmlComponent.html
index a126483711..fdd700977b 100644
--- a/api/classes/index.XmlComponent.html
+++ b/api/classes/index.XmlComponent.html
@@ -129,7 +129,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/math.MathBrackets.html b/api/classes/math.MathBrackets.html
index a55165a0b7..38737f1699 100644
--- a/api/classes/math.MathBrackets.html
+++ b/api/classes/math.MathBrackets.html
@@ -29,7 +29,7 @@ with what they hold.
diff --git a/api/classes/math.MathLargeOperator.html b/api/classes/math.MathLargeOperator.html
index 93e157ab10..df253dec69 100644
--- a/api/classes/math.MathLargeOperator.html
+++ b/api/classes/math.MathLargeOperator.html
@@ -28,7 +28,7 @@ it applies to. MathSum and MathIntegral are two of the
diff --git a/api/classes/math.MathMatrix.html b/api/classes/math.MathMatrix.html
index a24df34924..8e6a35ba0d 100644
--- a/api/classes/math.MathMatrix.html
+++ b/api/classes/math.MathMatrix.html
@@ -30,7 +30,7 @@ and Pages centre every column.
diff --git a/api/classes/math.MathPhantom.html b/api/classes/math.MathPhantom.html
index 746c591c3e..3adb88002f 100644
--- a/api/classes/math.MathPhantom.html
+++ b/api/classes/math.MathPhantom.html
@@ -28,7 +28,7 @@ line things up with it. Or math that is seen but takes up no room, or less, as <
diff --git a/api/classes/shapes.ShapeCanvasRun.html b/api/classes/shapes.ShapeCanvasRun.html
index 45745921a4..080f2c81bb 100644
--- a/api/classes/shapes.ShapeCanvasRun.html
+++ b/api/classes/shapes.ShapeCanvasRun.html
@@ -35,7 +35,7 @@ written in mc:AlternateContent, with the group as its fallback, unl
diff --git a/api/classes/shapes.ShapeGroupRun.html b/api/classes/shapes.ShapeGroupRun.html
index 0d316d6d50..04990fcdb1 100644
--- a/api/classes/shapes.ShapeGroupRun.html
+++ b/api/classes/shapes.ShapeGroupRun.html
@@ -35,7 +35,7 @@ when shapes are moved on a
diff --git a/api/classes/shapes.ShapeRun.html b/api/classes/shapes.ShapeRun.html
index 67fc32bd96..236bf6fa4d 100644
--- a/api/classes/shapes.ShapeRun.html
+++ b/api/classes/shapes.ShapeRun.html
@@ -33,7 +33,7 @@ and arrowheads, and text inside it. It sits inline with text unless floati
diff --git a/api/classes/watermarks.ImageWatermark.html b/api/classes/watermarks.ImageWatermark.html
index 4a4ed339f0..f846038fe9 100644
--- a/api/classes/watermarks.ImageWatermark.html
+++ b/api/classes/watermarks.ImageWatermark.html
@@ -46,7 +46,7 @@ way as an ImageRun.
diff --git a/api/classes/watermarks.TextWatermark.html b/api/classes/watermarks.TextWatermark.html
index 06901cd1c2..a09d35a081 100644
--- a/api/classes/watermarks.TextWatermark.html
+++ b/api/classes/watermarks.TextWatermark.html
@@ -44,7 +44,7 @@ recognizes it and can remove or replace it through that command.
\n option - causes the field result to be the paragraph number without trailing periods. No information about prior numbered levels is displayed unless it is included as part of the current level.
diff --git a/api/functions/index.convertToXmlComponent.html b/api/functions/index.convertToXmlComponent.html
index 5304563c91..ead2d4e54d 100644
--- a/api/functions/index.convertToXmlComponent.html
+++ b/api/functions/index.convertToXmlComponent.html
@@ -36,7 +36,7 @@ of the original XML.
diff --git a/api/functions/index.createEmphasisMark.html b/api/functions/index.createEmphasisMark.html
index f6db66ecb7..c046f671f0 100644
--- a/api/functions/index.createEmphasisMark.html
+++ b/api/functions/index.createEmphasisMark.html
@@ -37,7 +37,7 @@ text to emphasize it. This is commonly used in East Asian typography.
diff --git a/api/functions/index.createFrameProperties.html b/api/functions/index.createFrameProperties.html
index 01a0186129..deb22ef69f 100644
--- a/api/functions/index.createFrameProperties.html
+++ b/api/functions/index.createFrameProperties.html
@@ -41,7 +41,7 @@ drop cap effects and various text wrapping options.
diff --git a/api/functions/index.createHorizontalPosition.html b/api/functions/index.createHorizontalPosition.html
index db1a9c7434..e6fe60f321 100644
--- a/api/functions/index.createHorizontalPosition.html
+++ b/api/functions/index.createHorizontalPosition.html
@@ -40,7 +40,7 @@ object relative to a base element (page, margin, column, etc.).
diff --git a/api/functions/index.createMathAccentCharacter.html b/api/functions/index.createMathAccentCharacter.html
index 822e191807..4505a28826 100644
--- a/api/functions/index.createMathAccentCharacter.html
+++ b/api/functions/index.createMathAccentCharacter.html
@@ -31,7 +31,7 @@ such as summation (∑), integral (∫), or product (∏) symbols.
diff --git a/api/functions/index.createMathNAryProperties.html b/api/functions/index.createMathNAryProperties.html
index 4c879415a0..a87b28a32d 100644
--- a/api/functions/index.createMathNAryProperties.html
+++ b/api/functions/index.createMathNAryProperties.html
@@ -31,7 +31,7 @@ and integrals, including the operator character and limit positioning.
diff --git a/api/functions/index.createMathSubScriptElement.html b/api/functions/index.createMathSubScriptElement.html
index c276802c96..ec5761d738 100644
--- a/api/functions/index.createMathSubScriptElement.html
+++ b/api/functions/index.createMathSubScriptElement.html
@@ -31,7 +31,7 @@ script objects, and other structures that support subscripts.
diff --git a/api/functions/index.createMathSuperScriptElement.html b/api/functions/index.createMathSuperScriptElement.html
index 003db19dd4..d2322194c8 100644
--- a/api/functions/index.createMathSuperScriptElement.html
+++ b/api/functions/index.createMathSuperScriptElement.html
@@ -31,7 +31,7 @@ script objects, and other structures that support superscripts.
diff --git a/api/functions/index.createPageNumberType.html b/api/functions/index.createPageNumberType.html
index e18654cd3d..edc38615e7 100644
--- a/api/functions/index.createPageNumberType.html
+++ b/api/functions/index.createPageNumberType.html
@@ -37,7 +37,7 @@ for all pages in a section.
diff --git a/api/functions/index.createSectionType.html b/api/functions/index.createSectionType.html
index 227500eba7..9c0ca58256 100644
--- a/api/functions/index.createSectionType.html
+++ b/api/functions/index.createSectionType.html
@@ -37,7 +37,7 @@ where the new section begins relative to the previous section.
diff --git a/api/functions/index.createTableFloatProperties.html b/api/functions/index.createTableFloatProperties.html
index aa6c631ab7..59efdbf139 100644
--- a/api/functions/index.createTableFloatProperties.html
+++ b/api/functions/index.createTableFloatProperties.html
@@ -38,7 +38,7 @@ The overlap option isn't part of it: the table properties write it as w:tblOverl
diff --git a/api/functions/index.createTableLook.html b/api/functions/index.createTableLook.html
index f0e28f9d65..168e58159f 100644
--- a/api/functions/index.createTableLook.html
+++ b/api/functions/index.createTableLook.html
@@ -34,7 +34,7 @@ styles to apply special formatting to specific regions of the table.
diff --git a/api/functions/index.createTableRowHeight.html b/api/functions/index.createTableRowHeight.html
index bc6a70953b..a7dfb27c34 100644
--- a/api/functions/index.createTableRowHeight.html
+++ b/api/functions/index.createTableRowHeight.html
@@ -38,7 +38,7 @@ determining how the height should be applied.
diff --git a/api/functions/index.createWrapNone.html b/api/functions/index.createWrapNone.html
index 8dc8118cfb..39c824ad09 100644
--- a/api/functions/index.createWrapNone.html
+++ b/api/functions/index.createWrapNone.html
@@ -23,7 +23,7 @@ without wrapping around it.
diff --git a/api/functions/index.createWrapSquare.html b/api/functions/index.createWrapSquare.html
index 69f8a95137..19eee3ae33 100644
--- a/api/functions/index.createWrapSquare.html
+++ b/api/functions/index.createWrapSquare.html
@@ -32,7 +32,7 @@ of the drawing on the specified side(s).
diff --git a/api/functions/index.createWrapThrough.html b/api/functions/index.createWrapThrough.html
index 4b3b149962..051d2e7bec 100644
--- a/api/functions/index.createWrapThrough.html
+++ b/api/functions/index.createWrapThrough.html
@@ -36,7 +36,7 @@ fills any open space inside the drawing, such as the middle of a ring.
diff --git a/api/functions/index.createWrapTight.html b/api/functions/index.createWrapTight.html
index 2eff2f1e5d..c6916cea29 100644
--- a/api/functions/index.createWrapTight.html
+++ b/api/functions/index.createWrapTight.html
@@ -36,7 +36,7 @@ of the drawing rather than its rectangular bounding box.
diff --git a/api/functions/index.dateTimeValue.html b/api/functions/index.dateTimeValue.html
index 4cad55a317..50da51be08 100644
--- a/api/functions/index.dateTimeValue.html
+++ b/api/functions/index.dateTimeValue.html
@@ -36,7 +36,7 @@ This matches the xsd:dateTime format required by OOXML.
diff --git a/api/functions/index.fillPartPageNumbers.html b/api/functions/index.fillPartPageNumbers.html
index 4b8182408b..aad1ec00de 100644
--- a/api/functions/index.fillPartPageNumbers.html
+++ b/api/functions/index.fillPartPageNumbers.html
@@ -35,7 +35,7 @@ are left as they are
diff --git a/api/functions/index.fillSequenceNumbers.html b/api/functions/index.fillSequenceNumbers.html
index 27d61a0c50..bf924ea61a 100644
--- a/api/functions/index.fillSequenceNumbers.html
+++ b/api/functions/index.fillSequenceNumbers.html
@@ -27,7 +27,7 @@ tables of contents are filled in from its headings, as Word leaves a heading's S
diff --git a/api/functions/index.hpsMeasureValue.html b/api/functions/index.hpsMeasureValue.html
index 0dbc95c2d8..92463f3777 100644
--- a/api/functions/index.hpsMeasureValue.html
+++ b/api/functions/index.hpsMeasureValue.html
@@ -36,7 +36,7 @@ HPS (half-points) are commonly used for font sizes.
diff --git a/api/functions/index.patchDocument.html b/api/functions/index.patchDocument.html
index 3064a8b2a4..1dd56eaff5 100644
--- a/api/functions/index.patchDocument.html
+++ b/api/functions/index.patchDocument.html
@@ -42,7 +42,7 @@ the original document structure and optionally the original formatting.
diff --git a/api/functions/index.universalMeasureToTwips.html b/api/functions/index.universalMeasureToTwips.html
index 9924bdc19a..9805f238a0 100644
--- a/api/functions/index.universalMeasureToTwips.html
+++ b/api/functions/index.universalMeasureToTwips.html
@@ -35,7 +35,7 @@ Strings are converted according to their unit suffix.
diff --git a/api/functions/layout.estimatePageNumbersWith.html b/api/functions/layout.estimatePageNumbersWith.html
index 5acb7f0f3f..511e266565 100644
--- a/api/functions/layout.estimatePageNumbersWith.html
+++ b/api/functions/layout.estimatePageNumbersWith.html
@@ -32,7 +32,7 @@ options say. Give what it returns to a document as its pageNumbers,
diff --git a/api/functions/layout.layoutDocument.html b/api/functions/layout.layoutDocument.html
index 807ce30161..ec09c134fd 100644
--- a/api/functions/layout.layoutDocument.html
+++ b/api/functions/layout.layoutDocument.html
@@ -40,7 +40,7 @@ text box, it stops, and gives the pages up to there, with why in stoppedAt
diff --git a/api/functions/layout.measureWithPretext.html b/api/functions/layout.measureWithPretext.html
index a82082de93..59b66ba9ef 100644
--- a/api/functions/layout.measureWithPretext.html
+++ b/api/functions/layout.measureWithPretext.html
@@ -40,7 +40,7 @@ measures text in another, and Pretext keeps the widths it measured.
diff --git a/api/functions/math.latexToMath.html b/api/functions/math.latexToMath.html
index e3965bfc30..4178ffc8b3 100644
--- a/api/functions/math.latexToMath.html
+++ b/api/functions/math.latexToMath.html
@@ -44,7 +44,7 @@ cases and aligned equations, with \tag for their numbers. The math
diff --git a/api/interfaces/index.IXmlableObject.html b/api/interfaces/index.IXmlableObject.html
index 2e9729500b..ae2fb30554 100644
--- a/api/interfaces/index.IXmlableObject.html
+++ b/api/interfaces/index.IXmlableObject.html
@@ -31,7 +31,7 @@ to generate the final XML output. Objects typically have a structure like:
diff --git a/api/types/charts.BarChartBaseOptions.html b/api/types/charts.BarChartBaseOptions.html
index c1c1798521..6fc0f66203 100644
--- a/api/types/charts.BarChartBaseOptions.html
+++ b/api/types/charts.BarChartBaseOptions.html
@@ -31,7 +31,7 @@ Default is Office's: -27 for column charts and 0 for bar charts. Stacked bars al
@@ -49,14 +49,14 @@ bar, line or area chart spaces them by date
Sales. 2025: Jan 10, Feb 20.", and none for a decorative chart. An empty description removes it
+
diff --git a/api/types/charts.CategoryChartOptions.html b/api/types/charts.CategoryChartOptions.html
index 5ad98b3d2f..16c1f5091b 100644
--- a/api/types/charts.CategoryChartOptions.html
+++ b/api/types/charts.CategoryChartOptions.html
@@ -59,7 +59,7 @@ in years, are labelled in rows, the groups below their categories
diff --git a/api/types/charts.ChartAxisCrossing.html b/api/types/charts.ChartAxisCrossing.html
index 48412eadd7..f06050d328 100644
--- a/api/types/charts.ChartAxisCrossing.html
+++ b/api/types/charts.ChartAxisCrossing.html
@@ -20,7 +20,7 @@ the value is the category's number, from 1, or when the categories are dates, a
diff --git a/api/types/charts.ChartAxisGroup.html b/api/types/charts.ChartAxisGroup.html
index 10206cf636..a37676e7ab 100644
--- a/api/types/charts.ChartAxisGroup.html
+++ b/api/types/charts.ChartAxisGroup.html
@@ -19,7 +19,7 @@ chart's are along the bottom and the top.
diff --git a/api/types/charts.ChartCategoryGroup.html b/api/types/charts.ChartCategoryGroup.html
index 9a814556ea..913ab27e13 100644
--- a/api/types/charts.ChartCategoryGroup.html
+++ b/api/types/charts.ChartCategoryGroup.html
@@ -20,7 +20,7 @@ categories, or groups of its own, such as the months of each quarter of each yea
@@ -67,21 +67,21 @@ a point, and where they fit best on a pie. A chart's position is for the series
another way keep Office's, unless their own labels give one
diff --git a/api/types/charts.ChartDataPatchOptions.html b/api/types/charts.ChartDataPatchOptions.html
index 31f45b02ec..b611d55e8f 100644
--- a/api/types/charts.ChartDataPatchOptions.html
+++ b/api/types/charts.ChartDataPatchOptions.html
@@ -19,7 +19,7 @@ series' points, or for a stock chart its prices.
diff --git a/api/types/charts.ChartErrorBarsAmount.html b/api/types/charts.ChartErrorBarsAmount.html
index 878c6b3ae4..0078b1a237 100644
--- a/api/types/charts.ChartErrorBarsAmount.html
+++ b/api/types/charts.ChartErrorBarsAmount.html
@@ -64,7 +64,7 @@ deviations, or the standard error.
diff --git a/api/types/charts.ChartLineDash.html b/api/types/charts.ChartLineDash.html
index ef2b9195d9..9649814acc 100644
--- a/api/types/charts.ChartLineDash.html
+++ b/api/types/charts.ChartLineDash.html
@@ -19,7 +19,7 @@ and so on.
diff --git a/api/types/charts.ChartPointLabel.html b/api/types/charts.ChartPointLabel.html
index 445e7c6326..8ce633c0f7 100644
--- a/api/types/charts.ChartPointLabel.html
+++ b/api/types/charts.ChartPointLabel.html
@@ -19,7 +19,7 @@ format and its font. Anything left out is as the series' labels have it.
diff --git a/api/types/charts.ChartTrendline.html b/api/types/charts.ChartTrendline.html
index 1c6c00c5ae..7eedf175fc 100644
--- a/api/types/charts.ChartTrendline.html
+++ b/api/types/charts.ChartTrendline.html
@@ -20,7 +20,7 @@ forecast. It is drawn as a dotted line in the series' colour, and has an entry i
@@ -57,7 +57,7 @@ forecast. It is drawn as a dotted line in the series' colour, and has an entry i
along the x axis. Default is 0. Not for moving averages
@@ -73,35 +73,35 @@ the x axis. Default is 0. Not for moving averages
linear, exponential and polynomial trendlines, and above 0 for exponential ones
+
diff --git a/api/types/charts.ChartValueAxis.html b/api/types/charts.ChartValueAxis.html
index bcb8568e34..3462ae6df6 100644
--- a/api/types/charts.ChartValueAxis.html
+++ b/api/types/charts.ChartValueAxis.html
@@ -43,7 +43,7 @@ of 0 or less can't be shown. Default is a linear scale
diff --git a/api/types/charts.ComboChartSeriesType.html b/api/types/charts.ComboChartSeriesType.html
index db11f87ad5..52b6edc080 100644
--- a/api/types/charts.ComboChartSeriesType.html
+++ b/api/types/charts.ComboChartSeriesType.html
@@ -19,7 +19,7 @@ or an area. A chart with series of more than one type is Word's "Combo"
@@ -59,14 +59,14 @@ with undefined, takes the next of the theme's accent colours
one for each slice in the order of the categories, where undefined leaves a slice in. Default is 0
+
diff --git a/api/types/charts.SplitPieChartBaseOptions.html b/api/types/charts.SplitPieChartBaseOptions.html
index 96b57a1064..cac6bf11d5 100644
--- a/api/types/charts.SplitPieChartBaseOptions.html
+++ b/api/types/charts.SplitPieChartBaseOptions.html
@@ -42,7 +42,7 @@ second pie or a stacked bar, joined to the slice of the pie that stands for them
diff --git a/api/types/index.AttributePayload.html b/api/types/index.AttributePayload.html
index a296b48bd7..77ec4514da 100644
--- a/api/types/index.AttributePayload.html
+++ b/api/types/index.AttributePayload.html
@@ -21,7 +21,7 @@ control over attribute name mapping.
Specifies the additional length, in EMUs, which shall be added to the bottom edge of the DrawingML object to determine its actual bottom edge including effects.
Specifies the additional length, in EMUs, which shall be added to the left edge of the DrawingML object to determine its actual left edge including effects.
Specifies the additional length, in EMUs, which shall be added to the right edge of the DrawingML object to determine its actual right edge including effects.
Specifies the additional length, in EMUs, which shall be added to the top edge of the DrawingML object to determine its actual top edge including effects.
@@ -63,14 +63,14 @@ name. The page references to a bookmark that isn't in it are left blank.
the first of them on may not be Word's. Nothing of them is written into the document.
+
@@ -88,7 +88,7 @@ those in headers, footers and notes.
in headers and footers only on its pages, show. Those of a section whose number is undefined are left blank.
+
diff --git a/api/types/index.GraphicMediaData.html b/api/types/index.GraphicMediaData.html
index bbb0345785..91d7ace8c0 100644
--- a/api/types/index.GraphicMediaData.html
+++ b/api/types/index.GraphicMediaData.html
@@ -25,7 +25,7 @@ graphic it is. This is how docx/shapes writes its shapes.
diff --git a/api/types/index.IContext.html b/api/types/index.IContext.html
index 092a7730f5..6af2d84686 100644
--- a/api/types/index.IContext.html
+++ b/api/types/index.IContext.html
@@ -18,7 +18,7 @@ during the conversion of components to XML.
diff --git a/api/types/index.ICropOptions.html b/api/types/index.ICropOptions.html
index 89c49e3e0e..435d68152d 100644
--- a/api/types/index.ICropOptions.html
+++ b/api/types/index.ICropOptions.html
@@ -19,7 +19,7 @@ side of the image.
The grid can define a grid which snaps all East Asian characters to grid positions, but leaves Latin text with its default spacing; a grid which adds the specified character pitch to each character on each row; or a grid which affects only the line pitch for the current section.
Specifies that the paragraph (or at least part of it) should be rendered on the same page as the next paragraph when possible. If multiple paragraphs are to be kept together but they exceed a page, then the set of paragraphs begin on a new page and page breaks are used thereafter as needed.
diff --git a/api/types/index.IRunOptions.html b/api/types/index.IRunOptions.html
index 0452a21fbd..3c159cf352 100644
--- a/api/types/index.IRunOptions.html
+++ b/api/types/index.IRunOptions.html
@@ -21,7 +21,7 @@ The children property can contain various inline content elements.
diff --git a/api/types/index.IRunStylePropertiesOptions.html b/api/types/index.IRunStylePropertiesOptions.html
index ff3bf40d41..94759da0a7 100644
--- a/api/types/index.IRunStylePropertiesOptions.html
+++ b/api/types/index.IRunStylePropertiesOptions.html
@@ -19,7 +19,7 @@ including font, size, bold, italic, underline, color, and other character format
@@ -140,117 +140,117 @@ including font, size, bold, italic, underline, color, and other character format
highlights all the run's text. docx used to write it as w:highlightCs, which is in no schema.
diff --git a/api/types/index.ITableCellBorders.html b/api/types/index.ITableCellBorders.html
index 640f82fe13..0640f46912 100644
--- a/api/types/index.ITableCellBorders.html
+++ b/api/types/index.ITableCellBorders.html
@@ -22,7 +22,7 @@ can be specified for top, bottom, left, right, start, and end edges.
@@ -46,7 +46,7 @@ If relativeHorizontalPosition is also specified, then the absoluteHorizontalPosi
If the attribute is omitted, the value is assumed to be zero.
@@ -57,7 +57,7 @@ If relativeVerticalPosition is also specified, then the absoluteVerticalPosition
If the attribute is omitted, the value is assumed to be zero.
@@ -65,7 +65,7 @@ If the attribute is omitted, the value is assumed to be zero.
below the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -85,7 +85,7 @@ If omitted, the value is assumed to be page.
to the left of the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -121,7 +121,7 @@ inline - the table should be vertically aligned in line with the surrounding tex
top - the table should be vertically aligned to the top edge of the anchor
+
@@ -129,7 +129,7 @@ top - the table should be vertically aligned to the top edge of the anchor
to the right of the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -137,7 +137,7 @@ to the right of the table. The value is in twentieths of a point. If omitted, th
above the table. The value is in twentieths of a point. If omitted, the value is assumed to be zero.
+
@@ -88,7 +88,7 @@ When true, horizontal banding (alternating row colors) is disabled.
When false or undefined, horizontal banding is enabled if defined in the table style.
+
@@ -97,7 +97,7 @@ When true, vertical banding (alternating column colors) is disabled.
When false or undefined, vertical banding is enabled if defined in the table style.
+
diff --git a/api/types/index.ITableOfContentsOptions.html b/api/types/index.ITableOfContentsOptions.html
index 2716bfae52..b1a2ccb8c3 100644
--- a/api/types/index.ITableOfContentsOptions.html
+++ b/api/types/index.ITableOfContentsOptions.html
@@ -23,7 +23,7 @@ Options correspond to field switches in the TOC field code.
@@ -59,7 +59,7 @@ The identifier designated by text in this switch's field-argument corresponds to
Use captionLabelIncludingNumbers (\c) to build a table of captions with labels and numbers.
@@ -85,7 +85,7 @@ the bookmark named by text in this switch's field-argument.
that separate an entry and its page number. The default is a tab with leader dots.
+
@@ -96,21 +96,21 @@ to the style with a style ID of HeadingX (e.g. 1 corresponds to Heading1).
If no heading range is specified, all heading levels used in the document are listed.
+
@@ -119,21 +119,21 @@ Page numbers are omitted from all levels unless a range of entry levels is speci
text in this switch's field-argument. A range is specified as for \l.
+
@@ -168,7 +168,7 @@ with each doublet being a comma-separated set of style name and table of content
text in this switch's field-argument (which is typically a letter).
+
@@ -178,14 +178,14 @@ where startLevel and endLevel are integers, and startLevel has a value equal-to
TC fields that assign entries to lower levels are skipped.
+
@@ -76,64 +76,64 @@ parent cell) when the document is packed, so the table renders the same in every
consumer. Supply explicit values to take full control of the grid.
diff --git a/api/types/index.IThemeColorsOptions.html b/api/types/index.IThemeColorsOptions.html
index 2f967eee29..3d96abb561 100644
--- a/api/types/index.IThemeColorsOptions.html
+++ b/api/types/index.IThemeColorsOptions.html
@@ -21,7 +21,7 @@ when the theme's colors change. The colors not given are Office's.
diff --git a/api/types/index.IXmlAttribute.html b/api/types/index.IXmlAttribute.html
index 48fab8ed86..72dac74cbb 100644
--- a/api/types/index.IXmlAttribute.html
+++ b/api/types/index.IXmlAttribute.html
@@ -17,7 +17,7 @@
numbers, or booleans, which will be converted to strings in the final XML.
diff --git a/api/types/index.MathRunStyle.html b/api/types/index.MathRunStyle.html
index bd93a5099a..47c2b386de 100644
--- a/api/types/index.MathRunStyle.html
+++ b/api/types/index.MathRunStyle.html
@@ -23,7 +23,7 @@
alphabet other than roman is plain unless given a style, as LaTeX draws its alphabets upright.
diff --git a/api/types/index.OutputByType.html b/api/types/index.OutputByType.html
index a21fa49eff..3e1f43f0ee 100644
--- a/api/types/index.OutputByType.html
+++ b/api/types/index.OutputByType.html
@@ -24,7 +24,7 @@ format determines the return type. Based on JSZip's output types.
diff --git a/api/types/index.PageNumberEstimator.html b/api/types/index.PageNumberEstimator.html
index ca0a00ce81..3765c9d8d7 100644
--- a/api/types/index.PageNumberEstimator.html
+++ b/api/types/index.PageNumberEstimator.html
@@ -38,7 +38,7 @@ page counts can be written with it.
diff --git a/api/types/index.ParagraphChild.html b/api/types/index.ParagraphChild.html
index 4e28505a3b..8928572220 100644
--- a/api/types/index.ParagraphChild.html
+++ b/api/types/index.ParagraphChild.html
@@ -17,7 +17,7 @@ This union type represents all valid inline content elements that can appear
within a paragraph in WordprocessingML.
@@ -57,7 +57,7 @@ when it opens it, unzipped and read as the template is, by its path in the templ
(captureSpacesBetweenElements), as the spaces in a text element are its text
diff --git a/api/types/index.RelationshipType.html b/api/types/index.RelationshipType.html
index 7f6da12be5..1d400c0469 100644
--- a/api/types/index.RelationshipType.html
+++ b/api/types/index.RelationshipType.html
@@ -17,7 +17,7 @@
Each type corresponds to a specific kind of document component or resource.
diff --git a/api/types/index.TableRowsPatch.html b/api/types/index.TableRowsPatch.html
index bfb3171b69..af7e95e65b 100644
--- a/api/types/index.TableRowsPatch.html
+++ b/api/types/index.TableRowsPatch.html
@@ -32,7 +32,7 @@ none. The other patches are applied after the rows are repeated, so a placeholde
@@ -55,14 +55,14 @@ A field's patch can repeat rows of a table in the copy in turn, whose fields are
repeated for each part, with its item's fields, and an item without parts has no row
diff --git a/api/types/index.TemplatePageNumberEstimator.html b/api/types/index.TemplatePageNumberEstimator.html
index edecef5265..613b20d09b 100644
--- a/api/types/index.TemplatePageNumberEstimator.html
+++ b/api/types/index.TemplatePageNumberEstimator.html
@@ -33,7 +33,7 @@ pages, are written with it.
Specifies the height of the containing block of the shape. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the left of the containing block of the shape relative to the element left of it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline.
Specifies the position of the bottom of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the left of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the right of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the top of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the type of positioning used to place an element. Default is static. When the element is contained inside a group, this property must be absolute.
Specifies relative horizontal position data for objects in WordprocessingML documents. This modifies the mso-position-horizontal property. Default is text.
Specifies relative vertical position data for objects in WordprocessingML documents. This modifies the mso-position-vertical property. Default is text.
Specifies the position of the top of the containing block of the shape relative to the element above it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline.
Specifies the width of the containing block of the shape. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the distance from the bottom of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the left side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the right side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the top of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies whether the wrap coordinates were customized by the user. If the wrap coordinates are generated by an editor, this property is true; otherwise they were customized by a user. Default is false.
@@ -45,7 +45,7 @@ file is measured with the upright one. The layout stops at a character a font's
it in another font. A font the document embeds is measured from the document's own file
@@ -60,7 +60,7 @@ nearest to Word's lays it out. It still stops where it has no guess, such as at
is off, so the numbers written are Word's, as near as the layout knows, or blank.
+
@@ -70,7 +70,7 @@ break, and tabs move to their stops, as Word lays them out, and lines are as tal
width tables, so the layout stops at text in a font that isn't in them and isn't given as a file or embedded.
+
diff --git a/api/types/layout.MeasureWidth.html b/api/types/layout.MeasureWidth.html
index fccf650b44..e6e69f6bc1 100644
--- a/api/types/layout.MeasureWidth.html
+++ b/api/types/layout.MeasureWidth.html
@@ -33,7 +33,7 @@ between characters and the width of scaled text, which the document's formatting
diff --git a/api/types/shapes.ConnectorEnd.html b/api/types/shapes.ConnectorEnd.html
index b953d14053..329b0d36f8 100644
--- a/api/types/shapes.ConnectorEnd.html
+++ b/api/types/shapes.ConnectorEnd.html
@@ -38,7 +38,7 @@ bottom-left corner. On a shape without connection points, the connector ends at
diff --git a/api/types/shapes.CustomShapeGeometry.html b/api/types/shapes.CustomShapeGeometry.html
index 1d5e53e902..1d8f01a99a 100644
--- a/api/types/shapes.CustomShapeGeometry.html
+++ b/api/types/shapes.CustomShapeGeometry.html
@@ -50,7 +50,7 @@ fill the shape. Later paths are drawn over earlier ones
diff --git a/api/types/shapes.CustomShapePath.html b/api/types/shapes.CustomShapePath.html
index e63e2a00bd..88196806d5 100644
--- a/api/types/shapes.CustomShapePath.html
+++ b/api/types/shapes.CustomShapePath.html
@@ -20,7 +20,7 @@ own, so paths can overlap without cutting holes in each other.
diff --git a/api/types/shapes.CustomShapePathFill.html b/api/types/shapes.CustomShapePathFill.html
index 8f52f21780..d1bf082742 100644
--- a/api/types/shapes.CustomShapePathFill.html
+++ b/api/types/shapes.CustomShapePathFill.html
@@ -19,7 +19,7 @@ fill made lighter or darker, as Word's preset shapes shade the top of a cube or
diff --git a/api/types/shapes.IShapeCanvasOptions.html b/api/types/shapes.IShapeCanvasOptions.html
index ec76493373..f0d8a5e2b6 100644
--- a/api/types/shapes.IShapeCanvasOptions.html
+++ b/api/types/shapes.IShapeCanvasOptions.html
@@ -64,7 +64,7 @@ The shapes are not scaled.
diff --git a/api/types/shapes.IShapeConnectorOptions.html b/api/types/shapes.IShapeConnectorOptions.html
index 5a65238d02..2fb589b54d 100644
--- a/api/types/shapes.IShapeConnectorOptions.html
+++ b/api/types/shapes.IShapeConnectorOptions.html
@@ -23,7 +23,7 @@ or several connectors join the same two shapes, their ends are spread out along
@@ -64,21 +64,21 @@ or several connectors join the same two shapes, their ends are spread out along
shape, so Word doesn't move it when the connector moves
diff --git a/api/types/shapes.IShapeGroupChildOptions.html b/api/types/shapes.IShapeGroupChildOptions.html
index 0a69ceb908..1d09f0bdbc 100644
--- a/api/types/shapes.IShapeGroupChildOptions.html
+++ b/api/types/shapes.IShapeGroupChildOptions.html
@@ -20,7 +20,7 @@ in pixels, unless a layout places it, and id names it
diff --git a/api/types/shapes.IShapeGroupOptions.html b/api/types/shapes.IShapeGroupOptions.html
index 699fccbc2f..f6906b6498 100644
--- a/api/types/shapes.IShapeGroupOptions.html
+++ b/api/types/shapes.IShapeGroupOptions.html
@@ -50,7 +50,7 @@ the box around the children. A different size scales every shape in the group.
diff --git a/api/types/shapes.IShapeNestedGroupOptions.html b/api/types/shapes.IShapeNestedGroupOptions.html
index e2524607db..41a4b201cc 100644
--- a/api/types/shapes.IShapeNestedGroupOptions.html
+++ b/api/types/shapes.IShapeNestedGroupOptions.html
@@ -47,7 +47,7 @@ box around the children, and a different size scales every child
diff --git a/api/types/shapes.IShapeOptions.html b/api/types/shapes.IShapeOptions.html
index b96fe661b7..65f55cfe41 100644
--- a/api/types/shapes.IShapeOptions.html
+++ b/api/types/shapes.IShapeOptions.html
@@ -23,7 +23,7 @@ or startAngle and endAngle for a "pie"
diff --git a/api/types/shapes.PresetShapeAdjustments.html b/api/types/shapes.PresetShapeAdjustments.html
index 7a9b9c22c7..5ef45f177f 100644
--- a/api/types/shapes.PresetShapeAdjustments.html
+++ b/api/types/shapes.PresetShapeAdjustments.html
@@ -21,7 +21,7 @@ allows, so a value that is too large acts like the largest allowed value.
diff --git a/api/types/shapes.ShapeAdjustments.html b/api/types/shapes.ShapeAdjustments.html
index bf30db06bc..2e8d52052d 100644
--- a/api/types/shapes.ShapeAdjustments.html
+++ b/api/types/shapes.ShapeAdjustments.html
@@ -23,7 +23,7 @@ It is never for shapes without handles, which take no adjustments.<
diff --git a/api/types/shapes.ShapeFlowLayout.html b/api/types/shapes.ShapeFlowLayout.html
index fb14e12548..53f75ae2a1 100644
--- a/api/types/shapes.ShapeFlowLayout.html
+++ b/api/types/shapes.ShapeFlowLayout.html
@@ -20,7 +20,7 @@ that connect to it, and the shapes on each level are ordered so connectors cross
@@ -52,26 +52,26 @@ with a lane goes in the band of that name, and shapes without one g
across the direction the flow runs in, each with a header at the start of the flow
diff --git a/api/types/shapes.ShapeHorizontalPosition.html b/api/types/shapes.ShapeHorizontalPosition.html
index e809918193..9634e2a719 100644
--- a/api/types/shapes.ShapeHorizontalPosition.html
+++ b/api/types/shapes.ShapeHorizontalPosition.html
@@ -26,7 +26,7 @@ a base of the page, the space between its margins, or one of its margins
diff --git a/api/types/shapes.ShapeLayout.html b/api/types/shapes.ShapeLayout.html
index 2204f82fa8..c1fea8ac49 100644
--- a/api/types/shapes.ShapeLayout.html
+++ b/api/types/shapes.ShapeLayout.html
@@ -20,7 +20,7 @@ layout, which is placed around them. Connectors are routed after the shapes are
diff --git a/api/types/shapes.ShapeSize.html b/api/types/shapes.ShapeSize.html
index 8a2ff7233f..b21a19b55d 100644
--- a/api/types/shapes.ShapeSize.html
+++ b/api/types/shapes.ShapeSize.html
@@ -19,7 +19,7 @@ percentage of the space between the page's margins, or of what floating.si
diff --git a/api/types/shapes.ShapeTextWarp.html b/api/types/shapes.ShapeTextWarp.html
index 55efd7c98f..93c6bf11e0 100644
--- a/api/types/shapes.ShapeTextWarp.html
+++ b/api/types/shapes.ShapeTextWarp.html
@@ -19,7 +19,7 @@ The ...Filled arches, circle and button spread the text over the wh
diff --git a/api/types/shapes.ShapeThemeColor.html b/api/types/shapes.ShapeThemeColor.html
index fba0a7d40a..11b928e6b9 100644
--- a/api/types/shapes.ShapeThemeColor.html
+++ b/api/types/shapes.ShapeThemeColor.html
@@ -20,7 +20,7 @@ same as docx's ThemeColor, which text, borders and sha
diff --git a/api/types/shapes.ShapeTransformation.html b/api/types/shapes.ShapeTransformation.html
index 70dc8e446e..0d006be4a6 100644
--- a/api/types/shapes.ShapeTransformation.html
+++ b/api/types/shapes.ShapeTransformation.html
@@ -30,7 +30,7 @@ between the margins for a floating shape, such as "100%"<
diff --git a/api/types/shapes.ShapeTreeLayout.html b/api/types/shapes.ShapeTreeLayout.html
index 45db372871..90fad59442 100644
--- a/api/types/shapes.ShapeTreeLayout.html
+++ b/api/types/shapes.ShapeTreeLayout.html
@@ -20,7 +20,7 @@ children are placed side by side below their parent, which is centred over them.
diff --git a/api/types/shapes.ShapeVerticalPosition.html b/api/types/shapes.ShapeVerticalPosition.html
index 368ce6dde8..4305fbe6b4 100644
--- a/api/types/shapes.ShapeVerticalPosition.html
+++ b/api/types/shapes.ShapeVerticalPosition.html
@@ -26,7 +26,7 @@ a base of the page, the space between its margins, or one of its margins
diff --git a/api/variables/index.CharacterSet.html b/api/variables/index.CharacterSet.html
index 15f7549ad8..8175dbc664 100644
--- a/api/variables/index.CharacterSet.html
+++ b/api/variables/index.CharacterSet.html
@@ -60,7 +60,7 @@ Maps character set names to their hexadecimal identifiers.
diff --git a/api/variables/index.DocumentAttributeNamespaces.html b/api/variables/index.DocumentAttributeNamespaces.html
index 6a0494dd9a..c7135fcb29 100644
--- a/api/variables/index.DocumentAttributeNamespaces.html
+++ b/api/variables/index.DocumentAttributeNamespaces.html
@@ -94,7 +94,7 @@ in a document, including WordprocessingML, DrawingML, VML, and others.
When this value is set, the input specified via the user interface may be restricted to the number of lines per page and characters per line, with the consumer or producer translating this information based on the current font data to get the resulting line and character pitch values
diff --git a/api/variables/index.DropCapType.html b/api/variables/index.DropCapType.html
index 0af44fae76..4c0edc5288 100644
--- a/api/variables/index.DropCapType.html
+++ b/api/variables/index.DropCapType.html
@@ -32,7 +32,7 @@ beginning of a paragraph. This enum defines how the drop cap should be positione
diff --git a/api/variables/index.EMPTY_OBJECT.html b/api/variables/index.EMPTY_OBJECT.html
index 6dddb09488..9516716835 100644
--- a/api/variables/index.EMPTY_OBJECT.html
+++ b/api/variables/index.EMPTY_OBJECT.html
@@ -20,7 +20,7 @@ has no children or attributes.
diff --git a/api/variables/index.EmphasisMarkType.html b/api/variables/index.EmphasisMarkType.html
index c5fefe6235..4d3d76bce9 100644
--- a/api/variables/index.EmphasisMarkType.html
+++ b/api/variables/index.EmphasisMarkType.html
@@ -31,7 +31,7 @@ Emphasis marks are commonly used in East Asian typography.
Specifies that this header or footer shall appear on the first page in this section. The appearance of this header or footer is contingent on the setting of the titlePg element (§2.10.6).
diff --git a/api/variables/index.LevelFormat.html b/api/variables/index.LevelFormat.html
index 2d31dd918e..8632e533f4 100644
--- a/api/variables/index.LevelFormat.html
+++ b/api/variables/index.LevelFormat.html
@@ -281,7 +281,7 @@ decimal, roman numerals, letters, and various international formats.
diff --git a/api/variables/index.PageTextDirectionType.html b/api/variables/index.PageTextDirectionType.html
index e135424389..4fcecb8513 100644
--- a/api/variables/index.PageTextDirectionType.html
+++ b/api/variables/index.PageTextDirectionType.html
@@ -28,7 +28,7 @@ vertically (top-to-bottom), commonly used for East Asian languages.
Top-to-bottom, right-to-left (vertical East Asian text flow)
diff --git a/api/variables/index.ShadingType.html b/api/variables/index.ShadingType.html
index d267a4ac02..7da88314cf 100644
--- a/api/variables/index.ShadingType.html
+++ b/api/variables/index.ShadingType.html
@@ -103,7 +103,7 @@ color and the pattern color.
diff --git a/api/variables/index.TextEffect.html b/api/variables/index.TextEffect.html
index 149534ca20..5bd1ffd718 100644
--- a/api/variables/index.TextEffect.html
+++ b/api/variables/index.TextEffect.html
@@ -56,7 +56,7 @@ these effects are deprecated and may not be supported by all applications.
diff --git a/api/variables/index.VerticalAlign.html b/api/variables/index.VerticalAlign.html
index d8cf6e1ba3..93c8ed6df8 100644
--- a/api/variables/index.VerticalAlign.html
+++ b/api/variables/index.VerticalAlign.html
@@ -32,7 +32,7 @@ backward-compatibility and will be removed in the next major release.
diff --git a/api/variables/index.VerticalAlignTable.html b/api/variables/index.VerticalAlignTable.html
index 45cffcd409..ee0e8a0876 100644
--- a/api/variables/index.VerticalAlignTable.html
+++ b/api/variables/index.VerticalAlignTable.html
@@ -28,7 +28,7 @@ are valid according to ECMA-376 (§17.18.87 ST_VerticalJc within <w:tcP
diff --git a/api/variables/index.VerticalMergeType.html b/api/variables/index.VerticalMergeType.html
index 2e23f24acf..66a35c2787 100644
--- a/api/variables/index.VerticalMergeType.html
+++ b/api/variables/index.VerticalMergeType.html
@@ -29,7 +29,7 @@ This cell continues a vertical merge started by a cell above it.
This cell begins a new vertical merge region.
diff --git a/api/variables/index.bookmarkUniqueNumericId.html b/api/variables/index.bookmarkUniqueNumericId.html
index bb1110e52c..b00f7a347f 100644
--- a/api/variables/index.bookmarkUniqueNumericId.html
+++ b/api/variables/index.bookmarkUniqueNumericId.html
@@ -27,7 +27,7 @@ than a generator per instance.
diff --git a/api/variables/index.docPropertiesUniqueNumericId.html b/api/variables/index.docPropertiesUniqueNumericId.html
index 86b07603ff..bf9775f5d4 100644
--- a/api/variables/index.docPropertiesUniqueNumericId.html
+++ b/api/variables/index.docPropertiesUniqueNumericId.html
@@ -28,7 +28,7 @@ one counter rather than a generator per instance.
diff --git a/api/variables/layout.estimatePageNumbers.html b/api/variables/layout.estimatePageNumbers.html
index d14dbd3bad..5311cba8de 100644
--- a/api/variables/layout.estimatePageNumbers.html
+++ b/api/variables/layout.estimatePageNumbers.html
@@ -50,7 +50,7 @@ written, and the numbers left blank stay blank, without asking to update the fie
diff --git a/live-examples/lib/layout.iife.js b/live-examples/lib/layout.iife.js
index b513b334bc..7943e177d9 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -9962,17 +9962,22 @@ var docxLayout = (function(exports) {
/**
* Where a drawing of a size, with the room its effects take before and after it, starts across or down what it is placed
* against: at a distance or share of it from its start, or lined up with its start, middle or end, with its effects, as
- * Word lines it up (`word-floats.docx` F38b, F38c). Inside is the start on odd pages, and outside the end
+ * Word lines it up (`word-floats.docx` F38b, F38c). Inside is the start on odd pages, and outside the end, and lined up
+ * inside or outside, it is `inset` from the start or the end
*/
- var startOf = (position, base, size, before, after, oddPage) => {
+ var startOf = (position, base, size, before, after, oddPage, inset = {
+ start: 0,
+ end: 0
+ }) => {
const { align, offset, share } = position;
if (align === void 0) return base.start + (offset !== null && offset !== void 0 ? offset : (share !== null && share !== void 0 ? share : 0) * base.length);
+ const insideOrOutside = align === "inside" || align === "outside";
switch (align === "inside" ? oddPage ? "left" : "right" : align === "outside" ? oddPage ? "right" : "left" : align) {
case "left":
- case "top": return base.start + before;
+ case "top": return base.start + before + (insideOrOutside ? inset.start : 0);
case "center": return base.start + (base.length - size - before - after) / 2 + before;
case "right":
- case "bottom": return base.start + base.length - size - after;
+ case "bottom": return base.start + base.length - size - after - (insideOrOutside ? inset.end : 0);
default: return;
}
};
@@ -10020,11 +10025,20 @@ var docxLayout = (function(exports) {
if (across === void 0 || down === void 0) return "a drawing placed against what isn't followed yet";
const { inColumns } = drawing.horizontal;
if (inColumns !== void 0 && frame.section.columns.length > 1) return inColumns;
- if ([drawing.horizontal, drawing.vertical].some(({ from, align }) => (align === "inside" || align === "outside") && from !== "margin")) return "a drawing lined up inside or outside, not against the margins";
+ const linedUp = ({ align }) => align === "inside" || align === "outside";
+ if (linedUp(drawing.horizontal) && drawing.horizontal.from !== "margin" || linedUp(drawing.vertical) && drawing.vertical.from !== "margin" && drawing.vertical.from !== "page") return "a drawing lined up inside or outside, not against the margins or down the page";
const { effects } = drawing;
- const left = startOf(drawing.horizontal, across, size.width, effects.left, effects.right, frame.oddPage);
- const top = startOf(drawing.vertical, down, size.height, effects.top, effects.bottom, frame.oddPage);
- return left === void 0 || top === void 0 ? "a drawing lined up in a way not yet followed" : {
+ const { header, footer, pageWidth, pageHeight } = frame.section;
+ const pageInset = drawing.vertical.from === "page" ? {
+ start: header / 2,
+ end: footer / 2
+ } : void 0;
+ const placedLeft = startOf(drawing.horizontal, across, size.width, effects.left, effects.right, frame.oddPage);
+ const top = startOf(drawing.vertical, down, size.height, effects.top, effects.bottom, frame.oddPage, pageInset);
+ if (placedLeft === void 0 || top === void 0) return "a drawing lined up in a way not yet followed";
+ const left = drawing.keptOnPage === true ? Math.min(placedLeft, pageWidth - size.width) : placedLeft;
+ const pastAnEdge = left < -TOLERANCE$1 || top < -TOLERANCE$1 || top + size.height > pageHeight + TOLERANCE$1;
+ return drawing.keptOnPage === true && pastAnEdge ? "a VML drawing past an edge of the page other than its right edge" : {
left,
right: left + size.width,
top,
@@ -10052,7 +10066,7 @@ var docxLayout = (function(exports) {
var roomBeside = (drawings, top, height, within) => {
const beside = drawings.filter(({ keepOut }) => keepOut.top < top + height && top < keepOut.bottom && keepOut.left < within.end && within.start < keepOut.right);
if (beside.length === 0) return { spans: [within] };
- const rooms = beside.reduce((free, { drawing, keepOut }) => {
+ const wide = beside.reduce((free, { drawing, keepOut }) => {
const out = keepOutAcross(drawing, keepOut, within);
return free.flatMap((span) => out.end <= span.start || out.start >= span.end ? [span] : [...out.start > span.start ? [{
start: span.start,
@@ -10061,9 +10075,7 @@ var docxLayout = (function(exports) {
start: out.end,
end: span.end
}] : []]);
- }, [within]).filter(({ start, end }) => end - start > TOLERANCE$1);
- const wide = rooms.filter(({ start, end }) => end - start >= LEAST_ROOM - TOLERANCE$1);
- if (rooms.length > 0 && wide.length === 0) return { narrow: true };
+ }, [within]).filter(({ start, end }) => end - start >= LEAST_ROOM - TOLERANCE$1);
return wide.length > 0 ? { spans: wide } : { below: Math.min(...beside.map(({ keepOut }) => keepOut.bottom)) };
};
var LEAST_ROOM = 18;
@@ -32957,31 +32969,28 @@ var docxLayout = (function(exports) {
"exact"
]);
var twips$1 = (value) => pointsOf(value, 20);
- var UNSAID_ACROSS = "a text frame that doesn't say what it is placed against, in columns";
/**
* Where a frame is across or down the page: what it is placed against, lined up with it or at a distance from it, or why
- * it isn't known. One that doesn't say is placed against the margins, as Word places it: across the page, where the
- * margins and the column are the same in one column, so it stops in columns, and down the page, from the top margin
- * rather than the page, as the standard has it (`word-stops-floats.docx` FR6a, FR6b). Lined up inline down the margins,
- * it is at their top (FR6c)
+ * it isn't known. One that doesn't say is placed against the column across the page, as the standard has it, and down
+ * the page from the top margin rather than the page, as Word places it (`word-stops-floats.docx` FR6a, FR6b,
+ * `word-stops-floats2.docx` CO1b). Lined up inline down the margins, it is at their top (FR6c)
*/
var positionOf$1 = (anchor, align, offset, names, aligns) => {
var _twips;
- const from = anchor === void 0 ? "margin" : names[String(anchor)];
+ const from = anchor === void 0 ? names === ACROSS$1 ? "column" : "margin" : names[String(anchor)];
if (from === void 0) return "a text frame placed against what isn't followed yet";
- const unsaid = anchor === void 0 && names === ACROSS$1 ? { inColumns: UNSAID_ACROSS } : {};
if (align === "inline" && aligns === DOWN_ALIGNS$1 && from === "margin") return {
from,
align: "top"
};
- if (align !== void 0) return aligns.has(String(align)) ? _objectSpread2({
+ if (align !== void 0) return aligns.has(String(align)) ? {
from,
align: String(align)
- }, unsaid) : "a text frame lined up in a way not yet followed";
- return _objectSpread2({
+ } : "a text frame lined up in a way not yet followed";
+ return {
from,
offset: (_twips = twips$1(offset)) !== null && _twips !== void 0 ? _twips : 0
- }, unsaid);
+ };
};
/** Reads a paragraph's frame properties (`w:framePr`), or why the frame can't be laid out */
var readFrameProperties = (element) => {
@@ -33032,6 +33041,8 @@ var docxLayout = (function(exports) {
pc: 12,
px: .75
};
+ /** The weight of a VML shape's outline when it has one and doesn't say, in points: Word draws it 0.72 points wide */
+ var DEFAULT_OUTLINE = .72;
/** Whether a VML true or false value is false: "f", "false", or 0 */
var isVmlFalse = (value) => [
"f",
@@ -33042,25 +33053,66 @@ var docxLayout = (function(exports) {
var readVmlStyle = (style) => new Map(String(style !== null && style !== void 0 ? style : "").split(";").map((declaration) => declaration.split(":")).filter((parts) => parts.length === 2 && parts[0].trim() !== "").map(([name, value]) => [name.trim().toLowerCase(), value.trim()]));
/**
* A length of a VML style in points, or why it isn't known: one in ems, of a font the style doesn't name, or a share of
- * something, or a number with no unit, which isn't 0. Undefined when it isn't given.
+ * something. Undefined when it isn't given.
*/
var vmlLength = (value) => {
- var _length$2$toLowerCase;
if (value === void 0) return;
const length = /^(-?\d*\.?\d+)([a-z%]*)$/i.exec(value.trim());
const amount = Number(length === null || length === void 0 ? void 0 : length[1]);
- const unit = (_length$2$toLowerCase = length === null || length === void 0 ? void 0 : length[2].toLowerCase()) !== null && _length$2$toLowerCase !== void 0 ? _length$2$toLowerCase : "";
+ const unit = (length === null || length === void 0 ? void 0 : length[2].toLowerCase()) || "px";
if (length === null || Number.isNaN(amount)) return "a VML drawing with a length that isn't a number";
- if (unit === "" && amount === 0) return 0;
return unit in POINTS_PER_UNIT ? amount * POINTS_PER_UNIT[unit] : "a VML drawing with a length in units not yet followed";
};
/**
+ * The outline of a VML shape: whether it has one (`stroked`), which it has unless it says not, its weight in points
+ * (`strokeweight`), 0.72 when it doesn't say, and whether it is drawn, which a hidden shape's isn't. Or why its weight
+ * isn't known
+ */
+ var vmlOutline = (attributes, style) => {
+ var _attributes$stroked, _vmlLength;
+ const stroked = !isVmlFalse((_attributes$stroked = attributes.stroked) !== null && _attributes$stroked !== void 0 ? _attributes$stroked : "t");
+ const weight = stroked ? (_vmlLength = vmlLength(attributes.strokeweight === void 0 ? void 0 : String(attributes.strokeweight))) !== null && _vmlLength !== void 0 ? _vmlLength : DEFAULT_OUTLINE : 0;
+ return typeof weight === "string" ? weight : {
+ weight,
+ drawn: stroked && style.get("visibility") !== "hidden"
+ };
+ };
+ /**
+ * The room an outline of a weight takes beyond a VML shape that text flows around, on each side, in points: half of it,
+ * which Word takes in whole points, down on the left and up on the right, so 0.72 and 1 point take none on the left and
+ * one on the right, and 3 points take one and two (`word-stops-vml-shapes.docx` VM24a, VM24b, `word-stops-vml-text-boxes.docx`
+ * VM24c). Above and below, half of it, as the line 1.3 twips below a text box's outline of 0.72 points isn't beside it
+ * (VM24c)
+ */
+ var outlineEffects = (weight) => weight === 0 ? {
+ top: 0,
+ bottom: 0,
+ left: 0,
+ right: 0
+ } : {
+ top: weight / 2,
+ bottom: weight / 2,
+ left: Math.floor(weight / 2),
+ right: Math.ceil(weight / 2)
+ };
+ /**
+ * Whether any shape of a VML group (`v:group`) has an outline that is drawn, or one whose weight isn't known. A group
+ * draws no outline of its own (`word-stops-vml-shapes.docx` VM29f)
+ */
+ var groupOutlined = (group) => childrenOf(group[Object.keys(group)[0]]).filter((child) => SHAPES.has(Object.keys(child)[0])).some((child) => {
+ const [name] = Object.keys(child);
+ if (name === "v:group") return groupOutlined(child);
+ const outline = vmlOutline(attributesOf(child[name]), readVmlStyle(attributesOf(child[name]).style));
+ return typeof outline === "string" || outline.drawn;
+ });
+ /**
* The shape a VML drawing (`w:pict`) draws, past the types of shapes it defines (`v:shapetype`), or why it can't be laid
- * out: none, or more than one
+ * out: more than one. One of no shape, such as a `w:pict` of a shape type alone, draws nothing (`word-stops-vml-shape-type.docx`
+ * VM29e)
*/
var vmlShapeOf = (pict) => {
const shapes = childrenOf(pict).filter((child) => SHAPES.has(Object.keys(child)[0]));
- if (shapes.length !== 1) return shapes.length === 0 ? "a VML drawing with no shape" : "a VML drawing of more than one shape";
+ if (shapes.length !== 1) return shapes.length === 0 ? void 0 : "a VML drawing of more than one shape";
const [element] = shapes;
const [name] = Object.keys(element);
const textbox = find(childrenOf(element[name]), "v:textbox");
@@ -33111,14 +33163,17 @@ var docxLayout = (function(exports) {
"outside"
]);
/**
- * The wrapping of the text round a VML shape (`w10:wrap`'s type), as DrawingML names it, of those Word has been seen to lay
- * out as DrawingML's: square, and above and below only. Word wraps tightly round a rectangle closer than square wrapping
- * does, in a way not yet followed (`word-vml.docx` VM14)
+ * The wrapping of the text round a VML shape (`w10:wrap`'s type), as DrawingML names it. Word wraps the text tightly
+ * round a rectangle, and through it, as it wraps it square, but one point nearer on the right: 160 twips from a shape
+ * with a distance of 180 (`word-vml.docx` VM14, `word-stops-vml-shapes.docx` VM27a, VM27b)
*/
var WRAPS$1 = {
square: "square",
+ tight: "square",
+ through: "square",
topAndBottom: "topAndBottom"
};
+ var TIGHTER_RIGHT = 1;
/** The sides of a VML shape the text goes on (`w10:wrap`'s side), as DrawingML names them */
var SIDES$1 = {
both: "bothSides",
@@ -33126,13 +33181,14 @@ var docxLayout = (function(exports) {
right: "right",
largest: "largest"
};
+ var TENTHS_OF_A_PERCENT = 1e3;
/**
* Where a VML shape is across or down the page, from its style: what it is placed against, which is the column and the
- * paragraph when it doesn't say, lined up with it, or at a distance from it, its margin-left or margin-top. Or why it
- * isn't known
+ * paragraph when it doesn't say, lined up with it, or at a distance from it, its margin-left or margin-top, or its left
+ * or top, which Word reads as those (`word-stops-vml-shapes.docx` VM27f). Or why it isn't known
*/
var positionOf = (style, direction, anchor) => {
- var _ref, _style$get, _style$get2, _style$get3;
+ var _ref, _style$get, _style$get2, _ref2, _style$get3;
const names = direction === "horizontal" ? ACROSS : DOWN;
const relative = (_ref = (_style$get = style.get(`mso-position-${direction}-relative`)) !== null && _style$get !== void 0 ? _style$get : anchor) !== null && _ref !== void 0 ? _ref : "text";
const from = names.get(relative);
@@ -33143,32 +33199,52 @@ var docxLayout = (function(exports) {
align
} : "a VML drawing lined up in a way not yet followed";
const side = direction === "horizontal" ? "left" : "top";
- if (style.has(side)) return "a VML drawing placed by its left or top";
- const offset = vmlLength((_style$get3 = style.get(`margin-${side}`)) !== null && _style$get3 !== void 0 ? _style$get3 : "0");
+ if (style.has(side) && style.has(`margin-${side}`)) return "a VML drawing placed by its left or top and its margins";
+ const offset = vmlLength((_ref2 = (_style$get3 = style.get(`margin-${side}`)) !== null && _style$get3 !== void 0 ? _style$get3 : style.get(side)) !== null && _ref2 !== void 0 ? _ref2 : "0");
return typeof offset === "string" ? offset : {
from,
offset
};
};
/**
- * Reads a VML shape that text flows around, from its style and its wrapping (`w10:wrap`), or why it can't be followed:
- * one turned, sized by a share of something, or placed or wrapped in a way not yet followed. The text keeps 9 points from
- * it on the left and right, and none above and below, as VML has it, where its style doesn't say (`word-vml.docx` VM9).
+ * A VML shape's width or height as a share of what it is sized by (`mso-width-percent`, `mso-width-relative`), or why
+ * that isn't known: Word has been seen sizing one by a share of the margins only (`word-stops-vml-shapes.docx` VM27e)
*/
- var readVmlFloating = (shape, wrap, width, height) => {
- var _attributes$side, _style$get4, _attributesOf$oAllow;
+ var shareOf$1 = (style, dimension) => {
+ var _style$get4;
+ const percent = style.get(`mso-${dimension}-percent`);
+ if (percent === void 0) return;
+ const share = Number(percent) / TENTHS_OF_A_PERCENT;
+ const relative = (_style$get4 = style.get(`mso-${dimension}-relative`)) !== null && _style$get4 !== void 0 ? _style$get4 : "margin";
+ return Number.isNaN(share) ? "a VML drawing with a length that isn't a number" : relative === "margin" ? {
+ from: "margin",
+ share
+ } : "a VML drawing sized by a share of what it is placed against, other than the margins";
+ };
+ /**
+ * Reads a VML shape that text flows around, from its style, its wrapping (`w10:wrap`) and its outline, whose weight is
+ * `outline`, or why it can't be followed: one turned, one wrapped tightly round a polygon of its own (`wrapcoords`), or
+ * placed or wrapped in a way not yet followed. The text keeps 9 points from it on the left and right, and none above and
+ * below, as VML has it, where its style doesn't say (`word-vml.docx` VM9). Word moves one that would go past the right edge
+ * of the page back onto it (`word-stops-vml-shapes.docx` VM28a, VM28b)
+ */
+ var readVmlFloating = (shape, wrap, width, height, outline = 0) => {
+ var _attributes$side, _style$get5, _shapeAttributes$oAl;
const { style } = shape;
const attributes = attributesOf(wrap);
- const type = WRAPS$1[String(attributes.type)];
+ const shapeAttributes = attributesOf(shape.element[Object.keys(shape.element)[0]]);
+ const wrapType = String(attributes.type);
+ const type = WRAPS$1[wrapType];
const side = SIDES$1[String((_attributes$side = attributes.side) !== null && _attributes$side !== void 0 ? _attributes$side : "both")];
if (type === void 0 || side === void 0) return "a VML drawing that text flows around in a way not yet followed";
- if (Number((_style$get4 = style.get("rotation")) !== null && _style$get4 !== void 0 ? _style$get4 : 0) !== 0) return "a turned VML drawing that text flows around";
- if (style.has("mso-width-percent") || style.has("mso-height-percent")) return "a VML drawing sized by a share of what it is placed against";
+ const tighter = wrapType === "tight" || wrapType === "through";
+ if (tighter && shapeAttributes.wrapcoords !== void 0) return "a VML drawing wrapped tightly round a polygon of its own";
+ if (Number((_style$get5 = style.get("rotation")) !== null && _style$get5 !== void 0 ? _style$get5 : 0) !== 0) return "a turned VML drawing that text flows around";
const horizontal = positionOf(style, "horizontal", attributes.anchorx === void 0 ? void 0 : String(attributes.anchorx));
const vertical = positionOf(style, "vertical", attributes.anchory === void 0 ? void 0 : String(attributes.anchory));
const distance = (name, otherwise) => {
- var _vmlLength;
- return (_vmlLength = vmlLength(style.get(`mso-wrap-distance-${name}`))) !== null && _vmlLength !== void 0 ? _vmlLength : otherwise;
+ var _vmlLength2;
+ return (_vmlLength2 = vmlLength(style.get(`mso-wrap-distance-${name}`))) !== null && _vmlLength2 !== void 0 ? _vmlLength2 : otherwise;
};
const distances = [
distance("top", 0),
@@ -33176,34 +33252,34 @@ var docxLayout = (function(exports) {
distance("left", 9),
distance("right", 9)
];
+ const shares = [shareOf$1(style, "width"), shareOf$1(style, "height")];
const unknown = [
horizontal,
vertical,
- ...distances
+ ...distances,
+ ...shares
].find((value) => typeof value === "string");
if (unknown !== void 0) return unknown;
const [top, bottom, left, right] = distances;
- return {
+ const [relativeWidth, relativeHeight] = shares;
+ return _objectSpread2(_objectSpread2(_objectSpread2({
wrap: type,
side,
width,
- height,
- effects: {
- top: 0,
- bottom: 0,
- left: 0,
- right: 0
- },
+ height
+ }, relativeWidth === void 0 ? {} : { relativeWidth }), relativeHeight === void 0 ? {} : { relativeHeight }), {}, {
+ effects: outlineEffects(outline),
distances: {
top,
bottom,
left,
- right
+ right: tighter ? Math.max(0, right - TIGHTER_RIGHT) : right
},
horizontal,
vertical,
- mayOverlap: !isVmlFalse((_attributesOf$oAllow = attributesOf(shape.element[Object.keys(shape.element)[0]])["o:allowoverlap"]) !== null && _attributesOf$oAllow !== void 0 ? _attributesOf$oAllow : "t")
- };
+ mayOverlap: !isVmlFalse((_shapeAttributes$oAl = shapeAttributes["o:allowoverlap"]) !== null && _shapeAttributes$oAl !== void 0 ? _shapeAttributes$oAl : "t"),
+ keptOnPage: true
+ });
};
//#endregion
//#region src/layout/read-document.ts
@@ -33544,36 +33620,54 @@ var docxLayout = (function(exports) {
return typeof floating === "string" ? floating : floatingItem(floating, reader);
};
var OLDER_VML = "a VML drawing in a document in compatibility mode 12 or 11";
+ var DEFAULT_VML_SIZE = 50;
+ var VML_PICTURE = "a VML picture";
/** Whether the document is in Word 2007's or 2003's compatibility mode, where VML drawings aren't laid out as Word does */
var olderVml = ({ compatibilityMode }) => compatibilityMode !== void 0 && compatibilityMode < 14;
/**
- * Reads a VML drawing (`w:pict`), as Word lays it out (scripts/layout-probes/word-vml.ts). A shape in the line is a box of
- * its size, with its run's font, standing on the baseline, as a picture is (VM7), and a text box in it is a box sized to
- * its text (VM1 to VM5). One placed on the page (`position:absolute`) that text flows around (`w10:wrap`) is a drawing
- * that text flows around, as a DrawingML one is (VM9 to VM11, VM15), and one with no wrapping is in front of the text or
- * behind it, and takes no room (VM6), in a header or footer too, as docx's watermarks are. One in a header or footer that
- * text flows around is one the body's text goes round (VM13), as a DrawingML one is. It says why where Word's way with it
- * isn't known: a picture, which Word drew at a size other than its own (VM8), a shape with an outline, which takes room
- * around it (VM1), tight or through wrapping, which Word doesn't wrap as square wrapping (VM14), and one in a header's
- * line, whose room there doesn't follow the body's (VM12).
+ * Reads a VML drawing (`w:pict`), as Word lays it out (scripts/layout-probes/word-vml.ts and
+ * scripts/layout-probes/stops2/word-stops-vml.ts). A shape in the line is a box of its size, with its run's font, standing
+ * on the baseline, as a picture is (VM7), and its outline takes its weight more across and down (VM23a, VM23b); a group of
+ * shapes is a box of its size (VM29f). A text box in it is a box sized to its text (VM1 to VM5, VM25a to VM25e). One placed
+ * on the page (`position:absolute`) that text flows around (`w10:wrap`) is a drawing that text flows around, as a
+ * DrawingML one is (VM9 to VM11, VM15, VM24a to VM24c), and one with no wrapping is in front of the text or behind it, and
+ * takes no room (VM6), in a header or footer too, as docx's watermarks are. One in a header or footer that text flows
+ * around is one the body's text goes round (VM13), as a DrawingML one is, and one in the line of a header or footer takes
+ * the room it takes in the body (VM22a to VM22c). It says why where Word's way with it isn't known: a picture, which Word
+ * drew at a size other than its own (VM8, VM20), one in the line of a text box, which Word wouldn't open, and a group with a
+ * shape with an outline, or that text flows around
*/
var readVml = (pict, font, reader) => {
- var _attributes$stroked;
const shape = vmlShapeOf(pict);
- if (typeof shape === "string") return shape;
+ if (shape === void 0 || typeof shape === "string") return shape !== null && shape !== void 0 ? shape : [];
const { style, element } = shape;
- const children = childrenOf(element[nameOf$1(element)]);
- const attributes = attributesOf(element[nameOf$1(element)]);
- const width = vmlLength(style.get("width"));
- const height = vmlLength(style.get("height"));
- const outlined = !isVmlFalse((_attributes$stroked = attributes.stroked) !== null && _attributes$stroked !== void 0 ? _attributes$stroked : "t") && style.get("visibility") !== "hidden";
- const unsized = () => typeof width === "string" ? width : typeof height === "string" ? height : "a VML drawing with no size";
+ const name = nameOf$1(element);
+ const children = childrenOf(element[name]);
+ const attributes = attributesOf(element[name]);
+ const given = {
+ width: vmlLength(style.get("width")),
+ height: vmlLength(style.get("height"))
+ };
+ const { width, height } = given.width === void 0 && given.height === void 0 ? {
+ width: DEFAULT_VML_SIZE,
+ height: DEFAULT_VML_SIZE
+ } : given;
+ const unsized = () => typeof width === "string" ? width : typeof height === "string" ? height : "a VML drawing with a width but no height, or a height but no width";
+ const group = name === "v:group";
+ if (group && groupOutlined(element)) return "a VML group of shapes with an outline";
+ const outline = group ? {
+ weight: 0,
+ drawn: false
+ } : vmlOutline(attributes, style);
+ if (typeof outline === "string") return outline;
+ const picture = find(children, "v:imagedata") !== void 0 && attributes["o:ole"] === void 0;
if (style.get("position") === "absolute") {
const wrap = find(children, "w10:wrap");
if (wrap === void 0 || attributesOf(wrap).type === "none") return [];
- const reason = olderVml(reader) ? OLDER_VML : reader.inCell || reader.inNote || reader.inTextBox ? IN_CELL_OR_NOTE : shape.text !== void 0 ? "a text box that text flows around" : find(children, "v:imagedata") !== void 0 ? "a VML picture" : outlined ? "a VML drawing with an outline that text flows around" : typeof width !== "number" || typeof height !== "number" ? unsized() : void 0;
+ const reason = olderVml(reader) ? OLDER_VML : reader.inCell || reader.inNote || reader.inTextBox ? IN_CELL_OR_NOTE : group ? "a VML group of shapes that text flows around" : picture ? VML_PICTURE : typeof width !== "number" || typeof height !== "number" ? unsized() : void 0;
if (reason !== void 0) return reason;
- const floating = readVmlFloating(shape, wrap, width, height);
+ if (shape.text !== void 0) return readFloatingTextBox(shape, wrap, width, height, outline, reader);
+ const floating = readVmlFloating(shape, wrap, width, height, outline.drawn ? outline.weight : 0);
return typeof floating === "string" ? floating : floatingItem(floating, reader);
}
const sized = (reason) => typeof width === "number" && typeof height === "number" ? guessedOr(reader, reason, () => [{
@@ -33583,14 +33677,15 @@ var docxLayout = (function(exports) {
font
}]) : reason;
if (olderVml(reader)) return OLDER_VML;
- if (reader.inHeader || reader.inTextBox) return sized("a VML drawing in the line of a header, footer or text box");
- if (shape.text !== void 0) return readTextBox(shape, width, font, outlined, reader);
- if (find(children, "v:imagedata") !== void 0) return sized("a VML picture");
- if (outlined) return sized("a VML shape with an outline in the line");
- return typeof width !== "number" || typeof height !== "number" ? unsized() : [{
+ if (reader.inTextBox) return sized("a VML drawing in the line of a text box");
+ if (shape.text !== void 0) return readTextBox(shape, width, height, outline, font, reader);
+ if (picture) return sized(VML_PICTURE);
+ if (typeof width !== "number" || typeof height !== "number") return unsized();
+ const room = outline.drawn ? outline.weight : 0;
+ return [{
type: "box",
- width,
- height,
+ width: width + room,
+ height: height + room,
font
}];
};
@@ -33600,38 +33695,127 @@ var docxLayout = (function(exports) {
right: 7.2,
bottom: 3.6
};
- var TEXT_BOX_FIT = .72;
- var TEXT_BOX_OUTLINE = .72;
+ var TEXT_BOX_EXTRA = .5;
+ /**
+ * The room between a text box's edges and its text (`v:textbox`'s inset, "left,top,right,bottom", each as Word has it when
+ * it isn't given: `word-stops-vml-text-boxes.docx` VM25b, VM25c), or why it isn't known
+ */
+ var textBoxInsets = (textbox) => {
+ var _attributesOf$inset;
+ const given = String((_attributesOf$inset = attributesOf(textbox).inset) !== null && _attributesOf$inset !== void 0 ? _attributesOf$inset : "").split(",").map((value) => value.trim());
+ const [left, top, right, bottom] = [
+ "left",
+ "top",
+ "right",
+ "bottom"
+ ].map((side, index) => given[index] ? vmlLength(given[index]) : TEXT_BOX_INSETS[side]);
+ const unknown = [
+ left,
+ top,
+ right,
+ bottom
+ ].find((value) => typeof value === "string");
+ return unknown !== null && unknown !== void 0 ? unknown : {
+ left,
+ top,
+ right,
+ bottom
+ };
+ };
+ /**
+ * The paragraphs of a text box, read with the lists in them counted apart from the text's, as Word numbers them: a list
+ * in a text box starts at 1, and the text's paragraphs of the same list after it don't count the box's
+ * (`word-stops-vml-text-boxes.docx` VM26b). Or why they can't be laid out: a paragraph that can't be, or a list with
+ * paragraphs before the box, in the text or in another box, which Word may number on from or not
+ */
+ var textBoxBlocks = (shape, reader) => {
+ const counters = /* @__PURE__ */ new Map();
+ const blocks = readBlocks(shape.text, _objectSpread2(_objectSpread2({}, reader), {}, {
+ inTextBox: true,
+ counters
+ }));
+ const unsupported = blocks.map(({ unsupported: why }) => why).find((why) => why !== void 0);
+ if (unsupported !== void 0) return unsupported;
+ for (const definition of counters.keys()) {
+ if (reader.counters.has(definition)) return "a list in a text box with paragraphs of its list before it";
+ reader.counters.set(definition, {
+ numbers: [],
+ started: []
+ });
+ }
+ return blocks;
+ };
/**
* Reads a text box in the line (docx's `Textbox`): its paragraphs, and the box they are in, which Word sizes to them, as
- * docx writes it to be (`mso-fit-shape-to-text`), whatever height it gives (`word-vml.docx` VM3). The bookmarks and fields
- * in it are where it is, in the paragraph it is in. Or why it can't be laid out: one Word doesn't size to its text, one
- * with insets of its own or an outline of another weight, which Word hasn't been seen with, and one with notes or lists
- * in it, which Word may number in an order not yet followed
+ * docx writes it to be (`mso-fit-shape-to-text`), whatever height it gives (`word-vml.docx` VM3), or which is as tall as
+ * it says otherwise, its text at its top (`word-stops-vml-text-boxes.docx` VM25a). Its text is laid out in its width less
+ * its insets and its outline (`word-stops-floats2.docx` TX1a to TX1k), and the box is as tall as its lines, its insets and
+ * its outline, which takes its weight more in the line, or none when it is hidden (VM25b to VM25e). The bookmarks and
+ * fields in it are where it is, in the paragraph it is in, and a footnote referred to in it is left out, reference and
+ * note, as Word leaves it (`word-stops-vml-note.docx` VM26a). Or why it can't be laid out
*/
- var readTextBox = (shape, width, font, outlined, reader) => {
- var _shape$textStyle, _blocks$map$find;
- const attributes = attributesOf(shape.element[nameOf$1(shape.element)]);
- const textbox = find(childrenOf(shape.element[nameOf$1(shape.element)]), "v:textbox");
- const references = elementsIn$1(shape.text, (name) => name === "w:footnoteReference" || name === "w:endnoteReference");
- const reason = typeof width !== "number" ? width !== null && width !== void 0 ? width : "a VML drawing with no size" : ((_shape$textStyle = shape.textStyle) === null || _shape$textStyle === void 0 ? void 0 : _shape$textStyle.get("mso-fit-shape-to-text")) !== "t" ? "a text box not sized to its text" : attributesOf(textbox).inset !== void 0 ? "a text box with insets of its own" : attributes.strokeweight !== void 0 ? "a text box with an outline of its own" : references.length > 0 ? "a footnote or endnote in a text box" : void 0;
- if (reason !== void 0) return reason;
- const blocks = readBlocks(shape.text, _objectSpread2(_objectSpread2({}, reader), {}, { inTextBox: true }));
- const unsupported = (_blocks$map$find = blocks.map(({ unsupported: why }) => why).find((why) => why !== void 0)) !== null && _blocks$map$find !== void 0 ? _blocks$map$find : blocks.some((block) => block.type === "paragraph" && block.list !== void 0) ? "a list in a text box" : void 0;
- if (unsupported !== void 0) return unsupported;
- const outline = outlined ? TEXT_BOX_OUTLINE : 0;
- const { left, right, top, bottom } = TEXT_BOX_INSETS;
+ var readTextBox = (shape, width, height, outline, font, reader) => {
+ var _shape$textStyle;
+ const insets = textBoxInsets(find(childrenOf(shape.element[nameOf$1(shape.element)]), "v:textbox"));
+ const fits = ((_shape$textStyle = shape.textStyle) === null || _shape$textStyle === void 0 ? void 0 : _shape$textStyle.get("mso-fit-shape-to-text")) === "t";
+ if (typeof width !== "number") return width !== null && width !== void 0 ? width : "a VML drawing with no size";
+ if (typeof insets === "string") return insets;
+ if (!fits && typeof height !== "number") return height !== null && height !== void 0 ? height : "a VML drawing with no size";
+ const blocks = textBoxBlocks(shape, reader);
+ if (typeof blocks === "string") return blocks;
+ const { weight, drawn } = outline;
+ const { left, right, top, bottom } = insets;
+ const outside = drawn ? weight : 0;
+ const extra = fits && weight === .72 ? 0 : TEXT_BOX_EXTRA;
return [...markersIn(blocks).map((name) => ({
type: "marker",
name
- })), {
+ })), _objectSpread2({
type: "textBox",
- width: width + outline,
- textWidth: width - left - right,
- room: top + bottom + TEXT_BOX_FIT + outline,
+ width: width + outside,
+ textWidth: width - left - right - weight,
+ room: top + bottom + weight + outside + extra,
blocks,
font
- }];
+ }, fits ? {} : { fixed: {
+ height: height + outside + extra,
+ inner: height - top - bottom - weight
+ } })];
+ };
+ /**
+ * Reads a text box placed on the page that text flows around (`position:absolute` with `w10:wrap`), as Word lays it out:
+ * a drawing that text flows around, sized to its text as a text box in the line is, with its outline's room beside it
+ * (`word-stops-vml-text-boxes.docx` VM24c). The bookmarks and fields in it are on its anchor's page. One Word doesn't size
+ * to its text, and one with a table in it, haven't been seen
+ */
+ var readFloatingTextBox = (shape, wrap, width, height, outline, reader) => {
+ var _shape$textStyle2;
+ const insets = textBoxInsets(find(childrenOf(shape.element[nameOf$1(shape.element)]), "v:textbox"));
+ if (typeof insets === "string") return insets;
+ if (((_shape$textStyle2 = shape.textStyle) === null || _shape$textStyle2 === void 0 ? void 0 : _shape$textStyle2.get("mso-fit-shape-to-text")) !== "t") return "a text box that text flows around not sized to its text";
+ const blocks = textBoxBlocks(shape, reader);
+ if (typeof blocks === "string") return blocks;
+ const paragraphs = blocks.filter((block) => block.type === "paragraph");
+ if (paragraphs.length !== blocks.length) return "a table in a text box that text flows around";
+ const floating = readVmlFloating(shape, wrap, width, height, outline.drawn ? outline.weight : 0);
+ if (typeof floating === "string") return floating;
+ const half = outline.weight / 2;
+ const inset = {
+ left: insets.left + half,
+ right: insets.right + half,
+ top: insets.top + half,
+ bottom: insets.bottom + half
+ };
+ const items = floatingItem(_objectSpread2(_objectSpread2({}, floating), {}, { frame: {
+ blocks: paragraphs,
+ heightRule: "auto",
+ fitsWidth: false,
+ inset
+ } }), reader);
+ return typeof items === "string" ? items : [...markersIn(blocks).map((name) => ({
+ type: "marker",
+ name
+ })), ...items];
};
var WRAPS = {
"wp:wrapSquare": "square",
@@ -33904,6 +34088,12 @@ var docxLayout = (function(exports) {
case "w:endnoteReference": {
var _reader$notes3;
const id = String(attributesOf(child[name])["w:id"]);
+ if (reader.inTextBox) {
+ if (name === "w:endnoteReference") return "an endnote in a text box";
+ reader.notesInTextBoxes.add(id);
+ return [];
+ }
+ if (name === "w:footnoteReference" && reader.notesInTextBoxes.size > 0) return "a footnote after one in a text box";
/** The marker at the reference, and its note's number, unless a mark of its own follows it in its place */
const reference = (note, numbered) => note === void 0 ? [] : [...note.marker ? [{
type: "marker",
@@ -33930,7 +34120,20 @@ var docxLayout = (function(exports) {
return choice && !format.hidden ? readRun({ "w:r": [...childrenOf(choice["mc:Choice"])] }, paragraphRun, reader, removed) : [];
}
case "w:pict": return format.hidden ? [] : font.border ? guessedOr(reader, "a picture in text with a border", () => readVml(child["w:pict"], font, reader)) : readVml(child["w:pict"], font, reader);
- case "w:object": return format.hidden ? [] : "an embedded object";
+ case "w:object": {
+ if (format.hidden) return [];
+ if (olderVml(reader)) return OLDER_VML;
+ const object = vmlShapeOf(child["w:object"]);
+ if (object === void 0 || typeof object === "string") return "an embedded object without a shape of its own";
+ const width = vmlLength(object.style.get("width"));
+ const height = vmlLength(object.style.get("height"));
+ return typeof width === "number" && typeof height === "number" ? [{
+ type: "box",
+ width,
+ height,
+ font
+ }] : "an embedded object with no size";
+ }
case "w:dayShort":
case "w:dayLong":
case "w:monthShort":
@@ -34401,8 +34604,8 @@ var docxLayout = (function(exports) {
const fromStyle = (_paragraphStyles$find = paragraphStyles.findLast((style) => style.frame !== void 0)) === null || _paragraphStyles$find === void 0 ? void 0 : _paragraphStyles$find.frame;
const element = own !== null && own !== void 0 ? own : fromStyle;
if (element === void 0) return;
- if (reader.inNote && !reader.inEndnote && !reader.inCell && !reader.inTextBox) return;
- if (reader.inCell || reader.inNote || reader.inHeader || reader.inTextBox) return "a text frame in a table cell, endnote, header, footer or text box";
+ if (reader.inNote && !reader.inCell && !reader.inTextBox) return;
+ if (reader.inCell || reader.inHeader || reader.inTextBox) return "a text frame in a table cell, header, footer or text box";
const frame = readFrameProperties(element);
if (typeof frame === "string") return frame;
if (own !== void 0 && fromStyle !== void 0) {
@@ -34970,12 +35173,12 @@ var docxLayout = (function(exports) {
const tableTwips = givenWidth.width;
const fixedFit = fixed && evenable && (unequal || tableTwips !== void 0 && read.some(({ edges, end }) => Math.abs(edges.get(end) - tableTwips) > WIDTH_TOLERANCE));
const withoutGuess = blocks.find((block) => block.noGuess === true);
- const floatElement = reader.inNote === true && reader.inEndnote !== true && !reader.inCell && reader.inTextBox !== true ? void 0 : find(properties, "w:tblpPr");
+ const floatElement = reader.inNote === true && !reader.inCell && reader.inTextBox !== true ? void 0 : find(properties, "w:tblpPr");
const float = floatElement === void 0 ? void 0 : readTableFloat(floatElement, find(properties, "w:tblOverlap"));
const older = reader.compatibilityMode !== void 0;
const marginsBeside = older && sized && givenWidth.width === void 0;
const verticalUnsupported = fits && (float !== void 0 || reader.inSizedTable === true) && tableCells.some(({ vertical }) => vertical) ? "text that runs up or down a cell of a table sized to its text, in a table cell or that text flows around" : void 0;
- const unsupported = (_ref15 = (_ref16 = (_ref17 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_ref30 = (_ref31 = (_ref32 = (_withoutGuess$unsuppo = withoutGuess === null || withoutGuess === void 0 ? void 0 : withoutGuess.unsupported) !== null && _withoutGuess$unsuppo !== void 0 ? _withoutGuess$unsuppo : reader.down === true ? "a table on text that runs down the page" : void 0) !== null && _ref32 !== void 0 ? _ref32 : float !== void 0 && (reader.inCell || reader.inNote || reader.inHeader) ? "a table that text flows around in a table cell, header, footer or endnote" : void 0) !== null && _ref31 !== void 0 ? _ref31 : float !== void 0 && older ? "a table that text flows around in a document in compatibility mode" : void 0) !== null && _ref30 !== void 0 ? _ref30 : marginsBeside && fits && (reader.inCell === true || indent !== 0 || givenWidth.share !== void 0) ? "a table sized to its text in a table cell, indented or as a share of the width, in a document in compatibility mode" : void 0) !== null && _ref29 !== void 0 ? _ref29 : typeof float === "string" ? float : void 0) !== null && _ref28 !== void 0 ? _ref28 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref27 !== void 0 ? _ref27 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref26 !== void 0 ? _ref26 : unmerged) !== null && _ref25 !== void 0 ? _ref25 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref24 !== void 0 ? _ref24 : fits && tableCells.some(({ noWrap }) => noWrap) ? "a table cell whose text doesn't wrap, in a table sized to its text" : void 0) !== null && _ref23 !== void 0 ? _ref23 : fits && tableCells.some(({ fitText }) => fitText) ? "text fitted to its table cell, in a table sized to its text" : void 0) !== null && _ref22 !== void 0 ? _ref22 : verticalUnsupported) !== null && _ref21 !== void 0 ? _ref21 : spacingUnsupported) !== null && _ref20 !== void 0 ? _ref20 : typeof geometry === "string" ? geometry : void 0) !== null && _ref19 !== void 0 ? _ref19 : indent === void 0 ? "a table indented by a share of the width" : void 0) !== null && _ref18 !== void 0 ? _ref18 : ((_givenWidth$share = givenWidth.share) !== null && _givenWidth$share !== void 0 ? _givenWidth$share : 0) > 1 ? "a table whose width is a share of more than the width it is in" : void 0) !== null && _ref17 !== void 0 ? _ref17 : styleUnsupported) !== null && _ref16 !== void 0 ? _ref16 : lengths) !== null && _ref15 !== void 0 ? _ref15 : (_blocks$find = blocks.find((block) => block.unsupported !== void 0)) === null || _blocks$find === void 0 ? void 0 : _blocks$find.unsupported;
+ const unsupported = (_ref15 = (_ref16 = (_ref17 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_ref30 = (_ref31 = (_ref32 = (_withoutGuess$unsuppo = withoutGuess === null || withoutGuess === void 0 ? void 0 : withoutGuess.unsupported) !== null && _withoutGuess$unsuppo !== void 0 ? _withoutGuess$unsuppo : reader.down === true ? "a table on text that runs down the page" : void 0) !== null && _ref32 !== void 0 ? _ref32 : float !== void 0 && (reader.inCell || reader.inHeader) ? "a table that text flows around in a table cell, header or footer" : void 0) !== null && _ref31 !== void 0 ? _ref31 : float !== void 0 && older ? "a table that text flows around in a document in compatibility mode" : void 0) !== null && _ref30 !== void 0 ? _ref30 : marginsBeside && fits && (reader.inCell === true || indent !== 0 || givenWidth.share !== void 0) ? "a table sized to its text in a table cell, indented or as a share of the width, in a document in compatibility mode" : void 0) !== null && _ref29 !== void 0 ? _ref29 : typeof float === "string" ? float : void 0) !== null && _ref28 !== void 0 ? _ref28 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref27 !== void 0 ? _ref27 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref26 !== void 0 ? _ref26 : unmerged) !== null && _ref25 !== void 0 ? _ref25 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref24 !== void 0 ? _ref24 : fits && tableCells.some(({ noWrap }) => noWrap) ? "a table cell whose text doesn't wrap, in a table sized to its text" : void 0) !== null && _ref23 !== void 0 ? _ref23 : fits && tableCells.some(({ fitText }) => fitText) ? "text fitted to its table cell, in a table sized to its text" : void 0) !== null && _ref22 !== void 0 ? _ref22 : verticalUnsupported) !== null && _ref21 !== void 0 ? _ref21 : spacingUnsupported) !== null && _ref20 !== void 0 ? _ref20 : typeof geometry === "string" ? geometry : void 0) !== null && _ref19 !== void 0 ? _ref19 : indent === void 0 ? "a table indented by a share of the width" : void 0) !== null && _ref18 !== void 0 ? _ref18 : ((_givenWidth$share = givenWidth.share) !== null && _givenWidth$share !== void 0 ? _givenWidth$share : 0) > 1 ? "a table whose width is a share of more than the width it is in" : void 0) !== null && _ref17 !== void 0 ? _ref17 : styleUnsupported) !== null && _ref16 !== void 0 ? _ref16 : lengths) !== null && _ref15 !== void 0 ? _ref15 : (_blocks$find = blocks.find((block) => block.unsupported !== void 0)) === null || _blocks$find === void 0 ? void 0 : _blocks$find.unsupported;
const rowWidth = ((_read$0$cells = (_read$ = read[0]) === null || _read$ === void 0 ? void 0 : _read$.cells) !== null && _read$0$cells !== void 0 ? _read$0$cells : []).reduce((total, cell) => {
var _cell$ownWidth;
return total + ((_cell$ownWidth = cell.ownWidth) !== null && _cell$ownWidth !== void 0 ? _cell$ownWidth : 0);
@@ -35021,9 +35224,9 @@ var docxLayout = (function(exports) {
};
/**
* Where a table that text flows around is (`w:tblpPr`), or why it can't be followed. One that doesn't say what it is
- * placed against is placed against the margins, as Word places it: across the page, where the margins and the column are
- * the same in one column, so it stops in columns, and down the page, from the top margin (`word-stops-floats.docx` FT7a,
- * FT7b). Lined up inline against the text, it is at the top of the paragraph after it (FT7c)
+ * placed against is placed against the column across the page and the margins down it, as Word places it
+ * (`word-stops-floats.docx` FT7a, FT7b, `word-stops-floats2.docx` CO1a). Lined up inline against the text, it is at the
+ * top of the paragraph after it (FT7c)
*/
var readTableFloat = (element, overlap) => {
const attributes = attributesOf(element);
@@ -35031,22 +35234,21 @@ var docxLayout = (function(exports) {
var _twips4;
const { from: anchors, alignments } = TABLE_AXES[anchor];
const given = attributes[`w:${anchor}`];
- const from = given === void 0 ? "margin" : anchors.get(String(given));
+ const from = given === void 0 ? anchor === "horzAnchor" ? "column" : "margin" : anchors.get(String(given));
const align = attributes[`w:${spec}`];
if (from === void 0) return "a table that text flows around placed against what isn't followed yet";
- const unsaid = given === void 0 && anchor === "horzAnchor" ? { inColumns: "a table that text flows around placed against what isn't given, in columns" } : {};
if (align === "inline" && from === "paragraph") return {
from,
align: "top"
};
- if (align !== void 0) return alignments.has(String(align)) ? _objectSpread2({
+ if (align !== void 0) return alignments.has(String(align)) ? {
from,
align: String(align)
- }, unsaid) : "a table that text flows around lined up in a way not yet followed";
- return _objectSpread2({
+ } : "a table that text flows around lined up in a way not yet followed";
+ return {
from,
offset: (_twips4 = twips(attributes[`w:${at}`])) !== null && _twips4 !== void 0 ? _twips4 : 0
- }, unsaid);
+ };
};
const horizontal = position("horzAnchor", "tblpXSpec", "tblpX");
const vertical = position("vertAnchor", "tblpYSpec", "tblpY");
@@ -35482,9 +35684,9 @@ var docxLayout = (function(exports) {
/**
* A text frame as a drawing that text flows around, placed and sized by its properties and its paragraphs, nothing when
* it is in front of the text, or why it can't be laid out. Its borders at its sides keep the text further from it, and
- * those above and below are in it, above and below its text, as a paragraph's are (FR2a to FR2j). Where its paragraphs
- * have other borders at their sides, and where a frame with borders there has a distance from the text too, Word's way
- * isn't known
+ * those above and below are in it, above and below its text, as a paragraph's are (FR2a to FR2j), and its distance from
+ * the text keeps it further again (`word-stops-floats2.docx` FB1a). Where its paragraphs have other borders at their
+ * sides, Word's way isn't known
*/
var frameDrawing = (frame, blocks) => {
var _frame$wrap;
@@ -35495,7 +35697,6 @@ var docxLayout = (function(exports) {
const [left, right] = [blocks[0].format.borderLeft, blocks[0].format.borderRight].map(frameBorderRoom);
if (typeof left === "string" || typeof right === "string") return typeof left === "string" ? left : right;
const { width = 0, height, heightRule, horizontal, vertical, across, down } = frame;
- if (left + right > 0 && across > 0) return "a text frame with borders at its sides and a distance from the text";
if (wrap === "none") return;
return {
wrap,
@@ -35539,7 +35740,7 @@ var docxLayout = (function(exports) {
const anchored = [];
let framed = [];
for (const entry of entries) {
- var _ref33, _block$unsupported;
+ var _block$unsupported;
const { block } = entry;
if (isFramed(block)) {
framed = [...framed, entry];
@@ -35566,7 +35767,7 @@ var docxLayout = (function(exports) {
type: "drawing",
drawing
}]);
- const why = (_ref33 = (_block$unsupported = block.unsupported) !== null && _block$unsupported !== void 0 ? _block$unsupported : unsupported) !== null && _ref33 !== void 0 ? _ref33 : block.type === "table" && laidOut.some(({ drawing }) => drawing.vertical.from === "paragraph") ? "a text frame placed against the paragraph after it, before a table" : void 0;
+ const why = (_block$unsupported = block.unsupported) !== null && _block$unsupported !== void 0 ? _block$unsupported : unsupported;
anchored.push(withBlock(entry, _objectSpread2(_objectSpread2({}, block.type === "table" ? _objectSpread2(_objectSpread2({}, block), {}, { anchored: [...markers, ...laidOut] }) : _objectSpread2(_objectSpread2({}, block), {}, { items: [
...markers,
...laidOut,
@@ -36261,7 +36462,7 @@ var docxLayout = (function(exports) {
* Reads a document's body (`w:body`), with the other parts of the document.
*/
var readContent = (writtenBody, writtenParts, { guess = false } = {}) => {
- var _writtenParts$dataSto, _parts$otherListIds, _parts$otherListIds2, _parts$settings, _fontOf$size2, _notesByKind$kind$get, _ref34, _ref35, _ref36, _ref37, _ref38, _ref39, _ref40, _documentContent$unsu;
+ var _writtenParts$dataSto, _parts$otherListIds, _parts$otherListIds2, _parts$settings, _fontOf$size2, _notesByKind$kind$get, _ref33, _ref34, _ref35, _ref36, _ref37, _ref38, _ref39, _documentContent$unsu;
const stores = (_writtenParts$dataSto = writtenParts.dataStores) !== null && _writtenParts$dataSto !== void 0 ? _writtenParts$dataSto : /* @__PURE__ */ new Map();
const body = withBoundTextWritten(writtenBody, stores);
const parts = _objectSpread2(_objectSpread2({}, writtenParts), {}, {
@@ -36290,7 +36491,8 @@ var docxLayout = (function(exports) {
inHeader,
markers,
fields: [],
- counters: /* @__PURE__ */ new Map()
+ counters: /* @__PURE__ */ new Map(),
+ notesInTextBoxes: /* @__PURE__ */ new Set()
}, decimalSymbol === void 0 ? {} : { decimalSymbol }), mathsSettings), eastAsianRules === void 0 ? {} : { eastAsianRules }), guess ? { guess } : {}), compatibilityMode === void 0 ? {} : { compatibilityMode }), feLayout ? { feLayout } : {}), openTypeFeatures ? { openTypeFeatures } : {});
const elements = unwrap(joinRemovedMarks(contentOf$3(body), styles, {
nested: false,
@@ -36620,7 +36822,7 @@ var docxLayout = (function(exports) {
relativeReferences: markers.relative,
endnoteReferences
}, parts.fonts !== void 0 && parts.fonts.length > 0 ? { fonts: parts.fonts } : {}), readSettings(parts.settings));
- return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref34 = (_ref35 = (_ref36 = (_ref37 = (_ref38 = (_ref39 = (_ref40 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : styles.unsupported) !== null && _ref40 !== void 0 ? _ref40 : inNumbering) !== null && _ref39 !== void 0 ? _ref39 : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref38 !== void 0 ? _ref38 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref37 !== void 0 ? _ref37 : sections.slice(Math.min(...endnoteSections)).some(({ textRunsDown }) => textRunsDown !== void 0) ? "endnotes on or before text that runs down the page" : void 0) !== null && _ref36 !== void 0 ? _ref36 : endnoteSections.some((section) => sections.slice(section + 1).some((_, after) => !sameGrid(gridOf(section), gridOf(section + 1 + after)))) ? "endnotes from a section followed by one on another document grid" : void 0) !== null && _ref35 !== void 0 ? _ref35 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref34 !== void 0 ? _ref34 : unseenNumbering }));
+ return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref33 = (_ref34 = (_ref35 = (_ref36 = (_ref37 = (_ref38 = (_ref39 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : styles.unsupported) !== null && _ref39 !== void 0 ? _ref39 : inNumbering) !== null && _ref38 !== void 0 ? _ref38 : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref37 !== void 0 ? _ref37 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref36 !== void 0 ? _ref36 : sections.slice(Math.min(...endnoteSections)).some(({ textRunsDown }) => textRunsDown !== void 0) ? "endnotes on or before text that runs down the page" : void 0) !== null && _ref35 !== void 0 ? _ref35 : endnoteSections.some((section) => sections.slice(section + 1).some((_, after) => !sameGrid(gridOf(section), gridOf(section + 1 + after)))) ? "endnotes from a section followed by one on another document grid" : void 0) !== null && _ref34 !== void 0 ? _ref34 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref33 !== void 0 ? _ref33 : unseenNumbering }));
};
//#endregion
//#region src/layout/paginate.ts
@@ -36652,7 +36854,6 @@ var docxLayout = (function(exports) {
}];
};
var TOLERANCE = .01;
- var TEXT_BOX_DOUBT = .72;
var EXACT_ABOVE_BASELINE = .8;
var TOP_SPACE_KEPT = 9.6;
var TOP_SPACING_UNKNOWN = "the first line of a page or column, at line spacing Word hasn't shown, in a document that suppresses the space above it";
@@ -36817,7 +37018,7 @@ var docxLayout = (function(exports) {
}
};
var PUSHED_ON = "a drawing whose paragraph goes on to the next page as the text before it goes round it";
- var BEFORE_TABLE_MOVING_ON = "a table that text flows around or a text frame before a table that moves on";
+ var FRAME_BEFORE_TABLE_MOVING_ON = "a text frame before a table that moves on";
/**
* Thrown to lay out a page again when the paragraph of a drawing placed from the page's top went on to the next page as
* the text before it went round the drawing, with the paragraph starting on the next page (`block`), and its drawing with
@@ -36855,16 +37056,13 @@ var docxLayout = (function(exports) {
var KEPT_FLOATING = "a paragraph kept with the next before a table that text flows around";
/**
* Word lays out a paragraph kept with the next beside a drawing, with a drawing of its own or before a table, where it is,
- * when the next starts on its page (`word-stops-drawings.docx` DR12a, DR12b). How much room Word finds for it otherwise,
+ * when the next starts on its page (`word-stops-drawings.docx` DR12a, DR12b), and moves one with a drawing of its own to
+ * the next page with the next, and the drawing with it, as any kept paragraph (`word-stops-floats2.docx` KP1a). How much
+ * room Word finds for one kept with a table, or with a drawing of its own that the next's text goes above and below,
* where it moves on, hasn't been seen, so it is laid out where it is, and the layout stops where the next starts
* elsewhere
*/
- var KEPT_BESIDE = "a paragraph kept with the next beside a drawing, with a drawing of its own or before a table, apart from the next";
- /**
- * Word lays out a paragraph kept with the next with a table that text flows around anchored in it where it is, when the
- * next starts on its page (`word-stops-floats.docx` FT4a, FT4b); how Word moves them otherwise hasn't been seen
- */
- var KEPT_WITH_FLOATING = "a paragraph kept with the next with a table that text flows around, apart from the next";
+ var KEPT_BESIDE = "a paragraph kept with the next beside a drawing, kept with a table or with a drawing of its own the text goes above and below, apart from the next";
var BORDERLESS_FLOAT = .75;
/** Whether a table has no borders round it: none left or right, above its first row or below its last */
var borderlessOutside = ({ borderLeft, borderRight, rows }) => {
@@ -37079,16 +37277,16 @@ var docxLayout = (function(exports) {
}).find(Boolean);
};
/**
- * How tall a text box in the line is: its paragraphs, and the room above and below them. Where its text starts across
- * the box, Word's PDFs show to within a little less than the room it adds to its height (`word-vml.docx` VM1, VM5), so
- * it stops where its lines would break differently in that much more or less room, or, guessing, takes them as they
- * break in the room its insets leave
+ * How tall a text box in the line is: its paragraphs, broken in the room for its text, which is its width less its
+ * insets and its outline (`word-stops-floats2.docx` TX1a to TX1k), and the room above and below them; or its own
+ * height, when Word doesn't size it to its text, which its text must fit in (`word-stops-vml-text-boxes.docx` VM25a)
*/
const textBoxHeight = (box) => {
- const { room, textWidth: inside, blocks: inBox } = box;
- const [narrower, wider] = [inside - TEXT_BOX_DOUBT, inside + TEXT_BOX_DOUBT].map((width) => stackHeight(inBox, width, true));
- if (Math.abs(narrower - wider) > TOLERANCE) stopAt("a line in a text box that only just fits");
- return room + stackHeight(inBox, inside, true);
+ const { room, textWidth: inside, blocks: inBox, fixed } = box;
+ const ofText = stackHeight(inBox, inside, true);
+ if (fixed === void 0) return room + ofText;
+ if (ofText > fixed.inner + TOLERANCE) throw new Unsupported("a text box whose text is taller than it");
+ return fixed.height;
};
/**
* A paragraph's content, as it is measured, which stops the layout at a character whose width the measurer doesn't
@@ -38567,7 +38765,6 @@ var docxLayout = (function(exports) {
pending = [...pending, ...notes];
return;
}
- if (drawings.some(({ keepOut }) => keepOut.bottom > linesBottom(moreNoteRoom(notes)) + TOLERANCE)) throw new Unsupported(BESIDE_NOTES);
if (position + below <= linesBottom(moreNoteRoom(notes)) + TOLERANCE) {
addNotes(notes);
return;
@@ -38688,32 +38885,36 @@ var docxLayout = (function(exports) {
if (away === void 0) return;
if (isTableDrawing(away)) throw new Unsupported(PUSHED_ON);
const block = Number(away.anchor.split(" ")[0]);
- if (blocks[block].block.type === "table") throw new Unsupported(BEFORE_TABLE_MOVING_ON);
+ if (blocks[block].block.type === "table") throw new Unsupported(FRAME_BEFORE_TABLE_MOVING_ON);
throw new PushedOn(block, pageCount);
};
const startsNextPage = /* @__PURE__ */ new Map();
const inlined = /* @__PURE__ */ new Set();
+ const leftBehind = /* @__PURE__ */ new Set();
/** Whether a block is a table that text flows around, laid out round the paragraph after it */
const floatsAt = (index) => {
const entry = blocks[index];
- return entry !== void 0 && isFloating(entry.block) && !inlined.has(index) && !brokenAcross.has(index);
+ return entry !== void 0 && isFloating(entry.block) && !inlined.has(index) && !brokenAcross.has(index) && !leftBehind.has(index);
};
/**
* Breaks a table that text flows around that goes past the bottom of the page across pages, as Word breaks it: the rows
- * that fit stay where it was placed, the rest go at the top of the next pages, where it is across the page, and the
- * paragraph after it starts at the top of the page its last rows are on, beside them, as beside a drawing there. A page
- * between holds its rows only (`word-stops-floats.docx` FT5b to FT5d, `word-floats2.docx` G28). Where it has header rows,
- * footnotes or a distance from the text above or below it, is in columns, and where its first row doesn't fit, a row
- * that would go on to the next page has more than one line and can split, or a row is taller than a page, Word's way
- * isn't known, and it isn't broken: whether it is
+ * that fit stay where it was placed, the rest go at the top of the next pages, where it is across the page, below its
+ * header rows, which go at the top of each page again, and the paragraph after it starts at the top of the page its
+ * last rows are on, beside them, as beside a drawing there. A page between holds its rows only
+ * (`word-stops-floats.docx` FT5b to FT5d, `word-floats2.docx` G28, `word-stops-floats2.docx` TF2a, TF2b). Where it has
+ * footnotes or a distance from the text above it, is in columns, and where its first row doesn't fit, a row that would
+ * go on to the next page has more than one line and can split, which Word splits as a row of a table it doesn't flow
+ * around (TF2c), or a row is taller than a page, Word's way isn't followed, and it isn't broken: whether it is
*/
const breakAcross = ({ drawing, table }) => {
const block = blocks[table.index].block;
const { distances } = drawing.drawing;
const { heights } = table;
+ const headerRows = Math.max(0, block.rows.findIndex(({ header }) => !header));
+ const repeated = sum(heights.slice(0, headerRows));
const first = heights.findIndex((_, at) => drawing.box.top + sum(heights.slice(0, at + 1)) > linesBottom() + TOLERANCE);
- if (first <= 0) return false;
- const room = pageBottom - top;
+ if (first <= headerRows) return false;
+ const room = pageBottom - top - repeated;
const { parts } = heights.slice(first).reduce(({ parts: counts, used }, height) => counts.length > 0 && used + height <= room + TOLERANCE ? {
parts: [...counts.slice(0, -1), counts[counts.length - 1] + 1],
used: used + height
@@ -38727,7 +38928,7 @@ var docxLayout = (function(exports) {
if (!parts.map((_, part) => first + sum(parts.slice(0, part))).every((start) => {
const { cantSplit, cells } = block.rows[start];
return cantSplit || cells.every(({ blocks: [only, ...rest], width }) => rest.length === 0 && (only === null || only === void 0 ? void 0 : only.type) === "paragraph" && linesOf(only, width).length === 1);
- }) || carried !== void 0 || parts.includes(0) || block.rows.some(({ header }) => header) || notesIn(markersOf(block)).length > 0 || distances.top > 0 || distances.bottom > 0 || columnsSection().columns.length > 1) return false;
+ }) || carried !== void 0 || parts.includes(0) || notesIn(markersOf(block)).length > 0 || distances.top > 0 || columnsSection().columns.length > 1) return false;
/** Places some of its rows from where they go down the page, with their bookmarks and fields on that page */
const placeRows = (from, count, y) => {
heights.slice(from, from + count).reduce((rowTop, height, offset) => {
@@ -38748,12 +38949,13 @@ var docxLayout = (function(exports) {
let row = first;
for (const count of parts) {
startPage();
- placeRows(row, count, position);
+ placeRows(0, headerRows, position);
+ placeRows(row, count, position + repeated);
row += count;
}
const box = _objectSpread2(_objectSpread2({}, drawing.box), {}, {
top: position,
- bottom: position + sum(heights.slice(row - parts[parts.length - 1]))
+ bottom: position + repeated + sum(heights.slice(row - parts[parts.length - 1]))
});
drawings = [...drawings, _objectSpread2(_objectSpread2({}, drawing), {}, {
box,
@@ -38780,16 +38982,16 @@ var docxLayout = (function(exports) {
/**
* Why Word's way with the tables that text flows around from one (`index`) isn't known: with nothing after them in
* their section to place them against, which a document read doesn't have, as each section ends with a paragraph
- * and the body with the one Word adds after them, before a paragraph kept with the next, with borders between their
- * rows only, or with a footnote in one before a table. Word places them against the top of what comes after them: a
- * paragraph, the empty one that ends their section, which takes a line after them, and a table
- * (`word-stops-floats.docx` FT1a to FT1e), and their footnotes go on the page with them (FT3)
+ * and the body with the one Word adds after them, before a paragraph kept with the next, or with a footnote in one
+ * before a table. Word places them against the top of what comes after them: a paragraph, the empty one that ends
+ * their section, which takes a line after them, and a table (`word-stops-floats.docx` FT1a to FT1e), and their
+ * footnotes go on the page with them (FT3). One with borders between its rows only has the room of its rows, as its
+ * borders count as borders (`word-stops-floats2.docx` TF3)
*/
const floatsUnknown = (index) => {
const run = floatsFrom(index);
const after = blocks[index + run.length];
if ((after === null || after === void 0 ? void 0 : after.section) !== blocks[index].section) return "a table that text flows around without a paragraph after it";
- if (run.some((table) => borderlessOutside(blocks[table].block) && !borderless(blocks[table].block))) return "a table that text flows around with borders between its rows only";
return after.block.type === "table" && run.some((table) => notesIn(markersOf(blocks[table].block)).length > 0) ? "a footnote in a table that text flows around before a table" : void 0;
};
/**
@@ -38880,6 +39082,12 @@ var docxLayout = (function(exports) {
* goes round them, and the table goes below those it would go beside, as below a drawing. Where one goes past the bottom
* of the page, as the table it is anchored in would move on without it, Word's way isn't known. Whether any were placed
*/
+ /** Where a drawing is drawn on its page, placed against what its positions say, or stops where that isn't known */
+ const placeOrStop = (drawing, frame) => {
+ const box = placeDrawing(drawing, frame);
+ if (typeof box === "string") throw new Unsupported(box);
+ return box;
+ };
const placeBeforeTable = (table, index) => {
var _table$anchored;
const frames = (_table$anchored = table.anchored) !== null && _table$anchored !== void 0 ? _table$anchored : [];
@@ -38905,7 +39113,7 @@ var docxLayout = (function(exports) {
item,
drawing: pin
}, withTable);
- const box = placeDrawing(drawing, {
+ const box = placeOrStop(drawing, {
section: section(),
oddPage: pageNumber % 2 === 1,
column: {
@@ -38919,7 +39127,6 @@ var docxLayout = (function(exports) {
},
character: 0
});
- if (typeof box === "string") throw new Unsupported(box);
const keepOut = keepOutOf(drawing, box);
if (keepOut.bottom > linesBottom() + TOLERANCE || box.top - drawing.effects.top < top - TOLERANCE) throw new Unsupported(floating === void 0 ? "a text frame before a table going past the top or bottom of the page's text" : "a table that text flows around before a table going past the top or bottom of the page's text");
return _objectSpread2({
@@ -38945,8 +39152,14 @@ var docxLayout = (function(exports) {
const sizedFrame = (drawing) => {
const { frame } = drawing;
if (frame === void 0) return drawing;
- const width = frame.fitsWidth ? contentWidths(frame.blocks).max : drawing.width;
- const ofText = stackHeight(frame.blocks, width, false);
+ const { inset = {
+ top: 0,
+ bottom: 0,
+ left: 0,
+ right: 0
+ } } = frame;
+ const width = frame.fitsWidth ? contentWidths(frame.blocks).max + inset.left + inset.right : drawing.width;
+ const ofText = stackHeight(frame.blocks, width - inset.left - inset.right, false) + inset.top + inset.bottom;
if (frame.blocks.some(({ format }) => [
format.borderTop,
format.borderBottom,
@@ -38992,15 +39205,20 @@ var docxLayout = (function(exports) {
const table = isTableDrawing(drawing);
const kind = table === isTableDrawing(other) && own.frame === void 0 && other.drawing.frame === void 0;
const still = Math.max(effects.top, effects.bottom, effects.left, effects.right) === 0;
- const right = own.horizontal.align === void 0;
- const left = !table && own.horizontal.align === "right";
+ const { align } = own.horizontal;
+ const right = align === void 0 || table && align === "left";
+ const left = align === "right";
if (own.mayOverlap || !kind || !still || !(right || left) || attempts > others.length) throw new Unsupported("drawings that text flows around that may not overlap, overlapping");
- const to = table ? other.keepOut.right + (box.left - keepOut.left) : right ? other.box.right : other.box.left - (box.right - box.left);
- const shifted = _objectSpread2(_objectSpread2({}, box), {}, {
+ const width = box.right - box.left;
+ const fits = (candidate) => candidate.left >= within.start - TOLERANCE && candidate.right <= within.end + TOLERANCE;
+ const shiftedTo = (to) => _objectSpread2(_objectSpread2({}, box), {}, {
left: to,
- right: to + box.right - box.left
+ right: to + width
});
- if (shifted.left < within.start - TOLERANCE || shifted.right > within.end + TOLERANCE) throw new Unsupported("drawings that text flows around that may not overlap, overlapping, with no room beside");
+ const toRight = table ? other.keepOut.right + (box.left - keepOut.left) : other.box.right;
+ const toLeft = table ? other.keepOut.left - (keepOut.right - box.left) : other.box.left - width;
+ const shifted = (table ? right ? [toRight, toLeft] : [toLeft, toRight] : [right ? toRight : toLeft]).map(shiftedTo).find(fits);
+ if (shifted === void 0) throw new Unsupported("drawings that text flows around that may not overlap, overlapping, with no room beside");
return away(_objectSpread2(_objectSpread2({}, drawing), {}, {
box: shifted,
keepOut: keepOutOf(own, shifted)
@@ -39010,8 +39228,9 @@ var docxLayout = (function(exports) {
}, []);
/**
* Puts the drawings of the paragraph being placed on the page, where the text after them goes round them. It stops
- * where Word's way with them isn't known yet: drawings that overlap, one beside text placed before it on the page,
- * which Word lays out again, and one that goes below the bottom of the page's text or into its footnotes.
+ * where Word's way with them isn't known yet: drawings that overlap, and one beside text placed before it on the page,
+ * which Word lays out again. One beside the page's footnotes leaves their lines as they are, as Word does
+ * (`word-stops-floats2.docx` FN1).
*/
const placeDrawings = (placed) => {
const before = placements.slice(placements.findLastIndex(({ type }) => type === "page") + 1);
@@ -39028,7 +39247,6 @@ var docxLayout = (function(exports) {
top: placement.line.y,
bottom: placement.line.y + placement.line.height
}) : placement.type === "row" && !floatsAt(placement.block) && placement.row.y + placement.row.height > keepOut.top && placement.row.y < keepOut.bottom)) throw new DrawingAbove(drawing);
- if (noteArea > 0 && keepOut.bottom > linesBottom() + TOLERANCE) throw new Unsupported(BESIDE_NOTES);
}
drawings = [...drawings.filter(({ anchor }) => !placed.some(({ drawing }) => drawing.anchor === anchor)), ...placed.map(({ drawing }) => drawing)];
};
@@ -39122,7 +39340,6 @@ var docxLayout = (function(exports) {
*/
const roomOfRow = (around, y, height, line) => {
const room = roomBeside(around, y, height, within);
- if ("narrow" in room) throw new Unsupported("a line beside a drawing with less than 18 points of room beside it");
if ("below" in room) return room;
if (compatibilityMode !== void 0 && room.spans.some((span) => narrowGap(span, within))) stopAt("a line beside a drawing or frame in a gap narrower than 135 points, in a document in compatibility mode");
const spans = room.spans.map((span, offset) => ({
@@ -39139,6 +39356,12 @@ var docxLayout = (function(exports) {
/** Whether a row's only room is all of the paragraph's, as a line not beside a drawing has */
const isWhole = (spans, line) => spans.length === 1 && spans[0].start <= indentLeft + (line === 0 ? firstLineIndent : 0) + TOLERANCE && spans[0].end >= within.end - left - indentRight - TOLERANCE;
/** The rows of the lines broken in some rooms beside some of its own drawings, and the rooms they put the lines in */
+ const jumps = /* @__PURE__ */ new Map();
+ /** The bottom of the nearest of the drawings beside a row from `y`, `height` tall, when there is one */
+ const belowDrawings = (all, y, height) => {
+ const bottoms = all.filter(({ keepOut }) => keepOut.top < y + height && y < keepOut.bottom && keepOut.left < within.end && within.start < keepOut.right).map(({ keepOut }) => keepOut.bottom);
+ return bottoms.length === 0 ? void 0 : Math.min(...bottoms);
+ };
const walk = (lines, around) => {
const all = [...beside, ...around.map(({ drawing }) => drawing)];
const end = from + linesToBreak(lines, from).length;
@@ -39153,6 +39376,8 @@ var docxLayout = (function(exports) {
continue;
}
const rowTop = y;
+ const jump = jumps.get(line);
+ if (jump !== void 0 && jump > y) y = jump;
let { height } = lines[line];
let spans;
for (;;) {
@@ -39163,8 +39388,19 @@ var docxLayout = (function(exports) {
}
spans = room.spans.slice(0, end - line);
const tallest = Math.max(height, ...lines.slice(line, line + spans.length).map((one) => one.height));
- if (tallest <= height + TOLERANCE) break;
- height = tallest;
+ if (tallest > height + TOLERANCE) {
+ height = tallest;
+ continue;
+ }
+ const taking = Math.max(1, spans.length);
+ const below = belowDrawings(all, y, height);
+ const emptied = lines.slice(line, line + taking).every(({ text }) => text.trim() === "");
+ if (!isWhole(spans, line) && emptied && line + taking < end && below !== void 0 && !jumps.has(line)) {
+ jumps.set(line, below);
+ y = below;
+ continue;
+ }
+ break;
}
const onRow = Math.max(1, spans.length);
if (spans.length > 0 && !isWhole(spans, line)) for (const [offset, span] of spans.entries()) rooms.set(line + offset, span);
@@ -40096,6 +40332,48 @@ var docxLayout = (function(exports) {
}, next.pageBreakBefore ? {} : { keptLines: nextLines });
};
/**
+ * Places the tables that text flows around anchored in a paragraph kept with the next, which moves on to the next column
+ * or page, on this page, where they would have been with the paragraph, as Word leaves them where it first placed them
+ * (`word-stops-floats2.docx` KP1b), so that the paragraph is laid out without them where it goes
+ */
+ const leaveFloats = (index, paragraph) => {
+ const current = columnsSection();
+ const left = columnLeft(current, column);
+ const paragraphTop = position + Math.min(spaceAfter, spaceAboveOf(paragraph.spaceBefore));
+ for (const one of floatsBefore(index)) {
+ const { drawing, table } = floatingTable(one);
+ const box = placeOrStop(drawing, {
+ section: section(),
+ oddPage: pageNumber % 2 === 1,
+ column: {
+ start: left,
+ end: left + current.columns[column]
+ },
+ paragraph: paragraphTop,
+ line: {
+ top: paragraphTop,
+ height: 0
+ },
+ character: 0
+ });
+ const keepOut = keepOutOf(drawing, box);
+ if (keepOut.bottom > linesBottom() + TOLERANCE) throw new Unsupported("a table that text flows around going past the bottom of the page");
+ placeDrawings([{
+ line: 0,
+ item: -1,
+ drawing: {
+ drawing,
+ box,
+ keepOut,
+ anchor: `${one} table`
+ },
+ table
+ }]);
+ placeFloatingRows(table, box.top);
+ leftBehind.add(one);
+ }
+ };
+ /**
* Whether a block is the empty paragraph that ends a section and takes a line. Word gives it a line of its own right
* after a table, as there is no line of a paragraph before it for its mark to go on (`word-header-columns.docx` H1 to
* H4, H7 and H8), where LibreOffice gives it no room, and with text frames anchored in it, as after a frame
@@ -40145,11 +40423,13 @@ var docxLayout = (function(exports) {
inlineFloats(floatsFrom(index), unknown);
}
if (block.type === "table") {
- if (placeBeforeTable(block, index) && keptOn === void 0) keptOn = {
+ var _block$anchored2;
+ const framed = ((_block$anchored2 = block.anchored) !== null && _block$anchored2 !== void 0 ? _block$anchored2 : []).some((item) => item.type === "drawing");
+ if (placeBeforeTable(block, index) && framed && keptOn === void 0) keptOn = {
next: index,
page: pageCount,
column,
- reason: BEFORE_TABLE_MOVING_ON
+ reason: FRAME_BEFORE_TABLE_MOVING_ON
};
placeTable(block);
sectionSpaceAfter = void 0;
@@ -40161,7 +40441,8 @@ var docxLayout = (function(exports) {
if (paragraph.keepNext) {
const chain = blocks.slice(index, index + keptChain(index) + 1).map(({ block: one }) => one);
if (floatsAt(index + keptChain(index))) inlineFloats(floatsFrom(index + keptChain(index)), KEPT_FLOATING);
- const beside = besideDrawing() || chain.some((one) => one.type === "paragraph" && one.items.some(({ type }) => type === "drawing"));
+ const withFloating = chain.slice(0, -1).some((_, offset) => floatsBefore(index + offset).length > 0);
+ const beside = besideDrawing() || withFloating || chain.some((one) => one.type === "paragraph" && one.items.some(({ type }) => type === "drawing"));
/**
* What is kept together, from where the next line goes, broken into lines at the width of the column it goes in,
* with the footnotes held back from a paragraph kept with this one, which go below these lines too (`all`), and
@@ -40179,17 +40460,16 @@ var docxLayout = (function(exports) {
const anchor = blocks[index + keptChain(index)].block;
const anchorTaller = anchor.type === "paragraph" ? columnsTallerThan(anchor) : [];
const tallAnchor = anchorTaller.length > 0 && anchorTaller.every((tall) => tall);
- const withFloating = chain.slice(0, -1).some((_, offset) => floatsBefore(index + offset).length > 0);
- const unmeasured = withFloating || beside && (anchor.type === "table" || chain.slice(0, -1).some((one) => one.type === "paragraph" && one.items.some(({ type }) => type === "drawing")));
- const reason = withFloating ? KEPT_WITH_FLOATING : KEPT_BESIDE;
- if (unmeasured && tallAnchor) stopAt(reason);
+ const ownDrawings = chain.slice(0, -1).flatMap((one) => one.items.flatMap((item) => item.type === "drawing" ? [item.drawing] : []));
+ const unmeasured = beside && (anchor.type === "table" || ownDrawings.some(({ wrap }) => wrap === "topAndBottom"));
+ if (unmeasured && tallAnchor) stopAt(KEPT_BESIDE);
else if (unmeasured) {
placeParagraph(block, paragraph, false);
keptOn = {
next: index + 1,
page: pageCount,
column,
- reason
+ reason: KEPT_BESIDE
};
sectionSpaceAfter = void 0;
return;
@@ -40201,8 +40481,11 @@ var docxLayout = (function(exports) {
const fitsHere = here.fitsWith(leastNoteRoom(here.all));
const { columns } = columnsSection();
const fitsBelow = (from, area, below) => fitsAbove(from, keptHeight(index, below), Math.min(bottom, pageBottom - area), area > 0 || here.notes.length > 0);
- if (!fitsHere && column + 1 < columns.length && fitsBelow(columnTop, noteArea + moreNoteRoom(here.notes), columns[column + 1])) nextColumn();
- else if (!fitsHere && fitsBelow(top, leastAreaOf(here.notes, carried, columns.length > 1 ? columns : void 0), columns[0])) startPage();
+ const toNextColumn = !fitsHere && column + 1 < columns.length && fitsBelow(columnTop, noteArea + moreNoteRoom(here.notes), columns[column + 1]);
+ const toNextPage = !fitsHere && !toNextColumn && fitsBelow(top, leastAreaOf(here.notes, carried, columns.length > 1 ? columns : void 0), columns[0]);
+ if ((toNextColumn || toNextPage) && withFloating) leaveFloats(index, paragraph);
+ if (toNextColumn) nextColumn();
+ else if (toNextPage) startPage();
}
const { notes, kept, keptWith, keptLines, all, fitsWith } = keptHere();
holdNotes = !(keptWith === "part" && keptLines === void 0) && keptWith !== "nothing" && [...held, ...kept].length > 0 && notes.length === kept.length && fitsWith(leastNoteRoom(all)) && !fitsWith(moreNoteRoom(all));
diff --git a/usage/layout.md b/usage/layout.md
index 86425b9ab4..0ec3026e63 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -208,10 +208,10 @@ The pages are laid out with the widths and heights of the characters of the font
- footnotes, which take room at the bottom of the page their reference is on, and endnotes, which follow the text. A footnote that doesn't fit below its reference continues at the bottom of the next page, as Word continues it: it breaks between its paragraphs and table rows, and inside a paragraph keeping to its widow and orphan control, and its reference's line moves to the next page with it when too little of it would stay. A first paragraph kept together, or kept with the next, stays with its reference whole, with the first lines of what it is kept with. A footnote breaks before a later paragraph kept together, and before paragraphs kept with the next with what they are kept with, as the text does, unless they start its part on the page, which would leave none of it, where it breaks as without them, as the text does at the top of a page. It breaks before a table row whose lines widow control keeps together, and in a row whose lines could go on both pages, between its cells' lines, as a row of the text breaks, with the rest of the row at the top of the next page's footnotes, as Word breaks it. A footnote or endnote that ends with a table has a line below it for the empty paragraph Word puts after the table. A table's header rows aren't repeated above the rest of a footnote on the next page, nor left alone at the bottom of a page, as the table goes on the next page then. The footnote of a line kept with a longer paragraph goes below the first lines of it that the line is kept with, and of one kept with a table, below its first row, and the rest goes on the next page. One longer than a page fills the pages after it, and the text goes on above its end. Before the next section, whether it starts on a new page or not, and before a paragraph with a page break before it, the rest of a footnote goes on pages of its own, which belong to the section its reference is in, and the new section or paragraph starts after them. Before a continuous section numbered afresh, Word numbers each of those pages with the section's first number, and so does `docx/layout`. Before a continuous section, the number of pages of the section the footnote is in isn't worked out, as Word counts it its own way, and the next section's is its own pages, as Word counts them. A line whose footnote can't go on a page with it, such as one that starts with a paragraph kept together that is taller than a page, goes at the top of a page, with the text after it, and the footnote starts on the next page, with those referred to after it after it. A table row refers to footnotes as a line does: it moves to the next page with a footnote that doesn't fit below it, and one that breaks across pages has each line's footnote on the page the line is on, and breaks after a line whose footnote continues. Where its footnotes fit whole below fewer of its lines, with the lines that refer to them, it breaks there instead, as Word breaks a row with a table in a cell beside a line whose footnote would otherwise continue. In columns, the footnotes of a page are laid out in the columns too, as Word lays them out: one after the other from the first column, evened out, each part broken at the width of the column it is in, and every column ends above them. Footnotes from another section on the page go on in the columns of its first footnote's. A line or table row in columns whose footnotes don't fit below it moves to the next column, or the next page, with all of them, as Word moves it, and the page is left as it was when a reference moves on as its columns are laid out again for its footnote. At the top of the page's columns, or of the column a section starts in after the section before's, a line stays, and its footnote goes on the page as far as it fits below the lines of every column, with the text going on above it, and continues at the foot of the next page's columns. At the top of a later column, the columns before it are laid out again above as much of the footnote as leaves the line on the page, as Word lays them out: a footnote of 120 lines referred to from line 11 of the first of 2 columns takes 44 lines of each, the columns above it 6, and its reference goes on in the second. The separator above the endnotes goes on the page of their first line, and on each page after the first they are on, the continuation separator is above them, as Word puts them. Each is a line of its paragraph style's text tall, at single spacing, whatever its own spacing, line spacing and size, as Word lays them out. A footnote's paragraph borders take room as in the text. Below the continuation separator, as many lines of endnotes go on the page as fit on it without it, so the last can go past the bottom margin by as much as the separator takes, as Word puts them. Footnotes and endnotes are numbered as Word numbers them, 1, 2, 3 and i, ii, iii, or in the format and from the number a document or its sections give, afresh in each section when they say so, and footnotes afresh on each page. A section's own start number adds to the number of notes before it, as Word adds it: after 27 footnotes, a section numbered from 5 numbers its first 32. A footnote with a mark of its own in place of its number isn't counted, and a section's footnotes can go just below the text of their page, rather than at its bottom, as Word puts them. Word puts the endnotes of a section that says they go at the end of it at the end of the document, unless the document's settings say so too, and so does `docx/layout`
- run formatting that changes how much room text takes, as Word lays it out. Superscript and subscript (`superScript`, `subScript`) are drawn at 65% of the text's size, to the nearest half-point and down from a quarter, so 7 points at 11 and 9.5 at 15, and small capitals (`smallCaps`) at 80%, so 9 points at 11; both take up the line of their run's own size, so they never make a line taller. Raised and lowered text (`position`) raises the line's top or lowers its bottom by as much as it goes past the rest of the line: a word raised 6 points makes a line of Calibri 11 120 twips taller, and a smaller word raised a little none. Emphasis marks (`emphasisMark`) take a quarter of their line, over it, or under it for dots below, and both on a line with marks over and under it, with a picture in the line counted in it; line spacing that gives a line less room than a quarter of it adds it below the marks' room, and spacing that gives it at least that, such as 1.25 lines, holds the marks, and spacing of less than a line makes the line and the marks' room that share of themselves. A border around text (`border` on a `TextRun`) takes its space and its width on each side of the text, and above and below it, as wide as a paragraph's border of its style, an art border its size in points, and a space past 31 points only what is left over 32: two runs next to each other with the same border are in one box, a box that goes on to the next line starts again there, also in a word broken across lines, and a line keeps room for its box to end after its last word. Two lines in one (`w:eastAsianLayout` with `w:combine`) of text that isn't Chinese, Japanese or Korean is drawn at half its size on one row, as Word draws it
- pictures in the line, which stand on the baseline, so a line with text in it is as tall as the picture and the text below the baseline, as Word makes it. A line with a picture is at least as tall as a line of the picture's run's font, and its multiple line spacing adds a share of that, as Word's does. A line of only a picture isn't as tall as a larger paragraph mark, at single spacing
-- pictures, shapes and charts that text wraps around (`floating` with a `wrap`), as Word lays the text out around them. A line beside a drawing has the room beside it, with the drawing's distances from the text (`margins`) and the room its effects take, such as a shape's line or shadow, and a line with no room beside it goes below it. Square, tight and through wrapping put the text beside the drawing's box, on the side or sides its wrapping's `side` says, the left first, and Word puts as many words in the room on a side as fit there, and none when the next word doesn't fit, nor in a room narrower than 18 points where the line has a wider one. Top and bottom wrapping puts the lines below the drawing. Drawings that overlap keep the text out of all their room. A drawing in a margin, where there is no text, leaves the lines as they are. A line beside a drawing starts at the drawing's edge or the paragraph's left indent, whichever is further in, and its first line is indented from there. A drawing is placed against the page, its margins, the column, or the paragraph or line it is anchored in, as its `horizontalPosition` and `verticalPosition` say: at an offset, which places the drawing without its effects, lined up with them, with its effects, or at a percentage of them, as `docx/shapes` places shapes, and its percentage sizes are a share of the page or its margins: the inside and outside margins are those it is placed against on its page. Lined up inside or outside, it is lined up with the margins. One placed by its simple position is placed from the page's top left corner by that. Placed against its paragraph, it is at the top of the paragraph, below the space after the paragraph before, which is that paragraph's, and above its own space before, and no higher than the top of the page's text. Where it would go past the bottom of the page's text, the paragraph moves to the next column or page with it, above footnotes too, and a paragraph whose first line goes below a drawing with top and bottom wrapping keeps its own space before above that line. Placed against its line, it is at the line its anchor is on before the text goes round it, though the text going round it can move the anchor on to the next line. One anchored in a line that goes on to the next page goes there with it, against the top of the paragraph's part on that page. The text before a drawing's paragraph on its page goes round it too, as Word lays the page out again with it, and the drawing stays where it was first placed, though its paragraph moves down: with top and bottom wrapping, the lines before it that its distance above it reaches go below it. Where that moves the paragraph on to the next page, it starts there with the drawing, and the page is laid out again without it. Of two drawings that may not overlap (`allowOverlap: false`), the later is moved out of the way across the page, at the height it was placed at: to the right of the other, their boxes side by side, or to the left of it when it is lined up at the right. A table that fits beside a drawing at its indent goes beside it, as does one that fits past a drawing on its left, with its indent from there, and one that doesn't fit goes below it; one sized to its text goes beside it as wide as it is in the column. Paragraphs kept with the next are kept with as many of the next paragraph's lines beside a drawing as they would be without it, and move to the next page with a paragraph that moves there with its drawing. Those with drawings of their own, or kept with a table, stay where they are when the next starts on their page. Columns are evened out with the drawings in them. A turned picture wraps the text around its box as it is before it is turned. A drawing that text wraps around in a header or footer, placed against the page or its margins, is on each page that shows the header or footer, and the body's text goes round it as round its own, as Word lays it out. Drawings behind or in front of the text don't move the body's lines
-- tables that text wraps around (a table's `float`), as Word lays the text out around them: the text after the table goes beside it, as beside a picture with square wrapping, kept from it by its distances from the text (`leftFromText`, `rightFromText`, `topFromText` and `bottomFromText`). A table is placed across against the page, its margins or the column (`horizontalAnchor`), and down against the page, its margins or the top of the paragraph after it (`verticalAnchor`), at a distance (`absoluteHorizontalPosition`, `absoluteVerticalPosition`) or lined up with them (`relativeHorizontalPosition`, `relativeVerticalPosition`). Without `horizontalAnchor` or `verticalAnchor`, it is placed against the margins, and lined up inline against the text (`RelativeVerticalPosition.INLINE`), it is at the top of the paragraph after it. Its room is as wide as its rows with the halves of its borders left and right, on one side or both, or 0.75 points wider than its rows without any borders, and as tall as its rows, and its indent doesn't move it. It is below the space after the paragraph before, and the paragraph after it has all of its space before below that, as after a table. It is placed against the top of what comes after it: a paragraph, the empty paragraph that ends its section, which takes a line after it then, and whose next section on the page goes round it too, a table, or the empty paragraph Word adds after it at the end of the document. Tables one after the other before a paragraph each go round it, and the paragraphs after it go round it too while they are beside it. Its footnotes are on its page. Of two that may not overlap (`overlap: OverlapType.NEVER`), the later moves to the right until the room it keeps the text out of is beside the other's. One that goes past the bottom of the page is broken between its rows: those that fit stay where it was placed, the rest go at the top of the next pages, and the paragraph after it starts beside its last rows. One in a footnote is laid out in the note's text, as a table that doesn't float
-- text frames (a paragraph's `frame`) and drop caps, as Word lays them out: the paragraph is taken out of the text and put in a box of its own, which the paragraph after it is anchored in, and the text goes round the box as it goes round a picture with square wrapping. The box is placed against the page, its margins, the column, or the paragraph after it, at the place or lined up as `position` or `alignment` says, and its `space` keeps the text from it, `horizontal` left and right and `vertical` above and below. It is as wide as `width`, or its text when it has none, and as tall as `height` exactly with the rule `HeightRule.EXACT`, its text with `HeightRule.AUTO`, and at least `height` otherwise, as Word takes a height with no rule. Paragraphs next to each other with the same frame are in one box, with the space before the first and after the last in it. With `wrap` none, the box is in front of the text and takes no room, and with not beside, the text goes above and below it; around, tight, through and auto are all around it. A drop cap is a frame like any other, as wide as its letter, and the lines of the next paragraph beside it are those its box is beside, as Word lays it out. One that doesn't say what it is placed against (`w:hAnchor`, `w:vAnchor`, which docx always writes) is placed against the margins, and one lined up inline down the margins is at their top. Its borders take no room from its text across it, but keep the text beside it 1.5 points further than their width and space, and those above and below are in its box, as a paragraph's are. A frame with no paragraph after it, before a table or the end of its section, is anchored at the table's top, or in the empty paragraph that ends the section, which takes a line then. A paragraph's own frame that gives all its style's does is its frame. The bookmarks, fields and notes in a frame are on its anchor's page, and in a footnote, a frame's paragraph is laid out in the note's text. The text in frames isn't among the lines of `layoutDocument`'s pages
-- VML drawings (`w:pict`), as Word lays them out. A text box (`Textbox`) in the line is sized to its text, as Word sizes it whatever `height` it has: its paragraphs, broken in its `width` less 0.2 inches for the room between its edges and its text, with 0.1 inches above and below them and 0.72 points more, and its outline, which takes 0.72 points across and down, or none when it is hidden. It stands on the baseline, as a picture does. A text box placed on the page (`position: "absolute"`) takes no room, as Word puts it in front of the text, as do docx's watermarks. In [templates](#templates), a shape in the line without an outline is a box of its size, and one placed on the page with square or top and bottom wrapping (`w10:wrap`) is laid out as a picture with that wrapping, with VML's distances from the text, 9 points left and right, where it gives none
+- pictures, shapes and charts that text wraps around (`floating` with a `wrap`), as Word lays the text out around them. A line beside a drawing has the room beside it, with the drawing's distances from the text (`margins`) and the room its effects take, such as a shape's line or shadow, and a line with no room beside it goes below it. Square, tight and through wrapping put the text beside the drawing's box, on the side or sides its wrapping's `side` says, the left first, and Word puts as many words in the room on a side as fit there, and none when the next word doesn't fit, nor in a room narrower than 18 points, so a line with no wider room goes below the drawing. Top and bottom wrapping puts the lines below the drawing. Drawings that overlap keep the text out of all their room. A drawing in a margin, where there is no text, leaves the lines as they are. A line beside a drawing starts at the drawing's edge or the paragraph's left indent, whichever is further in, and its first line is indented from there. A drawing is placed against the page, its margins, the column, or the paragraph or line it is anchored in, as its `horizontalPosition` and `verticalPosition` say: at an offset, which places the drawing without its effects, lined up with them, with its effects, or at a percentage of them, as `docx/shapes` places shapes, and its percentage sizes are a share of the page or its margins: the inside and outside margins are those it is placed against on its page. Lined up inside or outside against the margins, it is lined up with them, and against the page, down it, it is at the top of the page, inside on odd pages and outside on even ones, half the header's distance from the page's top below it, and at the bottom otherwise, half the footer's distance above it. One placed by its simple position is placed from the page's top left corner by that. Placed against its paragraph, it is at the top of the paragraph, below the space after the paragraph before, which is that paragraph's, and above its own space before, and no higher than the top of the page's text. Where it would go past the bottom of the page's text, the paragraph moves to the next column or page with it, above footnotes too, and a paragraph whose first line goes below a drawing with top and bottom wrapping keeps its own space before above that line. Placed against its line, it is at the line its anchor is on before the text goes round it, though the text going round it can move the anchor on to the next line. One anchored in a line that goes on to the next page goes there with it, against the top of the paragraph's part on that page. The text before a drawing's paragraph on its page goes round it too, as Word lays the page out again with it, and the drawing stays where it was first placed, though its paragraph moves down: with top and bottom wrapping, the lines before it that its distance above it reaches go below it. Where that moves the paragraph on to the next page, it starts there with the drawing, and the page is laid out again without it. Of two drawings that may not overlap (`allowOverlap: false`), the later is moved out of the way across the page, at the height it was placed at: to the right of the other, their boxes side by side, or to the left of it when it is lined up at the right. A table that fits beside a drawing at its indent goes beside it, as does one that fits past a drawing on its left, with its indent from there, and one that doesn't fit goes below it; one sized to its text goes beside it as wide as it is in the column. Paragraphs kept with the next are kept with as many of the next paragraph's lines beside a drawing as they would be without it, and move to the next page with a paragraph that moves there with its drawing. Those with drawings of their own move to the next page with the next, and their drawings with them, and those kept with a table stay where they are when the next starts on their page. Columns are evened out with the drawings in them. A turned picture wraps the text around its box as it is before it is turned. A drawing that text wraps around in a header or footer, placed against the page or its margins, is on each page that shows the header or footer, and the body's text goes round it as round its own, as Word lays it out. Drawings behind or in front of the text don't move the body's lines. A drawing beside the page's footnotes leaves their lines as they are
+- tables that text wraps around (a table's `float`), as Word lays the text out around them: the text after the table goes beside it, as beside a picture with square wrapping, kept from it by its distances from the text (`leftFromText`, `rightFromText`, `topFromText` and `bottomFromText`). A table is placed across against the page, its margins or the column (`horizontalAnchor`), and down against the page, its margins or the top of the paragraph after it (`verticalAnchor`), at a distance (`absoluteHorizontalPosition`, `absoluteVerticalPosition`) or lined up with them (`relativeHorizontalPosition`, `relativeVerticalPosition`). Without `horizontalAnchor` it is placed against the column, and without `verticalAnchor` against the margins, and lined up inline against the text (`RelativeVerticalPosition.INLINE`), it is at the top of the paragraph after it. Its room is as wide as its rows with the halves of its borders left and right, on one side or both, or 0.75 points wider than its rows without any borders, which borders between its rows alone count as, and as tall as its rows, and its indent doesn't move it. It is below the space after the paragraph before, and the paragraph after it has all of its space before below that, as after a table. It is placed against the top of what comes after it: a paragraph, the empty paragraph that ends its section, which takes a line after it then, and whose next section on the page goes round it too, a table, or the empty paragraph Word adds after it at the end of the document. Tables one after the other before a paragraph each go round it, and the paragraphs after it go round it too while they are beside it. Its footnotes are on its page. Of two that may not overlap (`overlap: OverlapType.NEVER`), the later moves to the right until the room it keeps the text out of is beside the other's, or to the left of the other when it has no room on the right, or is lined up at the right. One that goes past the bottom of the page is broken between its rows: those that fit stay where it was placed, the rest go at the top of the next pages, below its header rows, which go there again, and the paragraph after it starts beside its last rows. One in a footnote or an endnote is laid out in the note's text, as a table that doesn't float. One before a table that moves on to the next page stays where it was placed, as does one anchored in a paragraph kept with the next that moves on to the next page with the next
+- text frames (a paragraph's `frame`) and drop caps, as Word lays them out: the paragraph is taken out of the text and put in a box of its own, which the paragraph after it is anchored in, and the text goes round the box as it goes round a picture with square wrapping. The box is placed against the page, its margins, the column, or the paragraph after it, at the place or lined up as `position` or `alignment` says, and its `space` keeps the text from it, `horizontal` left and right and `vertical` above and below. It is as wide as `width`, or its text when it has none, and as tall as `height` exactly with the rule `HeightRule.EXACT`, its text with `HeightRule.AUTO`, and at least `height` otherwise, as Word takes a height with no rule. Paragraphs next to each other with the same frame are in one box, with the space before the first and after the last in it. With `wrap` none, the box is in front of the text and takes no room, and with not beside, the text goes above and below it; around, tight, through and auto are all around it. A drop cap is a frame like any other, as wide as its letter, and the lines of the next paragraph beside it are those its box is beside, as Word lays it out. One that doesn't say what it is placed against (`w:hAnchor`, `w:vAnchor`, which docx always writes) is placed against the column across the page and the margins down it, and one lined up inline down the margins is at their top. Its borders take no room from its text across it, but keep the text beside it 1.5 points further than their width and space, and its `space` further again, and those above and below are in its box, as a paragraph's are. A frame with no paragraph after it, before a table or the end of its section, is anchored at the table's top, or in the empty paragraph that ends the section, which takes a line then, and one placed against the paragraph after it before a table is placed against the table's top. A paragraph's own frame that gives all its style's does is its frame. The bookmarks, fields and notes in a frame are on its anchor's page, and in a footnote or an endnote, a frame's paragraph is laid out in the note's text. The text in frames isn't among the lines of `layoutDocument`'s pages
+- VML drawings (`w:pict`), as Word lays them out. A text box (`Textbox`) in the line is sized to its text, as Word sizes it whatever `height` it has: its paragraphs, broken in its `width` less its insets (0.1 inch left and right and 0.05 above and below, or its own) and its outline, with the insets above and below them and the outline's weight (0.72 points, or its own) inside the box and again in the line, or none when it is hidden or it has none. A line with a text box of another outline than Word's own, or of none, or one Word doesn't size to its text, which is as tall as its own height, is half a point taller again. It stands on the baseline, as a picture does, in a header or footer as in the text. A list in a text box is numbered from 1, apart from the text's lists, and a footnote referred to in a text box is left out, reference and note, as Word leaves it. A text box placed on the page (`position: "absolute"`) with no wrapping takes no room, as Word puts it in front of the text, as do docx's watermarks, and one with square wrapping (`wrapStyle`) is laid out as a picture with that wrapping, sized to its text, with VML's distances from the text, 9 points left and right, where it gives none, and its outline's room beside it: half its weight, in whole points, down on the left and up on the right. In [templates](#templates), a shape in the line is a box of its size and its outline's weight, a group of shapes a box of its size, one with no size 50 points square, and one placed on the page with square, tight, through or top and bottom wrapping is laid out as a picture with that wrapping, the text 1 point nearer on the right with tight or through wrapping. Lengths in pixels, or with no unit, are 96 to the inch, and a shape as wide as a share of the margins (`mso-width-percent`) is that wide. A shape that would go past the right edge of the page is moved back onto it. An embedded object (`w:object`) is a box of its picture's size
- equations (`Math`, and those `latexToMath` writes), as Word lays them out in Cambria Math, by the rules of the font's maths table: letters in italic, unless a run is plain (`style: "plain"`), or in the alphabet and style it gives, such as double-struck, script, fraktur, bold and bold italic; digits, operators and brackets upright, and digits in bold or bold italic as Unicode's bold digits, or double-struck, each as wide as Cambria Math draws it, with the spaces TeX puts between them, as Word puts them: 4 eighteenths of an em either side of a binary operator such as +, ×, ∪, ∩, ∧ or ⊕, 5 either side of a relation such as =, ≤, ∈, ⊂, ⇒ or ↦, 3 after punctuation such as a comma, after a function's name or a sum, before a sum or a function after a letter or digit, and beside a fraction next to a letter, a digit, punctuation or another fraction, and none beside brackets, bars and slashes, or after ∀ or ¬. A plus or minus sign at the start, or after an operator, a relation, an opening bracket or punctuation, or before a relation, is unary, with no space, and one after a unary one is binary. Word's italic correction is added after an italic letter, unless a letter, a digit or another ordinary character follows it. Fractions, superscripts and subscripts, roots, sums and integrals with their limits, brackets that grow, matrices and cases, accents, bars, functions and limits, braces, boxes (`MathBorderBox`), equation arrays lined up at an ampersand in each row, and phantoms are built up as Word builds them up: in a line of text, a fraction's numerator and denominator, and scripts, are smaller (73% of the equation's size, and 60% for a script's script, rounded down to the half point), and a sum's limits are beside it; displayed, a fraction keeps its size, a script's or the equation's, and a sum is larger, with its limits under and over it, or beside it as the document's maths settings say (`m:naryLim`, `m:intLim`). A matrix's or an equation array's rows are a line apart, or further where they are too tall for that. An equation is in its paragraph's style's size, or its runs' own, and takes room in its line as text in Cambria Math does, or as far as its ink goes above and below its baseline, with the font's line gap above it, whichever is further, so a line of it beside text is as tall as the tallest ascent and the deepest descent of both. One alone in its paragraph is displayed, on a line of its own, centred, and an equation displayed (`m:oMathPara`) beside text, or alone after its list's number, is in the line, built up as in a line of text. Bold and spaced-out text in an equation (`w:b`, `w:spacing`) is laid out as Word does, as it is without them
- tracked changes, as Word lays them out with its markup in balloons beside the page, or in Simple Markup. Deleted text (`DeletedTextRun`), and deleted pictures, tabs and breaks, take no room, nor does text moved elsewhere, and inserted text (`InsertedTextRun`) does. A paragraph whose mark is deleted (`run: { deletion }`), or moved elsewhere, is joined to the next, all in the next one's formatting, style and list, one at the end of a content control to the paragraph after it, and a section whose break is deleted goes on into the next, on its pages, numbered and with headers and footers as the next one's are. A paragraph with no paragraph after it to join, before a table or at the end of a table cell or of the document, stays as it is, and the document's last paragraph keeps its section break and takes a line. A footnote or endnote whose reference is deleted or moved elsewhere isn't laid out, but Word still counts it, so the notes after it keep their numbers, and so it counts those a deleted table row refers to. A deleted table row (`TableRow`'s `deletion`) takes no room, nor does the space between cells around it, and the rows around it have one border between them, which is the deleted row's own when it has borders of its own, or, with space between cells, each their own, as without it. Nor does a table all of whose rows are deleted take room. A table style's formatting for the first and last rows and for bands of rows goes by each row's place among all the rows, the deleted ones too, so with the first row deleted the second isn't formatted as the first. Word still sizes the columns of a table to their text, or widens them for long words, by its deleted rows, and by deleted text, pictures, tabs, breaks, note references and paragraph marks, as they are written, though the lines are laid out without them. Deleted and inserted cells, comments and changes of formatting don't move the lines. A document that asks Word to hide its insertions and deletions, or its markup (`w:revisionView`), is laid out the same, as Word for Mac opens it in its own view
- tables, with their columns' widths (`columnWidths`, or their cells' widths), their rows' heights, cell margins and borders. The columns of a table given no widths are sized to their text, as Word sizes them: each as wide as its longest line, or narrower when they don't all fit, but never narrower than its longest word, and a column whose cells give it a width keeps it. A cell merged across columns (`columnSpan`) widens them where its longest line needs more room, each in proportion to how wide it is, and a table in a cell counts as wide as its columns. In a table whose cells all have widths, a column with a word longer than its cells give it is widened to fit the word, and the other columns are narrowed to make room, as Word does, unless the table's layout is fixed. A table with a width of its own in twips is fitted to it, as Word fits it: when its columns are narrower, they are widened in proportion, and when they are wider, they are narrowed toward their longest words, or, when its layout is fixed, whatever is in them, each by the same share of the room for its text. When a word is longer than the table, its column is as wide as the word, and the table goes past the margin. Without a width of its own in twips, or with all of the width, a table whose columns' longest words don't fit in the room has each column narrowed to a share of it in proportion to its longest word, whatever width its cells give it, and the words break across lines, as Word breaks them. Where the rows of a table give a column different widths, each column is as wide as the widest a row gives it, and a cell merged across columns that is wider than they are widens the last of them, before they are fitted to the table's width, or, without one, narrowed to the room, unless its layout is fixed. A word in a cell merged across columns that is longer than they are wide is shared among them in proportion to each column's longest word and its longest line, or its width, added together, as Word shares it, and those columns keep its width when the others are narrowed. A long word with more text beside it widens them as its line does. Rows break across pages between the lines of their cells, as Word breaks them, keeping to widow and orphan control and lines kept together, and with room on the page for the space after a cell's paragraph that ends there. They move to the next page whole when a cell would have none of its lines on the page, when they are kept whole (`cantSplit`), and when the page hasn't room for the height they are set to. A row kept whole, or whose paragraph is kept together, that is taller than a page moves to a new page and breaks there as other rows do, and a row set to a height taller than a page takes a page of its own, cut off at its bottom, as Word lays them out. A cell merged down from such a row has its text in it, and the row's footnote starts at the bottom of the next page. A row set to at least a height taller than a page, whose text is taller than a page too, breaks where its text does, and each part of it fills its page. In columns, a row kept whole that is taller than a column goes down only the first column of each page, from the top of a new page unless it is at the top of this one, as a paragraph kept together does. Where a table breaks across pages, Word draws its bottom border below the last of it on the page, which takes room there too, or its cells' own bottom borders. Header rows are repeated at the top of each page and column a table is on, and they aren't left alone at the foot of a page: when none of the row after them goes there, as it is kept whole, kept with the next or set to a height, they go on to the next page with it, as Word moves them. The text of a cell merged down rows (`verticalMerge`) goes down from below the border above its first row across the others, to above the border below the last, and makes the last of them taller when it needs the room. Where one of its rows breaks across pages, its text breaks with the row, as far down the page as its lines go, keeping to widow control, as Word breaks it, and the rest of it goes on from the top of its rows on the next page, and on across the pages after when it breaks in the last of them. A table in a cell breaks with its row, between its own rows and in them between the lines of their cells, as Word breaks it: as a table in the text breaks, keeping to widow control, with its bottom border below the last of it on the page and its cells' margins around their lines on each page, and with its rows kept whole, or of a set height, moving to the next page whole. On the next page, Word draws its top border above the rest of it, and doesn't repeat its header rows. A table in a cell merged down rows breaks as one in a cell of a row, and so does one with cells merged down its rows whose text is in their first rows. An empty paragraph that ends a cell after a table in it takes no room, as Word lays it out
@@ -224,10 +224,10 @@ The pages are laid out with the widths and heights of the characters of the font
It stops at the first thing it can't lay out yet, and the page numbers of the headings and bookmarks after it are left blank, until the fields are updated in Word (see [Opening the document in Word](#opening-the-document-in-word)):
-- a table that text wraps around (a table's `float`) where Word's way with it hasn't been seen: one in a table cell, a header, a footer or an endnote, one placed without `horizontalAnchor` in columns, or lined up inline against anything but the text, one with borders between its rows only, one with a footnote in it before a table, one after a paragraph kept with the next, one anchored in a paragraph kept with the next that starts elsewhere than the next, one before a table that goes past the top or bottom of the page's text, or whose table moves on to the next page, two that may not overlap and do, where one may, or with no room beside, and one going past the bottom of the page with header rows, footnotes, a distance from the text above or below it, a row of more than one line that would go on to the next page, a row taller than a page, or in columns
-- a text frame where Word's way with it hasn't been seen: one in a header, footer, table cell, endnote or text box, one at the end of the document or whose own paragraph ends its section, one before a table that text wraps around, one placed against the paragraph after it before a table, one with a footnote or endnote in it before a table, one before a table that moves on to the next page, one whose paragraph gives it less of a frame than its style does, one with borders beside it and `space` too, or paragraphs with other borders beside them, one with a shadowed border as tall as its text, one that doesn't say what it is placed against across the page (`w:hAnchor`) in columns, and one placed against something other than the page, the margins, the column and the paragraph, or lined up inline other than down the margins
-- a VML drawing where Word's way with it hasn't been seen: a text box whose line would break differently in 0.72 points more or less room, one not sized to its text, with insets or an outline of its own, with a footnote, a list or a drawing in it, in a header or footer, or placed on the page with wrapping; a picture (`v:imagedata`), which Word draws at a size other than its own, a shape in the line with an outline, one placed on the page with tight or through wrapping or an outline, or in a header or footer against its paragraph or line, a shape sized in ems or a share, one turned, and an embedded object (`w:object`)
-- a picture, shape or chart that text wraps around where Word's way with it hasn't been seen: drawings that may not overlap (`allowOverlap: false`) and do, where the first may not and the second may, one is lined up otherwise than at the right or has effects, or one would be moved past its column, one in a table cell, a footnote or an endnote, one in a header or footer placed against its paragraph, its line or where its anchor is along its line, against a column of a section of several, beside the header's or footer's own text, or on a page of text that runs down it, one beside a table sized to its text that would be narrower in the room beside it, or beside a table with an indent out of its column that it would move to the right, one beside paragraphs kept with the next that have drawings of their own or are kept with a table, where the next starts elsewhere, one in columns evened out after being laid out again for a drawing beside text before it, one beside the footnotes at the bottom of a page, and one beside the text of a section before it on its page, which Word lays out again around it. So does one placed against where its anchor is along its line (`HorizontalPositionRelativeFrom.CHARACTER`), one lined up inside or outside against anything but the margins, as Word puts one against the page lower than its top, one that would go above the page's text with a distance from the text above it, and one that would go past the bottom of the page's text at the top of a page or a column, or only by its distance from the text below it. So does a line whose only room beside a drawing is narrower than 18 points, one whose anchor's page changes as the text goes round it, a page whose text going round a table that text wraps around moves the table's paragraph to the next page, or that has to be laid out again for its drawings more than 5 times
+- a table that text wraps around (a table's `float`) where Word's way with it hasn't been seen: one in a table cell, a header or a footer, one lined up inline against anything but the text, one with a footnote in it before a table, one after a paragraph kept with the next, one before a table that goes past the top or bottom of the page's text, two that may not overlap and do, where one may, or lined up at the centre, or with no room on either side, and one going past the bottom of the page with footnotes, a distance from the text above it, a row of more than one line that would go on to the next page, which Word splits as a row of a table it doesn't flow around, a row taller than a page, or in columns
+- a text frame where Word's way with it hasn't been seen: one in a header, footer, table cell or text box, one at the end of the document or whose own paragraph ends its section, one before a table that text wraps around, one with a footnote or endnote in it before a table, one before a table that moves on to the next page, one whose paragraph gives it less of a frame than its style does, one of paragraphs with other borders beside them, one with a shadowed border as tall as its text, and one placed against something other than the page, the margins, the column and the paragraph, or lined up inline other than down the margins
+- a VML drawing where Word's way with it hasn't been seen: a text box whose text is taller than it, one with an endnote, a drawing or a text box in it, or a list with paragraphs of its list before it, in the text or in another text box, a footnote after one left out of a text box, a text box that text flows around not sized to its text or with a table in it, and a text box in a text box, which Word wouldn't open; a picture (`v:imagedata`) that isn't an object's, which Word draws at a size other than its own; a shape with a width but no height, or a height but no width, a group of shapes with an outline, or that text flows around, a shape sized in ems or by a share of what isn't the margins, one turned, one wrapped tightly round a polygon of its own, one placed by both its `left` and its `margin-left`, one that would go past an edge of the page other than its right edge, and an embedded object without a shape or a size
+- a picture, shape or chart that text wraps around where Word's way with it hasn't been seen: drawings that may not overlap (`allowOverlap: false`) and do, where the first may not and the second may, one is lined up otherwise than at the right or has effects, or one would be moved past its column, one in a table cell, a footnote or an endnote, one in a header or footer placed against its paragraph, its line or where its anchor is along its line, against a column of a section of several, beside the header's or footer's own text, or on a page of text that runs down it, one beside a table sized to its text that would be narrower in the room beside it, or beside a table with an indent out of its column that it would move to the right, one beside paragraphs kept with the next that are kept with a table, or have drawings of their own the text goes above and below, where the next starts elsewhere, one in columns evened out after being laid out again for a drawing beside text before it, and one beside the text of a section before it on its page, which Word lays out again around it. So does one placed against where its anchor is along its line (`HorizontalPositionRelativeFrom.CHARACTER`), one lined up inside or outside against anything but the margins, or the page down it, one that would go above the page's text with a distance from the text above it, and one that would go past the bottom of the page's text at the top of a page or a column, or only by its distance from the text below it. So does a line whose anchor's page changes as the text goes round it, a page whose text going round a table that text wraps around moves the table's paragraph to the next page, or that has to be laid out again for its drawings more than 5 times
- an equation Word builds up where its way with it hasn't been seen: brackets, a root's sign, an accent or a brace whose size Word's probes leave between two of Cambria Math's sizes, a superscript in a sum's or limit's lower limit, a fraction, a sum or a function beside a bracket or bar, where Word may put a thin space, a sum in a script's script, a box with a side hidden or struck through, an equation array lined up other than at one ampersand in each row, or spaced otherwise, a phantom that takes less than its part's room, pre-scripts, skewed and linear fractions, a character Cambria Math has no sizes of grown over or under a part, or one such as an arrow over a part too narrow for it made of its parts, and an empty part, where Word shows a placeholder; normal text (`normalText`), which Word draws in the paragraph's font, whose ink the layout doesn't measure; a digit in an alphabet other than bold and double-struck; a symbol Word has been seen to draw only next to itself, such as some arrows and set operators, beside other atoms, and a character Cambria Math doesn't have; formatting other than bold, spacing and a size of its own; an equation that doesn't fit on its line, which Word breaks after an operator in a line of text, and before one when displayed, with the lines after the first indented; more than one equation alone in a paragraph; an equation outside a paragraph; and equations in a maths font other than Cambria Math, which Word draws in Cambria Math only where the computer doesn't have it, or whose document's maths settings make fractions small, and displayed equations whose document's maths settings give them margins (`m:lMargin`, `m:rMargin`), which Word breaks one too long for them within
- a footnote that continues on the next page where it would break in a table row across more than two pages, or in one with cells merged down rows, a table in a cell, text running up or down or a height of its own; one that starts with a table row that could break, none of which fits below its reference; a footnote or endnote that ends with a table, in a document whose Normal style and footnote or endnote text style differ; one that continues from a paragraph kept with a paragraph that starts a new page; one that starts on the page after its reference's, before a continuous section that starts on that page; a footnote line, or a line and the start of its footnote, taller than a page; and footnotes after one that starts on the page after its reference's that don't fit below its end
- endnotes after text in columns, which Word evens out above them, and in [templates](#templates), an endnote separator with text before its separator, or of more than a paragraph (Word leaves out the text after it)
The unique identifier for this abstract numbering definition.