diff --git a/api/classes/charts.ChartDataPatch.html b/api/classes/charts.ChartDataPatch.html
index 88581732fb..651df7ddf8 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 809d3be21b..3ff4a6ca65 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 2d9279a191..a0f5a1dbb9 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 92b831e6b4..cd18d86d93 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 310a780d33..c3051fd42e 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 11a9153100..08466f25a7 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 87191fbde3..6c103115cd 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 cfeedd6893..befaab2661 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 e01509c5e4..2f4473235a 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 5633e881a4..22a19ee3e4 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 d60ec23add..b12dc77455 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 9b822b57ac..15e1ad0365 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 107dd99a1b..33c9dd8176 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 56453b495c..6266a4edc9 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 4c2175e52d..944b1649e6 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 029173e382..e85b89f36e 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 559e036869..8878cd7500 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 0ad256c7f0..ce05c4a9f9 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 3a91fa3c4b..fc796eb0b5 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 9eecd3fcce..8cca8fc6ba 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 da79a71bf4..2588666a39 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 252ad48164..551a2d3c73 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 9b32635f67..c7764ad731 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 139b654aa6..2c2833dd3b 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 8a45645226..78f5e08ae7 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 f49b8a507c..ef4837b35f 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 f186365fde..9e0be01e58 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 1c81555a71..c0c191ec16 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 f945a3ae53..abf0060272 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 a2f3b068e3..c43b4ada3e 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 9149951309..3a9d5d5995 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 fa09ca7724..c66b0f7376 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 6b31c0c5fa..7a402d980c 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 893080aeae..fb15e4fa50 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 8b30b8b3af..590e4ab43a 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 27d8c333ce..36e5b1d4e1 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 de3d5baaa5..66b6a312b2 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 fa10965b43..4b2691924d 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 91a320e01d..a669b4487e 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 795ad43835..698504a830 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 21615deb2c..e338bf6343 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 eac4d4b222..8958109217 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 103d89c697..1c221c8b4d 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 5af7aa1f60..3a331145b0 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 8a47f531cd..82e0b2a934 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 4178bdaf59..afa0392209 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 5ef79d61d9..d55327dd5f 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 9f553552af..46f75bc7b9 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 878dbc3ebc..6b80fe9133 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 3499a5e983..1dcfa4ea9a 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 54df5c3f0e..599f6cce66 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 4c14a957e1..37e3bc0254 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 120b5cebcb..e6b80bbfa1 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 e351baae75..0f67b74f14 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 3b6022a3df..b5e88cc531 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 2242f4139b..d6cb4c79b2 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 fd5851f9af..a47a28e274 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 f75d5813b8..b15c907cc2 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 52f2ab0823..8ca485f6e1 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 6a45d08a5c..ef4658c359 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 463b3b8aa7..874e1f6cea 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 c0efcb10c9..f08ede8e74 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 e34a5df611..560585cbde 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 e931c85e42..8f5ac4c750 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 cb00448756..73b0cad328 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 d01ae6d293..80b1a2f791 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 f4311a82f1..f221e68548 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 cba39d8fcc..bda40ccefa 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 d76a3b7c7a..c0b62d376f 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 642d6fb282..b13f8f8b06 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 fe545c9e21..c10edabdbd 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 be86d97a00..cd8ac4abb0 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 9f8a1dd891..dc454b36d7 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 b5fa57385f..2cd03c1a33 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 a457668c05..10ed17d278 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 60c34f888d..7054d63c59 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 9516536bc5..070784cd45 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 66cbff7208..ebb55b19d2 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 8dcbf9c9f6..95075b0c87 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 a726b9e0a2..db16b3669c 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 b9babf4885..d7316d973f 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 035714ab69..56c32206c7 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 e9d8bfca92..42bc7829ae 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 4a586da3f6..9dbd8e2c99 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 e1f21c0c57..e294e496b8 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 189499a0a5..394f97e69c 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 8d3573170b..25f55e213d 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 194caf7d24..ee3ebb8df3 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 591031cf70..ccf59f23f3 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 f605446474..493578e537 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 f2380b4d28..3ccc51e353 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 0b281656fc..fa96c91ca3 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 ae3f13461d..415206aced 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 8497b2edd4..0f65ee7dcb 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 5edf347f65..f8768cd9f8 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 ef833dbe8d..c47613d243 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 352c26374f..3abecea779 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 827296e0ae..d60bce7ee8 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 56f8d6f4b4..ae25f0d196 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 6f06940ca3..4810cab0a8 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 6b249a9b81..3e621a9960 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 26eb41bcf1..a3c6833472 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 1c24c40f9b..b7a8a1a049 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 2aacaf92e0..e9332d3a6f 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 98ceeed5ba..d7d801e413 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 b234b7dcc0..08a526325b 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 b3d23cbbfd..1c188d950d 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 efcf5904dc..bc9f07c8a5 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 93495e7388..83eec5fd6f 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 79b952fdc2..784d9ba4d1 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 a2f63cd730..fc7f0e23f4 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 1969ba3a2f..e91df772d6 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 1cda30546d..48b1d1e9cd 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 b6d097fc9e..052ca0cb4b 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 70fbabb9d9..28c25f7031 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 8acdcfc93c..362824acbd 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 a1aef4f7ee..9031554248 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 5dcfe73640..d51d3ff6b1 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 44c15cd240..4aa6183c5b 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 6821dfdf32..3b26607ff3 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 f56e09f83a..35a05113a5 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 427fa12f06..bf4bb349c3 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 c24ccfd523..05b2ca5295 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 f365d5b38d..b20f341faa 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 f9d9e3dc6a..d69a1316c6 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 356f05c6dc..6fc0d63513 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 5f1283353d..830307bd13 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 f4cd902c2f..5319fd0d5b 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 cbcc479f62..a6105c5f6c 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 6e4c854ddf..b4aa391738 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 11826b0529..fc954411fa 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 47bb3d0ad9..73fe696bb9 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 f50a788c4b..ac6d3ef3a7 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 283c3d6a14..842c6807d8 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 2b077cf7e8..0dab03555e 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 46ab2f0e44..6718393d89 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 3d8396ee4f..91a45caedf 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 1dcb48289b..9377d12a7a 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 11fc87668a..b7490f0b48 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 4e82f6ce79..0bb861e358 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 ef1b0ee639..e74b3d54f5 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 2b72ab8f30..67382005af 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 ce7972f1d2..02bf76a8ee 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 cc70756f0e..a62b227f6f 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 78ba262562..3938937615 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 7145f335fe..a02fda2939 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 ca933d90bc..5e66938a76 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 92fa347cda..dcfa6821eb 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 b52f64ad4b..f414a85243 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 945b5e3d40..66a8b6187d 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 3e5eaa035d..8389dc3384 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 7b60e67876..1a98d0c80a 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 564964cd04..40f6df6ff7 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 4ccbe1b75f..691ca130c2 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 09d7513f29..1636be5be2 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 7ea5576631..75eae8d92c 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 e6695bbc5e..be2783e23d 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 0ab15c2e74..e62bf1331e 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 58f105a698..1e03502f4e 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 c5d72847d5..42af3b99bc 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 28cf1e24fc..b179a38626 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 3b0713fa44..833c25433a 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 feb4147211..1fcd9c947f 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 1168576b95..0b10358cd4 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 9e03982cb6..37c991e109 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 4ec90cac8d..762b5fb6fa 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 113dd771c9..2bd0126172 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 37c85f08fb..3259083cc7 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 409328f66f..41e8158e36 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 ba985b7665..5982106ef7 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 1cce6c6915..ff4791622c 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 d709af6a69..aac7ab911e 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 652d8db88c..6a30a85419 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 6486742984..2adbf3332c 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 dc9f6ec740..b7cda4a0bd 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 4a53536edd..bd6c1df017 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 7d26f2dc52..eb7a403d09 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 3b73749b29..98a082e01c 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 3cd1ce23c3..6374ec5ec6 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 22b73add42..9b8672174d 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 a8f278be29..5d607a3f50 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 666798b3ea..fec1f0073f 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 a960765826..56e9a551b7 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -7121,7 +7121,7 @@ var docxLayout = (function(exports) {
unknownShaping
};
var DEFAULT_TAB_STOP = 36;
- var TOLERANCE$1 = .01;
+ var TOLERANCE$2 = .01;
var HYPHEN_ROOM = 19.8 / 20;
var NO_HYPHEN_ROOM = 2.7 / 20;
var OLDER_PAGE_BREAK = "a page break at the end of a paragraph in a document in compatibility mode";
@@ -7441,7 +7441,7 @@ var docxLayout = (function(exports) {
height: marked,
unsupported: both ? "emphasis marks over and under text on one line with line spacing" : "emphasis marks on a line with a picture and line spacing"
};
- const single = Math.abs(natural - tallest) <= TOLERANCE$1;
+ const single = Math.abs(natural - tallest) <= TOLERANCE$2;
if (spacing.rule === "multiple" && spacing.multiple < 1) return single ? { height: marked * spacing.multiple } : {
height: marked,
unsupported: "emphasis marks on a line whose line spacing Word hasn't shown with them"
@@ -7451,9 +7451,9 @@ var docxLayout = (function(exports) {
height: marked,
unsupported: "emphasis marks on a line whose line spacing Word hasn't shown with them"
};
- const holds = extra >= room - TOLERANCE$1;
+ const holds = extra >= room - TOLERANCE$2;
const below = spacing.rule === "multiple" ? holds ? extra - room : extra : 0;
- return _objectSpread2({ height: natural + extra + (holds ? 0 : room) }, below > TOLERANCE$1 ? { spacingBelow: below } : {});
+ return _objectSpread2({ height: natural + extra + (holds ? 0 : room) }, below > TOLERANCE$2 ? { spacingBelow: below } : {});
};
/**
* How tall a line is, with the paragraph's line spacing, and how much of that multiple spacing adds below its text. Word
@@ -7463,7 +7463,7 @@ var docxLayout = (function(exports) {
var heightOf = (given, spacing) => {
const heights = withNumber(given);
const { ascent, descent, tallest, picture, marks } = heights;
- if (given.listNumber !== void 0 && !onlyNumber(given) && heights.ascent > given.ascent + TOLERANCE$1 && (spacing === null || spacing === void 0 ? void 0 : spacing.rule) === "multiple" && spacing.multiple !== 1) return {
+ if (given.listNumber !== void 0 && !onlyNumber(given) && heights.ascent > given.ascent + TOLERANCE$2 && (spacing === null || spacing === void 0 ? void 0 : spacing.rule) === "multiple" && spacing.multiple !== 1) return {
height: 0,
unsupported: "a list number taller than its line's text, with multiple line spacing"
};
@@ -7515,11 +7515,11 @@ var docxLayout = (function(exports) {
*/
var nextStop = (position, stops, defaultStop, limit) => {
var _stops$find;
- const stop = (_stops$find = stops.find((given) => given.position > position + TOLERANCE$1)) !== null && _stops$find !== void 0 ? _stops$find : {
- position: (Math.floor((position + TOLERANCE$1) / defaultStop) + 1) * defaultStop,
+ const stop = (_stops$find = stops.find((given) => given.position > position + TOLERANCE$2)) !== null && _stops$find !== void 0 ? _stops$find : {
+ position: (Math.floor((position + TOLERANCE$2) / defaultStop) + 1) * defaultStop,
alignment: "left"
};
- return stop.position > limit + TOLERANCE$1 ? void 0 : stop;
+ return stop.position > limit + TOLERANCE$2 ? void 0 : stop;
};
/**
* How wide tokens are, one after the other, with the room of the borders between them and the kerning before each, after
@@ -7660,12 +7660,12 @@ var docxLayout = (function(exports) {
* stop instead, which it hasn't shown: where the number ends at another stop, or at a left indent that isn't one.
*/
var numberTabStop = (position, stops, { indentLeft = 0, firstLineIndent = 0 }, defaultStop, limit) => {
- const stop = nextStop(position - 2 * TOLERANCE$1, stops, defaultStop, limit);
- const past = firstLineIndent !== 0 ? nextStop(position, stops, defaultStop, limit) : indentLeft <= limit + TOLERANCE$1 ? {
+ const stop = nextStop(position - 2 * TOLERANCE$2, stops, defaultStop, limit);
+ const past = firstLineIndent !== 0 ? nextStop(position, stops, defaultStop, limit) : indentLeft <= limit + TOLERANCE$2 ? {
position: indentLeft,
alignment: "left"
} : void 0;
- return (stop === void 0 || past === void 0 ? stop === past : Math.abs(stop.position - past.position) <= TOLERANCE$1) ? { stop } : {
+ return (stop === void 0 || past === void 0 ? stop === past : Math.abs(stop.position - past.position) <= TOLERANCE$2) ? { stop } : {
stop,
unsupported: "a tab after a list number aligned right, which Word hasn't been seen to move"
};
@@ -7737,7 +7737,7 @@ var docxLayout = (function(exports) {
return _objectSpread2({
min,
max
- }, min > whole + TOLERANCE$1 ? { hyphenated: true } : {});
+ }, min > whole + TOLERANCE$2 ? { hyphenated: true } : {});
};
/** What a character is next to another for the space a grid of lines and characters puts between them */
var kindOnGrid = (character) => isGridCharacter(character) ? "grid" : takesNoRoom(character) ? void 0 : new RegExp("\\p{L}", "u").test(character) ? "letter" : /\s/u.test(character) ? "space" : "other";
@@ -7840,7 +7840,7 @@ var docxLayout = (function(exports) {
latin
};
};
- const offCells = cell !== void 0 && [indentLeft, indentLeft + firstLineIndent].some((start) => Math.abs(start / cell - Math.round(start / cell)) > TOLERANCE$1 / cell);
+ const offCells = cell !== void 0 && [indentLeft, indentLeft + firstLineIndent].some((start) => Math.abs(start / cell - Math.round(start / cell)) > TOLERANCE$2 / cell);
const shapedOnGrid = (cell !== void 0 || characterSpace !== void 0) && items.some((item) => item.type === "text" && shaped(item.font) && item.font.snapToGrid !== false) ? "kerning or ligatures on a document grid of characters" : void 0;
const unknownOnGrid = offCells ? "an indent of part of a character on a grid that snaps to characters" : (_spaced$unsupported = spaced === null || spaced === void 0 ? void 0 : spaced.unsupported) !== null && _spaced$unsupported !== void 0 ? _spaced$unsupported : shapedOnGrid;
let markHeight;
@@ -7857,7 +7857,7 @@ var docxLayout = (function(exports) {
* multiple spacing Word's probes had the pictures' runs as large as the mark or larger (scripts/layout-probes/word-mixed-heights.ts
* MH3d, MH7)
*/
- const markMatters = ({ ascent, tallest, picture }) => picture > 0 && ascent === 0 && markLineHeight() > tallest + TOLERANCE$1 && (lineSpacing === null || lineSpacing === void 0 ? void 0 : lineSpacing.rule) === "multiple" && lineSpacing.multiple !== 1;
+ const markMatters = ({ ascent, tallest, picture }) => picture > 0 && ascent === 0 && markLineHeight() > tallest + TOLERANCE$2 && (lineSpacing === null || lineSpacing === void 0 ? void 0 : lineSpacing.rule) === "multiple" && lineSpacing.multiple !== 1;
/**
* Whether a line of only a list number is as tall as the number, or as the paragraph's mark, where they differ, which
* Word hasn't shown. The number is in the mark's formatting, but for what its list's level gives it
@@ -7869,7 +7869,7 @@ var docxLayout = (function(exports) {
"ascent",
"descent",
"tallest"
- ].some((part) => Math.abs(mark[part] - heights.listNumber[part]) > TOLERANCE$1);
+ ].some((part) => Math.abs(mark[part] - heights.listNumber[part]) > TOLERANCE$2);
};
/** The heights of a line with the text of the token on it too */
const withToken = (heights, token) => {
@@ -7932,7 +7932,7 @@ var docxLayout = (function(exports) {
* doesn't squeeze, takes no more (JU1a to JU1c)
*/
const squeezesIn = (state, tokenWidth) => {
- if (!squeezes || older || state.spaces - state.otherSpaces <= TOLERANCE$1) return false;
+ if (!squeezes || older || state.spaces - state.otherSpaces <= TOLERANCE$2) return false;
const over = state.position + tokenWidth - limitOf();
const slack = limitOf() - state.end;
if (over / state.spaces > MOST_SQUEEZE) return false;
@@ -7958,14 +7958,14 @@ var docxLayout = (function(exports) {
text: "-",
font: part[part.length - 1].font
};
- return state.position + lead + widthOf([...part, hyphen], measurer) <= limitOf() + TOLERANCE$1;
+ return state.position + lead + widthOf([...part, hyphen], measurer) <= limitOf() + TOLERANCE$2;
};
/**
* Whether a word or picture past the end of a justified line could be squeezed in, were the spaces Word doesn't
* squeeze among its spaces squeezed as the others are, beside ordinary spaces it does, or at a four-per-em space,
* which Word hasn't been seen with
*/
- const unsure = (state, tokenWidth) => squeezes && !older && state.otherSpaces > 0 && (state.spaces - state.otherSpaces > TOLERANCE$1 || state.text.includes(" ")) && state.position + tokenWidth - limitOf() <= MOST_SQUEEZE * state.spaces;
+ const unsure = (state, tokenWidth) => squeezes && !older && state.otherSpaces > 0 && (state.spaces - state.otherSpaces > TOLERANCE$2 || state.text.includes(" ")) && state.position + tokenWidth - limitOf() <= MOST_SQUEEZE * state.spaces;
/**
* Why where Word puts the text after a tab to one of the paragraph's own stops past the end of the line isn't known,
* when it isn't: its probes had no right indent past the margin, indents, first line and hanging ones too
@@ -8044,7 +8044,7 @@ var docxLayout = (function(exports) {
*/
const skipRooms = (needs, hyphenated) => {
let skipped = false;
- while (!line.started && roomOf(lines.length) !== void 0 && line.position + needs > limitOf() + TOLERANCE$1) {
+ while (!line.started && roomOf(lines.length) !== void 0 && line.position + needs > limitOf() + TOLERANCE$2) {
if (hyphenated) {
var _line$unsupported;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported = line.unsupported) !== null && _line$unsupported !== void 0 ? _line$unsupported : "a word with a soft hyphen beside a drawing it doesn't fit beside" });
@@ -8074,7 +8074,7 @@ var docxLayout = (function(exports) {
}
const skipped = skipRooms(needs, hyphens.length > 0);
const squeezedIn = squeezes && line.started && squeezesIn(line, needs);
- if (token.type === "word" && hyphens.length > 0 && !squeezedIn && line.position + needs > endOf(line) + TOLERANCE$1) {
+ if (token.type === "word" && hyphens.length > 0 && !squeezedIn && line.position + needs > endOf(line) + TOLERANCE$2) {
if (line.started && mayHyphenate(line, token, leadOf(line))) {
var _line$unsupported3;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported3 = line.unsupported) !== null && _line$unsupported3 !== void 0 ? _line$unsupported3 : MAY_HYPHENATE });
@@ -8090,8 +8090,8 @@ var docxLayout = (function(exports) {
return;
}
}
- const overflows = line.started && line.position + needs > endOf(line) + TOLERANCE$1;
- if (token.type === "box" && token.unbroken !== void 0 && line.position + needs > endOf(line) + TOLERANCE$1) {
+ const overflows = line.started && line.position + needs > endOf(line) + TOLERANCE$2;
+ if (token.type === "box" && token.unbroken !== void 0 && line.position + needs > endOf(line) + TOLERANCE$2) {
var _line$unsupported4;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported4 = line.unsupported) !== null && _line$unsupported4 !== void 0 ? _line$unsupported4 : token.unbroken });
}
@@ -8109,8 +8109,8 @@ var docxLayout = (function(exports) {
tokenWidth = widthOn(line);
}
line = _objectSpread2(_objectSpread2({}, place(line)), {}, { position: line.position + leadOf(line, skipped || overflows && !squeezed) });
- if (cell !== void 0 && token.type === "word" && line.position + tokenWidth > endOf(line) + TOLERANCE$1) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a word longer than its line on a grid that snaps to characters" });
- if (token.type === "word" && !squeezed && line.position + tokenWidth > endOf(line) + TOLERANCE$1 && limitOf() - startOf(lines.length, false) > 0) {
+ if (cell !== void 0 && token.type === "word" && line.position + tokenWidth > endOf(line) + TOLERANCE$2) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a word longer than its line on a grid that snaps to characters" });
+ if (token.type === "word" && !squeezed && line.position + tokenWidth > endOf(line) + TOLERANCE$2 && limitOf() - startOf(lines.length, false) > 0) {
let placed = false;
if (mayHyphenate(line, token, 0)) {
var _line$unsupported6;
@@ -8125,7 +8125,7 @@ var docxLayout = (function(exports) {
for (const character of charactersOf(token.pieces)) {
var _lastBorder$room3, _lastBorder3;
const room = (_lastBorder$room3 = (_lastBorder3 = lastBorder(character)) === null || _lastBorder3 === void 0 ? void 0 : _lastBorder3.room) !== null && _lastBorder$room3 !== void 0 ? _lastBorder$room3 : 0;
- if (placed && from + widthOf([...onLine, ...character], measurer) + room > endOf(line) + TOLERANCE$1 && limitOf(lines.length + 1) - startOf(lines.length + 1, false) > 0) {
+ if (placed && from + widthOf([...onLine, ...character], measurer) + room > endOf(line) + TOLERANCE$2 && limitOf(lines.length + 1) - startOf(lines.length + 1, false) > 0) {
line = wrap(_objectSpread2(_objectSpread2({}, line), {}, {
heights: withToken(line.heights, token),
started: true
@@ -8250,15 +8250,15 @@ var docxLayout = (function(exports) {
const next = nextStop(line.position, given, defaultTabStop, Infinity);
const rest = tokens.slice(index + 1);
const own = !numbered && given.includes(next);
- const pastIndent = own && indentRight > 0 && next.position > limitOf() + TOLERANCE$1 && next.position <= marginOf() + TOLERANCE$1;
- const pastEnd = own && next.position > Math.max(limitOf(), marginOf()) + TOLERANCE$1 ? next : void 0;
- const pastMargin = own && indentRight < 0 && next.alignment === "left" && next.position > marginOf() + TOLERANCE$1 && next.position + widthAfterTab(rest, measurer) > limitOf() + TOLERANCE$1;
- const unknown = pastIndent && squeezes ? "a tab stop past the paragraph's right indent in a justified line" : pastIndent && next.alignment === "left" && next.position + widthAfterTab(rest, measurer) > marginOf() + TOLERANCE$1 ? "text after a tab stop past the paragraph's right indent that goes past the margin" : pastMargin && pastEnd === void 0 ? "text after a left tab stop past the margin, in a paragraph indented past it, that goes past the end of the line" : pastEnd === void 0 ? void 0 : pastEndUnknown(pastEnd, line.started);
+ const pastIndent = own && indentRight > 0 && next.position > limitOf() + TOLERANCE$2 && next.position <= marginOf() + TOLERANCE$2;
+ const pastEnd = own && next.position > Math.max(limitOf(), marginOf()) + TOLERANCE$2 ? next : void 0;
+ const pastMargin = own && indentRight < 0 && next.alignment === "left" && next.position > marginOf() + TOLERANCE$2 && next.position + widthAfterTab(rest, measurer) > limitOf() + TOLERANCE$2;
+ const unknown = pastIndent && squeezes ? "a tab stop past the paragraph's right indent in a justified line" : pastIndent && next.alignment === "left" && next.position + widthAfterTab(rest, measurer) > marginOf() + TOLERANCE$2 ? "text after a tab stop past the paragraph's right indent that goes past the margin" : pastMargin && pastEnd === void 0 ? "text after a left tab stop past the margin, in a paragraph indented past it, that goes past the end of the line" : pastEnd === void 0 ? void 0 : pastEndUnknown(pastEnd, line.started);
if (unknown !== void 0) {
var _line$unsupported10;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported10 = line.unsupported) !== null && _line$unsupported10 !== void 0 ? _line$unsupported10 : unknown });
}
- if (older && !numbered && next.position > limitOf() + TOLERANCE$1) {
+ if (older && !numbered && next.position > limitOf() + TOLERANCE$2) {
var _line$unsupported11;
line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported11 = line.unsupported) !== null && _line$unsupported11 !== void 0 ? _line$unsupported11 : "a tab past the end of the line in a document in compatibility mode" });
}
@@ -8272,7 +8272,7 @@ var docxLayout = (function(exports) {
continue;
}
const aligned = pastEnd !== void 0 && pastEnd.alignment !== "left" && unknown === void 0;
- if (aligned && line.position + widthAfterTab(rest, measurer) > limitOf() + TOLERANCE$1) line = wrap(line);
+ if (aligned && line.position + widthAfterTab(rest, measurer) > limitOf() + TOLERANCE$2) line = wrap(line);
const stop = numbered ? numbered.stop : aligned ? {
position: limitOf(),
alignment: "right"
@@ -8286,7 +8286,7 @@ var docxLayout = (function(exports) {
});
continue;
}
- if (!numbered && stop.position <= line.position + TOLERANCE$1) line = wrap(line);
+ if (!numbered && stop.position <= line.position + TOLERANCE$2) line = wrap(line);
line = _objectSpread2(_objectSpread2({}, place(line)), pastIndent ? { pastIndent } : {});
const shift = shiftAt(stop.alignment, rest, measurer, line.border);
const misaligned = shift === void 0 ? "text at a decimal tab stop that Word hasn't been seen lining up" : void 0;
@@ -9283,21 +9283,28 @@ var docxLayout = (function(exports) {
default: return;
}
};
- /** A drawing's size on its section's pages: its own, or a share of what it is sized by */
- var sizeOf$1 = (drawing, section) => {
+ /**
+ * A drawing's size on its section's pages: its own, or a share of what it is sized by. The inside and outside margins are
+ * those it is placed against, by whether the page is odd or even (`word-stops-drawings.docx` DR4a to DR4d)
+ */
+ var sizeOf$1 = (drawing, section, oddPage) => {
var _widths$relativeWidth, _heights$relativeHeig;
const { pageWidth, pageHeight, marginLeft, marginRight, marginTop, marginBottom } = section;
const widths = {
page: pageWidth,
margin: pageWidth - marginLeft - marginRight,
leftMargin: marginLeft,
- rightMargin: marginRight
+ rightMargin: marginRight,
+ insideMargin: oddPage ? marginLeft : marginRight,
+ outsideMargin: oddPage ? marginRight : marginLeft
};
const heights = {
page: pageHeight,
margin: pageHeight - marginTop - marginBottom,
topMargin: marginTop,
- bottomMargin: marginBottom
+ bottomMargin: marginBottom,
+ insideMargin: oddPage ? marginTop : marginBottom,
+ outsideMargin: oddPage ? marginBottom : marginTop
};
const { relativeWidth, relativeHeight } = drawing;
const width = relativeWidth === void 0 ? drawing.width : ((_widths$relativeWidth = widths[relativeWidth.from]) !== null && _widths$relativeWidth !== void 0 ? _widths$relativeWidth : NaN) * relativeWidth.share;
@@ -9313,11 +9320,14 @@ var docxLayout = (function(exports) {
* doing yet; lined up, its effects are lined up with it.
*/
var placeDrawing = (drawing, frame) => {
- const size = sizeOf$1(drawing, frame.section);
+ const size = sizeOf$1(drawing, frame.section, frame.oddPage);
const across = acrossBase(drawing.horizontal.from, frame);
const down = downBase(drawing.vertical.from, frame);
if (size === void 0) return "a drawing sized by a share of what isn't followed yet";
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 { effects } = drawing;
const left = startOf$1(drawing.horizontal, across, size.width, effects.left, effects.right, frame.oddPage);
const top = startOf$1(drawing.vertical, down, size.height, effects.top, effects.bottom, frame.oddPage);
@@ -9348,7 +9358,8 @@ 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);
- const spans = beside.reduce((free, { drawing, keepOut }) => {
+ if (beside.length === 0) return { spans: [within] };
+ const rooms = 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,
@@ -9357,9 +9368,13 @@ var docxLayout = (function(exports) {
start: out.end,
end: span.end
}] : []]);
- }, [within]);
- return spans.length > 0 ? { spans } : { below: Math.min(...beside.map(({ keepOut }) => keepOut.bottom)) };
+ }, [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 };
+ return wide.length > 0 ? { spans: wide } : { below: Math.min(...beside.map(({ keepOut }) => keepOut.bottom)) };
};
+ var LEAST_ROOM = 18;
+ var TOLERANCE$1 = .01;
/**
* The room across the page a drawing keeps text out of, in the room a line is in: its own across, and the side of it the
* text doesn't go on, to the edge of the room, or the line's room for a drawing that text goes above and below
@@ -31915,22 +31930,31 @@ 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
+ * 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)
*/
var positionOf$1 = (anchor, align, offset, names, aligns) => {
var _twips;
- const from = anchor === void 0 ? void 0 : names[String(anchor)];
- if (from === void 0) return anchor === void 0 ? "a text frame that doesn't say what it is placed against" : "a text frame placed against what isn't followed yet";
- if (align !== void 0) return aligns.has(String(align)) ? {
+ const from = anchor === void 0 ? "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({
from,
align: String(align)
- } : "a text frame lined up in a way not yet followed";
- return {
+ }, unsaid) : "a text frame lined up in a way not yet followed";
+ return _objectSpread2({
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) => {
@@ -32650,19 +32674,25 @@ var docxLayout = (function(exports) {
var _wrapAttributes$wrapT;
const children = childrenOf(element);
const attributes = attributesOf(element);
- if (isOn(attributes.simplePos)) return "a drawing placed by its simple position";
const wrapName = Object.keys(WRAPS).find((name) => find(children, name) !== void 0);
if (wrapName === void 0) return "a drawing that text flows around in a way not yet followed";
const wrapAttributes = attributesOf(find(children, wrapName));
const side = String((_wrapAttributes$wrapT = wrapAttributes.wrapText) !== null && _wrapAttributes$wrapT !== void 0 ? _wrapAttributes$wrapT : "bothSides");
- const horizontal = readPosition(find(children, "wp:positionH"), "wp14:pctPosHOffset");
- const vertical = readPosition(find(children, "wp:positionV"), "wp14:pctPosVOffset");
const extent = attributesOf(find(children, "wp:extent"));
const effect = attributesOf(find(children, "wp:effectExtent"));
const points = (value) => {
var _numberOf2;
return ((_numberOf2 = numberOf(value)) !== null && _numberOf2 !== void 0 ? _numberOf2 : 0) / EMUS_PER_POINT;
};
+ const simple = isOn(attributes.simplePos) ? attributesOf(find(children, "wp:simplePos")) : void 0;
+ const horizontal = simple === void 0 ? readPosition(find(children, "wp:positionH"), "wp14:pctPosHOffset") : {
+ from: "page",
+ offset: points(simple.x)
+ };
+ const vertical = simple === void 0 ? readPosition(find(children, "wp:positionV"), "wp14:pctPosVOffset") : {
+ from: "page",
+ offset: points(simple.y)
+ };
const distance = (name) => {
var _wrapAttributes$name;
return points((_wrapAttributes$name = wrapAttributes[name]) !== null && _wrapAttributes$name !== void 0 ? _wrapAttributes$name : attributes[name]);
@@ -33284,23 +33314,24 @@ var docxLayout = (function(exports) {
};
/**
* The text frame a paragraph is in (`w:framePr`), its own or its style's, or why it can't be laid out: one in a table
- * cell, a footnote, an endnote, a header or a footer, one given by both the paragraph and its style differently, and one
- * with a note's reference in it, which aren't followed yet. Undefined when it isn't in one.
+ * cell, a footnote, an endnote, a header or a footer, and one given by both the paragraph and its style differently,
+ * which aren't followed yet. Undefined when it isn't in one.
*/
- var readFrameOf = (paragraph, properties, paragraphStyles, reader) => {
+ var readFrameOf = (properties, paragraphStyles, reader) => {
var _paragraphStyles$find;
const own = find(properties, "w:framePr");
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.inCell || reader.inNote || reader.inHeader || reader.inTextBox) return "a text frame in a table cell, footnote, endnote, header, footer or text box";
+ 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";
const frame = readFrameProperties(element);
if (typeof frame === "string") return frame;
if (own !== void 0 && fromStyle !== void 0) {
- const styled = readFrameProperties(fromStyle);
- if (typeof styled === "string" || styled.key !== frame.key) return "a text frame given by both a paragraph and its style";
+ const said = new Set(Object.keys(attributesOf(own)));
+ if (Object.keys(attributesOf(fromStyle)).some((name) => !said.has(name))) return "a text frame given by both a paragraph and its style";
}
- return elementsIn$1(contentOf$3(paragraph), (name) => name === "w:footnoteReference" || name === "w:endnoteReference").length > 0 ? "a footnote or endnote in a text frame" : frame;
+ return frame;
};
/**
* Reads a paragraph (`w:p`), in the formatting of its styles, and of its table's style when it is in a table.
@@ -33350,7 +33381,7 @@ var docxLayout = (function(exports) {
var _item$font$characterS;
return item.type === "text" && ((_item$font$characterS = item.font.characterSpacing) !== null && _item$font$characterS !== void 0 ? _item$font$characterS : 0) !== 0 && item.font.snapToGrid !== false;
}) ? "text spaced out by its run on a grid that snaps to characters" : void 0;
- const frame = readFrameOf(element, properties, styleChain(styles, style, "paragraph"), reader);
+ const frame = readFrameOf(properties, styleChain(styles, style, "paragraph"), reader);
const unsupported = (_ref4 = (_ref5 = (_ref6 = (_list$unsupported = list.unsupported) !== null && _list$unsupported !== void 0 ? _list$unsupported : unknownOnGrid) !== null && _ref6 !== void 0 ? _ref6 : reader.down === true && reader.inNote === true ? "a footnote or endnote on text that runs down the page" : void 0) !== null && _ref5 !== void 0 ? _ref5 : reader.down === true ? unknownDownOf(own, combined, borders) : void 0) !== null && _ref4 !== void 0 ? _ref4 : typeof frame === "string" ? frame : otherDecimalSymbol ? "a decimal tab stop in a document whose decimal symbol isn't a full stop" : find(properties, "w:divId") !== void 0 ? "a paragraph in an HTML division" : combined.alignment === "mediumKashida" || combined.alignment === "highKashida" ? "a paragraph justified for Arabic with a medium or high kashida" : forThaiOrArabic && typeof items !== "string" && items.some((item) => item.type === "text" && THAI_OR_ARABIC.test(item.text)) ? "Thai or Arabic text justified for it" : (_ref7 = (_ref8 = (_unknownInOlderLayout = unknownInOlderLayout(content, combined.alignment, reader)) !== null && _unknownInOlderLayout !== void 0 ? _unknownInOlderLayout : unknownLengthIn(element)) !== null && _ref8 !== void 0 ? _ref8 : typeof format === "string" ? format : void 0) !== null && _ref7 !== void 0 ? _ref7 : typeof borders === "string" ? borders : void 0;
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
type: "paragraph",
@@ -33843,12 +33874,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 = find(properties, "w:tblpPr");
+ const floatElement = reader.inNote === true && reader.inEndnote !== 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 = (_ref14 = (_ref15 = (_ref16 = (_ref17 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_ref30 = (_ref31 = (_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 && _ref31 !== void 0 ? _ref31 : float !== void 0 && (reader.inCell || reader.inNote || reader.inHeader) ? "a table that text flows around in a table cell, header, footer or note" : void 0) !== null && _ref30 !== void 0 ? _ref30 : float !== void 0 && older ? "a table that text flows around in a document in compatibility mode" : void 0) !== null && _ref29 !== void 0 ? _ref29 : 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 && _ref28 !== void 0 ? _ref28 : typeof float === "string" ? float : void 0) !== null && _ref27 !== void 0 ? _ref27 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref26 !== void 0 ? _ref26 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref25 !== void 0 ? _ref25 : unmerged) !== null && _ref24 !== void 0 ? _ref24 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref23 !== void 0 ? _ref23 : fits && tableCells.some(({ noWrap }) => noWrap) ? "a table cell whose text doesn't wrap, in a table sized to its text" : void 0) !== null && _ref22 !== void 0 ? _ref22 : fits && tableCells.some(({ fitText }) => fitText) ? "text fitted to its table cell, in a table sized to its text" : void 0) !== null && _ref21 !== void 0 ? _ref21 : verticalUnsupported) !== null && _ref20 !== void 0 ? _ref20 : spacingUnsupported) !== null && _ref19 !== void 0 ? _ref19 : typeof geometry === "string" ? geometry : void 0) !== null && _ref18 !== void 0 ? _ref18 : indent === void 0 ? "a table indented by a share of the width" : void 0) !== null && _ref17 !== void 0 ? _ref17 : ((_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 && _ref16 !== void 0 ? _ref16 : styleUnsupported) !== null && _ref15 !== void 0 ? _ref15 : lengths) !== null && _ref14 !== void 0 ? _ref14 : (_blocks$find = blocks.find((block) => block.unsupported !== void 0)) === null || _blocks$find === void 0 ? void 0 : _blocks$find.unsupported;
+ const unsupported = (_ref14 = (_ref15 = (_ref16 = (_ref17 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_ref30 = (_ref31 = (_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 && _ref31 !== void 0 ? _ref31 : 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 && _ref30 !== void 0 ? _ref30 : float !== void 0 && older ? "a table that text flows around in a document in compatibility mode" : void 0) !== null && _ref29 !== void 0 ? _ref29 : 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 && _ref28 !== void 0 ? _ref28 : typeof float === "string" ? float : void 0) !== null && _ref27 !== void 0 ? _ref27 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref26 !== void 0 ? _ref26 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref25 !== void 0 ? _ref25 : unmerged) !== null && _ref24 !== void 0 ? _ref24 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref23 !== void 0 ? _ref23 : fits && tableCells.some(({ noWrap }) => noWrap) ? "a table cell whose text doesn't wrap, in a table sized to its text" : void 0) !== null && _ref22 !== void 0 ? _ref22 : fits && tableCells.some(({ fitText }) => fitText) ? "text fitted to its table cell, in a table sized to its text" : void 0) !== null && _ref21 !== void 0 ? _ref21 : verticalUnsupported) !== null && _ref20 !== void 0 ? _ref20 : spacingUnsupported) !== null && _ref19 !== void 0 ? _ref19 : typeof geometry === "string" ? geometry : void 0) !== null && _ref18 !== void 0 ? _ref18 : indent === void 0 ? "a table indented by a share of the width" : void 0) !== null && _ref17 !== void 0 ? _ref17 : ((_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 && _ref16 !== void 0 ? _ref16 : styleUnsupported) !== null && _ref15 !== void 0 ? _ref15 : lengths) !== null && _ref14 !== void 0 ? _ref14 : (_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);
@@ -33892,23 +33923,34 @@ var docxLayout = (function(exports) {
])
}
};
- /** Where a table that text flows around is (`w:tblpPr`), or why it can't be followed */
+ /**
+ * 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)
+ */
var readTableFloat = (element, overlap) => {
const attributes = attributesOf(element);
const position = (anchor, spec, at) => {
var _twips4;
const { from: anchors, alignments } = TABLE_AXES[anchor];
- const from = anchors.get(String(attributes[`w:${anchor}`]));
+ const given = attributes[`w:${anchor}`];
+ const from = given === void 0 ? "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 given";
- if (align !== void 0) return alignments.has(String(align)) ? {
+ 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({
from,
align: String(align)
- } : "a table that text flows around lined up in a way not yet followed";
- return {
+ }, unsaid) : "a table that text flows around lined up in a way not yet followed";
+ return _objectSpread2({
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");
@@ -34270,18 +34312,35 @@ var docxLayout = (function(exports) {
notBeside: "topAndBottom",
none: "none"
};
+ var FRAME_BORDER_ROOM = 1.5;
+ /**
+ * The room a text frame's border at its side takes beside it, in points, or why it isn't known: its width, without the
+ * shadow that doubles a paragraph's, its space from the text, and 1.5 points more, as Word keeps the text from it: 65
+ * twips for a border of 15 twips 20 from the text (`word-frames.docx` FM13), and 40 to 660 twips for those of
+ * `word-stops-floats.docx` FR2a to FR2j. The frame's text isn't moved, as its border is drawn outside it
+ */
+ var frameBorderRoom = (border) => {
+ const room = borderRoom(border === void 0 ? void 0 : _objectSpread2(_objectSpread2({}, border), {}, { shadow: false }));
+ return typeof room === "string" || room === 0 ? room : room + FRAME_BORDER_ROOM;
+ };
/**
* 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: one with borders, which take room beside it in a way not yet
- * followed (FM13)
+ * 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
*/
var frameDrawing = (frame, blocks) => {
var _frame$wrap;
const wrap = FRAME_WRAPS[(_frame$wrap = frame.wrap) !== null && _frame$wrap !== void 0 ? _frame$wrap : "around"];
if (wrap === void 0) return "a text frame that text flows around in a way not yet followed";
- if (blocks.some(({ borders }) => borders !== void 0)) return "a text frame with borders";
- if (wrap === "none") return;
+ const sideKey = (border) => border === void 0 || NO_BORDER.has(border.style) ? "" : border.key;
+ if (new Set(blocks.map(({ format }) => `${sideKey(format.borderLeft)} ${sideKey(format.borderRight)}`)).size > 1) return "a text frame of paragraphs with other borders at their sides";
+ 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,
side: "bothSides",
@@ -34296,8 +34355,8 @@ var docxLayout = (function(exports) {
distances: {
top: down,
bottom: down,
- left: across,
- right: across
+ left: across + left,
+ right: across + right
},
horizontal,
vertical,
@@ -34311,15 +34370,20 @@ var docxLayout = (function(exports) {
};
/**
* Takes the paragraphs in text frames out of the body's text, and anchors each frame in the paragraph after it, as a
- * drawing that text flows around, at its start. Frames elsewhere stop the layout as they are read. The paragraphs of a frame are those next to each other with the same frame. The
- * bookmarks and fields in a frame are where its anchor is, as the frame is on its page. A frame with no paragraph after it
- * in its section, such as one before a table, isn't followed yet, so the layout stops there.
+ * drawing that text flows around, at its start. Frames elsewhere stop the layout as they are read. The paragraphs of a
+ * frame are those next to each other with the same frame. The bookmarks, fields and notes' references in a frame are
+ * where its anchor is, as the frame is on its page (`word-stops-floats.docx` FR5a). The paragraph after a frame can be the
+ * empty one that ends its section, which takes a line then, and which the next section's text on the page goes round
+ * too, and with a table after it, the frame is anchored at the table's top, as Word places it (FR1a to FR1d). One placed
+ * against the paragraph after it before a table, and one with nothing after it in its section, at the end of the
+ * document or as its own paragraph ends the section, aren't followed yet, so the layout stops there.
*/
var anchorFrames = (entries, withBlock) => {
const isFramed = (block) => block.type === "paragraph" && block.frame !== void 0 && block.unsupported === void 0;
const anchored = [];
let framed = [];
for (const entry of entries) {
+ var _ref32, _block$unsupported;
const { block } = entry;
if (isFramed(block)) {
framed = [...framed, entry];
@@ -34329,8 +34393,9 @@ var docxLayout = (function(exports) {
anchored.push(entry);
continue;
}
- if (block.type !== "paragraph" || block.sectionBreak || entry.section !== framed[0].section) {
- anchored.push(...unanchored(framed, withBlock), entry);
+ if (entry.section !== framed[0].section || block.type === "table" && block.float !== void 0) {
+ const unknown = entry.section === framed[0].section ? "a text frame before a table that text flows around" : void 0;
+ anchored.push(...unanchored(framed, withBlock, unknown), entry);
framed = [];
continue;
}
@@ -34345,11 +34410,12 @@ var docxLayout = (function(exports) {
type: "drawing",
drawing
}]);
- anchored.push(withBlock(entry, _objectSpread2(_objectSpread2({}, block), {}, { items: [
+ const why = (_ref32 = (_block$unsupported = block.unsupported) !== null && _block$unsupported !== void 0 ? _block$unsupported : unsupported) !== null && _ref32 !== void 0 ? _ref32 : block.type === "table" && laidOut.some(({ drawing }) => drawing.vertical.from === "paragraph") ? "a text frame placed against the paragraph after it, before a table" : void 0;
+ anchored.push(withBlock(entry, _objectSpread2(_objectSpread2({}, block.type === "table" ? _objectSpread2(_objectSpread2({}, block), {}, { anchored: [...markers, ...laidOut] }) : _objectSpread2(_objectSpread2({}, block), {}, { items: [
...markers,
...laidOut,
...block.items
- ] }, unsupported !== void 0 && block.unsupported === void 0 ? { unsupported } : {})));
+ ] })), why === void 0 ? {} : { unsupported: why })));
framed = [];
}
anchored.push(...unanchored(framed, withBlock));
@@ -34359,7 +34425,7 @@ var docxLayout = (function(exports) {
* The paragraphs of text frames with no paragraph after them in their section to be anchored in, as they are in the text,
* the first stopping the layout, which Word lays out in a way not yet followed
*/
- var unanchored = (framed, withBlock) => framed.map((entry, index) => index === 0 ? withBlock(entry, _objectSpread2(_objectSpread2({}, entry.block), {}, { unsupported: "a text frame with no paragraph after it in its section" })) : entry);
+ var unanchored = (framed, withBlock, unsupported = "a text frame with no paragraph after it in its section") => framed.map((entry, index) => index === 0 ? withBlock(entry, _objectSpread2(_objectSpread2({}, entry.block), {}, { unsupported })) : entry);
var START_TYPES = /* @__PURE__ */ new Set([
"nextPage",
"continuous",
@@ -34404,7 +34470,7 @@ var docxLayout = (function(exports) {
* leaves it out in a cell, and keeps it beside a table
*/
var withCellEdges = (stack, reader) => stack.map((block, index) => {
- var _block$rows$0$cells$, _block$rows$, _block$unsupported;
+ var _block$rows$0$cells$, _block$rows$, _block$unsupported2;
if (block.type !== "table") return block;
const before = stack[index - 1];
const after = stack[index + 1];
@@ -34439,7 +34505,7 @@ var docxLayout = (function(exports) {
}) }));
leavesOut(before, "after", endOf((_block$rows$0$cells$ = (_block$rows$ = block.rows[0]) === null || _block$rows$ === void 0 || (_block$rows$ = _block$rows$.cells[0]) === null || _block$rows$ === void 0 ? void 0 : _block$rows$.blocks) !== null && _block$rows$0$cells$ !== void 0 ? _block$rows$0$cells$ : [], "first"), false);
leavesOut(after, "before", rowEnd, false);
- const unsupported = (_block$unsupported = block.unsupported) !== null && _block$unsupported !== void 0 ? _block$unsupported : unseen ? CONTEXTUAL_EDGE : void 0;
+ const unsupported = (_block$unsupported2 = block.unsupported) !== null && _block$unsupported2 !== void 0 ? _block$unsupported2 : unseen ? CONTEXTUAL_EDGE : void 0;
return _objectSpread2(_objectSpread2({}, block), {}, { rows }, withoutUndefined({ unsupported }));
});
/** The headers or footers a section refers to, by the pages they are on */
@@ -35018,7 +35084,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, _ref32, _ref33, _ref34, _ref35, _ref36, _ref37, _ref38, _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), {}, {
@@ -35098,7 +35164,7 @@ var docxLayout = (function(exports) {
const separator = shows === void 0;
const grid = separator ? void 0 : gridOf(sections.length);
const down = !separator && downOf(childrenOf(sectionElements[sections.length])) !== void 0;
- const readerOfNote = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, readerOf(false)), {}, { inNote: true }, separator ? {} : { noteNumber: shows }), grid === void 0 ? {} : { grid }), down ? { down } : {});
+ const readerOfNote = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, readerOf(false)), {}, { inNote: true }, kind === "endnote" ? { inEndnote: true } : {}), separator ? {} : { noteNumber: shows }), grid === void 0 ? {} : { grid }), down ? { down } : {});
const noteBlocks = readBlocks(content, readerOfNote);
return separator || ((_noteBlocks = noteBlocks[noteBlocks.length - 1]) === null || _noteBlocks === void 0 ? void 0 : _noteBlocks.type) !== "table" ? noteBlocks : [...noteBlocks, paragraphAfterTable(kind, readerOfNote)];
};
@@ -35296,6 +35362,12 @@ var docxLayout = (function(exports) {
const addSection = (element) => {
sections.push(readSection(element, readPart, sections[sections.length - 1], pageSettings, readGrid(element, normalSize, pageSettings)));
};
+ /** The reader of a section's blocks, on its grid and with its text running down the page when it does */
+ const sectionReader = (section) => {
+ const grid = gridOf(section);
+ const down = downOf(childrenOf(sectionElements[section])) !== void 0;
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, reader), grid === void 0 ? {} : { grid }), down ? { down } : {});
+ };
for (const element of elements) {
const name = nameOf$1(element);
if (name === "w:sectPr") addSection(element[name]);
@@ -35303,9 +35375,7 @@ var docxLayout = (function(exports) {
const bookmark = bookmarkOf(element);
bookmarks = bookmark === void 0 ? bookmarks : [...bookmarks, bookmark];
} else {
- const grid = gridOf(sections.length);
- const down = downOf(childrenOf(sectionElements[sections.length])) !== void 0;
- const block = readBlock(element, _objectSpread2(_objectSpread2(_objectSpread2({}, reader), grid === void 0 ? {} : { grid }), down ? { down } : {}));
+ const block = readBlock(element, sectionReader(sections.length));
const sectionProperties = sectionPropertiesOf(element);
if ((block === null || block === void 0 ? void 0 : block.type) === "paragraph" && block.hidden) {
bookmarks = [...bookmarks, ...markersIn([block])];
@@ -35327,6 +35397,12 @@ var docxLayout = (function(exports) {
if (sectionProperties !== void 0) addSection(sectionProperties);
}
}
+ const lastBlock = blocks[blocks.length - 1];
+ const closing = (lastBlock === null || lastBlock === void 0 ? void 0 : lastBlock.block.type) === "table" && lastBlock.block.float !== void 0 ? readBlock({ "w:p": [] }, sectionReader(lastBlock.section)) : void 0;
+ if (closing !== void 0) blocks.push({
+ block: closing,
+ section: lastBlock.section
+ });
blocks.splice(0, blocks.length, ...anchorFrames(blocks, (entry, block) => _objectSpread2(_objectSpread2({}, entry), {}, { block })));
const edged = withCellEdges(blocks.map(({ block }) => block), reader);
blocks.splice(0, blocks.length, ...blocks.map((entry, index) => _objectSpread2(_objectSpread2({}, entry), {}, { block: edged[index] })));
@@ -35367,7 +35443,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: (_ref32 = (_ref33 = (_ref34 = (_ref35 = (_ref36 = (_ref37 = (_ref38 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : styles.unsupported) !== null && _ref38 !== void 0 ? _ref38 : inNumbering) !== null && _ref37 !== void 0 ? _ref37 : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref36 !== void 0 ? _ref36 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref35 !== void 0 ? _ref35 : [...endnoteSections, sections.length - 1].some((section) => sections[section].textRunsDown !== void 0) && endnotes.length > 0 ? "endnotes on text that runs down the page" : void 0) !== null && _ref34 !== void 0 ? _ref34 : endnoteSections.some((section) => !sameGrid(gridOf(section), gridOf(sections.length - 1))) ? "endnotes from a section on another document grid than the last" : void 0) !== null && _ref33 !== void 0 ? _ref33 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref32 !== void 0 ? _ref32 : 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 : [...endnoteSections, sections.length - 1].some((section) => sections[section].textRunsDown !== void 0) && endnotes.length > 0 ? "endnotes on text that runs down the page" : void 0) !== null && _ref35 !== void 0 ? _ref35 : endnoteSections.some((section) => !sameGrid(gridOf(section), gridOf(sections.length - 1))) ? "endnotes from a section on another document grid than the last" : 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
@@ -35457,17 +35533,25 @@ var docxLayout = (function(exports) {
noteNumber: numberOf(note),
content
}));
- /** The headings in a block: a paragraph's own, and those in a table's cells, whose chapter numbers aren't known yet */
- var headingsIn = (block) => block.type === "paragraph" ? [...block.items.flatMap((item) => {
+ /** The headings of the text frames anchored in a block, which are before it in the text, whose chapter numbers aren't known yet */
+ var framedHeadings = (items) => items.flatMap((item) => {
var _item$drawing$frame$b, _item$drawing$frame;
return item.type === "drawing" ? (_item$drawing$frame$b = (_item$drawing$frame = item.drawing.frame) === null || _item$drawing$frame === void 0 ? void 0 : _item$drawing$frame.blocks) !== null && _item$drawing$frame$b !== void 0 ? _item$drawing$frame$b : [] : [];
}).flatMap(headingsIn).map(({ level }) => ({
level,
unsupported: "a chapter heading in a text frame"
- })), ...block.heading ? [block.heading] : []] : block.rows.flatMap(({ cells }) => cells.flatMap((cell) => cell.blocks.flatMap(headingsIn))).map(({ level }) => ({
- level,
- unsupported: "a chapter heading in a table"
}));
+ /**
+ * The headings in a block: a paragraph's own, and those in a table's cells and in the text frames anchored in either,
+ * whose chapter numbers aren't known yet
+ */
+ var headingsIn = (block) => {
+ var _block$anchored;
+ return block.type === "paragraph" ? [...framedHeadings(block.items), ...block.heading ? [block.heading] : []] : [...framedHeadings((_block$anchored = block.anchored) !== null && _block$anchored !== void 0 ? _block$anchored : []), ...block.rows.flatMap(({ cells }) => cells.flatMap((cell) => cell.blocks.flatMap(headingsIn))).map(({ level }) => ({
+ level,
+ unsupported: "a chapter heading in a table"
+ }))];
+ };
/** Whether a block is a paragraph with Word's automatic space before or after it */
var hasAutomaticSpace = (block) => block.type === "paragraph" && (block.format.autoSpaceBefore === true || block.format.autoSpaceAfter === true);
/** Whether a block is a paragraph with borders or automatic spacing, which Word hasn't been seen with in some footnotes */
@@ -35555,6 +35639,23 @@ var docxLayout = (function(exports) {
this.drawing = drawing;
}
};
+ 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";
+ /**
+ * 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
+ * it, as Word lays it out (`word-stops-drawings.docx` DR8). Where the page isn't laid out again, as it ends other than
+ * in placing a block, the layout stops there
+ */
+ var PushedOn = class extends Unsupported {
+ constructor(block, page) {
+ super(PUSHED_ON);
+ _defineProperty(this, "block", void 0);
+ _defineProperty(this, "page", void 0);
+ this.block = block;
+ this.page = page;
+ }
+ };
var MOST_PAGE_LAYOUTS = 5;
var sum = (values) => values.reduce((total, value) => total + value, 0);
/** A row of lines, the first of them a paragraph's line `first`, `skip` below the row before it, at `top` */
@@ -35574,8 +35675,27 @@ var docxLayout = (function(exports) {
textWidth: sum(lines.map(({ textWidth }) => textWidth))
}, breakAfter === void 0 ? {} : { breakAfter }), spacingBelow === void 0 ? {} : { spacingBelow }) });
};
- var KEPT_FLOATING = "a paragraph kept with the next with a table that text flows around";
+ 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,
+ * 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 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 }) => {
+ var _rows$, _rows$at;
+ return !borderLeft && !borderRight && !((_rows$ = rows[0]) === null || _rows$ === void 0 ? void 0 : _rows$.borderTop) && !((_rows$at = rows.at(-1)) === null || _rows$at === void 0 ? void 0 : _rows$at.borderBottom);
+ };
+ /** Whether a table has no borders round it, nor between its rows */
+ var borderless = (table) => borderlessOutside(table) && table.rows.every(({ borderTop, borderBottom }) => !borderTop && !borderBottom);
/** Whether a block is a table that text flows around */
var isFloating = (block) => block.type === "table" && block.float !== void 0;
/** The width of a table's rows, with its cells' margins and the halves of its borders outside them */
@@ -35584,6 +35704,11 @@ var docxLayout = (function(exports) {
return Math.max(0, ...table.rows.map(({ cells }) => sum(cells.map((cell) => cell.width + cell.marginLeft + cell.marginRight)))) + (((_table$borderLeft = table.borderLeft) !== null && _table$borderLeft !== void 0 ? _table$borderLeft : 0) + ((_table$borderRight = table.borderRight) !== null && _table$borderRight !== void 0 ? _table$borderRight : 0)) / 2;
};
var MOST_ATTEMPTS = 10;
+ /** Whether some lines' rooms are those of others, with rooms for more lines */
+ var extendsRooms = (more, fewer) => more.size > fewer.size && [...fewer].every(([line, { start, end }]) => {
+ const room = more.get(line);
+ return room !== void 0 && Math.abs(room.start - start) < TOLERANCE && Math.abs(room.end - end) < TOLERANCE;
+ });
/** Whether two sets of lines' rooms are the same */
var sameRooms = (one, other) => one.size === other.size && [...one].every(([line, { start, end }]) => {
const room = other.get(line);
@@ -35810,6 +35935,7 @@ var docxLayout = (function(exports) {
* Word hasn't shown stops the layout, or guessing, is laid out as it was broken, and so are lines of text in a font or
* with a character the measurer doesn't know, measured as it measures them
*/
+ const blockIndexes = new Map(blocks.map(({ block }, index) => [block, index]));
const linesOf = (paragraph, widths, rooms = /* @__PURE__ */ new Map()) => {
const given = typeof widths === "number" ? [{
from: 0,
@@ -35853,7 +35979,9 @@ var docxLayout = (function(exports) {
};
const lines = paragraph.items.some(isPageField) ? layOut() : kept();
for (const reason of new Set(lines.flatMap(({ unsupported }) => unsupported === void 0 ? [] : [unsupported]))) stopAt(reason);
- return lines;
+ const index = blockIndexes.get(paragraph);
+ const floatNotes = index === void 0 ? [] : floatsBefore(index).flatMap((table) => notesIn(markersOf(blocks[table].block)));
+ return floatNotes.length === 0 ? lines : [_objectSpread2(_objectSpread2({}, lines[0]), {}, { markers: [...floatNotes, ...lines[0].markers] }), ...lines.slice(1)];
};
/**
* The space before or after a paragraph by its own formatting, next to a block on that side. Word's automatic spacing
@@ -36124,6 +36252,8 @@ var docxLayout = (function(exports) {
/** Where the layout is at the start of a block, to lay out the blocks from it again */
const snapshot = (index) => ({
index,
+ keptOn,
+ brokenAcross,
pageCount,
pageNumber,
restart,
@@ -36155,6 +36285,15 @@ var docxLayout = (function(exports) {
drawings,
anchored
});
+ let keptOn;
+ let brokenAcross = /* @__PURE__ */ new Set();
+ /** Stops where a block a paragraph is kept with (`keptOn`) starts in another page or column than it ended in */
+ const checkKept = (block) => {
+ if ((keptOn === null || keptOn === void 0 ? void 0 : keptOn.next) === block) {
+ if (keptOn.page !== pageCount || keptOn.column !== column) stopAt(keptOn.reason);
+ keptOn = void 0;
+ }
+ };
let blockStart;
let columnsStart;
/** The bottom of the page's columns: the page's, or less when they are being balanced */
@@ -36164,7 +36303,7 @@ var docxLayout = (function(exports) {
* out again to even out columns only moves them between the columns of the same page
*/
const restore = (state) => {
- ({pageCount, pageNumber, restart, top, pageBottom, position, column, columnTop, placedInColumn, deepest, columnBroken, pageNotes, noteArea, notesSection, notesInColumns, filledEnd, continued, carried, held, heldLines, deferred, pending, spaceAfter, sectionSpaceAfter, finished, pageColumns, drawings, anchored} = state);
+ ({keptOn, brokenAcross, pageCount, pageNumber, restart, top, pageBottom, position, column, columnTop, placedInColumn, deepest, columnBroken, pageNotes, noteArea, notesSection, notesInColumns, filledEnd, continued, carried, held, heldLines, deferred, pending, spaceAfter, sectionSpaceAfter, finished, pageColumns, drawings, anchored} = state);
drawings = withPinned(drawings);
placements.length = Math.min(placements.length, state.placed);
bottom = columnsBottom();
@@ -36839,6 +36978,7 @@ var docxLayout = (function(exports) {
};
/** Places a row of the table being placed, or the part of it on the page */
const placeRow = (index, y, height) => {
+ checkKept(blockIndex);
placements.push({
type: "row",
block: blockIndex,
@@ -37365,41 +37505,113 @@ var docxLayout = (function(exports) {
*/
const checkAnchors = () => {
var _pinned$get3;
- if (((_pinned$get3 = pinned.get(pageCount)) !== null && _pinned$get3 !== void 0 ? _pinned$get3 : []).some(({ anchor }) => !anchored.includes(anchor))) throw new Unsupported("a drawing whose paragraph goes on to the next page as the text before it goes round it");
+ const away = ((_pinned$get3 = pinned.get(pageCount)) !== null && _pinned$get3 !== void 0 ? _pinned$get3 : []).find(({ anchor }) => !anchored.includes(anchor));
+ 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);
+ throw new PushedOn(block, pageCount);
};
+ const startsNextPage = /* @__PURE__ */ new Map();
const inlined = /* @__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);
+ return entry !== void 0 && isFloating(entry.block) && !inlined.has(index) && !brokenAcross.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
+ */
+ const breakAcross = ({ drawing, table }) => {
+ const block = blocks[table.index].block;
+ const { distances } = drawing.drawing;
+ const { heights } = table;
+ 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;
+ 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
+ } : {
+ parts: [...counts, height <= room + TOLERANCE ? 1 : 0],
+ used: height
+ }, {
+ parts: [],
+ used: 0
+ });
+ 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;
+ /** 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) => {
+ mark(block.rows[from + offset].cells.flatMap((cell) => cell.blocks.flatMap(markersOf)));
+ placements.push({
+ type: "row",
+ block: table.index,
+ row: {
+ index: from + offset,
+ y: rowTop,
+ height
+ }
+ });
+ return rowTop + height;
+ }, y);
+ };
+ placeRows(0, first, drawing.box.top);
+ let row = first;
+ for (const count of parts) {
+ startPage();
+ placeRows(row, count, position);
+ row += count;
+ }
+ const box = _objectSpread2(_objectSpread2({}, drawing.box), {}, {
+ top: position,
+ bottom: position + sum(heights.slice(row - parts[parts.length - 1]))
+ });
+ drawings = [...drawings, _objectSpread2(_objectSpread2({}, drawing), {}, {
+ box,
+ keepOut: keepOutOf(drawing.drawing, box)
+ })];
+ brokenAcross = /* @__PURE__ */ new Set([...brokenAcross, table.index]);
+ return true;
};
/**
* The tables that text flows around right before a block, which the paragraph after them goes round. Those before a
* paragraph are in its section, as those that aren't stop the layout
*/
const floatsBefore = (index) => {
- const first = blocks.slice(0, index).findLastIndex((_, at) => !floatsAt(at)) + 1;
+ let first = index;
+ while (floatsAt(first - 1)) first--;
return Array.from({ length: index - first }, (_, offset) => first + offset);
};
/** The tables that text flows around from one, one after the other */
const floatsFrom = (index) => {
- const end = blocks.findIndex((_, at) => at >= index && !floatsAt(at));
- return Array.from({ length: (end === -1 ? blocks.length : end) - index }, (_, offset) => index + offset);
+ let end = index;
+ while (floatsAt(end)) end++;
+ return Array.from({ length: end - index }, (_, offset) => index + offset);
};
/**
- * Why Word's way with the tables that text flows around from one (`index`) isn't known: without a paragraph after them
- * in their section to place them against, before a paragraph kept with the next, or with a footnote in one
+ * 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)
*/
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 || after.block.type !== "paragraph" || after.block.sectionBreak) return "a table that text flows around without a paragraph after it";
- if (after.block.format.keepNext === true) return KEPT_FLOATING;
- if (run.some((table) => {
- const { borderLeft, borderRight } = blocks[table].block;
- return !borderLeft !== !borderRight;
- })) return "a table that text flows around with a border on one side only";
- return run.some((table) => notesIn(markersOf(blocks[table].block)).length > 0) ? "a footnote in a table that text flows around" : void 0;
+ 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;
};
/**
* Stops at tables that text flows around, one after the other, where Word's way with them isn't known (`reason`), or,
@@ -37412,21 +37624,21 @@ var docxLayout = (function(exports) {
/**
* A table that text flows around, sized in the column, as a drawing with square wrapping the size of its rows, as Word
* puts the text beside it (`word-floats2.docx` G24 to G29), with its rows' heights. It is as wide as its rows with the
- * halves of its borders left and right, from half a point to 3 points, and without borders there, 0.75 points wider, at
- * the left of the margins and at the right: 3010, 3020, 3060 and 3015 twips for 3000 (`word-floats3.docx` H1 to H5, H8).
- * Its cells' margins don't change it, and its indent doesn't move it (H6, H7)
+ * halves of its borders left and right, from half a point to 3 points, on both sides or one, and without borders at
+ * all, 0.75 points wider, at the left of the margins and at the right: 3010, 3020, 3060 and 3015 twips for 3000
+ * (`word-floats3.docx` H1 to H5, H8), 3030 with 3 points on one side, and 3000 with a border above or below it only
+ * (`word-stops-floats.docx` FT2a to FT2e). Its cells' margins don't change it, and its indent doesn't move it (H6, H7)
*/
const floatingTable = (index) => {
const block = blocks[index].block;
const { horizontal, vertical, distances, mayOverlap } = block.float;
const table = sizedToPlace(block, columnsSection().columns[column]);
const heights = rowHeights(table);
- const borderless = !table.borderLeft && !table.borderRight;
return {
drawing: {
wrap: "square",
side: "bothSides",
- width: tableWidthOf(table) + (borderless ? BORDERLESS_FLOAT : 0),
+ width: tableWidthOf(table) + (borderless(table) ? BORDERLESS_FLOAT : 0),
height: sum(heights),
effects: {
top: 0,
@@ -37450,11 +37662,11 @@ var docxLayout = (function(exports) {
* 3000 twips beside a drawing on the right or the left, moving it to the right past one on the left
* (`word-floats2.docx` G14, G15), and moves one that doesn't down below them, as Word moves one as wide as the text
* (`word-floats.docx` F40). Where it goes across is its indent, which must leave it beside the drawings, or past one on
- * its left, where an indent would put it isn't known. Its rows are as tall wherever it goes across the column, so only
- * where it goes down the page counts here. Whether Word sizes a table sized to its text in the room beside a drawing
- * isn't known.
+ * its left, with its indent from there (`word-stops-drawings.docx` DR11b). Its rows are as tall wherever it goes across
+ * the column, so only where it goes down the page counts here. A table sized to its text that is as wide sized in the
+ * room beside a drawing as in the column goes beside it (DR11a); whether Word sizes one in that room isn't known.
*/
- const placeBesideDrawings = (table, heights) => {
+ const placeBesideDrawings = (table, heights, block) => {
var _table$indent;
const current = columnsSection();
const columnStart = columnLeft(current, column);
@@ -37472,17 +37684,81 @@ var docxLayout = (function(exports) {
const room = roomBeside(beside, at, tableHeight, within);
const spans = "spans" in room ? room.spans : [];
const left = columnStart + indent;
- const atIndent = spans.some(({ start, end }) => start <= Math.max(columnStart, left) + TOLERANCE && left + tableWidth <= end + TOLERANCE);
- const pastLeft = spans.some(({ start, end }) => start > Math.max(columnStart, left) + TOLERANCE && end - start >= tableWidth - TOLERANCE);
- if (atIndent || pastLeft) {
- if (table.fit !== void 0) throw new Unsupported("a table sized to its text beside a drawing that text flows around");
- if (!atIndent && indent !== 0) throw new Unsupported("an indented table moved past a drawing on its left");
+ const atIndent = spans.find(({ start, end }) => start <= Math.max(columnStart, left) + TOLERANCE && left + tableWidth <= end + TOLERANCE);
+ const pastLeft = spans.find(({ start, end }) => start > Math.max(columnStart, left) + TOLERANCE && end - start >= Math.max(0, indent) + tableWidth - TOLERANCE);
+ const goesIn = atIndent !== null && atIndent !== void 0 ? atIndent : pastLeft;
+ if (goesIn !== void 0) {
+ if (table.fit !== void 0 && Math.abs(tableWidthOf(sizedToPlace(block, goesIn.end - goesIn.start)) - tableWidth) > TOLERANCE) throw new Unsupported("a table sized to its text beside a drawing that text flows around");
+ if (atIndent === void 0 && indent < 0) throw new Unsupported("an indented table moved past a drawing on its left");
return;
}
position = Math.min(...beside.map(({ keepOut }) => keepOut.bottom));
}
};
/**
+ * Places the tables that text flows around right before a table, and the text frames anchored in it, against its top,
+ * where Word places them with no paragraph between (`word-stops-floats.docx` FT1a, FR1a, FR1d): the text after the table
+ * 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
+ */
+ const placeBeforeTable = (table, index) => {
+ var _table$anchored;
+ const frames = (_table$anchored = table.anchored) !== null && _table$anchored !== void 0 ? _table$anchored : [];
+ const own = [...floatsBefore(index).map((one, offset) => _objectSpread2(_objectSpread2({}, floatingTable(one)), {}, { item: -1 - offset })), ...frames.flatMap((item, at) => item.type === "drawing" ? [{
+ drawing: item.drawing,
+ item: at,
+ table: void 0
+ }] : [])];
+ if (own.length === 0) return false;
+ const markers = frames.flatMap((item) => item.type === "marker" ? [item.name] : []);
+ if (notesIn(markers).length > 0) throw new Unsupported("a footnote or endnote in a text frame before a table");
+ mark(markers);
+ const current = columnsSection();
+ const left = columnLeft(current, column);
+ const placed = own.map(({ drawing: unsized, item, table: floating }) => {
+ var _pinned$get4;
+ const drawing = sizedFrame(unsized);
+ const anchor = floating === void 0 ? `${index} ${item}` : `${floating.index} table`;
+ const withTable = floating === void 0 ? {} : { table: floating };
+ const pin = ((_pinned$get4 = pinned.get(pageCount)) !== null && _pinned$get4 !== void 0 ? _pinned$get4 : []).find((one) => one.anchor === anchor);
+ if (pin !== void 0) return _objectSpread2({
+ line: 0,
+ item,
+ drawing: pin
+ }, withTable);
+ const box = placeDrawing(drawing, {
+ section: section(),
+ oddPage: pageNumber % 2 === 1,
+ column: {
+ start: left,
+ end: left + current.columns[column]
+ },
+ paragraph: position,
+ line: {
+ top: position,
+ height: 0
+ },
+ 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({
+ line: 0,
+ item,
+ drawing: {
+ drawing,
+ box,
+ keepOut,
+ anchor
+ }
+ }, withTable);
+ });
+ placeDrawings(placed);
+ for (const { drawing, table: floating } of placed) if (floating !== void 0) placeFloatingRows(floating, drawing.box.top);
+ return true;
+ };
+ /**
* A text frame at the size its paragraphs give it: as wide as their widest line when it has no width of its own, and
* as tall as they are, at least its own height, or its own height exactly, as its height rule says. Another drawing
* is as it is
@@ -37492,6 +37768,11 @@ var docxLayout = (function(exports) {
if (frame === void 0) return drawing;
const width = frame.fitsWidth ? contentWidths(frame.blocks).max : drawing.width;
const ofText = stackHeight(frame.blocks, width, false);
+ if (frame.blocks.some(({ format }) => [
+ format.borderTop,
+ format.borderBottom,
+ format.borderBetween
+ ].some((one) => (one === null || one === void 0 ? void 0 : one.shadow) === true && one.style !== "none" && one.style !== "nil")) && frame.heightRule !== "exact" && ofText > drawing.height + TOLERANCE) throw new Unsupported("a text frame with a shadowed border, as tall as its text");
const height = frame.heightRule === "exact" ? drawing.height : frame.heightRule === "atLeast" ? Math.max(drawing.height, ofText) : ofText;
return _objectSpread2(_objectSpread2({}, drawing), {}, {
width,
@@ -37500,6 +37781,54 @@ var docxLayout = (function(exports) {
};
/** Whether a drawing that text flows around on the page goes down below where the next line goes */
const besideDrawing = () => drawings.some(({ keepOut }) => keepOut.bottom > position + TOLERANCE);
+ /** Whether a drawing on the page is a table that text flows around */
+ const isTableDrawing = ({ anchor }) => anchor.endsWith(" table");
+ /**
+ * Whether two drawings on the page, of which one may not overlap the other, overlap where Word moves one out of the way:
+ * pictures and shapes by their boxes (`word-stops-drawings.docx` DR2a to DR2e), and tables that text flows around by
+ * the room they keep the text out of (`word-stops-floats.docx` FT8a to FT8c). Others by the room they keep the text
+ * out of, as it isn't known
+ */
+ const clash = (one, other) => {
+ if (one.drawing.mayOverlap && other.drawing.mayOverlap) return false;
+ return [one, other].every((drawing) => !isTableDrawing(drawing) && drawing.drawing.frame === void 0) ? overlap(one.box, other.box) : overlap(one.keepOut, other.keepOut);
+ };
+ /**
+ * The drawings of a paragraph moved out of the way of the drawings on the page, and of those before them, that one of
+ * them may not overlap, as Word moves the later one: across the page, at the height it was placed at, a picture placed at
+ * a distance to the right, until its box is beside the other's (`word-stops-drawings.docx` DR2a to DR2e), and one lined
+ * up at the right to the left (`word-floats2.docx` G3), and a table placed at a distance to the right, until the rooms
+ * they keep the text out of are beside each other (`word-stops-floats.docx` FT8a to FT8c). Where Word moves one that may
+ * overlap out of the way of one that may not, one with effects, one lined up otherwise, one moved past the column, and
+ * a picture out of the way of a table or a text frame, isn't known
+ */
+ const outOfTheWay = (placed, within) => placed.reduce((moved, one) => {
+ const others = [...drawings.filter(({ anchor }) => !placed.some((item) => item.drawing.anchor === anchor)), ...moved.map((item) => item.drawing)];
+ /** It moved past the other it may not overlap, and past those it then overlaps, a few times at the most */
+ const away = (drawing, attempts) => {
+ const other = others.find((placedOne) => clash(drawing, placedOne));
+ if (other === void 0) return drawing;
+ const { drawing: own, box, keepOut } = drawing;
+ const { effects } = own;
+ 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";
+ 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), {}, {
+ left: to,
+ right: to + box.right - box.left
+ });
+ 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");
+ return away(_objectSpread2(_objectSpread2({}, drawing), {}, {
+ box: shifted,
+ keepOut: keepOutOf(own, shifted)
+ }), attempts + 1);
+ };
+ return [...moved, _objectSpread2(_objectSpread2({}, one), {}, { drawing: away(one.drawing, 0) })];
+ }, []);
/**
* 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,
@@ -37509,11 +37838,11 @@ var docxLayout = (function(exports) {
const before = placements.slice(placements.findLastIndex(({ type }) => type === "page") + 1);
const anchorBlock = blockIndex;
for (const { drawing } of placed) {
- var _pinned$get4;
+ var _pinned$get5;
const { keepOut } = drawing;
anchored = [...anchored, drawing.anchor];
- if (((_pinned$get4 = pinned.get(pageCount)) !== null && _pinned$get4 !== void 0 ? _pinned$get4 : []).some(({ anchor }) => anchor === drawing.anchor)) continue;
- if ([...drawings, ...placed.slice(0, placed.findIndex((one) => one.drawing === drawing)).map((one) => one.drawing)].filter((other) => other.anchor !== drawing.anchor && overlap(other.keepOut, keepOut)).some((other) => !other.drawing.mayOverlap || !drawing.drawing.mayOverlap)) throw new Unsupported("drawings that text flows around that may not overlap, overlapping");
+ if (((_pinned$get5 = pinned.get(pageCount)) !== null && _pinned$get5 !== void 0 ? _pinned$get5 : []).some(({ anchor }) => anchor === drawing.anchor)) continue;
+ if ([...drawings, ...placed.slice(0, placed.findIndex((one) => one.drawing === drawing)).map((one) => one.drawing)].some((other) => other.anchor !== drawing.anchor && clash(drawing, other))) throw new Unsupported("drawings that text flows around that may not overlap, overlapping");
if (before.some((placement) => placement.type === "line" ? placement.block !== anchorBlock && overlap(keepOut, {
left: placement.line.x,
right: placement.line.x + placement.line.width,
@@ -37566,12 +37895,12 @@ var docxLayout = (function(exports) {
const columnEnd = linesBottom();
/** Places one of its own drawings, against its paragraph's top, or the top of a line from `lineTop`, `height` tall */
const place = ({ drawing: unsized, index, table }, line, lineTop, height) => {
- var _pinned$get5;
+ var _pinned$get6;
const drawing = sizedFrame(unsized);
if (drawing.horizontal.from === "character") throw new Unsupported("a drawing placed against where it is anchored along its line");
const anchor = table === void 0 ? `${at} ${index}` : `${table.index} table`;
const withTable = table === void 0 ? {} : { table };
- const pin = ((_pinned$get5 = pinned.get(pageCount)) !== null && _pinned$get5 !== void 0 ? _pinned$get5 : []).find((one) => one.anchor === anchor);
+ const pin = ((_pinned$get6 = pinned.get(pageCount)) !== null && _pinned$get6 !== void 0 ? _pinned$get6 : []).find((one) => one.anchor === anchor);
if (pin !== void 0) return _objectSpread2({
line,
item: index,
@@ -37614,6 +37943,7 @@ 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) => ({
@@ -37671,15 +38001,19 @@ var docxLayout = (function(exports) {
/** The lines broken in the rooms beside some of its own drawings, laid out again until their rooms settle */
const settle = (around) => {
let rooms = earlier;
- for (let attempt = 0; attempt < MOST_ATTEMPTS; attempt++) {
+ let changes = 0;
+ for (;;) {
const lines = linesOf(block, widths, rooms);
const laid = walk(lines, around);
if (sameRooms(laid.rooms, rooms)) return _objectSpread2({ lines }, laid);
+ if (!extendsRooms(laid.rooms, rooms)) {
+ changes++;
+ if (changes >= MOST_ATTEMPTS) throw new Unsupported("lines beside a drawing that don't settle");
+ }
({rooms} = laid);
}
- throw new Unsupported("lines beside a drawing that don't settle");
};
- const byPage = own.filter(({ drawing }) => drawing.vertical.from !== "line").map((item) => place(item, anchorLine(firstLines, item.index), rowsTop, 0));
+ const byPage = outOfTheWay(own.filter(({ drawing }) => drawing.vertical.from !== "line").map((item) => place(item, anchorLine(firstLines, item.index), rowsTop, 0)), within);
const byLine = own.filter(({ drawing }) => drawing.vertical.from === "line");
/** The lines settled beside the drawings, with the line each is anchored in among them */
const settled = (placed) => {
@@ -37688,11 +38022,11 @@ var docxLayout = (function(exports) {
};
const first = settled(byPage);
if (byLine.length === 0) return first;
- return settled([...byPage, ...byLine.flatMap((item) => {
+ return settled(outOfTheWay([...byPage, ...byLine.flatMap((item) => {
const line = anchorLine(first.lines, item.index);
const row = first.rows.find((one) => line >= one.first && line < one.first + one.count);
return (row === null || row === void 0 ? void 0 : row.top) === void 0 ? [] : [place(item, line, row.top, row.height)];
- })]);
+ })], within));
};
/**
* What is left out above a paragraph's line at the top of a page or column, in a document that suppresses the space
@@ -37817,6 +38151,8 @@ var docxLayout = (function(exports) {
if (count > 0 && [...excluded].some((item) => lines.findIndex(({ markers }) => markers.includes(drawingMarker(item))) < placedEnd)) throw new Unsupported("a drawing whose anchor's page changes as the text goes round it");
const onPage = Math.max(placedEnd, index + 1);
const sinking = laid.placed.filter(({ line, drawing: { drawing, keepOut } }) => line < onPage && (drawing.vertical.from === "paragraph" || drawing.vertical.from === "line") && keepOut.bottom > linesBottom() + TOLERANCE);
+ const brokenTable = sinking.find((one) => one.table !== void 0);
+ if (brokenTable !== void 0 && sinking.length === 1 && floatsBefore(blockIndex).length === 1 && laid.placed.length === 1 && breakAcross(brokenTable)) continue;
if (sinking.some(({ table }) => table !== void 0)) {
const run = floatsBefore(blockIndex);
inlineFloats(run, "a table that text flows around going past the bottom of the page");
@@ -37830,13 +38166,14 @@ var docxLayout = (function(exports) {
}
if (sinking.length > 0) {
stopIfBalancing();
- if (!sinking.every(({ drawing: { drawing, box } }) => box.bottom + drawing.effects.bottom > linesBottom() + TOLERANCE) || !placedInColumn || noteArea > 0) throw new Unsupported("a drawing that moves with its paragraph past the bottom of the page's text");
+ if (!sinking.every(({ drawing: { drawing, box } }) => box.bottom + drawing.effects.bottom > linesBottom() + TOLERANCE) || !placedInColumn) throw new Unsupported("a drawing that moves with its paragraph past the bottom of the page's text");
nextColumn();
continue;
}
if (count > 0) {
for (const { drawing, table } of laid.placed) if (table !== void 0) placeFloatingRows(table, drawing.box.top);
position += space;
+ checkKept(blockIndex);
const current = columnsSection();
const placedLines = linesUpTo(count);
for (const row of rows.slice(0, count)) {
@@ -38298,7 +38635,7 @@ var docxLayout = (function(exports) {
const repeated = headerRows > 0 ? sum(heights.slice(0, headerRows)) : 0;
position += spaceAfter;
spaceAfter = 0;
- placeBesideDrawings(table, heights);
+ placeBesideDrawings(table, heights, block);
const below = !onNextPage && placedInColumn && headerRows > 0 ? {
page: pageCount,
column,
@@ -38518,15 +38855,14 @@ var docxLayout = (function(exports) {
* are kept with, as they are placed, and none of it fitting when a drawing of that paragraph that moves with it would go
* past the bottom of the page. Word moves a heading kept with the next to the next page with a paragraph that moves
* there with its drawing (`word-floats2.docx` G11, G12), and keeps one beside a drawing with as many of the next
- * paragraph's lines, beside it, as widow control keeps together (G13). Where the paragraphs kept with the next have
- * drawings of their own, or are kept with a table, how much room Word finds for them hasn't been seen.
+ * paragraph's lines, beside it, as widow control keeps together (G13). Those with drawings of their own, or kept with a
+ * table, aren't measured here (see {@link KEPT_BESIDE}).
*/
const keptBeside = (index, width) => {
var _nextRows$at, _lastRow$spacingBelow;
const chain = keptChain(index);
const anchor = blocks[index + chain].block;
const kept = blocks.slice(index, index + chain).map(({ block }) => block);
- if (anchor.type === "table" || kept.some(({ items }) => items.some(({ type }) => type === "drawing"))) throw new Unsupported("a paragraph kept with the next beside a drawing, with a drawing of its own or before a table");
const widths = [{
from: 0,
width
@@ -38581,20 +38917,25 @@ var docxLayout = (function(exports) {
}, next.pageBreakBefore ? {} : { keptLines: nextLines });
};
/**
- * Whether a block is the empty paragraph that ends a section right after a table. Word gives it a line of its own, 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
+ * 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
+ * (`word-stops-floats.docx` FR1b)
*/
const endsAfterTable = (index) => {
var _blocks$index, _blocks5;
const block = (_blocks$index = blocks[index]) === null || _blocks$index === void 0 ? void 0 : _blocks$index.block;
- return (block === null || block === void 0 ? void 0 : block.type) === "paragraph" && block.sectionBreak === true && ((_blocks5 = blocks[index - 1]) === null || _blocks5 === void 0 ? void 0 : _blocks5.block.type) === "table";
+ return (block === null || block === void 0 ? void 0 : block.type) === "paragraph" && block.sectionBreak === true && (((_blocks5 = blocks[index - 1]) === null || _blocks5 === void 0 ? void 0 : _blocks5.block.type) === "table" || block.items.some((item) => item.type === "drawing" && item.drawing.frame !== void 0));
};
const placeBlock = (block, index) => {
var _blocks8, _blocks9;
blockIndex = index;
stopAtRead(block);
if (index === firstEndnote && section().columns.length > 1) stopAt(ENDNOTES_IN_COLUMNS);
+ if (keptOn !== void 0 && index > keptOn.next) {
+ stopAt(keptOn.reason);
+ keptOn = void 0;
+ }
const width = columnsSection().columns[column];
const previous = blocks[index - 1];
if (block.type === "paragraph") {
@@ -38625,10 +38966,17 @@ var docxLayout = (function(exports) {
inlineFloats(floatsFrom(index), unknown);
}
if (block.type === "table") {
+ if (placeBeforeTable(block, index) && keptOn === void 0) keptOn = {
+ next: index,
+ page: pageCount,
+ column,
+ reason: BEFORE_TABLE_MOVING_ON
+ };
placeTable(block);
sectionSpaceAfter = void 0;
return;
}
+ if (startsNextPage.get(index) === pageCount) startPage();
const paragraph = measureParagraph(block, width, (_blocks8 = blocks[index - 1]) === null || _blocks8 === void 0 ? void 0 : _blocks8.block, (_blocks9 = blocks[index + 1]) === null || _blocks9 === void 0 ? void 0 : _blocks9.block);
let holdNotes = false;
if (paragraph.keepNext) {
@@ -38651,7 +38999,23 @@ var docxLayout = (function(exports) {
const keptWithPrevious = (previous === null || previous === void 0 ? void 0 : previous.section) === blocks[index].section && previous.block.type === "paragraph" && previous.block.format.keepNext === true;
const anchor = blocks[index + keptChain(index)].block;
const anchorTaller = anchor.type === "paragraph" ? columnsTallerThan(anchor) : [];
- if (anchorTaller.length > 0 && anchorTaller.every((tall) => tall)) {
+ 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);
+ else if (unmeasured) {
+ placeParagraph(block, paragraph, false);
+ keptOn = {
+ next: index + 1,
+ page: pageCount,
+ column,
+ reason
+ };
+ sectionSpaceAfter = void 0;
+ return;
+ }
+ if (tallAnchor) {
if (!keptWithPrevious && !atTopOfPage()) startPage();
} else if (placedInColumn) {
const here = keptHere();
@@ -38674,13 +39038,13 @@ var docxLayout = (function(exports) {
* out again, and after the page has been laid out again for its drawings a few times
*/
const placeAbove = (drawing) => {
- var _pageLayouts$get, _pinned$get6;
+ var _pageLayouts$get, _pinned$get7;
const layouts = ((_pageLayouts$get = pageLayouts.get(pageCount)) !== null && _pageLayouts$get !== void 0 ? _pageLayouts$get : 0) + 1;
if (layouts > MOST_PAGE_LAYOUTS) throw new Unsupported("drawings whose places on the page don't settle as the text goes round them");
const onPage = placements.slice(placements.findLastIndex(({ type }) => type === "page") + 1, columnsStart.placed);
if (columnsStart.pageCount === pageCount && onPage.length > 0) throw new Unsupported("a drawing beside text of a section before on its page");
pageLayouts.set(pageCount, layouts);
- pinned.set(pageCount, [...((_pinned$get6 = pinned.get(pageCount)) !== null && _pinned$get6 !== void 0 ? _pinned$get6 : []).filter(({ anchor }) => anchor !== drawing.anchor), drawing]);
+ pinned.set(pageCount, [...((_pinned$get7 = pinned.get(pageCount)) !== null && _pinned$get7 !== void 0 ? _pinned$get7 : []).filter(({ anchor }) => anchor !== drawing.anchor), drawing]);
};
/** Takes back the bookmarks and fields placed since some were, to place them again as what is after them is laid out again */
const unmarkSince = (marks) => {
@@ -38708,7 +39072,10 @@ var docxLayout = (function(exports) {
placeBlock(block, index);
} catch (error) {
if (error instanceof DrawingAbove) placeAbove(error.drawing);
- else if (!(error instanceof NotesGrew)) throw error;
+ else if (error instanceof PushedOn) {
+ startsNextPage.set(error.block, error.page);
+ pinned.set(error.page, pinned.get(error.page).filter(({ anchor }) => Number(anchor.split(" ")[0]) !== error.block));
+ } else if (!(error instanceof NotesGrew)) throw error;
else reserveFor(error);
restore(columnsStart);
index = columnsStart.index - 1;
diff --git a/usage/layout.md b/usage/layout.md
index 15bd1c2898..d5ebb5196a 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -208,9 +208,9 @@ 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, however narrow it is, and none when the next word doesn't fit. 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. 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, 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. A table that fits beside a drawing at its indent goes beside it, as does one without an indent that fits past a drawing on its left, and one that doesn't fit goes below it. 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. 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`). Its room is as wide as its rows with the halves of its borders left and right, or 0.75 points wider than its rows without borders there, 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. 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
-- 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. The bookmarks and fields in a frame are on its anchor's page. The text in frames isn't among the lines of `layoutDocument`'s pages
+- 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
- 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, 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 and after a function's name or a sum, and none beside brackets, bars and slashes. 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. 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, and braces 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, to the half point), and a sum's limits are beside it; displayed, a fraction keeps its size, and a sum is larger, with its limits under and over it. 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. 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 }`) is joined to the next, all in the next one's formatting, style and list, and a section whose break is deleted goes on into the next, on its pages. 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. A footnote whose reference is deleted isn't laid out, but Word still counts it, so the footnotes after it keep their numbers. 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. 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 deleted text. 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
@@ -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 a note, one without a paragraph after it in its section, one placed without what it is placed against (`horizontalAnchor`, `verticalAnchor`) or lined up with the line it would be in, one with a footnote in it or a border on one side only, one kept with the next paragraph or before a paragraph kept with the next, two that may not overlap (`overlap: OverlapType.NEVER`) and do, and one that would go past the bottom of the page, which Word breaks across pages, with the paragraph after it on the last
-- a text frame where Word's way with it hasn't been seen: one with borders, which take room beside it that their width doesn't explain, one in a header, footer, table cell, footnote, endnote or text box, one with no paragraph after it in its section, such as one before a table, one with a footnote or endnote in it, one whose paragraph and style give it different frames, and one placed against something other than the page, the margins, the column and the paragraph, or lined up in line with the text
+- 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, which Word moves out of the way, 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, or beside an indented table 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, one in columns evened out after being laid out again for a drawing beside text before it, and one beside the footnotes at the bottom of a page. So does one placed against where its anchor is along its line (`HorizontalPositionRelativeFrom.CHARACTER`), or by its simple position, 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, above footnotes, or only by its distance from the text below it. So does one whose anchor's page changes as the text goes round it, and a page whose text going round a drawing moves the drawing's paragraph to the next page, or that has to be laid out again for its drawings more than 5 times
+- 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
- an equation Word builds up where its way with it hasn't been seen: scripts in a size other than 11 points, where Word's scripts' size could be rounded more than one way, a superscript in a denominator, a root or another cramped part, brackets whose size Word's probes leave between two of Cambria Math's sizes, a matrix whose rows are too tall to be single spaced, a fraction, brackets, a sum or a function directly beside a letter or digit, where Word may put a thin space, a fraction beside other parts in a fraction, a fraction in a script of a displayed equation, a sum in a script, a box (`MathBorderBox`), an equation array, a phantom, pre-scripts, skewed and linear fractions, an empty part, where Word shows a placeholder, and one Word builds up displayed beside text or alone after its list's number; normal text (`normalText`), which Word draws in the paragraph's font; a digit in bold or another alphabet, such as double-struck; a symbol Word has been seen to draw only next to itself, such as an arrow or a set operator, beside other atoms, and a character Cambria Math doesn't have; operators next to each other Word hasn't been seen to space; 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 put limits, displayed equations or fractions otherwise, and displayed equations whose document's maths settings give them margins (`m:lMargin`, `m:rMargin`), which Word breaks one too long for them within, or space between them (`m:interSp`) where there are two side by side in a paragraph of equations
- 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.