diff --git a/api/classes/charts.ChartDataPatch.html b/api/classes/charts.ChartDataPatch.html
index 4dbd065492..2d7542531c 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 d18798f2de..7dd33611dd 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 ee2350248c..5de12b30eb 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 62ef6d6108..d0ab8c933a 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 8cc8efdd7f..02541a9898 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 47524fd466..7e4b25415a 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 87fff46252..396403e909 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 15e86702a9..6b08a9aa34 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 b33f1475cb..56aea0e668 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 12722f72d2..0352d721f9 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 deb82ea6b7..3c844576b9 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 6cfd8cfe07..70424bdfbc 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 13936fecac..266f7beca6 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 72ee5e2229..6e36c780ed 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 78aa6531e8..770cdc5798 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 844a1f4401..0f41f2b7ec 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 4798695ea9..23ee00acc1 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 2da20cc6c3..72e4310949 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 08b997f6e3..656fc4da59 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 c76d97b5a0..9fa86403fe 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 eae32f4256..c0a356a0c4 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 d7b1f05136..d6fe5f0229 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 c26e7a9094..6df4a7a440 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 b8b33c6fee..c5bd90fee9 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 35e44dae30..ada9c24e94 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 3951480e6d..f37eb340b7 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 66fc496397..ced5aae350 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 44ecddf6db..73ed3ece5d 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 77decc4764..dbb1003375 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 17c4165ade..daa9144236 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 727e3bcf99..4a84258d3f 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 82a3d8e43b..6434df3fd5 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 6badd0bca7..0be9ea8e9b 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 68323ff528..0087862660 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 4de865f334..249e77ab72 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 77c5d70d69..90b402c62e 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 9191398a73..b8b0bca75b 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 d87d83a7a5..749f400a09 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 9d13c523bb..421089383b 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 1072d65d44..9b253946e9 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 3572d63804..f43bc3a5b3 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 aabb1a0359..db959e5430 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 0c37b1fb02..9e85953476 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 ff62f58a35..6d9521b4e2 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 2feae28323..6d5e6852fc 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 80cc221a04..627b6317f8 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 8b92eeb1d7..4d10779df6 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 b58366a8f8..736cf80ebe 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 44272a6df0..ab868f489c 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 0647f670a9..7ee01a06f3 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 ef9b287729..f150ac5229 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 e0473f8043..15733cb703 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 220bd1bd4a..96c83af8f2 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 89b7e2fc89..9afa8bba45 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 585c02ba60..c0c81660f3 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 3023fc42e8..1e701bd6ce 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 b94830d696..a799702b89 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 b234b66450..5f4799eaca 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 eb61a16e4d..148dae2691 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 200ecfe4a4..8ca69b112b 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 2472639655..1950ab65ba 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 2927492b8a..7a61f12af7 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 f124640acc..77fd25c26b 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 9403c9d26b..295ab9e80b 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 1224a9c568..184260c608 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 fdc301d039..cbf3a58474 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 8605e87059..3bf4c2561f 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 5499f36b65..a19a16b3fc 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 7d96bc9eff..a9eea1a1cd 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 86bcfac8de..c52401ec94 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 b695abdc96..40d31d95fa 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 3f45646bdd..0eb4d12a4a 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 479573eab8..c61bfd2c3c 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 ed8281b1aa..2394efd478 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 e4a8dfb3dc..6dbea100b1 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 df240e925c..acc6dc90f2 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 fd3748890a..9a063277a4 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 5355f59873..a3cca4fa3f 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 6b615b2280..9f677bdec1 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 c7b2c40217..73dc47c6f4 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 29c1a4ad40..a5b3ce5050 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 6969d02c54..c52437b2e7 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 3700861b61..379617c030 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 7a021e54a4..ff7321ab15 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 bc7b74b0f9..4ea016669d 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 7a65d79c3c..13af14df8d 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 a3aee87461..573f6682e4 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 d5fd7181d4..27dab824d1 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 66afabe0dc..40a2b91390 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 3990249475..e7f4a51473 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 58bdb828cf..4d4b003cbc 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 52091c9a1a..90f223a1e4 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 4cda28f552..d63ab1ebd3 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 2c656590f3..f513996a91 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 3318abed79..0d3f9d9fc4 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 f12c3b2669..6147a33ba3 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 3fe4a451f7..010d2a10ee 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 d36894ddbb..c2af663857 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 2cf2f4b943..55788b93d0 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 b76dbe54c0..52337690c7 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 45686fb54f..084c068c04 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 006b479fa3..b050773372 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 b082f19d84..55e4b5faae 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 8f0e902819..d474508be8 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 160349fa2e..19263dcaaa 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 77ad6288d9..1645b18c80 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 a5e5fd3eb0..1e05b0bcd6 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 a9ae61c0ba..daea401233 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 8af5597cd8..0ba941a0d1 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 5819c0086e..e5c2b2f2bd 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 57b667692f..a589dda45d 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 1592aa7dc4..6130dfca15 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 d0651cf0c0..c4af649fec 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 1c9b6bbbec..216220ede3 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 616bd471c8..5310502e11 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 a6baa226dc..707cb0b5cb 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 bca712721d..01300b6f47 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 fdbd2ebe39..4f30f61676 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 f0bd95e6a0..a44831ca67 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 35278f1a67..e0888a2209 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 dbb3156b89..c125587e61 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 dd81683a33..46e5a16e54 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 1a27a7518d..7de9390ef5 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 8b7b19873d..674971bb87 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 22c52935be..af79103a21 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 dd4d27250e..97173f4bb9 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 0debd0bfba..e66e5fb95e 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 76872b850e..38cb025e28 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 ed437ee5a6..66387483d7 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 c5eee953e7..241ff81e84 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 a444c5782a..9ef8ff6e2a 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 8d60f0e1cf..302f556520 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 a550e171d6..037ece5bbf 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 04980de10e..473addcfb0 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 ae8e62a715..554066a3a9 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 9b1e4bbea4..962adacbdc 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 52822bb2b4..f358351f14 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 968b7319aa..13ca46af41 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 d4b4224caa..a56c60bb12 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 ed41be0010..323c6015c7 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 cc13d7df67..8ced812cb9 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 8ca92e6ebb..ab20f9b27d 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 f844fc09a9..cb139df97a 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 41859d11db..6dfd8343fe 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 86822a1995..4fb616d71d 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.
@@ -63,7 +63,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.
+
@@ -73,7 +73,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 72cda4aa50..f4eff83e4d 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 8ab66a5273..edfa6f6c3c 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 78ba5bc68b..b2a00ad8d8 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 eb8c521ef6..01dec231af 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 9fc3401d92..2fdd798a74 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 b6112bf964..069195601e 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 bdc1c716db..bfb882ae46 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 edb889ecc6..41b2a9e4b8 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 1c3acae201..c34d8647df 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 358ce8ca22..4a0a190523 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 57e7c51903..f219fdd787 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 39666fa45a..7fef6877d9 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 cfc910bd1f..b199813c23 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 90183efb8a..3259ef7573 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 2f9477eee4..bf1d0222a3 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 06a3ae5619..fbe3821974 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 9f6c395045..c08d59d379 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 2cbf22f4d0..410fbcb048 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 82112b8b47..8ef6e6dee9 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 81f121ca41..9e1688f418 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 317c9246ea..bb782bc8d6 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 05f6fbd703..f732939f76 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 e3967dab9c..7a6822ceba 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 6041185200..3384b81738 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 15b86ad953..7dce9b4649 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 46a8b279a4..085edd9bc3 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 7afcb8326a..eebcfb8076 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 8bf6721eea..0fd1ff3879 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 e580124fe6..e2fdbb6887 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 beb3ab4176..492b115fb0 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 b6230aab12..aa435e73c6 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 fc24d5e820..e29574c5e1 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 07fa832555..9e7dcea17f 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 cc3c9242a9..f28ffbd69f 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 621ff8c16d..741e7dfa7c 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 74e0a67345..24f3af9b88 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 09f91fd3c3..1eba4e7723 100644
--- a/api/variables/layout.estimatePageNumbers.html
+++ b/api/variables/layout.estimatePageNumbers.html
@@ -51,7 +51,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 342bce6bd2..003b230742 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -7513,8 +7513,9 @@ var docxLayout = (function(exports) {
...Object.keys(BORDER_WIDTHS),
"custom"
]);
+ /** Whether a style of border is an art border's, of pictures, whose size is in points, rather than a line's */
+ var isArtBorder = (style) => !LINE_BORDERS.has(style);
var SEEN_RUN_BORDERS = { thickThinLargeGap: { 36: 54 } };
- var WIDEST_ART_BORDER = 31;
/**
* How wide a run's border is as Word draws it, in eighths of a point: as a paragraph's of its style. A border of no style
* ("none") takes its space still, but no width (scripts/layout-probes/word-run-formatting.ts RF7h). An art border's size
@@ -7528,7 +7529,7 @@ var docxLayout = (function(exports) {
var _BORDER_WIDTHS$style, _BORDER_WIDTHS$style2, _SEEN_RUN_BORDERS$sty;
if (size === void 0) return style === "none" && !shadow && !frame ? 0 : void 0;
if (shadow || frame) return style === "single" && size >= 2 && size <= 96 ? (shadow ? 2 : 1) * size : void 0;
- if (!LINE_BORDERS.has(style)) return size >= 1 && size <= WIDEST_ART_BORDER ? size * EIGHTHS_PER_POINT$2 : void 0;
+ if (isArtBorder(style)) return size >= 1 && size <= 31 ? size * EIGHTHS_PER_POINT$2 : void 0;
if (style === "single" && size === 1 || style === "double" && size === 0) return BORDER_WIDTHS[style](size);
return style === "none" ? 0 : size < 2 || size > 96 ? void 0 : (_BORDER_WIDTHS$style = (_BORDER_WIDTHS$style2 = BORDER_WIDTHS[style]) === null || _BORDER_WIDTHS$style2 === void 0 ? void 0 : _BORDER_WIDTHS$style2.call(BORDER_WIDTHS, size)) !== null && _BORDER_WIDTHS$style !== void 0 ? _BORDER_WIDTHS$style : (_SEEN_RUN_BORDERS$sty = SEEN_RUN_BORDERS[style]) === null || _SEEN_RUN_BORDERS$sty === void 0 ? void 0 : _SEEN_RUN_BORDERS$sty[size];
};
@@ -11000,40 +11001,109 @@ var docxLayout = (function(exports) {
* though they take no room (`word-tracked-changes.docx` MK11h, MK11i)
*/
var sizingRows = ({ rows, deletedRows = [] }) => [...rows, ...deletedRows];
- var VERTICAL_LINE = 1.25;
+ var CALIBRI_VERTICAL_LINE = 1.25;
+ var AS_ACROSS = /* @__PURE__ */ new Set([
+ "times new roman",
+ "arial",
+ "cambria",
+ "courier new"
+ ]);
+ var VERTICAL_EXTRA = .35;
var VERTICAL_DESCENT = .25;
var VERTICAL_RANGE = [.9, 1.2];
/** The size of a run's line, which a superscript or subscript keeps of its text (`word-stops-vertical-cells.docx` TV4) */
var lineSizeOf = ({ size = 10, lineSize = size }) => lineSize;
+ /** The fonts of a paragraph's text and of the numbers its page fields write among it */
+ var textFontsOf = (items) => items.flatMap((item) => item.type === "text" || item.type === "pageNumber" || item.type === "pageCount" || item.type === "pageReference" || item.type === "sectionNumber" ? [item.font] : []);
/** The line sizes of a paragraph's text and of the numbers its page fields write among it */
- var textLineSizesOf = (items) => items.flatMap((item) => item.type === "text" || item.type === "pageNumber" || item.type === "pageCount" || item.type === "pageReference" || item.type === "sectionNumber" ? [lineSizeOf(item.font)] : []);
+ var textLineSizesOf = (items) => textFontsOf(items).map(lineSizeOf);
/**
- * About how wide Word makes a paragraph of text that runs up or down a cell, across the cell, in points: one line however
- * long its text (`word-stops-vertical-cells.docx` TV1f), as wide as its largest text, its page fields' numbers among it,
- * not its mark (TV5b), or its picture with the text's descent (TV5c), with the space before and after it.
+ * How far apart Word lays out the lines of text that runs up or down a table cell in a font, in points: in Calibri a
+ * quarter of its size further than its size, further than across the page, and in Times New Roman, Arial, Cambria and
+ * Courier New as far as across the page. Undefined in a font whose lines Word's PDFs haven't shown
*/
- var verticalWidthOf = ({ items, markFont, format }) => {
+ var verticalLineOf = (font, lineHeight) => {
+ var _font$font;
+ const name = ((_font$font = font.font) !== null && _font$font !== void 0 ? _font$font : DEFAULT_FONT).toLowerCase();
+ return name === "calibri" ? CALIBRI_VERTICAL_LINE * lineSizeOf(font) : AS_ACROSS.has(name) ? lineHeight(font) : void 0;
+ };
+ /**
+ * A line of text that runs up or down a cell at its paragraph's line spacing, in points: its multiple of the line, or the
+ * exact height, or the height at least (`word-stops-vertical-cells2.docx` VC3e to VC3g: 1.5 lines, exactly 20 points and
+ * at least 20 points)
+ */
+ var verticalSpacing = (line, spacing) => spacing === void 0 ? line : spacing.rule === "multiple" ? spacing.multiple * line : spacing.rule === "exact" ? spacing.height : Math.max(spacing.height, line);
+ /**
+ * How wide Word makes a paragraph of text that runs up or down a cell, across the cell, in points: one line however long
+ * its text (`word-stops-vertical-cells.docx` TV1f), as far across as the lines of its largest text and its page fields'
+ * numbers among it are apart (`verticalLineOf`), at its line spacing, not its mark (TV5b, `word-stops-vertical-cells2.docx`
+ * VC5b, VC5h), or its picture with the text's descent (TV5c), with the space before and after it (VC3c, VC3d). An empty
+ * paragraph takes none (VC3a, VC3b, VC3h, VC5d). Undefined where Word's width isn't known: in a font whose lines Word's
+ * PDFs haven't shown, of an empty paragraph with space before or after it, and with space before or after it as a web page
+ * spaces paragraphs
+ */
+ var verticalWidthOf = ({ items, markFont, format }, lineHeight) => {
var _format$spaceBefore, _format$spaceAfter;
+ const fonts = textFontsOf(items);
+ const pictures = items.flatMap((item) => item.type === "box" ? [item.height] : []);
+ const around = ((_format$spaceBefore = format.spaceBefore) !== null && _format$spaceBefore !== void 0 ? _format$spaceBefore : 0) + ((_format$spaceAfter = format.spaceAfter) !== null && _format$spaceAfter !== void 0 ? _format$spaceAfter : 0);
+ if (format.autoSpaceBefore === true || format.autoSpaceAfter === true) return;
+ if (fonts.length === 0 && pictures.length === 0) return around === 0 ? 0 : void 0;
+ const lineFonts = fonts.length > 0 ? fonts : [markFont];
+ const lines = lineFonts.map((font) => verticalLineOf(font, lineHeight));
+ if (lines.includes(void 0)) return;
+ const size = largest(lineFonts.map(lineSizeOf));
+ const line = verticalSpacing(largest(lines), format.lineSpacing);
+ return around + largest(pictures.map((height) => height + VERTICAL_DESCENT * size), line);
+ };
+ /**
+ * About how wide a paragraph of text that runs up or down a cell is, where how wide Word makes it isn't known: its largest
+ * text's lines a quarter of their size further apart than their size, as Calibri's are
+ */
+ var verticalEstimateOf = ({ items, markFont, format }) => {
+ var _format$spaceBefore2, _format$spaceAfter2;
const sizes = textLineSizesOf(items);
const size = largest(sizes.length > 0 ? sizes : [lineSizeOf(markFont)]);
const pictures = items.flatMap((item) => item.type === "box" ? [item.height + VERTICAL_DESCENT * size] : []);
- return ((_format$spaceBefore = format.spaceBefore) !== null && _format$spaceBefore !== void 0 ? _format$spaceBefore : 0) + largest(pictures, VERTICAL_LINE * size) + ((_format$spaceAfter = format.spaceAfter) !== null && _format$spaceAfter !== void 0 ? _format$spaceAfter : 0);
+ return ((_format$spaceBefore2 = format.spaceBefore) !== null && _format$spaceBefore2 !== void 0 ? _format$spaceBefore2 : 0) + largest(pictures, CALIBRI_VERTICAL_LINE * size) + ((_format$spaceAfter2 = format.spaceAfter) !== null && _format$spaceAfter2 !== void 0 ? _format$spaceAfter2 : 0);
+ };
+ /**
+ * How wide Word makes the text of a cell that runs up or down, across the cell, in points: as wide as each of its
+ * paragraphs (`verticalWidthOf`), and a little more. Undefined where it isn't known
+ */
+ var verticalCellWidthOf = ({ blocks }, lineHeight) => {
+ const widths = blocks.map((block) => block.type === "paragraph" ? verticalWidthOf(block, lineHeight) : 0);
+ return widths.includes(void 0) ? void 0 : sum$1(widths) + VERTICAL_EXTRA;
+ };
+ /** Whether how wide Word makes the text of a cell that runs up or down is known (`verticalCellWidthOf`) */
+ var isVerticalWidthKnown = (cell) => verticalCellWidthOf(cell, () => 0) !== void 0;
+ /**
+ * How wide the text of a cell that runs up or down is, across the cell, in points, as `verticalCellWidthOf` says, or where
+ * that isn't known, about as wide, times `across`
+ */
+ var verticalWidths = (lineHeight, across) => (cell) => {
+ var _verticalCellWidthOf;
+ return (_verticalCellWidthOf = verticalCellWidthOf(cell, lineHeight)) !== null && _verticalCellWidthOf !== void 0 ? _verticalCellWidthOf : across * (sum$1(cell.blocks.map((block) => block.type === "paragraph" ? verticalEstimateOf(block) : 0)) + VERTICAL_EXTRA);
};
/**
* How narrow and how wide the content of each cell of a table can be, with the cell's margins, as Word sizes the columns
* by it: with its deleted text in (MK11j). Text that runs up or down a cell is as wide as a line of each of its paragraphs
- * (TV1), times `across`.
+ * (TV1), as `vertical` says.
*/
- var measureCells = (table, measure, across) => new Map(sizingRows(table).flatMap(({ cells }) => cells.map((cell) => {
- var _cell$sizing;
- const vertical = across * sum$1(cell.blocks.map((block) => block.type === "paragraph" ? verticalWidthOf(block) : 0));
+ var measureCells = (table, measure, vertical) => new Map(sizingRows(table).flatMap(({ cells }) => cells.map((cell) => {
+ const measured = () => {
+ var _cell$sizing;
+ const widths = measure((_cell$sizing = cell.sizing) !== null && _cell$sizing !== void 0 ? _cell$sizing : cell.blocks);
+ return table.fit && cell.noWrap ? _objectSpread2(_objectSpread2({}, widths), {}, { min: widths.max }) : widths;
+ };
+ const fitted = table.fit ? cell.width : 0;
const text = cell.fitText ? {
- min: 0,
- max: 0
+ min: fitted,
+ max: fitted
} : cell.vertical ? {
- min: vertical,
- max: vertical
- } : measure((_cell$sizing = cell.sizing) !== null && _cell$sizing !== void 0 ? _cell$sizing : cell.blocks);
+ min: vertical(cell),
+ max: vertical(cell)
+ } : measured();
const margins = cell.marginLeft + cell.marginRight;
return [cell, _objectSpread2(_objectSpread2({}, text), {}, {
min: text.min + margins,
@@ -11171,7 +11241,16 @@ var docxLayout = (function(exports) {
var sizeGivenColumns = (table, content) => {
const cells = sizingRows(table).flatMap((row) => row.cells);
const count = largest(cells.map((cell) => cell.column + spanOf(cell)));
- const edges = Array.from({ length: count }, (_, index) => index + 1).reduce((done, edge) => done.concat(largest(cells.filter((cell) => cell.column + spanOf(cell) === edge).map((cell) => done[cell.column] + givenWidthOf(cell)), done[edge - 1])), [0]);
+ const ends = [...cells.map((cell) => ({
+ from: cell.column,
+ to: cell.column + spanOf(cell),
+ width: givenWidthOf(cell)
+ })), ...sizingRows(table).flatMap(({ cells: rowCells, before }) => before === void 0 || rowCells.length === 0 ? [] : [{
+ from: 0,
+ to: rowCells[0].column,
+ width: before
+ }])];
+ const edges = Array.from({ length: count }, (_, index) => index + 1).reduce((done, edge) => done.concat(largest(ends.filter(({ to }) => to === edge).map(({ from, width }) => done[from] + width), done[edge - 1])), [0]);
const columns = Array.from({ length: count }, (_, column) => {
const min = largest(cells.filter((cell) => cell.column === column && spanOf(cell) === 1).map((cell) => content.get(cell).min));
return {
@@ -11226,23 +11305,26 @@ var docxLayout = (function(exports) {
* the table wider than its width and the page (SP15a). Word evens out the rows of a table laid out fixed in the same
* way (SP14b), but widens no column of it for a long word.
*
- * Text that runs up or down a cell makes its column about as wide as a line of each of its paragraphs, however long
- * (`word-stops-vertical-cells.docx` TV1), and a long word in it widens nothing (TV2). How wide exactly Word makes it has
- * been seen only of Calibri, so the layout stops where the other cells' widths depend on it: where the columns are
- * narrowed to the room or fitted to the table's width, and where a cell gives it less than a line of its text.
+ * Text that runs up or down a cell makes its column as wide as a line of each of its paragraphs, however long
+ * (`word-stops-vertical-cells.docx` TV1, `verticalCellWidthOf`), and a long word in it widens nothing (TV2). Its columns
+ * are then sized as others are, narrowed to the room around it or widened to the table's width in proportion
+ * (`word-stops-vertical-cells2.docx` VC4a, VC4b). How wide Word makes it in a font whose lines Word's PDFs haven't shown
+ * isn't known, so there the layout stops where the other cells' widths depend on it: where the columns are narrowed to
+ * the room or fitted to the table's width, and where a cell gives it less than a line of its text.
*
* @param available - The width the table is in, in points: the page's text, a column's, or a table cell's
* @param measure - How narrow and how wide the content of a cell can be, in points
+ * @param lineHeight - How tall a line of text in a font is across the page, in points
*/
- var fitColumns = (table, available, measure) => {
+ var fitColumns = (table, available, measure, lineHeight) => {
const { fit, widen } = table;
if (!fit && !widen) return table;
const fitAt = (across) => fitTo(table, available, (widen === null || widen === void 0 ? void 0 : widen.fixed) ? measureCells(table, () => ({
min: 0,
max: 0
- }), 0) : measureCells(table, measure, across));
+ }), () => 0) : measureCells(table, measure, verticalWidths(lineHeight, across)));
const laidOut = fitAt(1);
- if (laidOut.unsupported !== void 0 || (widen === null || widen === void 0 ? void 0 : widen.fixed) || !sizingRows(table).some(({ cells }) => cells.some(({ vertical }) => vertical))) return laidOut;
+ if (laidOut.unsupported !== void 0 || (widen === null || widen === void 0 ? void 0 : widen.fixed) || !sizingRows(table).some(({ cells }) => cells.some((cell) => cell.vertical && verticalCellWidthOf(cell, lineHeight) === void 0))) return laidOut;
const widthsOf = ({ rows, unsupported }) => JSON.stringify([unsupported, rows.map(({ cells }) => cells.filter(({ vertical }) => !vertical).map(({ width }) => width))]);
return VERTICAL_RANGE.every((across) => widthsOf(fitAt(across)) === widthsOf(laidOut)) ? laidOut : _objectSpread2(_objectSpread2({}, laidOut), {}, { unsupported: fit ? "text that runs up or down a cell of a table sized to its text, narrowed or fitted to its width" : "a table cell given less width than a line of its text that runs up or down" });
};
@@ -11251,7 +11333,7 @@ var docxLayout = (function(exports) {
* content of each cell can be
*/
var fitTo = (table, available, content) => {
- var _tableWidth$width, _tableWidth$share;
+ var _table$borderLeft, _table$borderRight, _tableWidth$width, _tableWidth$share;
const { fit, widen, rows, indent = 0 } = table;
const spaced = table.cellSpacing !== void 0;
if (widen) {
@@ -11264,15 +11346,20 @@ var docxLayout = (function(exports) {
const { columns, unsettled } = widen ? sizeGivenColumns(table, content) : sizeColumns(table, content);
const total = sum$1(columns.map(({ width }) => width));
const tableWidth = fit !== null && fit !== void 0 ? fit : widen;
- const target = (_tableWidth$width = tableWidth.width) !== null && _tableWidth$width !== void 0 ? _tableWidth$width : tableWidth.share === void 0 ? void 0 : tableWidth.share * available;
+ const borders = table.marginsBeside === true ? 0 : (((_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;
const beside = table.marginsBeside === true ? outerMargins(table) : 0;
- const room = target !== null && target !== void 0 ? target : (widen === null || widen === void 0 ? void 0 : widen.fixed) ? Number.POSITIVE_INFINITY : available - indent + beside;
+ const target = (_tableWidth$width = tableWidth.width) !== null && _tableWidth$width !== void 0 ? _tableWidth$width : tableWidth.share === void 0 ? void 0 : tableWidth.share * available - borders;
+ const fullRoom = (widen === null || widen === void 0 ? void 0 : widen.fixed) ? Number.POSITIVE_INFINITY : available - indent + beside - borders;
+ const room = target !== null && target !== void 0 ? target : fullRoom;
const sizingCells = sizingRows(table).flatMap((row) => row.cells);
if (fit && sizingCells.some((cell) => content.get(cell).hyphenated) && (total > room || sizingCells.some((cell) => cell.ownWidth !== void 0 && content.get(cell).min > cell.ownWidth))) return _objectSpread2(_objectSpread2({}, table), {}, { unsupported: "a table sized to its text whose columns' widths depend on words Word may hyphenate" });
const words = proportionalWords(table, columns);
- const overflowing = sum$1(columns.map(({ min }) => min)) > room && tableWidth.width === void 0;
- const crowded = overflowing && words !== void 0 && sum$1(words.margins) > room;
- const unsupported = overflowing && (((_tableWidth$share = tableWidth.share) !== null && _tableWidth$share !== void 0 ? _tableWidth$share : 1) < 1 || words === void 0 || unsettled.length > 0) ? "a word longer than its table can make room for" : crowded ? "a table whose cells' margins are wider than the room for it" : unsettled.includes("always") || unsettled.length > 0 && total > room ? "a long word in cells merged across columns" : void 0;
+ const least = sum$1(columns.map(({ min }) => min));
+ const overflowing = least > room && tableWidth.width === void 0;
+ const sharedRoom = ((_tableWidth$share = tableWidth.share) !== null && _tableWidth$share !== void 0 ? _tableWidth$share : 1) < 1 ? fullRoom : room;
+ const grows = overflowing && least <= sharedRoom;
+ const crowded = overflowing && !grows && words !== void 0 && sum$1(words.margins) > sharedRoom;
+ const unsupported = overflowing && (unsettled.length > 0 || !grows && words === void 0) ? "a word longer than its table can make room for" : crowded ? "a table whose cells' margins are wider than the room for it" : unsettled.includes("always") || unsettled.length > 0 && total > room ? "a long word in cells merged across columns" : void 0;
const given = columns.filter((column) => column.given);
const sized = columns.filter((column) => !column.given);
const givenWidths = narrowed(given, room - sum$1(sized.map(({ min }) => min)));
@@ -11280,7 +11367,8 @@ var docxLayout = (function(exports) {
const spacingRooms = columns.map((_, index) => spaced ? spacingOf(table.cellSpacing, index, columns.length) : 0);
const spacing = sum$1(spacingRooms);
const widths = columns.map((column, index) => {
- if (overflowing && words !== void 0 && !crowded) return words.margins[index] + (room - sum$1(words.margins)) * words.widths[index] / sum$1(words.widths);
+ if (grows) return column.min;
+ if (overflowing && words !== void 0 && !crowded) return words.margins[index] + (sharedRoom - sum$1(words.margins)) * words.widths[index] / sum$1(words.widths);
if (target !== void 0 && total < target && total > spacing) return spacingRooms[index] + (column.width - spacingRooms[index]) * (target - spacing) / (total - spacing);
return column.given ? givenWidths[given.indexOf(column)] : sizedWidths[sized.indexOf(column)];
});
@@ -11297,15 +11385,16 @@ var docxLayout = (function(exports) {
* its columns.
*
* @param measure - How narrow and how wide the content of a cell can be, in points
+ * @param lineHeight - How tall a line of text in a font is across the page, in points
*/
- var tableWidths = (table, measure) => {
+ var tableWidths = (table, measure, lineHeight) => {
var _widen$width, _fit$width;
const { fit, widen, borderLeft = 0, borderRight = 0 } = table;
- const laidOut = widen === void 0 || widen.share !== void 0 ? table : fitColumns(table, (_widen$width = widen.width) !== null && _widen$width !== void 0 ? _widen$width : Number.POSITIVE_INFINITY, measure);
+ const laidOut = widen === void 0 || widen.share !== void 0 ? table : fitColumns(table, (_widen$width = widen.width) !== null && _widen$width !== void 0 ? _widen$width : Number.POSITIVE_INFINITY, measure, lineHeight);
const rows = laidOut === table || laidOut.unsupported !== void 0 ? sizingRows(table) : laidOut.rows;
const borders = (borderLeft + borderRight) / 2;
if (fit !== void 0 && fit.width === void 0) {
- const content = measureCells(table, measure, 1);
+ const content = measureCells(table, measure, verticalWidths(lineHeight, 1));
const { columns } = sizeColumns(table, content);
return _objectSpread2({
min: sum$1(columns.map(({ min }) => min)) + borders,
@@ -34022,84 +34111,22 @@ var docxLayout = (function(exports) {
var isDrawn = (border) => border !== void 0 && border.style !== "none";
/**
* The room a border takes from what is beside it, in points: its line's room and the space between it and the text,
- * which Word adds to it (BS31). Undefined for a style or width whose room Word's PDFs haven't shown.
+ * which Word adds to it (BS31). An art border's width is in points, where a line's is in eighths of one, and it takes that
+ * many above and below a cell's text (`word-stops-table-borders.docx` TB4w and TB4x, `word-stops-table-borders2.docx`
+ * BT2a to BT2e: apples and triangles of 6, 12, 20 and 31 points, and BT1h, where apples and triangles of 12 meet). Undefined
+ * for a style or width whose room Word's PDFs haven't shown.
*/
var roomOf = (border) => {
var _ROOMS$style, _ROOMS$style2, _ROOMS_BY_WIDTH$style;
if (!isDrawn(border)) return 0;
const { style, width, space = 0 } = border;
+ if (isArtBorder(style)) {
+ const art = width * EIGHTHS_PER_POINT$1;
+ return art <= 31 ? art + space : void 0;
+ }
const room = (_ROOMS$style = (_ROOMS$style2 = ROOMS[style]) === null || _ROOMS$style2 === void 0 ? void 0 : _ROOMS$style2.call(ROOMS, width)) !== null && _ROOMS$style !== void 0 ? _ROOMS$style : (_ROOMS_BY_WIDTH$style = ROOMS_BY_WIDTH[style]) === null || _ROOMS_BY_WIDTH$style === void 0 ? void 0 : _ROOMS_BY_WIDTH$style[width];
return room === void 0 ? void 0 : room + space;
};
- var WEIGHTS = {
- single: 1,
- thick: 2,
- double: 3,
- dotDash: 8,
- dotDotDash: 9,
- triple: 10,
- thinThickSmallGap: 11,
- thickThinSmallGap: 12,
- thinThickThinSmallGap: 13,
- thinThickMediumGap: 14,
- thickThinMediumGap: 15,
- thinThickThinMediumGap: 16,
- thinThickLargeGap: 17,
- thickThinLargeGap: 18,
- thinThickThinLargeGap: 19,
- wave: 20,
- doubleWave: 21,
- dashSmallGap: 22,
- dashDotStroked: 23,
- threeDEmboss: 24,
- threeDEngrave: 25,
- outset: 26,
- inset: 27
- };
- var UNWEIGHED = /* @__PURE__ */ new Set(["dotted", "dashed"]);
- var PRECEDENCE = [
- "single",
- "thick",
- "double",
- "dotted",
- "dashed",
- "dotDash",
- "dotDotDash",
- "triple",
- "thinThickSmallGap",
- "thickThinSmallGap",
- "thinThickThinSmallGap",
- "thinThickMediumGap",
- "thickThinMediumGap",
- "thinThickThinMediumGap",
- "thinThickLargeGap",
- "thickThinLargeGap",
- "thinThickThinLargeGap",
- "wave",
- "doubleWave",
- "dashSmallGap",
- "dashDotStroked",
- "threeDEmboss",
- "threeDEngrave",
- "outset",
- "inset"
- ];
- /** How heavy Word counts a border where two cells' borders meet, or undefined for a style it doesn't weigh, such as art */
- var weightOf = ({ style, width }) => UNWEIGHED.has(style) ? 1 : WEIGHTS[style] === void 0 ? void 0 : WEIGHTS[style] * width * EIGHTHS_PER_POINT$1;
- /**
- * The border Word draws where two cells meet: the one there is, when the other is none, and otherwise the heavier, its
- * width in eighths of a point times a number for its style, or of two as heavy, the later of their styles in Word's list
- * (MS-OI29500, Part 1, 17.4.66; `word-stops-table-borders.docx` TB1 and TB2: a double border of half a point over a
- * single one of 1.5 points, and a single one of 1.5 points over a dotted one). Two of the same style and width are the
- * same border. Undefined where Word's choice isn't known: between styles Word doesn't weigh, such as art borders.
- */
- var borderBetween = (one, other) => {
- if (!isDrawn(one) || !isDrawn(other)) return isDrawn(one) ? one : other;
- const [weight, otherWeight] = [weightOf(one), weightOf(other)];
- if (weight === void 0 || otherWeight === void 0) return one.style === other.style ? one.width >= other.width ? one : other : void 0;
- if (weight !== otherWeight) return weight > otherWeight ? one : other;
- return PRECEDENCE.indexOf(other.style) > PRECEDENCE.indexOf(one.style) ? other : one;
- };
/** The room a border takes, or why it isn't known */
var roomOrWhy = (border) => {
var _roomOf;
@@ -34111,7 +34138,7 @@ var docxLayout = (function(exports) {
var widest = (borders) => borders.reduce((room, border) => wider(room, roomOrWhy(border)), 0);
/**
* The room the borders of a table's rows take, in points. Each cell's side has its own border, or else the table's
- * there. Where two cells meet, Word draws one of their borders (`borderBetween`), but makes room for the wider, whichever
+ * there. Where two cells meet, Word draws one of their borders (see `sideBorders`), but makes room for the wider, whichever
* it draws (`word-stops-table-borders.docx` TB3d: a dotted border of 1.5 points meeting a single one of half a point
* takes 1.5 points, below the single one Word draws), so each row is as much taller as the widest of its cells' borders
* and those of the cells above them (`word-table-formats.docx` BC1, TB1 to TB3). A cell merged down from the row above
@@ -34157,13 +34184,18 @@ var docxLayout = (function(exports) {
};
};
/**
- * The room the borders left and right of each cell of a row take, in points: its own, or the table's at the table's
- * edges and between its cells. Where two cells meet, the wider of their borders, and the one Word draws
- * (`borderBetween`), which can be the narrower. Why, where a border's room isn't known.
+ * The room the borders left and right of each cell of a row take beside its text, in points: its own, or the table's at
+ * the table's edges and between its cells. Where two cells meet, Word draws the heavier of their borders, by Word's weights
+ * for their styles (`word-stops-table-borders.docx` TB1 and TB2), but keeps each cell's text from its own border, whichever
+ * it draws and whichever is wider (`word-stops-table-borders2.docx` BT1a to BT1e, with no margins: the second cell's text
+ * 0.5 points in from its dotted and dashed border of 1 point, which Word drew over the first cell's single one of 6, and 3
+ * and 1.5 points in from its single ones of 6 and 3 points, below the first cell's heavier ones of 1 and 0.5 points). Why,
+ * where a border's room isn't known, or where an art border is beside the text, whose room there Word's PDFs haven't
+ * settled: apples of 12 points beside a cell's text kept it only 0.75 points from them, where they took 12 points above
+ * and below a cell's (BT1g).
*/
var sideBorders = (cells, table) => {
var _table$insideV;
- if (cells.length === 0) return [];
const insideV = (_table$insideV = table.insideV) !== null && _table$insideV !== void 0 ? _table$insideV : NONE;
const leftOf = (index) => {
var _cells$index$borders$, _table$left;
@@ -34173,31 +34205,31 @@ var docxLayout = (function(exports) {
var _cells$index$borders$2, _table$right;
return (_cells$index$borders$2 = cells[index].borders.right) !== null && _cells$index$borders$2 !== void 0 ? _cells$index$borders$2 : index === cells.length - 1 ? (_table$right = table.right) !== null && _table$right !== void 0 ? _table$right : NONE : insideV;
};
- const rooms = Array.from({ length: cells.length + 1 }, (_, index) => index === 0 ? [leftOf(0)] : index === cells.length ? [rightOf(index - 1)] : [rightOf(index - 1), leftOf(index)]).map((meeting) => {
- const [room, other = 0] = meeting.map(roomOrWhy);
- if (typeof room === "string" || typeof other === "string") return typeof room === "string" ? room : other;
- const drawn = meeting.length === 1 ? meeting[0] : borderBetween(meeting[0], meeting[1]);
- return {
- room: Math.max(room, other),
- drawn: roomOf(drawn)
+ const sides = cells.map((_, index) => {
+ const [left, right] = [leftOf(index), rightOf(index)];
+ return [
+ left,
+ right,
+ ...[...index > 0 ? [rightOf(index - 1)] : [], ...index < cells.length - 1 ? [leftOf(index + 1)] : []]
+ ].some((border) => isDrawn(border) && isArtBorder(border.style)) ? "an art border beside a table cell's text" : {
+ left: roomOrWhy(left),
+ right: roomOrWhy(right)
};
});
- const unsupported = rooms.find((room) => typeof room === "string");
- return unsupported !== null && unsupported !== void 0 ? unsupported : cells.map((_, index) => ({
- left: rooms[index],
- right: rooms[index + 1]
- }));
+ const unsupported = sides.flatMap((side) => typeof side === "string" ? [side] : [side.left, side.right]).find((room) => typeof room === "string");
+ return unsupported !== null && unsupported !== void 0 ? unsupported : sides;
};
/**
- * The space between a table's cells (`w:tblCellSpacing`), in points: none when it isn't given, or is `nil`. "share" when
- * it is a share of the table's width, which Word lays out as none for a table (`word-stops-table-borders.docx` TB6a and
- * TB6b: 2% and 5% of its width), and undefined for another type, such as `auto`, which Word's PDFs haven't shown.
+ * The space between a table's cells (`w:tblCellSpacing`), in points: none when it isn't given, or is `nil` or `auto`, which
+ * Word lays out as none, whatever its width (`word-stops-table-borders2.docx` BT5d and BT5e: of 100 twips and of none).
+ * "share" when it is a share of the table's width, which Word lays out as none for a table (`word-stops-table-borders.docx`
+ * TB6a and TB6b: 2% and 5% of its width), and undefined for a type the schema doesn't have.
*/
var readCellSpacing = (element) => {
var _pointsOf;
if (element === void 0) return 0;
const { "w:w": value, "w:type": type = "dxa" } = attributesOf(element);
- if (type === "nil") return 0;
+ if (type === "nil" || type === "auto") return 0;
if (type === "pct") return "share";
return type === "dxa" ? Math.max(0, (_pointsOf = pointsOf(value, 20)) !== null && _pointsOf !== void 0 ? _pointsOf : 0) : void 0;
};
@@ -34266,63 +34298,53 @@ var docxLayout = (function(exports) {
...lastRow && firstColumn ? ["swCell"] : []
];
};
- var BESIDE_TEXT = "table cell borders of different styles that meet, wider than twice a cell's margin";
/**
* The room around the text of a table's rows and cells: its borders and its cells' (`rowBorders`, `sideBorders`), and
- * the space between its cells.
+ * the space between the cells of each row.
*
- * Without space between cells, a cell's text is as far in from its left and right edges as its margin, or half the
+ * Without space between cells, a cell's text is as far in from its left and right edges as its margin, or half its own
* border there when that is more, as in Word (`word-table-formats.docx` BC7 to BC9, `word-table-formats2.docx` BC10 and
- * BC11). Where two borders of different styles meet and Word draws the narrower, which half border it keeps the text
- * from hasn't been seen, so where that is more than the margin, why.
+ * BC11, `word-stops-table-borders2.docx` BT1).
*
* With space between cells, each cell has borders of its own, its own or else the table's: the table's top above the
* first row, its bottom below the last, its left before the first cell and its right after the last, and its inside
* borders between them; and the table has its own around them. Each row has its space above and below its cells'
- * borders, and the table its space inside its own borders (CS1 to CS4, CS13). Where the table breaks across pages, the
- * row on the page keeps the space below it, with the table's bottom border below that, and the next page's starts with
- * the table's top border and the space above it (CS12, `word-stops-table-borders.docx` TB7a to TB7c). Across, the space
- * is around each cell and inside the table's edges, as margins are (`word-watertight-tables.docx` TB4,
- * `word-table-formats.docx` CS5 to CS8, `word-table-formats2.docx` CS9, CS10, CS14), and each cell's text is further in
- * by the whole of its own border left and right of it, where the table's borders there take none of its width (TB5a to
- * TB5l: with space of 2, 5 and 10 points, and borders of half a point to 6 points, each cell's text was twice its
- * border narrower than without them).
+ * borders, and inside the table's borders above the first row and below the last too (CS1 to CS4, CS13), its own where it
+ * has space of its own, in place of the table's (`word-stops-table-borders2.docx` BT5a and BT5b: rows of 2 and 5 points
+ * in a table of 2 points and of none). Where the table breaks across pages, the row on the page keeps the space below it,
+ * with the table's bottom border below that, and the next page's starts with the table's top border and the space above
+ * it (CS12, `word-stops-table-borders.docx` TB7a to TB7c). Across, the space is around each cell and inside the table's
+ * edges, as margins are, each row's own (`word-watertight-tables.docx` TB4, `word-table-formats.docx` CS5 to CS8,
+ * `word-table-formats2.docx` CS9, CS10, CS14, BT5a, BT5b), and each cell's text is further in by the whole of its own
+ * border left and right of it, where the table's borders there take none of its width (TB5a to TB5l: with space of 2, 5
+ * and 10 points, and borders of half a point to 6 points, each cell's text was twice its border narrower than without
+ * them; BT6a to BT6c: a row's own borders, `w:tblPrEx`, as its cells' own).
*/
- var tableGeometry = (rows, table) => {
+ var tableGeometry = (rows, borders) => {
var _borders$top, _borders$bottom;
- const { borders, spacing } = table;
- if (spacing === 0) {
+ const across = rows.map(({ cells }) => sideBorders(cells, borders));
+ const beside = across.find((sides) => typeof sides === "string");
+ const sidesOf = (index) => across[index];
+ if (rows.every(({ spacing }) => spacing === 0)) {
const vertical = rowBorders(rows.map(({ cells }) => cells), borders);
- if (typeof vertical === "string") return vertical;
- const across = rows.map(({ cells }) => sideBorders(cells, borders));
- const unsupported = across.find((sides) => typeof sides === "string");
- if (unsupported !== void 0) return unsupported;
- const beside = (margin, { room, drawn }) => Math.max(margin, room / 2) === Math.max(margin, drawn / 2) ? Math.max(margin, room / 2) : void 0;
- const geometry = rows.map(({ cells }, index) => ({
+ if (typeof vertical === "string" || beside !== void 0) return typeof vertical === "string" ? vertical : beside;
+ return rows.map(({ cells }, index) => ({
borderTop: vertical.tops[index],
borderBottom: index === rows.length - 1 ? vertical.bottom : 0,
breakBorder: vertical.breaks[index],
cells: cells.map(({ margins, gridWidth }, cell) => {
- const sides = across[index][cell];
- const left = beside(margins.left, sides.left);
- const right = beside(margins.right, sides.right);
- return left === void 0 || right === void 0 ? void 0 : {
+ const sides = sidesOf(index)[cell];
+ const left = Math.max(margins.left, sides.left / 2);
+ const right = Math.max(margins.right, sides.right / 2);
+ return {
left,
right,
width: gridWidth - left - right
};
})
}));
- return geometry.some(({ cells }) => cells.includes(void 0)) ? BESIDE_TEXT : geometry;
}
const last = rows.length - 1;
- const sideRooms = rows.map(({ cells }) => cells.map((cell, index) => {
- var _cell$borders$left, _cell$borders$right;
- return {
- left: roomOrWhy((_cell$borders$left = cell.borders.left) !== null && _cell$borders$left !== void 0 ? _cell$borders$left : index === 0 ? borders.left : borders.insideV),
- right: roomOrWhy((_cell$borders$right = cell.borders.right) !== null && _cell$borders$right !== void 0 ? _cell$borders$right : index === cells.length - 1 ? borders.right : borders.insideV)
- };
- }));
const rooms = rows.map(({ cells }, index) => ({
tops: widest(cells.map((cell) => {
var _ref2, _cell$borders$top2;
@@ -34338,19 +34360,19 @@ var docxLayout = (function(exports) {
top,
bottom,
...rooms.flatMap(({ tops, bottoms }) => [tops, bottoms]),
- ...sideRooms.flat().flatMap(({ left, right }) => [left, right])
+ beside
].find((room) => typeof room === "string");
if (unknown !== void 0) return unknown;
return rows.map(({ cells, spacing: own }, index) => {
const { tops, bottoms } = rooms[index];
return _objectSpread2(_objectSpread2({
- borderTop: tops + own + (index === 0 ? spacing + top : 0),
- borderBottom: bottoms + own + (index === last ? spacing + bottom : 0),
+ borderTop: tops + own + (index === 0 ? own + top : 0),
+ borderBottom: bottoms + own + (index === last ? own + bottom : 0),
breakBorder: bottom
}, top > 0 ? { breakTop: top } : {}), {}, { cells: cells.map(({ margins, gridWidth }, cell) => {
- const { left: leftBorder, right: rightBorder } = sideRooms[index][cell];
- const left = margins.left + own + (cell === 0 ? spacing : 0) + leftBorder;
- const right = margins.right + own + (cell === cells.length - 1 ? spacing : 0) + rightBorder;
+ const sides = sidesOf(index)[cell];
+ const left = margins.left + own + (cell === 0 ? own : 0) + sides.left;
+ const right = margins.right + own + (cell === cells.length - 1 ? own : 0) + sides.right;
return {
left,
right,
@@ -34721,14 +34743,12 @@ var docxLayout = (function(exports) {
var _excluded2 = [
"borders",
"margins",
- "gridWidth",
- "noWrap"
+ "gridWidth"
];
var _excluded3 = [
"borders",
"margins",
- "gridWidth",
- "noWrap"
+ "gridWidth"
];
var DEFAULT_SECTION = {
pageWidth: 612,
@@ -36021,14 +36041,20 @@ var docxLayout = (function(exports) {
var NO_BORDER = /* @__PURE__ */ new Set(["none", "nil"]);
/**
* The room a border of a paragraph takes, in points: its width and the space between it and the text, or why it isn't
- * known. A shadow doubles a single line (B6)
+ * known. A shadow doubles a single line (B6). An art border, of pictures, is as wide as its size in points
+ * (`word-stops-text.docx` PB4a, `word-stops-table-borders2.docx` BT2f and BT2g: apples of 6, 12 and 20 points), and a
+ * border of a line of no width, whose width is a multiple of its size, takes only its space (PB4d, BT3a to BT3c: single
+ * and double lines). Word keeps the space in five bits, so one of 32 points is none, as a run's is (BT3d to BT3f: 32, 50
+ * and 63 points took 0, 18 and 31). A line of a width of an eighth of a point hasn't been seen.
*/
var borderRoom = (border) => {
if (border === void 0 || NO_BORDER.has(border.style)) return 0;
const style = BORDER_WIDTHS[border.style];
- if (style === void 0 || border.frame || border.shadow && border.style !== "single") return "a paragraph border of a style not yet followed";
- const width = border.size === void 0 || border.size < 2 || border.size > 96 || border.space > 31 ? void 0 : style(border.size);
- return width === void 0 ? "a paragraph border of a width or space not yet followed" : (border.shadow ? 2 : 1) * width / EIGHTHS_PER_POINT + border.space;
+ const art = isArtBorder(border.style);
+ if (style === void 0 && !art || border.frame || border.shadow && border.style !== "single") return "a paragraph border of a style not yet followed";
+ const { size } = border;
+ const width = size === void 0 ? void 0 : style === void 0 ? size >= 1 && size <= 31 ? size * EIGHTHS_PER_POINT : void 0 : size >= 2 && size <= 96 || size === 0 && style(0) === 0 ? style(size) : void 0;
+ return width === void 0 ? "a paragraph border of a width not yet followed" : (border.shadow ? 2 : 1) * width / EIGHTHS_PER_POINT + border.space % 32;
};
/**
* The room a paragraph's borders take above and below its lines, or why it isn't known. Left and right borders take
@@ -36062,7 +36088,7 @@ var docxLayout = (function(exports) {
top,
bottom,
between,
- betweenSpace: between > 0 ? borderBetween.space : 0,
+ betweenSpace: between > 0 ? borderBetween.space % 32 : 0,
box: JSON.stringify([
...outline,
keyOf(borderBetween),
@@ -36177,21 +36203,27 @@ var docxLayout = (function(exports) {
return direction === void 0 || HORIZONTAL.has(direction) || VERTICAL.has(direction) ? void 0 : "text in a table cell in a direction not yet followed";
};
/**
- * Why text that runs up or down a cell makes its row taller in a way not yet followed, when it does. Word makes the row
- * as tall as a line of the cell's paragraph marks, whatever the text's size and the space around its paragraphs, and with
- * a picture in it (`word-table-formats.docx` VT1, VT2, `word-table-formats2.docx` VT5 to VT7,
- * `word-stops-vertical-cells.docx` TV5c). Not with a mark larger than its text: a mark of 20 points with text of 11 made
- * the row no taller than a line of 11 (TV5b), so which line Word makes it then isn't known, nor for marks of different
- * fonts or sizes, nor what a table in it does, which Word lays across the cell (TV5d), nor a text box in it.
+ * Why text that runs up or down a cell makes its row taller in a way not yet followed, when it does. Word makes a row of
+ * only such cells as tall as a line of the last paragraph's mark, whatever the text's size and the space around its
+ * paragraphs, and with a picture in it (`word-table-formats.docx` VT1, VT2, `word-table-formats2.docx` VT5 to VT7,
+ * `word-stops-vertical-cells.docx` TV5c, `word-stops-vertical-cells2.docx` VC5a to VC5h), and a row with other cells no
+ * taller (TV5b, VC1g, VC1h). What a table in it does, which Word lays across the cell (TV5d), and a text box in it, aren't
+ * known.
*/
var unsupportedVerticalOf = (blocks) => {
const paragraphs = blocks.filter((block) => block.type === "paragraph");
if (paragraphs.length < blocks.length) return "text running up or down a table cell with a table in it";
- if (paragraphs.some(({ items }) => items.some((item) => item.type === "textBox"))) return "text running up or down a table cell with a text box in it";
- const marks = new Set(paragraphs.map(({ markFont: { font, size } }) => `${font} ${size}`));
- const smaller = paragraphs.some(({ items, markFont }) => textLineSizesOf(items).some((size) => size < lineSizeOf(markFont)));
- return marks.size > 1 || smaller ? "text running up or down a table cell with marks of different sizes, or larger than its text" : void 0;
+ return paragraphs.some(({ items }) => items.some((item) => item.type === "textBox")) ? "text running up or down a table cell with a text box in it" : void 0;
};
+ /**
+ * Why a row of only cells of text that runs up or down can't be laid out, when it can't: Word makes it as tall as a line of
+ * each cell's last paragraph's mark, as far apart as it lays out lines of text that runs up or down in its font
+ * (`verticalLineOf`), which Word's PDFs haven't shown of every font
+ */
+ var unsupportedVerticalRowOf = (cells) => cells.length > 0 && cells.every(({ vertical }) => vertical) && cells.some(({ blocks }) => {
+ const last = blocks.findLast((block) => block.type === "paragraph");
+ return last !== void 0 && verticalLineOf(last.markFont, () => 0) === void 0;
+ }) ? "a table row of only text running up or down, whose mark is in a font whose lines Word's PDFs haven't shown" : void 0;
var HORIZONTAL = /* @__PURE__ */ new Set([
"lrTb",
"tb",
@@ -36257,9 +36289,9 @@ var docxLayout = (function(exports) {
"band1Horz",
"band2Horz"
]);
- var FOLLOWED_PART_ROW_PROPERTIES = /* @__PURE__ */ new Set(["w:trHeight"]);
+ var FOLLOWED_PART_ROW_PROPERTIES = /* @__PURE__ */ new Set(["w:trHeight", "w:cantSplit"]);
var IGNORED_PART_TABLE_PROPERTIES = /* @__PURE__ */ new Set(["w:tblCellSpacing"]);
- var IGNORED_STYLE_ROW_PROPERTIES = /* @__PURE__ */ new Set(["w:trHeight"]);
+ var READ_STYLE_ROW_PROPERTIES = /* @__PURE__ */ new Set(["w:trHeight", "w:cantSplit"]);
var FOLLOWED_STYLE_CELL_PROPERTIES = /* @__PURE__ */ new Set(["w:tcMar"]);
var FOLLOWED_ROW_TABLE_PROPERTIES = /* @__PURE__ */ new Set(["w:tblBorders", "w:tblCellMar"]);
/** The last of a property given among properties, each over those before: those of a table's styles, then its own */
@@ -36353,7 +36385,7 @@ var docxLayout = (function(exports) {
* bands by each row's place among all the rows, the deleted ones too (MK14j to MK14l).
*/
var readTable = (element, reader) => {
- var _twips2, _reader$grid, _readTableLook, _kept$0$spacing, _kept$, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _withoutGuess$unsuppo, _read$find2, _givenWidth$share, _blocks$find, _read$0$cells, _read$, _roomOf, _roomOf2;
+ var _twips2, _reader$grid, _readTableLook, _kept$0$spacing, _kept$, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _withoutGuess$unsuppo, _read$find2, _givenWidth$share, _blocks$find, _read$0$cells, _read$, _roomOf, _roomOf2;
const children = contentOf$3(element).filter(isObject);
const properties = childrenOf(find(children, "w:tblPr"));
const style = valueOf(properties, "w:tblStyle");
@@ -36371,7 +36403,7 @@ var docxLayout = (function(exports) {
const givenSpacing = readCellSpacing(lastOf(allProperties, "w:tblCellSpacing"));
const tableSpacing = givenSpacing === "share" ? 0 : givenSpacing;
const { "w:w": indentValue, "w:type": indentType = "dxa" } = attributesOf(lastOf(allProperties, "w:tblInd"));
- const indent = indentType === "nil" ? 0 : indentType === "dxa" ? (_twips2 = twips(indentValue)) !== null && _twips2 !== void 0 ? _twips2 : 0 : void 0;
+ const indent = indentType === "nil" || indentType === "pct" ? 0 : indentType === "dxa" ? (_twips2 = twips(indentValue)) !== null && _twips2 !== void 0 ? _twips2 : 0 : void 0;
const grid = childrenOf(find(children, "w:tblGrid")).filter((child) => "w:gridCol" in child).map((column) => {
var _twips3;
return (_twips3 = twips(attributesOf(column["w:gridCol"])["w:w"])) !== null && _twips3 !== void 0 ? _twips3 : 0;
@@ -36410,13 +36442,18 @@ var docxLayout = (function(exports) {
const height = find(rowProperties, "w:trHeight");
return height === void 0 ? [] : [attributesOf(height)];
});
+ const keptWhole = applying.flatMap(([, { rowProperties }]) => {
+ const whole = onOff(rowProperties, "w:cantSplit");
+ return whole === void 0 ? [] : [whole];
+ });
return _objectSpread2({
formats: [...ownStyles, ...applying.map(([, format]) => format)],
borders: Object.assign({}, ...applying.map(([, { cellProperties }]) => readBorderSet(find(cellProperties, "w:tcBorders")))),
margins: Object.assign({}, ...applying.map(([, { cellProperties }]) => readCellMargins(find(cellProperties, "w:tcMar"))))
}, withoutUndefined({
height: heights[heights.length - 1],
- unsupported: unfollowed ? "a table style's formatting for some of its cells" : unseenInHeaderOf(position, applying)
+ cantSplit: keptWhole[keptWhole.length - 1],
+ unsupported: unfollowed ? "a table style's formatting for some of its cells" : void 0
}));
};
const UNFORMATTED = {
@@ -36424,20 +36461,13 @@ var docxLayout = (function(exports) {
borders: {},
margins: {}
};
- /**
- * Why the parts of the table's style for a cell in a header of several rows apply in a way Word hasn't been seen to
- * apply them, when they do: its bands in a header of four rows or more with its first row turned off. Word made all
- * of a header of two or three rows its first row, with its corner cells in each of them (`word-stops-tables.docx`
- * TS2), and put one of two in the second band (`word-compat-off.docx` CS2a, CS2b and CS2f), but banded one of three
- * from its first row, as though it weren't a header (TS3)
- */
- const unseenInHeaderOf = ({ row, headerRows: header = 0 }, applying) => {
- const types = new Set(applying.map(([type]) => type));
- return row < header && header > 3 && (types.has("band1Horz") || types.has("band2Horz")) ? "a table style's bands of rows in a header of four rows or more" : void 0;
- };
+ const styleKept = tableStyles.reduce((whole, { rowProperties = [] }) => {
+ var _onOff;
+ return (_onOff = onOff(rowProperties, "w:cantSplit")) !== null && _onOff !== void 0 ? _onOff : whole;
+ }, void 0);
const gridWidth = (from, to) => grid.slice(from, to).reduce((total, value) => total + value, 0);
const read = rows.map(({ element: row, bookmarks: rowBookmarks }, rowIndex) => {
- var _formatsOf$height, _numberOf4;
+ var _formatsOf$height, _numberOf4, _ref12, _onOff2;
const rowChildren = contentOf$3(row).filter(isObject);
const rowProperties = childrenOf(find(rowChildren, "w:trPr"));
const rowParts = unwrap(rowChildren);
@@ -36456,6 +36486,8 @@ var docxLayout = (function(exports) {
const height = twips(heightAttributes["w:val"]);
const { "w:hRule": rule } = heightAttributes;
const skipped = (_numberOf4 = numberOf(attributesOf(find(rowProperties, "w:gridBefore"))["w:val"])) !== null && _numberOf4 !== void 0 ? _numberOf4 : 0;
+ const { "w:w": beforeValue, "w:type": beforeType = "dxa" } = attributesOf(find(rowProperties, "w:wBefore"));
+ const widthBefore = skipped > 0 && beforeType === "dxa" ? twips(beforeValue) : void 0;
const ownSpacing = find(rowProperties, "w:tblCellSpacing");
const spacing = ownSpacing === void 0 ? tableSpacing : readCellSpacing(ownSpacing);
const deleted = deletedFlags[rowIndex];
@@ -36538,9 +36570,9 @@ var docxLayout = (function(exports) {
}, {
column: skipped,
cells: [],
- edges: /* @__PURE__ */ new Map([[skipped, gridWidth(0, skipped)]])
+ edges: /* @__PURE__ */ new Map([[skipped, widthBefore !== null && widthBefore !== void 0 ? widthBefore : gridWidth(0, skipped)]])
});
- const rowUnsupported = rowParts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : changesLines(exceptions, FOLLOWED_ROW_TABLE_PROPERTIES) ? "a table row with table properties of its own" : spacing !== 0 && find(exceptions, "w:tblBorders") !== void 0 ? "a table row with borders of its own in a table with space between its cells" : deleted && JSON.stringify([...rowReader.counters]) !== counts ? "a list in a deleted table row" : ownEndnote ? OWN_NOTE_MARK : unseenHeaderCount ? "a deleted row in a table's header of several rows, whose style formats some of its rows" : cellsUnsupported;
+ const rowUnsupported = rowParts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : changesLines(exceptions, FOLLOWED_ROW_TABLE_PROPERTIES) ? "a table row with table properties of its own" : deleted && JSON.stringify([...rowReader.counters]) !== counts ? "a list in a deleted table row" : ownEndnote ? OWN_NOTE_MARK : unseenHeaderCount ? "a deleted row in a table's header of several rows, whose style formats some of its rows" : cellsUnsupported !== null && cellsUnsupported !== void 0 ? cellsUnsupported : unsupportedVerticalRowOf(cells.filter(({ verticalMerge }) => verticalMerge === void 0));
return _objectSpread2(_objectSpread2({
cells,
deleted,
@@ -36555,8 +36587,14 @@ var docxLayout = (function(exports) {
rule: rule === "exact" ? "exact" : "atLeast"
} } : {}), {}, {
header: onOff(rowProperties, "w:tblHeader") === true,
- cantSplit: onOff(rowProperties, "w:cantSplit") === true
- })
+ cantSplit: ((_ref12 = (_onOff2 = onOff(rowProperties, "w:cantSplit")) !== null && _onOff2 !== void 0 ? _onOff2 : formatsOf({
+ row: rowIndex,
+ rows: rows.length,
+ cell: 0,
+ cells: rowCells.length,
+ headerRows
+ }).cantSplit) !== null && _ref12 !== void 0 ? _ref12 : styleKept) === true
+ }, widthBefore === void 0 ? {} : { before: widthBefore })
});
});
const kept = read.filter(({ deleted }) => !deleted);
@@ -36571,16 +36609,15 @@ var docxLayout = (function(exports) {
}
const tableCells = read.flatMap(({ cells }) => cells);
const fits = !fixed && tableCells.some(({ ownWidth }) => ownWidth === void 0);
+ const givenWidth = readTableWidth(properties);
const rowSpacings = new Set(kept.map(({ spacing }) => spacing));
- const spacingUnsupported = tableSpacing === void 0 || rowSpacings.has(void 0) ? "space between table cells of a width that isn't in twips" : rowSpacings.has("share") ? "space between a table row's cells as a share of the table's width" : rowSpacings.size > 1 ? "table rows with different space between their cells" : void 0;
- const followedSpacing = spacingUnsupported === void 0 ? (_kept$0$spacing = (_kept$ = kept[0]) === null || _kept$ === void 0 ? void 0 : _kept$.spacing) !== null && _kept$0$spacing !== void 0 ? _kept$0$spacing : tableSpacing : 0;
- const geometryOf = (laidOut) => tableGeometry(laidOut.map(({ cells }) => ({
+ const spacingUnsupported = tableSpacing === void 0 || rowSpacings.has(void 0) ? "space between table cells of a width that isn't in twips" : rowSpacings.has("share") ? "space between a table row's cells as a share of the table's width" : rowSpacings.size > 1 && rowSpacings.has(0) ? "table rows with space between their cells beside rows without" : rowSpacings.size > 1 && (fits || givenWidth.width === void 0) ? "table rows with different space between their cells, in a table sized to its text or with no width of its own" : void 0;
+ const spacingOfRow = (spacing) => spacingUnsupported === void 0 && typeof spacing === "number" ? spacing : 0;
+ const followedSpacing = spacingOfRow((_kept$0$spacing = (_kept$ = kept[0]) === null || _kept$ === void 0 ? void 0 : _kept$.spacing) !== null && _kept$0$spacing !== void 0 ? _kept$0$spacing : tableSpacing);
+ const geometryOf = (laidOut, spacing) => tableGeometry(laidOut.map(({ cells, spacing: own }) => ({
cells,
- spacing: followedSpacing
- })), {
- borders: tableBorders,
- spacing: followedSpacing
- });
+ spacing: spacing !== null && spacing !== void 0 ? spacing : spacingOfRow(own)
+ })), tableBorders);
const spaced = followedSpacing > 0;
const keptGeometry = geometryOf(kept);
const bordersOf = (index) => {
@@ -36597,6 +36634,7 @@ var docxLayout = (function(exports) {
return deleted && (above < 0 || below < 0 || bordersOf(above) !== bordersOf(index) || bordersOf(below) !== bordersOf(index));
});
const geometry = kept.length === read.length || typeof keptGeometry === "string" ? keptGeometry : !spaced ? withDeletedBorders(keptGeometry, geometryOf(read), deletedFlags) : bordered() ? "a deleted row in a table with borders and space between its cells, at its top or bottom or with borders of its own" : keptGeometry;
+ const sizingGeometry = rowSpacings.size > 1 && typeof geometry !== "string" ? geometryOf(kept, followedSpacing) : geometry;
const tableRows = [];
let carried = [];
let unmerged;
@@ -36609,6 +36647,7 @@ var docxLayout = (function(exports) {
];
if (deleted) return;
const placed = typeof geometry === "string" ? void 0 : geometry[tableRows.length];
+ const sizing = typeof sizingGeometry === "string" ? void 0 : sizingGeometry[tableRows.length];
const above = tableRows[tableRows.length - 1];
tableRows.push(_objectSpread2(_objectSpread2(_objectSpread2({}, row), {}, {
borderTop: (_placed$borderTop = placed === null || placed === void 0 ? void 0 : placed.borderTop) !== null && _placed$borderTop !== void 0 ? _placed$borderTop : 0,
@@ -36616,14 +36655,15 @@ var docxLayout = (function(exports) {
}, withoutUndefined({
breakBorder: placed === null || placed === void 0 ? void 0 : placed.breakBorder,
breakTop: placed === null || placed === void 0 ? void 0 : placed.breakTop
- })), {}, { cells: cells.map((_ref12, cellIndex) => {
+ })), {}, { cells: cells.map((_ref13, cellIndex) => {
var _read, _above$cells$find, _unmerged;
- let { borders: _, margins, gridWidth: __, noWrap: ___ } = _ref12, cell = _objectWithoutProperties(_ref12, _excluded2);
+ let { borders: _, margins, gridWidth: __ } = _ref13, cell = _objectWithoutProperties(_ref13, _excluded2);
const pending = [...carried, ...cellBookmarks[cellIndex]];
const marked = pending.length === 0 ? void 0 : startingAtFirst(cell.blocks, pending);
carried = marked === void 0 ? pending : [];
const around = placed === null || placed === void 0 ? void 0 : placed.cells[cellIndex];
- const spacingRoom = around === void 0 ? 0 : around.left - margins.left + around.right - margins.right;
+ const sizingCell = sizing === null || sizing === void 0 ? void 0 : sizing.cells[cellIndex];
+ const spacingRoom = sizingCell === void 0 ? 0 : sizingCell.left - margins.left + sizingCell.right - margins.right;
const orphan = ((_read = read[index - 1]) === null || _read === void 0 ? void 0 : _read.deleted) === true && cell.verticalMerge === "continue" && (above === null || above === void 0 || (_above$cells$find = above.cells.find((other) => other.column === cell.column)) === null || _above$cells$find === void 0 ? void 0 : _above$cells$find.verticalMerge) === void 0;
(_unmerged = unmerged) !== null && _unmerged !== void 0 || (unmerged = orphan && hasContent(cell.blocks) ? "a cell merged down from a deleted table row" : void 0);
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, cell), around === void 0 ? {} : {
@@ -36643,9 +36683,9 @@ var docxLayout = (function(exports) {
const deletedRows = sized ? read.filter(({ deleted }) => deleted).map(({ row, cells }) => _objectSpread2(_objectSpread2({}, row), {}, {
borderTop: 0,
borderBottom: 0,
- cells: cells.map((_ref13) => {
- let { borders: _, margins: __, gridWidth: ___, noWrap: ____ } = _ref13;
- return _objectWithoutProperties(_ref13, _excluded3);
+ cells: cells.map((_ref14) => {
+ let { borders: _, margins: __, gridWidth: ___ } = _ref14;
+ return _objectWithoutProperties(_ref14, _excluded3);
})
})) : [];
const blocks = [...tableRows.flatMap(({ cells }) => cells.flatMap((cell) => {
@@ -36653,9 +36693,8 @@ var docxLayout = (function(exports) {
return [...cell.blocks, ...(_cell$sizing = cell.sizing) !== null && _cell$sizing !== void 0 ? _cell$sizing : []];
})), ...deletedRows.flatMap(({ cells }) => cells.flatMap((cell) => cell.blocks))];
const unfitted = read.reduce((most, { end }) => Math.max(most, end), 0) > MOST_COLUMNS ? `a table given no widths of more than ${MOST_COLUMNS} columns` : void 0;
- const styleUnsupported = tableStyles.some(({ rowProperties = [], cellProperties = [] }) => changesLines(rowProperties, IGNORED_STYLE_ROW_PROPERTIES) || changesLines(cellProperties, FOLLOWED_STYLE_CELL_PROPERTIES)) ? "a table style with formatting of its rows or cells" : void 0;
- const givenWidth = readTableWidth(properties);
- const evenable = !(spaced && fixed) && givenWidth.share === void 0 && read.every(({ edges }) => edges.has(0));
+ const styleUnsupported = tableStyles.some(({ rowProperties = [], cellProperties = [] }) => changesLines(rowProperties, READ_STYLE_ROW_PROPERTIES) || changesLines(cellProperties, FOLLOWED_STYLE_CELL_PROPERTIES)) ? "a table style with formatting of its rows or cells" : void 0;
+ const evenable = !(spaced && fixed) && read.every(({ edges, row }) => edges.has(0) || row.before !== void 0);
const evened = unequal && evenable;
const tableTwips = givenWidth.width;
const fixedFit = fixed && evenable && (unequal || tableTwips !== void 0 && read.some(({ edges, end }) => Math.abs(edges.get(end) - tableTwips) > WIDTH_TOLERANCE));
@@ -36664,8 +36703,8 @@ var docxLayout = (function(exports) {
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 = (_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 && _ref30 !== void 0 ? _ref30 : float !== void 0 && (reader.inCell || reader.inHeader) ? "a table that text flows around in a table cell, header or footer" : void 0) !== null && _ref29 !== void 0 ? _ref29 : float !== void 0 && older ? "a table that text flows around in a document in compatibility mode" : void 0) !== null && _ref28 !== void 0 ? _ref28 : 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 && _ref27 !== void 0 ? _ref27 : typeof float === "string" ? float : void 0) !== null && _ref26 !== void 0 ? _ref26 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref25 !== void 0 ? _ref25 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref24 !== void 0 ? _ref24 : unmerged) !== null && _ref23 !== void 0 ? _ref23 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref22 !== void 0 ? _ref22 : fits && tableCells.some(({ noWrap }) => noWrap) ? "a table cell whose text doesn't wrap, in a table sized to its text" : void 0) !== null && _ref21 !== void 0 ? _ref21 : fits && tableCells.some(({ fitText }) => fitText) ? "text fitted to its table cell, in a table sized to its text" : void 0) !== null && _ref20 !== void 0 ? _ref20 : verticalUnsupported) !== null && _ref19 !== void 0 ? _ref19 : spacingUnsupported) !== null && _ref18 !== void 0 ? _ref18 : typeof geometry === "string" ? geometry : void 0) !== null && _ref17 !== void 0 ? _ref17 : indent === void 0 ? "a table indented by a share of the width" : void 0) !== null && _ref16 !== void 0 ? _ref16 : ((_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 && _ref15 !== void 0 ? _ref15 : styleUnsupported) !== 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 verticalUnsupported = fits && (float !== void 0 || reader.inSizedTable === true) && tableCells.some((cell) => cell.vertical && !isVerticalWidthKnown(cell)) ? "text that runs up or down a cell of a table sized to its text, in a table cell or that text flows around" : void 0;
+ const unsupported = (_ref15 = (_ref16 = (_ref17 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_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 && _ref29 !== void 0 ? _ref29 : float !== void 0 && (reader.inCell || reader.inHeader) ? "a table that text flows around in a table cell, header or footer" : void 0) !== null && _ref28 !== void 0 ? _ref28 : float !== void 0 && older ? "a table that text flows around in a document in compatibility mode" : void 0) !== null && _ref27 !== void 0 ? _ref27 : 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 && _ref26 !== void 0 ? _ref26 : typeof float === "string" ? float : void 0) !== null && _ref25 !== void 0 ? _ref25 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref24 !== void 0 ? _ref24 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref23 !== void 0 ? _ref23 : unmerged) !== null && _ref22 !== void 0 ? _ref22 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : 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 indent of a type not yet followed" : 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 : (_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);
@@ -37949,7 +37988,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, _ref31, _ref32, _ref33, _ref34, _ref35, _documentContent$unsu;
+ var _writtenParts$dataSto, _parts$otherListIds, _parts$otherListIds2, _parts$settings, _fontOf$size2, _notesByKind$kind$get, _ref30, _ref31, _ref32, _ref33, _ref34, _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), {}, {
@@ -38309,7 +38348,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: (_ref31 = (_ref32 = (_ref33 = (_ref34 = (_ref35 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref35 !== void 0 ? _ref35 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref34 !== void 0 ? _ref34 : sections.slice(Math.min(...endnoteSections)).some(({ textRunsDown }) => textRunsDown !== void 0) ? "endnotes on or before text that runs down the page" : void 0) !== null && _ref33 !== void 0 ? _ref33 : endnoteSections.some((section) => sections.slice(section + 1).some((_, after) => !sameGrid(gridOf(section), gridOf(section + 1 + after)))) ? "endnotes from a section followed by one on another document grid" : void 0) !== null && _ref32 !== void 0 ? _ref32 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref31 !== void 0 ? _ref31 : unseenNumbering }));
+ return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref30 = (_ref31 = (_ref32 = (_ref33 = (_ref34 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref34 !== void 0 ? _ref34 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref33 !== void 0 ? _ref33 : sections.slice(Math.min(...endnoteSections)).some(({ textRunsDown }) => textRunsDown !== void 0) ? "endnotes on or before text that runs down the page" : void 0) !== null && _ref32 !== void 0 ? _ref32 : endnoteSections.some((section) => sections.slice(section + 1).some((_, after) => !sameGrid(gridOf(section), gridOf(section + 1 + after)))) ? "endnotes from a section followed by one on another document grid" : void 0) !== null && _ref31 !== void 0 ? _ref31 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref30 !== void 0 ? _ref30 : unseenNumbering }));
};
//#endregion
//#region src/layout/paginate.ts
@@ -38433,7 +38472,6 @@ var docxLayout = (function(exports) {
var MOVES_ON_FROM_TOP = "a footnote in columns whose reference moves on to the next page from the top of a column";
var NOTE_ROOM_STEP = 1;
var ENDNOTES_IN_COLUMNS = "endnotes after text in columns";
- var KEPT_ROW_IN_COLUMNS = "a table row kept together taller than a column";
/** The measurers the layout measures with, by those it is given, so the lines laid out with each are kept */
var stoppingMeasurers = /* @__PURE__ */ new WeakMap();
/**
@@ -38925,7 +38963,7 @@ var docxLayout = (function(exports) {
* wide as the narrowest of them
*/
const contentWidths = (stack) => stack.reduce((widths, block) => {
- const own = block.type === "table" ? tableWidths(block, contentWidths) : measureContentWidths(measurable(block.items), {
+ const own = block.type === "table" ? tableWidths(block, contentWidths, measuring.measureLineHeight) : measureContentWidths(measurable(block.items), {
format: block.format,
tabStops: block.tabStops,
defaultTabStop,
@@ -38953,7 +38991,7 @@ var docxLayout = (function(exports) {
if (!table.fit && !table.widen) return table;
const byWidth = (_fittedTables$get = fittedTables.get(table)) !== null && _fittedTables$get !== void 0 ? _fittedTables$get : /* @__PURE__ */ new Map();
fittedTables.set(table, byWidth);
- const sized = (_byWidth$get = byWidth.get(width)) !== null && _byWidth$get !== void 0 ? _byWidth$get : fitColumns(table, width, contentWidths);
+ const sized = (_byWidth$get = byWidth.get(width)) !== null && _byWidth$get !== void 0 ? _byWidth$get : fitColumns(table, width, contentWidths, measuring.measureLineHeight);
byWidth.set(width, sized);
return sized;
};
@@ -39007,15 +39045,21 @@ var docxLayout = (function(exports) {
*/
const textWidthOf = (cell) => cell.fitText ? Math.max(cell.width, contentWidths(cell.blocks).max) : cell.width;
/**
- * How tall a cell's text makes its row. Text that runs up or down a cell makes it as tall as a line of its paragraph
- * mark, whatever its size, as Word breaks the text into lines as long as the row is tall (`word-watertight-tables.docx`
- * TB6, `word-table-formats.docx` VT1, `word-table-formats2.docx` VT5 to VT7). Guessing, one with a table in it is as
- * tall as a line of its first paragraph's mark, as a cell ends with a paragraph
+ * How tall a cell's text makes its row. Text that runs up or down a cell makes it as tall as a line of its last
+ * paragraph's mark, as far apart as Word lays out its lines (`verticalLineOf`), at its line spacing, whatever its text's
+ * size, as Word breaks the text into lines as long as the row is tall (`word-watertight-tables.docx` TB6,
+ * `word-table-formats.docx` VT1, `word-table-formats2.docx` VT5 to VT7, `word-stops-vertical-cells2.docx` VC5a to
+ * VC5h: marks of 8 and 20 points beside text of 8, 16 and 20, the last of two paragraphs', and a style's). In a font
+ * whose lines Word's PDFs haven't shown, guessing, as tall as a line of it across the page, and one with a table in it
+ * as tall as a line of its last paragraph's mark, as a cell ends with a paragraph. One with no paragraph at all, as a
+ * cell of only a bookmark, needs no room, as a cell of nothing across the page
*/
const contentHeight = (cell) => {
if (!cell.vertical) return stackHeight(blocksWithRoom(cell), textWidthOf(cell), true);
- const first = cell.blocks.find((block) => block.type === "paragraph");
- return linesHeight(measureParagraph(_objectSpread2(_objectSpread2({}, first), {}, { items: [] }), cell.width, void 0, void 0, true).lines);
+ const last = cell.blocks.findLast((block) => block.type === "paragraph");
+ if (last === void 0) return 0;
+ const line = verticalLineOf(last.markFont, measuring.measureLineHeight);
+ return line === void 0 ? linesHeight(measureParagraph(_objectSpread2(_objectSpread2({}, last), {}, { items: [] }), cell.width, void 0, void 0, true).lines) : verticalSpacing(line, last.format.lineSpacing);
};
/** How tall a cell makes its row with its own margins, as a cell merged down rows does */
const cellHeight = (cell) => cell.marginTop + contentHeight(cell) + cell.marginBottom;
@@ -39044,7 +39088,9 @@ var docxLayout = (function(exports) {
const heights = rows.map(({ cells, height, borderTop, borderBottom }) => {
const own = cells.filter(({ verticalMerge }) => verticalMerge === void 0);
const largest = (lengths) => Math.max(0, ...lengths);
- const natural = own.length === 0 ? 0 : largest(own.map(({ marginTop }) => marginTop)) + largest(own.map(contentHeight)) + largest(own.map(({ marginBottom }) => marginBottom));
+ const across = own.filter(({ vertical }) => !vertical);
+ const natural = own.length === 0 ? 0 : largest(own.map(({ marginTop }) => marginTop)) + largest((across.length > 0 ? across : own).map(contentHeight)) + largest(own.map(({ marginBottom }) => marginBottom));
+ if ((height === null || height === void 0 ? void 0 : height.rule) === "exact" && table.cellSpacing === void 0) return Math.max(height.value, borderTop) + borderBottom;
return (height === void 0 ? natural : height.rule === "exact" ? height.value : Math.max(height.value, natural)) + borderTop + borderBottom;
});
return merges.reduce((current, { first, last, height }) => {
@@ -39103,6 +39149,7 @@ var docxLayout = (function(exports) {
let pending = [];
let spaceAfter = 0;
let openMerges = [];
+ let cutHeader = false;
let sectionSpaceAfter = 0;
let sectionColumn = 0;
let pageColumns;
@@ -41204,7 +41251,9 @@ var docxLayout = (function(exports) {
const last = table.rows.length - 1;
const bottomBorder = (_table$rows$at$border = (_table$rows$at = table.rows.at(-1)) === null || _table$rows$at === void 0 ? void 0 : _table$rows$at.borderBottom) !== null && _table$rows$at$border !== void 0 ? _table$rows$at$border : 0;
const ownHeights = rowHeights(table, []);
- const unknown = mergesOf(table).some(({ first, height }) => table.rows[first].borderTop + height > ownHeights[first] - table.rows[first].borderBottom + TOLERANCE) ? "a cell merged down the rows of a table in a table cell, whose text goes on past its first row, across pages" : table.cellSpacing === void 0 ? void 0 : "a table with space between its cells in a table cell across pages";
+ const goingOn = mergesOf(table).filter(({ first, height }) => table.rows[first].borderTop + height > ownHeights[first] - table.rows[first].borderBottom + TOLERANCE);
+ /** Why where the table breaks at a row (`index`), before it or in it, isn't known */
+ const unknownAt = (index) => goingOn.some(({ first, last: end }) => first <= index && index <= end) ? "a cell merged down the rows of a table in a table cell, whose text goes on past its first row, across pages" : table.cellSpacing === void 0 ? void 0 : "a table with space between its cells in a table cell across pages";
let used = 0;
let placed = [];
/** The cell's part where the table breaks before a row (`index`), or in it with the paragraphs left in its cells */
@@ -41235,6 +41284,7 @@ var docxLayout = (function(exports) {
used += whole;
continue;
}
+ const unknown = unknownAt(index);
if (unknown !== void 0) return breaksAt(index, brokenCells, unknown);
const borders = borderTop + row.borderBottom;
const margins = rowMarginsOf(row);
@@ -41294,36 +41344,71 @@ var docxLayout = (function(exports) {
*/
const markersLeft = (paragraphs) => paragraphs.flatMap((item) => "paragraph" in item ? item.paragraph.lines.slice(item.from).flatMap(({ markers }) => markers) : item.table.rows.slice(item.from).flatMap(({ cells }) => cells.flatMap((cell) => cell.blocks.flatMap(markersOf))));
/**
- * Ends the text of the cells merged down rows that have rows on the page, where the page breaks below them (`end`):
- * all of it goes in their rows on the page. Which rows Word puts the rest in when it doesn't fit there isn't known
+ * The text of a cell merged down rows left after it filled its rows on a page, which goes on from the top of its rows on
+ * the next page, as a paragraph's lines go on, keeping to widow control: beside the rest of a row that breaks across
+ * three pages (`word-stops-rows2.docx` RW13), and, where none of it goes on the page, as one line of a paragraph of more
+ * would be alone at its foot, all of it in the rows on the next (RW14a, RW14b, RW16a). Undefined when all of it is placed
+ */
+ const goesOn = (merge, rest, placed) => {
+ if (rest.length === 0) return;
+ if (notesIn(merge.cell.blocks.flatMap(markersOf)).length > 0) stopAt("a footnote in a cell merged down table rows whose text goes on across pages");
+ if (merge.header) stopAt("a cell merged down from a table's header rows whose text goes on across pages");
+ if (columnsSection().columns.length > 1) stopAt("a cell merged down table rows whose text goes on across columns");
+ return _objectSpread2(_objectSpread2({}, merge), {}, {
+ rest,
+ start: void 0,
+ startTop: void 0,
+ broken: merge.broken || placed,
+ moved: true
+ });
+ };
+ /**
+ * Ends the part of the text of the cells merged down rows that have rows on the page that goes in them, where the page
+ * breaks below them (`end`). The rest goes on in their rows on the next page (`goesOn`)
*/
const closeMerges = (end) => {
- for (const { cell, rest, start, broken } of openMerges) if (start !== void 0) {
+ openMerges = openMerges.flatMap((merge) => {
+ const { cell, rest, start, broken } = merge;
+ if (start === void 0) return [merge];
const { lines, rest: left } = fillCell(rest, end - start - cell.marginTop - cell.marginBottom, !broken);
- if (left.length > 0) throw new Unsupported(broken ? "a cell merged down table rows whose text goes on across more than two pages" : "a cell merged down table rows whose text goes on across a page break between them");
mark(lines.flatMap(({ markers }) => markers));
- }
- openMerges = openMerges.filter(({ start }) => start === void 0);
+ const next = goesOn(merge, left, lines.length > 0);
+ return next === void 0 ? [] : [next];
+ });
};
/**
* Places a row of a set height taller than the page, at the top of one: it takes the rest of the page, cut off at its
* bottom, so what follows goes on the next page, as Word lays out one set to exactly or at least 15000 twips, with
- * 13958 of room (`word-probes.docx` U5c, U5d), as LibreOffice does. A cell merged down from it has its text in it, and
- * its footnotes go at the bottom of the next page, as Word lays them out (`word-stops-tables.docx` RW5a, RW5c). What
- * Word does with one in columns, a header row, or with the text of a cell merged down to it from a row above, or of one
- * merged down from it that doesn't fit in it, isn't known
+ * 13958 of room (`word-probes.docx` U5c, U5d), as LibreOffice does. In columns, it goes in the first column of a page,
+ * and what follows goes on the next page (`word-stops-rows2.docx` RW19b).
+ *
+ * The text of a cell merged down from it or to it from a row above goes in it, in all of its height where that is
+ * exact, past the bottom of the page (`word-stops-tables.docx` RW5a, RW16a, RW16b: 58 lines of 60 in a row of 16000
+ * twips, the last two, kept together by widow control, in the row after it on the next page), and the rest of the text of
+ * one merged down past it goes on in the rows after it on the next page (`goesOn`). What Word does with the text of one
+ * that ends in it and doesn't fit isn't known.
+ *
+ * Its footnotes go at the bottom of the next page, the first starting there as one does that can't go on a page with its
+ * line, and those after it below it (RW5c, RW15a). A header row isn't repeated on the next page, and what comes after the
+ * table goes on the page after the one it ends on (RW5b, RW18)
*/
const placeCutRow = (row, index) => {
- if (section().columns.length > 1) stopAt(KEPT_ROW_IN_COLUMNS);
- const markers = row.cells.flatMap((cell) => cell.blocks.flatMap(markersOf));
+ var _row$height4;
+ const own = row.cells.filter((cell) => !startsMerge(cell)).flatMap((cell) => cell.blocks.flatMap(markersOf));
+ const markers = [...own, ...row.cells.filter(startsMerge).flatMap(roomlessOf)];
const height = linesBottom() - position;
- const fitsIn = ({ first, cell, rest }) => first === index && fillCell(rest, height - row.borderTop - row.borderBottom - cell.marginTop - cell.marginBottom, true).rest.length === 0;
- if (!openMerges.every(fitsIn)) throw new Unsupported("a cell merged down into a table row of a set height taller than a page, or out of it past it");
- if (row.header) throw new Unsupported("a header row of a set height taller than a page");
- const notes = notesIn(markers);
- if (notes.length > 1 || notes.length > 0 && (carried !== void 0 || pageNotes.length > 0)) throw new Unsupported("footnotes in a table row of a set height taller than a page");
+ const room = ((_row$height4 = row.height) === null || _row$height4 === void 0 ? void 0 : _row$height4.rule) === "exact" ? row.height.value - row.borderTop : height - row.borderTop - row.borderBottom;
+ let notes = notesIn(own);
+ openMerges = openMerges.flatMap((merge) => {
+ const { lines, rest } = fillCell(merge.rest, room - merge.cell.marginTop - merge.cell.marginBottom, !merge.broken);
+ const placed = lines.flatMap(({ markers: lineMarkers }) => lineMarkers);
+ mark(placed);
+ notes = [...notes, ...notesIn(placed)];
+ if (rest.length > 0 && merge.last === index) throw new Unsupported("the text of a cell merged down into a table row of a set height taller than a page, longer than it");
+ const next = goesOn(merge, rest, lines.length > 0);
+ return next === void 0 ? [_objectSpread2(_objectSpread2({}, merge), {}, { rest: [] })] : [next];
+ });
mark(markers);
- openMerges = openMerges.map((merge) => _objectSpread2(_objectSpread2({}, merge), {}, { rest: [] }));
placeRow(index, position, height);
position = linesBottom();
placedInColumn = true;
@@ -41336,6 +41421,13 @@ var docxLayout = (function(exports) {
line: 0
}
};
+ pending = [...pending, ...notes.slice(1)];
+ }
+ cutHeader || (cutHeader = row.header);
+ while (column < columnsSection().columns.length - 1) {
+ nextColumn();
+ position = linesBottom();
+ placedInColumn = true;
}
};
/**
@@ -41360,6 +41452,7 @@ var docxLayout = (function(exports) {
let parts = own.map(cellParagraphs);
let isFirstPart = true;
let fillsPages = false;
+ let firstColumnsOnly = false;
const roomless = row.cells.flatMap(roomlessOf);
if (notesIn(roomless).length > 0) throw new Unsupported("a footnote in text that runs up or down a table cell");
const borders = row.borderTop + row.borderBottom;
@@ -41433,7 +41526,7 @@ var docxLayout = (function(exports) {
};
};
for (;;) {
- var _row$height$value2, _row$height4;
+ var _row$height$value2, _row$height5;
const at = position;
const isFirst = isFirstPart;
const flowing = openMerges.filter(({ last }) => isFirst || last === rowIndex);
@@ -41454,11 +41547,8 @@ var docxLayout = (function(exports) {
const ends = (cell) => cell < own.length || flowing[cell - own.length].last === rowIndex;
const isLastPart = filled.every(({ rest }, cell) => rest.length === 0 || !ends(cell));
const decides = (cell) => !isLastPart || ends(cell);
- const placesLines = (!isFirstPart || fillsPages || (isLastPart ? height - borders : (_row$height$value2 = (_row$height4 = row.height) === null || _row$height4 === void 0 ? void 0 : _row$height4.value) !== null && _row$height$value2 !== void 0 ? _row$height$value2 : 0) <= roomAbove(noteRoom) + TOLERANCE) && filled.some(({ lines }, cell) => decides(cell) && lines.length > 0) && cells.every(({ paragraphs }, cell) => !decides(cell) || paragraphs.length === 0 || filled[cell].lines.length > 0);
- if (placesLines && !isLastPart) {
- filled.forEach((part) => stopAtRead(part));
- if (table.spacedLast) stopAt("the last row of a table with space between its cells across pages");
- }
+ const placesLines = (!isFirstPart || fillsPages || (isLastPart ? height - borders : (_row$height$value2 = (_row$height5 = row.height) === null || _row$height5 === void 0 ? void 0 : _row$height5.value) !== null && _row$height$value2 !== void 0 ? _row$height$value2 : 0) <= roomAbove(noteRoom) + TOLERANCE) && filled.some(({ lines }, cell) => decides(cell) && lines.length > 0) && cells.every(({ paragraphs }, cell) => !decides(cell) || paragraphs.length === 0 || filled[cell].lines.length > 0);
+ if (placesLines && !isLastPart) filled.forEach((part) => stopAtRead(part));
const fitsWhole = !isFirstPart || position + height + breakBorder <= linesBottom() + TOLERANCE;
const atTop = !placedInColumn && continued === void 0;
if ((!placesLines || !fitsWhole) && atTop) {
@@ -41477,14 +41567,21 @@ var docxLayout = (function(exports) {
continue;
}
if (!kept) throw new Unsupported(tallerThanPage ? "a table row whose text and set height are both taller than a page" : "a line in a table cell taller than a page");
- if (section().columns.length > 1) stopAt(KEPT_ROW_IN_COLUMNS);
+ if (section().columns.length > 1) {
+ firstColumnsOnly = true;
+ if (column > 0) {
+ closeMerges(position);
+ startTablePage(!isFirstPart, true);
+ continue;
+ }
+ }
parts = parts.map((paragraphs) => paragraphs.map((part, index) => index === 0 && "paragraph" in part ? _objectSpread2(_objectSpread2({}, part), {}, { paragraph: _objectSpread2(_objectSpread2({}, part.paragraph), {}, { keepLines: false }) }) : part));
continue;
}
if (!placesLines && isFirstPart && table.kept) stopAt("a table row kept with the next before a row that moves to the next page");
if (!placesLines) {
closeMerges(position);
- startTablePage(!isFirstPart);
+ startTablePage(!isFirstPart, firstColumnsOnly);
continue;
}
mark([...filled.flatMap(({ lines }, cell) => decides(cell) ? lines.flatMap(({ markers }) => markers) : []), ...isFirstPart ? roomless : []]);
@@ -41500,16 +41597,9 @@ var docxLayout = (function(exports) {
startTop: (_merge$startTop = merge.startTop) !== null && _merge$startTop !== void 0 ? _merge$startTop : row.borderTop
});
if (index === -1 || !decides(own.length + index)) return [placed];
- const { rest } = filled[own.length + index];
- if (rest.length === 0) return [];
- if (notesIn(merge.cell.blocks.flatMap(markersOf)).length > 0) stopAt("a footnote in a cell merged down table rows whose text goes on across pages");
- if (merge.header) stopAt("a cell merged down from a table's header rows whose text goes on across pages");
- return [_objectSpread2(_objectSpread2({}, merge), {}, {
- rest,
- start: void 0,
- startTop: void 0,
- broken: true
- })];
+ const { rest, lines } = filled[own.length + index];
+ const next = goesOn(merge, rest, lines.length > 0);
+ return next === void 0 ? [] : [next];
});
if (isLastPart) {
placedInColumn = true;
@@ -41518,7 +41608,7 @@ var docxLayout = (function(exports) {
closeMerges(position - breakBorder);
parts = filled.slice(0, own.length).map(({ rest }) => rest);
isFirstPart = false;
- startTablePage(true);
+ startTablePage(true, firstColumnsOnly);
}
};
/**
@@ -41570,7 +41660,7 @@ var docxLayout = (function(exports) {
const page = pageCount;
nextColumn();
while (newPage && pageCount === page) nextColumn();
- if (index >= headerRows) {
+ if (index >= headerRows && !cutHeader) {
heights.slice(0, Math.max(0, headerRows)).reduce((y, rowHeight, row) => {
placeRow(row, y, rowHeight);
return y + rowHeight;
@@ -41578,9 +41668,10 @@ var docxLayout = (function(exports) {
position += repeated;
}
const { breakTop = 0 } = table.rows[index];
+ const belowHeaders = headerRows > 0 && index >= headerRows && !cutHeader;
if (breakTop > 0 && (index > 0 || continuing)) {
- if (headerRows > 0) stopAt("a table with space between its cells, borders and header rows across pages");
- position += breakTop;
+ if (belowHeaders && continuing) stopAt("a table row with space between its cells that breaks across pages below header rows");
+ position += belowHeaders ? 0 : breakTop;
}
};
/** Whether a row fits on the page, with its footnotes */
@@ -41600,8 +41691,8 @@ var docxLayout = (function(exports) {
const heightAt = (index) => {
var _table$rows$index$hei;
const ending = openMerges.filter(({ last }) => last === index);
- if (!ending.some(({ broken }) => broken) || ((_table$rows$index$hei = table.rows[index].height) === null || _table$rows$index$hei === void 0 ? void 0 : _table$rows$index$hei.rule) === "exact") return heights[index];
- return Math.max(ownHeights[index], ...ending.map(({ cell, rest, start, startTop, broken }) => start + startTop + cell.marginTop + fillCell(rest, Infinity, !broken).height + cell.marginBottom + table.rows[index].borderBottom - position));
+ if (!ending.some(({ broken, moved }) => broken || moved) || ((_table$rows$index$hei = table.rows[index].height) === null || _table$rows$index$hei === void 0 ? void 0 : _table$rows$index$hei.rule) === "exact") return heights[index];
+ return Math.max(ownHeights[index], ...ending.map(({ cell, rest, start = position, startTop = table.rows[index].borderTop, broken }) => start + startTop + cell.marginTop + fillCell(rest, Infinity, !broken).height + cell.marginBottom + table.rows[index].borderBottom - position));
};
/**
* What the table's last row is kept with when it is kept with the next: the first lines of the paragraph after the
@@ -41645,9 +41736,10 @@ var docxLayout = (function(exports) {
};
const bottomBorder = (_table$rows$borderBot = (_table$rows = table.rows[table.rows.length - 1]) === null || _table$rows === void 0 ? void 0 : _table$rows.borderBottom) !== null && _table$rows$borderBot !== void 0 ? _table$rows$borderBot : 0;
openMerges = [];
+ cutHeader = false;
if (onNextPage) startTablePage(0);
for (const [index, row] of table.rows.entries()) {
- var _row$breakBorder3, _row$height5;
+ var _row$breakBorder3, _row$height6, _row$height7;
openMerges = [...openMerges, ...merges.filter(({ first }) => first === index).map(({ first, last, cell }) => ({
first,
last,
@@ -41662,7 +41754,7 @@ var docxLayout = (function(exports) {
const markers = markersIn(row);
const holding = held.length > 0 && heldLines !== void 0 && index < heldLines;
const notes = [...holding && index === heldLines - 1 ? held : [], ...notesIn(markers)];
- const keptWhole = holding || row.cantSplit || ((_row$height5 = row.height) === null || _row$height5 === void 0 ? void 0 : _row$height5.rule) === "exact";
+ const keptWhole = holding || row.cantSplit || ((_row$height6 = row.height) === null || _row$height6 === void 0 ? void 0 : _row$height6.rule) === "exact";
placeKeptRows(index);
while (keptWhole && !rowStays(roomNeeded, notes) && (placedInColumn || continued !== void 0)) {
closeMerges(position);
@@ -41670,24 +41762,20 @@ var docxLayout = (function(exports) {
}
const tooTall = keptWhole && !rowStays(roomNeeded, notes);
if (tooTall) {
- var _row$height6;
stopIfBalancing();
if (notes.length > 0 && position + roomNeeded <= linesBottom() + TOLERANCE) throw new Unsupported("a table row and its footnote taller than a page");
- if (((_row$height6 = row.height) === null || _row$height6 === void 0 ? void 0 : _row$height6.rule) === "exact") {
- placeCutRow(row, index);
- continue;
- }
}
const firstColumns = tooTall && section().columns.length > 1;
if (firstColumns && column > 0) {
closeMerges(position);
startTablePage(index, true);
}
+ if (tooTall && ((_row$height7 = row.height) === null || _row$height7 === void 0 ? void 0 : _row$height7.rule) === "exact") {
+ placeCutRow(row, index);
+ continue;
+ }
if (tooTall || !rowFits(roomNeeded, notes) && !keptWhole) {
- splitRow(row, index, height, breakBorder, (continuing) => startTablePage(index, firstColumns, continuing), {
- spacedLast: table.cellSpacing !== void 0 && index === table.rows.length - 1,
- kept: index > brokenUntil && index > 0 && keptWithNext(table.rows[index - 1])
- });
+ splitRow(row, index, height, breakBorder, (continuing, newPage) => startTablePage(index, firstColumns || newPage, continuing), { kept: index > brokenUntil && index > 0 && keptWithNext(table.rows[index - 1]) });
continue;
}
mark(row.cells.flatMap((cell) => startsMerge(cell) ? roomlessOf(cell) : cell.blocks.flatMap(markersOf)));
@@ -41707,6 +41795,11 @@ var docxLayout = (function(exports) {
openMerges = openMerges.filter(({ last }) => last !== index);
placedInColumn = true;
}
+ const after = blocks[blockIndex + 1];
+ if (cutHeader && after !== void 0) {
+ if (after.section === blocks[blockIndex].section) startPage();
+ else stopAt("a table whose header row is taller than a page, at the end of its section");
+ }
};
/** How many paragraphs from one (`index`) on are kept with the next block of their section, one after the other */
const keptChain = (index) => blocks.slice(index).findIndex(({ block, section: blockSection }, offset) => {
diff --git a/live-examples/lib/shapes.iife.js b/live-examples/lib/shapes.iife.js
index f8ba0e4de8..62199d71ba 100644
--- a/live-examples/lib/shapes.iife.js
+++ b/live-examples/lib/shapes.iife.js
@@ -4934,8 +4934,9 @@ var docxShapes = (function(exports, docx) {
...Object.keys(BORDER_WIDTHS),
"custom"
]);
+ /** Whether a style of border is an art border's, of pictures, whose size is in points, rather than a line's */
+ var isArtBorder = (style) => !LINE_BORDERS.has(style);
var SEEN_RUN_BORDERS = { thickThinLargeGap: { 36: 54 } };
- var WIDEST_ART_BORDER = 31;
/**
* How wide a run's border is as Word draws it, in eighths of a point: as a paragraph's of its style. A border of no style
* ("none") takes its space still, but no width (scripts/layout-probes/word-run-formatting.ts RF7h). An art border's size
@@ -4949,7 +4950,7 @@ var docxShapes = (function(exports, docx) {
var _BORDER_WIDTHS$style, _BORDER_WIDTHS$style2, _SEEN_RUN_BORDERS$sty;
if (size === void 0) return style === "none" && !shadow && !frame ? 0 : void 0;
if (shadow || frame) return style === "single" && size >= 2 && size <= 96 ? (shadow ? 2 : 1) * size : void 0;
- if (!LINE_BORDERS.has(style)) return size >= 1 && size <= WIDEST_ART_BORDER ? size * EIGHTHS_PER_POINT : void 0;
+ if (isArtBorder(style)) return size >= 1 && size <= 31 ? size * EIGHTHS_PER_POINT : void 0;
if (style === "single" && size === 1 || style === "double" && size === 0) return BORDER_WIDTHS[style](size);
return style === "none" ? 0 : size < 2 || size > 96 ? void 0 : (_BORDER_WIDTHS$style = (_BORDER_WIDTHS$style2 = BORDER_WIDTHS[style]) === null || _BORDER_WIDTHS$style2 === void 0 ? void 0 : _BORDER_WIDTHS$style2.call(BORDER_WIDTHS, size)) !== null && _BORDER_WIDTHS$style !== void 0 ? _BORDER_WIDTHS$style : (_SEEN_RUN_BORDERS$sty = SEEN_RUN_BORDERS[style]) === null || _SEEN_RUN_BORDERS$sty === void 0 ? void 0 : _SEEN_RUN_BORDERS$sty[size];
};
diff --git a/usage/layout.md b/usage/layout.md
index 1cc5f1c01e..b60c57721f 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -200,7 +200,7 @@ The pages are laid out with the widths and heights of the characters of the font
- spacing before and after paragraphs, line spacing, indents and tab stops. A decimal tab stop (`TabStopType.DECIMAL`) lines up the first full stop of the text after it, such as that of `$1,234.50` or `e.g. 7`, or the end of a number, of digits and commas, that comes first and has none, such as the `12` of `12%`, the `12,` of `12, 34` or the `1` of `1 234.5`, or else the end of the text, as Word lays it out. Past the end of the line, the text after a right, centred or decimal tab stop of the paragraph's own lines up with the end of the line, or of the next line when it doesn't fit, after text or at the start of a line, whatever the left, first line and hanging indents, and a left one takes a line of its own, below the text before it, and the text after it goes to the start of the next line, in a paragraph with a first line or hanging indent too, as Word lays it out. A tab stop between the paragraph's right indent and the margin, left, right, centred or decimal, lines its text up with it on the line, past the indent, in a justified paragraph too. A word that doesn't fit after a tab goes on to the next line with the tab, which moves to its stop there, and breaks there after the last character that fits, or at a soft hyphen, as Word lays it out. Text in a border lines up with a tab stop by its box: a right stop with the end of the box, a centred one with its middle, and a decimal one with its text, and a box goes on round a tab in it. The other cases stop the layout (see below). A line in one font is as tall as Word makes it, to a fraction of a twip (a twentieth of a point): 268.55 twips for Calibri 11. A line in several fonts is as tall as Word makes it from the tallest of them above the baseline and the deepest below it, so a word of Courier New in a line of Calibri 11 makes it 275.53 twips, taller than either font's own line. Multiple line spacing (`line` with `LineRuleType.AUTO`) adds its share of the tallest font's own line below the text, and the last line on a page, or in a column, can have that space below the bottom of the page, though not into the page's footnotes, where the line goes on to the next page, as Word lays it out, but for the cases it stops at (see below). Contextual spacing (`contextualSpacing`) leaves out only its paragraph's own share of the space between it and a paragraph of the same style, as Word does: all of its space after, or as much of its space before as is more than the space after the paragraph above it. At the edges of a table cell, Word compares a paragraph with the one next to it in the document: the first cell's first paragraph with the paragraph before the table, and the last paragraph of each row with the end of the row, which is in the default paragraph style, so contextual spacing leaves out the space before a table's first paragraph of the same style as the paragraph before the table, and the space after a row's last paragraph in the default style, such as Normal
- justified paragraphs (`AlignmentType.JUSTIFIED`), whose spaces Word squeezes to fit one more word on a line, so they can have more words to a line than left-aligned ones. It squeezes them, in proportion to their widths, when that takes less of their width than a quarter, and less than they would stretch by with the word on the next line divided by 2.015. Spaces at the start of a line, those before a tab, no-break spaces, and en, em and ideographic spaces aren't squeezed, so a line whose only spaces are those isn't, nor one past its end by more than a quarter of its ordinary spaces' width, and a line with text in a border is squeezed as any other. Distributed paragraphs (`AlignmentType.DISTRIBUTE`) are squeezed less often, as their letters can stretch too, and Latin and Thai text justified for Thai (`THAI_DISTRIBUTE`), and Latin text with a low kashida (`LOW_KASHIDA`), as justified text is
- automatic hyphenation (`hyphenation: { autoHyphenation: true }`), where Word certainly leaves the word after a line whole: in a paragraph that suppresses hyphenation (`w:suppressAutoHyphens`, in templates), and where its dictionary breaks no word like it. In compatibility mode 15, Word hyphenates a word that doesn't fit at the end of a line whenever a part of it fits with a hyphen, however little room that leaves: it has no hyphenation zone, so `hyphenationZone` changes nothing. Its English dictionary, which it hyphenates text in English or in no language by, leaves at least two letters before the hyphen, and breaks no word of fewer than five letters, nor numbers. It doesn't hyphenate text not checked for spelling (`noProof`), or in no language (`language: { value: "zxx" }`), nor words in capitals, typed so or shown so with `allCaps`, when the document says so (`doNotHyphenateCaps`). On a justified line it squeezes a word in rather than hyphenate it, and doesn't squeeze the spaces to fit a part. `consecutiveHyphenLimit` only leaves more words whole. Which parts Word breaks other words into is in its dictionaries, which the layout doesn't have, so it stops there (see below)
-- paragraph borders (`border`, and `thematicBreak`), with the room Word gives them: a border above or below a paragraph takes its width and the space between it and the text, also at the top of a page, and at its foot, where the last line goes to the next page when its border doesn't fit below it. The space before and after goes outside the borders. Paragraphs next to each other with the same borders and the same left and right indents are one box, as Word draws them, whatever their borders between them: the top border above the first, the bottom border below the last, the border between them (`between`) of the first of each two between them, and no border where a page breaks the box. A paragraph with a page break before it starts a box of its own, with its top border, on the next page. The empty paragraph that ends a section takes no room for its borders, and paragraphs with the same borders either side of it, when it has none, are boxes of their own. Borders at the sides take no room, and leave the lines as wide as they are. Each style takes the room Word gives it: a double line three times its width, a triple line five times, and a wave 3 points whatever its width
+- paragraph borders (`border`, and `thematicBreak`), with the room Word gives them: a border above or below a paragraph takes its width and the space between it and the text, also at the top of a page, and at its foot, where the last line goes to the next page when its border doesn't fit below it. The space before and after goes outside the borders. Paragraphs next to each other with the same borders and the same left and right indents are one box, as Word draws them, whatever their borders between them: the top border above the first, the bottom border below the last, the border between them (`between`) of the first of each two between them, and no border where a page breaks the box. A paragraph with a page break before it starts a box of its own, with its top border, on the next page. The empty paragraph that ends a section takes no room for its borders, and paragraphs with the same borders either side of it, when it has none, are boxes of their own. Borders at the sides take no room, and leave the lines as wide as they are. Each style takes the room Word gives it: a double line three times its width, a triple line five times, a wave 3 points whatever its width, and in [templates](#templates), an art border as many points as its size, and a single or double line of no width only its space. Word keeps the space between a border and the text in five bits, so space of 32 points is none, and 50 is 18
- Word's automatic spacing (`beforeAutoSpacing`, `afterAutoSpacing`), as documents made from HTML have it: 14 points, the larger of two between paragraphs, in place of the space given. Word puts none above the first paragraph of the document, a table cell or a header, below the last of a cell, or between the paragraphs of a list, of one level or several, nor any for the empty paragraph that ends a section, and contextual spacing leaves it out as it does the space given. In a footnote it puts 14 points below the separator too, and keeps the last paragraph's space after at the foot of the page
- indents in characters (`firstLineChars`, and the left, right and hanging indents in characters of documents Word made), and space before and after in lines, which Word takes in place of those in twips. A character of a first line or hanging indent is as wide as the paragraph's first character is tall, one of a left indent as its style's text, and one of a right indent as its mark, and a hanging indent in characters puts the first line at the left indent and the other lines further in, as a hanging indent in twips from a left indent in characters does. A first line indent in twips starts the first line that much further in from a left indent in characters. A line is 12 points, whatever the font
- keeping a paragraph with the next, keeping its lines together, widow and orphan control, and page breaks
@@ -214,8 +214,8 @@ The pages are laid out with the widths and heights of the characters of the font
- VML drawings (`w:pict`), as Word lays them out. A text box (`Textbox`) in the line is sized to its text, as Word sizes it whatever `height` it has: its paragraphs, broken in its `width` less its insets (0.1 inch left and right and 0.05 above and below, or its own) and its outline, with the insets above and below them and the outline's weight (0.72 points, or its own) inside the box and again in the line, or none when it is hidden or it has none. A line with a text box of another outline than Word's own, or of none, or one Word doesn't size to its text, which is as tall as its own height, is half a point taller again. It stands on the baseline, as a picture does, in a header or footer as in the text. A list in a text box is numbered from 1, apart from the text's lists, and a footnote referred to in a text box is left out, reference and note, as Word leaves it. A text box placed on the page (`position: "absolute"`) with no wrapping takes no room, as Word puts it in front of the text, as do docx's watermarks, and one with square wrapping (`wrapStyle`) is laid out as a picture with that wrapping, sized to its text, with VML's distances from the text, 9 points left and right, where it gives none, and its outline's room beside it: half its weight, in whole points, down on the left and up on the right. In [templates](#templates), a shape in the line is a box of its size and its outline's weight, a group of shapes a box of its size, one with no size 50 points square, and one placed on the page with square, tight, through or top and bottom wrapping is laid out as a picture with that wrapping, the text 1 point nearer on the right with tight or through wrapping. Lengths in pixels, or with no unit, are 96 to the inch, and a shape as wide as a share of the margins (`mso-width-percent`) is that wide. A shape that would go past the right edge of the page is moved back onto it. An embedded object (`w:object`) is a box of its picture's size
- equations (`Math`, and those `latexToMath` writes), as Word lays them out in Cambria Math, by the rules of the font's maths table: letters in italic, unless a run is plain (`style: "plain"`), or in the alphabet and style it gives, such as double-struck, script, fraktur, bold and bold italic; digits, operators and brackets upright, and digits in bold or bold italic as Unicode's bold digits, or double-struck, each as wide as Cambria Math draws it, with the spaces TeX puts between them, as Word puts them: 4 eighteenths of an em either side of a binary operator such as +, ×, ∪, ∩, ∧ or ⊕, 5 either side of a relation such as =, ≤, ∈, ⊂, ⇒ or ↦, 3 after punctuation such as a comma, after a function's name or a sum, before a sum or a function after a letter or digit, and beside a fraction next to a letter, a digit, punctuation or another fraction, and none beside brackets, bars and slashes, or after ∀ or ¬. A plus or minus sign at the start, or after an operator, a relation, an opening bracket or punctuation, or before a relation, is unary, with no space, and one after a unary one is binary. Word's italic correction is added after an italic letter, unless a letter, a digit or another ordinary character follows it. Fractions, superscripts and subscripts, roots, sums and integrals with their limits, brackets that grow, matrices and cases, accents, bars, functions and limits, braces, boxes (`MathBorderBox`), equation arrays lined up at an ampersand in each row, and phantoms are built up as Word builds them up: in a line of text, a fraction's numerator and denominator, and scripts, are smaller (73% of the equation's size, and 60% for a script's script, rounded down to the half point), and a sum's limits are beside it; displayed, a fraction keeps its size, a script's or the equation's, and a sum is larger, with its limits under and over it, or beside it as the document's maths settings say (`m:naryLim`, `m:intLim`). A matrix's or an equation array's rows are a line apart, or further where they are too tall for that. An equation is in its paragraph's style's size, or its runs' own, and takes room in its line as text in Cambria Math does, or as far as its ink goes above and below its baseline, with the font's line gap above it, whichever is further, so a line of it beside text is as tall as the tallest ascent and the deepest descent of both. One alone in its paragraph is displayed, on a line of its own, centred, and an equation displayed (`m:oMathPara`) beside text, or alone after its list's number, is in the line, built up as in a line of text. Bold and spaced-out text in an equation (`w:b`, `w:spacing`) is laid out as Word does, as it is without them
- tracked changes, as Word lays them out with its markup in balloons beside the page, or in Simple Markup. Deleted text (`DeletedTextRun`), and deleted pictures, tabs and breaks, take no room, nor does text moved elsewhere, and inserted text (`InsertedTextRun`) does. A paragraph whose mark is deleted (`run: { deletion }`), or moved elsewhere, is joined to the next, all in the next one's formatting, style and list, one at the end of a content control to the paragraph after it, and a section whose break is deleted goes on into the next, on its pages, numbered and with headers and footers as the next one's are. A paragraph with no paragraph after it to join, before a table or at the end of a table cell or of the document, stays as it is, and the document's last paragraph keeps its section break and takes a line. A footnote or endnote whose reference is deleted or moved elsewhere isn't laid out, but Word still counts it, so the notes after it keep their numbers, and so it counts those a deleted table row refers to. A deleted table row (`TableRow`'s `deletion`) takes no room, nor does the space between cells around it, and the rows around it have one border between them, which is the deleted row's own when it has borders of its own, or, with space between cells, each their own, as without it. Nor does a table all of whose rows are deleted take room. A table style's formatting for the first and last rows and for bands of rows goes by each row's place among all the rows, the deleted ones too, so with the first row deleted the second isn't formatted as the first. Word still sizes the columns of a table to their text, or widens them for long words, by its deleted rows, and by deleted text, pictures, tabs, breaks, note references and paragraph marks, as they are written, though the lines are laid out without them. Deleted and inserted cells, comments and changes of formatting don't move the lines. A document that asks Word to hide its insertions and deletions, or its markup (`w:revisionView`), is laid out the same, as Word for Mac opens it in its own view
-- tables, with their columns' widths (`columnWidths`, or their cells' widths), their rows' heights, cell margins and borders. The columns of a table given no widths are sized to their text, as Word sizes them: each as wide as its longest line, or narrower when they don't all fit, but never narrower than its longest word, and a column whose cells give it a width keeps it. A cell merged across columns (`columnSpan`) widens them where its longest line needs more room, each in proportion to how wide it is, and a table in a cell counts as wide as its columns. In a table whose cells all have widths, a column with a word longer than its cells give it is widened to fit the word, and the other columns are narrowed to make room, as Word does, unless the table's layout is fixed. A table with a width of its own in twips is fitted to it, as Word fits it: when its columns are narrower, they are widened in proportion, and when they are wider, they are narrowed toward their longest words, or, when its layout is fixed, whatever is in them, each by the same share of the room for its text. When a word is longer than the table, its column is as wide as the word, and the table goes past the margin. Without a width of its own in twips, or with all of the width, a table whose columns' longest words don't fit in the room has each column narrowed to a share of it in proportion to its longest word, whatever width its cells give it, and the words break across lines, as Word breaks them. Where the rows of a table give a column different widths, each column is as wide as the widest a row gives it, and a cell merged across columns that is wider than they are widens the last of them, before they are fitted to the table's width, or, without one, narrowed to the room, unless its layout is fixed. A word in a cell merged across columns that is longer than they are wide is shared among them in proportion to each column's longest word and its longest line, or its width, added together, as Word shares it, and those columns keep its width when the others are narrowed. A long word with more text beside it widens them as its line does. Rows break across pages between the lines of their cells, as Word breaks them, keeping to widow and orphan control and lines kept together, and with room on the page for the space after a cell's paragraph that ends there. They move to the next page whole when a cell would have none of its lines on the page, when they are kept whole (`cantSplit`), and when the page hasn't room for the height they are set to. A row kept whole, or whose paragraph is kept together, that is taller than a page moves to a new page and breaks there as other rows do, and a row set to a height taller than a page takes a page of its own, cut off at its bottom, as Word lays them out. A cell merged down from such a row has its text in it, and the row's footnote starts at the bottom of the next page. A row set to at least a height taller than a page, whose text is taller than a page too, breaks where its text does, and each part of it fills its page. In columns, a row kept whole that is taller than a column goes down only the first column of each page, from the top of a new page unless it is at the top of this one, as a paragraph kept together does. Where a table breaks across pages, Word draws its bottom border below the last of it on the page, which takes room there too, or its cells' own bottom borders. Header rows are repeated at the top of each page and column a table is on, and they aren't left alone at the foot of a page: when none of the row after them goes there, as it is kept whole, kept with the next or set to a height, they go on to the next page with it, as Word moves them. The text of a cell merged down rows (`verticalMerge`) goes down from below the border above its first row across the others, to above the border below the last, and makes the last of them taller when it needs the room. Where one of its rows breaks across pages, its text breaks with the row, as far down the page as its lines go, keeping to widow control, as Word breaks it, and the rest of it goes on from the top of its rows on the next page, and on across the pages after when it breaks in the last of them. A table in a cell breaks with its row, between its own rows and in them between the lines of their cells, as Word breaks it: as a table in the text breaks, keeping to widow control, with its bottom border below the last of it on the page and its cells' margins around their lines on each page, and with its rows kept whole, or of a set height, moving to the next page whole. On the next page, Word draws its top border above the rest of it, and doesn't repeat its header rows. A table in a cell merged down rows breaks as one in a cell of a row, and so does one with cells merged down its rows whose text is in their first rows. An empty paragraph that ends a cell after a table in it takes no room, as Word lays it out
-- table formatting, as Word lays it out. Borders come from the table's style and the table (`borders`), side by side, from its cells (`TableCell`'s `borders`), and from the parts of its style for some of its cells. Where two cells meet, Word draws the heavier of their borders, by its width and a weight for its style, but makes room for the wider, so each row is as much taller as the widest border above its cells and below those above it. Double, triple and the other styles of border take the room Word gives them, such as three times their width for a double border, and a border's `space` adds to it. A cell's text is as far in from a border beside it as its margin, or half the border when that is more. A row is as tall as its tallest cell's text, with the largest margins above and below of its cells, which needn't be the same cell's. Space between cells (`cellSpacing`) goes around each cell and inside the table's edges, and the table keeps its width, its columns narrowed for the space as Word narrows them, or widened to it in proportion, the space aside, and a column with a long word widened for it as in a table without the space. Where its rows give a column different widths, they are evened out as in a table without it, unless its layout is fixed. Each cell's own borders take room inside it, left and right of its text as well as above and below it, and the table's own go around the space. Where such a table breaks across pages, Word draws its bottom border below the last of it on the page, and its top border above the rest of it on the next. A row's own space between its cells is the table's, and space given as a share of the table's width is none, as Word lays them out. A row whose first cell's first paragraph is kept with the next (`keepNext`) is kept on the page with the next row, or, for the last row, with the paragraph after the table, and rows kept together that don't fit on a page of their own start a new page and break where it ends. Text that runs up or down a cell (`textDirection`) makes its row only as tall as a line of its paragraph mark, as Word breaks it into lines as long as the row is tall, and a row with it breaks across pages as other rows do, the text on the page of its first part. In a table sized to its text, its column is about as wide as a line of each of its paragraphs, however long, and a long word in it widens nothing. Text down with East Asian characters upright is laid out as text that runs down, and across with them on their side as text across. A table sized to its text that is indented (`indent`) is sized in the room the indent leaves. The parts of a table style for some cells, such as its first row, its last column or its bands of rows, apply where the table turns them on (`tableLook`), and where it doesn't say, as Word turns them on: its first row and column and its bands of rows. A header of several rows (`tableHeader`) is the table's first row, all of it, with the parts for its corner cells in each of its rows, and the bands of rows start below it, as Word applies them, but for a header of three rows with the first row turned off, whose bands start at its first row. A table style's own cell margins apply to its cells, and its own row height doesn't apply, as in Word, and a part of it for some rows gives them its height and not its space between cells. In [templates](#templates), a row's own table borders and cell margins (`w:tblPrEx`) apply to its cells, cells merged across columns as old versions of Word wrote them (`w:hMerge`) are one cell across them, and in a table whose cells all have widths, a cell whose text Word is told not to wrap (`w:noWrap`) has it wrapped all the same, and text fitted to its cell (`w:tcFitText`) is on one line a paragraph, as Word lays them out. In [templates](#templates), an empty last paragraph of a cell whose mark is hidden (`w:hideMark`) takes no room
+- tables, with their columns' widths (`columnWidths`, or their cells' widths), their rows' heights, cell margins and borders. The columns of a table given no widths are sized to their text, as Word sizes them: each as wide as its longest line, or narrower when they don't all fit, but never narrower than its longest word, and a column whose cells give it a width keeps it. A cell merged across columns (`columnSpan`) widens them where its longest line needs more room, each in proportion to how wide it is, and a table in a cell counts as wide as its columns. In a table whose cells all have widths, a column with a word longer than its cells give it is widened to fit the word, and the other columns are narrowed to make room, as Word does, unless the table's layout is fixed. A table with a width of its own in twips is fitted to it, as Word fits it: when its columns are narrower, they are widened in proportion, and when they are wider, they are narrowed toward their longest words, or, when its layout is fixed, whatever is in them, each by the same share of the room for its text. When a word is longer than the table, its column is as wide as the word, and the table goes past the margin. Without a width of its own in twips, or with all of the width, a table whose columns' longest words don't fit in the room has each column narrowed to a share of it in proportion to its longest word, whatever width its cells give it, and the words break across lines, as Word breaks them. A table of a share of less than the width (`WidthType.PERCENTAGE`) whose columns' longest words don't fit in its share is as wide as they are, up to the room, and past it is narrowed as one of all of the width. A table sized to its text, or of a share of the width, has half of each of its left and right borders inside the room it fills, outside its columns, as Word draws them, where one of a width in twips has them outside it. Where the rows of a table give a column different widths, each column is as wide as the widest a row gives it, and a cell merged across columns that is wider than they are widens the last of them, before they are fitted to the table's width, in twips or as a share of the width, or, without one, narrowed to the room, unless its layout is fixed. In [templates](#templates), a row that starts past the first column (`w:gridBefore`) gives it its width before it (`w:wBefore`), as a cell does. A word in a cell merged across columns that is longer than they are wide is shared among them in proportion to each column's longest word and its longest line, or its width, added together, as Word shares it, and those columns keep its width when the others are narrowed. A long word with more text beside it widens them as its line does. Rows break across pages between the lines of their cells, as Word breaks them, keeping to widow and orphan control and lines kept together, and with room on the page for the space after a cell's paragraph that ends there. They move to the next page whole when a cell would have none of its lines on the page, when they are kept whole (`cantSplit`), and when the page hasn't room for the height they are set to. A row kept whole, or whose paragraph is kept together, that is taller than a page moves to a new page and breaks there as other rows do, and a row set to a height taller than a page takes a page of its own, cut off at its bottom, as Word lays them out. The text of a cell merged down from such a row, or to it from a row above, goes in all of its set height, past the bottom of the page, and the rest goes on in the rows after it on the next page, keeping to widow control. The row's footnotes start at the bottom of the next page, one after the other. A header row set to a height taller than a page isn't repeated on the next page, and what comes after its table goes on the page after the one the table ends on, as Word lays it out. A row set to at least a height taller than a page, whose text is taller than a page too, breaks where its text does, and each part of it fills its page. In columns, a row kept whole, or whose paragraph is kept together, that is taller than a column goes down only the first column of each page, from the top of a new page unless it is at the top of this one, as a paragraph kept together does, and what comes after one set to a height taller than a column goes on the next page. Where a table breaks across pages, Word draws its bottom border below the last of it on the page, which takes room there too, or its cells' own bottom borders. Header rows are repeated at the top of each page and column a table is on, and they aren't left alone at the foot of a page: when none of the row after them goes there, as it is kept whole, kept with the next or set to a height, they go on to the next page with it, as Word moves them. The text of a cell merged down rows (`verticalMerge`) goes down from below the border above its first row across the others, to above the border below the last, and makes the last of them taller when it needs the room. Where one of its rows breaks across pages, its text breaks with the row, as far down the page as its lines go, keeping to widow control, as Word breaks it, and the rest of it goes on from the top of its rows on the next page, and on across the pages after. Where the page breaks between its rows, as the next is kept whole or set to a height, the text that doesn't fit in its rows on the page goes on in its rows on the next, all of it where widow control leaves none of it on the page. A table in a cell breaks with its row, between its own rows and in them between the lines of their cells, as Word breaks it: as a table in the text breaks, keeping to widow control, with its bottom border below the last of it on the page and its cells' margins around their lines on each page, and with its rows kept whole, or of a set height, moving to the next page whole. On the next page, Word draws its top border above the rest of it, and doesn't repeat its header rows. A table in a cell merged down rows breaks as one in a cell of a row, and so does one with cells merged down its rows whose text is in their first rows, or whose rows are all on the page. An empty paragraph that ends a cell after a table in it takes no room, as Word lays it out
+- table formatting, as Word lays it out. Borders come from the table's style and the table (`borders`), side by side, from its cells (`TableCell`'s `borders`), and from the parts of its style for some of its cells. Where two cells meet, Word draws the heavier of their borders, by its width and a weight for its style, but makes room for the wider, so each row is as much taller as the widest border above its cells and below those above it. Double, triple and the other styles of border take the room Word gives them, such as three times their width for a double border, and a border's `space` adds to it. In [templates](#templates), an art border takes as many points above and below a cell's text as its size. A cell's text is as far in from its left and right edges as its margin, or half its own border there when that is more, whichever of two borders that meet Word draws. A row of an exact height (`HeightRule.EXACT`) has the border above it inside that height, and one of at least a height has it outside, as Word lays them out. A row is as tall as its tallest cell's text, with the largest margins above and below of its cells, which needn't be the same cell's. Space between cells (`cellSpacing`) goes around each cell and inside the table's edges, and the table keeps its width, its columns narrowed for the space as Word narrows them, or widened to it in proportion, the space aside, and a column with a long word widened for it as in a table without the space. Where its rows give a column different widths, they are evened out as in a table without it, unless its layout is fixed. Each cell's own borders take room inside it, left and right of its text as well as above and below it, and the table's own go around the space. Where such a table breaks across pages, Word draws its bottom border below the last of it on the page, and its top border above the rest of it on the next, but for below its header rows repeated there, which have it above them. A row's own space between its cells (`TableRow`'s `cellSpacing`) goes around its cells in place of the table's, at the table's edges too, as do its own borders (`w:tblPrEx`, in [templates](#templates)), and the table's columns are as wide as they would be without it, where the table has a width of its own and its cells have widths. Space given as a share of the table's width, or of the type `auto`, is none, as Word lays them out. A row whose first cell's first paragraph is kept with the next (`keepNext`) is kept on the page with the next row, or, for the last row, with the paragraph after the table, and rows kept together that don't fit on a page of their own start a new page and break where it ends. Text that runs up or down a cell (`textDirection`) makes a row of only such cells as tall as a line of its last paragraph's mark, and a row with other cells no taller, as Word breaks it into lines as long as the row is tall, and a row with it breaks across pages as other rows do, the text on the page of its first part. In a table sized to its text, its column is as wide as a line of each of its paragraphs with text, however long, with the space before and after them, its lines as far apart as Word lays them out at their line spacing: a quarter of their size further than their size in Calibri, and as far as across the page in Times New Roman, Arial, Cambria and Courier New. A long word in it widens nothing, and the table's other columns are sized as they would be beside any other column. Text down with East Asian characters upright is laid out as text that runs down, and across with them on their side as text across. A table sized to its text that is indented (`indent`) is sized in the room the indent leaves, and one indented by a share of the width (`WidthType.PERCENTAGE`) is laid out as though it weren't indented, as Word lays it out. The parts of a table style for some cells, such as its first row, its last column or its bands of rows, apply where the table turns them on (`tableLook`), and where it doesn't say, as Word turns them on: its first row and column and its bands of rows. A header of several rows (`tableHeader`) is the table's first row, all of it, with the parts for its corner cells in each of its rows, and the bands of rows start below it, as Word applies them, but for a header of three rows or more with the first row turned off, whose bands start at its first row. A table style's own cell margins apply to its cells, its rows kept whole (`w:cantSplit`) are kept whole, and its own row height doesn't apply, as in Word, and a part of it for some rows gives them its height, and keeps them whole, and not its space between cells. In [templates](#templates), a row's own table borders and cell margins (`w:tblPrEx`) apply to its cells, cells merged across columns as old versions of Word wrote them (`w:hMerge`) are one cell across them, and a cell whose text Word is told not to wrap (`w:noWrap`) has it wrapped all the same, and text fitted to its cell (`w:tcFitText`) is on one line a paragraph, as Word lays them out. In a table sized to its text, the one makes its column as wide as its lines, as though they didn't wrap, and the other as wide as its column in the table's grid. In [templates](#templates), an empty last paragraph of a cell whose mark is hidden (`w:hideMark`) takes no room
- sections, with their page sizes, margins, columns, headers and footers, how they start, and their page numbering. Page numbers are written in Word's number formats as Word writes them, such as roman numerals, letters, words ("twenty-one") and the numbers of other languages, but for those it leaves blank (see below), and with chapter numbers in front of them (`chapterHeadingLevel`), such as 2-5 for page 5 of chapter 2. Each column's lines are broken at its own width, so a paragraph that goes on into a column of another width is broken again there, as Word breaks it. Widow control counts the lines left for the next column as they are broken in the column before, as Word counts them, and a table sized to its text keeps the widths it was sized to in each column it goes on into, as Word keeps them, going past the edge of a narrower one. Columns before a continuous section break are evened out, as Word evens them out, unless a column break is in them or a section in them started in the next column, and the next section starts below the longest. A section that starts in the next column (`SectionType.NEXT_COLUMN`) starts in the next column of the page when the section before has as many columns and one is left, as Word starts it, and on a new page otherwise. When its own columns are of other widths, it is laid out in the page's, where they are and as wide as they are, as Word lays it out, and in its own on the pages after. Its footnotes are laid out in its own columns. A continuous section numbered afresh (`pageNumbers: { start }`) leaves the page it starts on its number, and numbers the next on from its own first number, as Word does: 8 after a section numbered from 7 starts on page 12. When none of it fits on the page before, the page it starts at the top of is its first, numbered 7. One that starts in the next column of a page numbers on through the document, as Word numbers it. A gutter is beside the page's text, or above it in a document that puts it at the top (`w:gutterAtTop`), as Word takes it from the page's height, on every page with mirrored margins too, and below a negative top margin, which the header doesn't push the text below. A paragraph kept together that is taller than a column goes down only the first column of each page, as Word lays it out, from the top of a new page unless it is at the top of this one, and what follows it goes on below it. In columns of different widths it does when it is taller than each of them. One taller than some of them but not others goes in the first column, from where it is, that it fits in, as Word moves it: from the top of a narrow first column to a wide second, and past a narrow second column to a new page, in 3 columns or more as in 2, and the paragraphs kept with the next before it go with it. Paragraphs kept with the next before one taller than each column go to the new page with it, unless they are at the top of the page already, and it moves on to the next page, as Word moves them, so they are alone on theirs. A section that ends with a table has a line below it for the empty paragraph that ends the section, as Word has it
- a section's document grid (`grid`), as Chinese and Japanese documents and Word's templates for them have it. On a grid of lines (`DocumentGridType.LINES`), each line takes as many of the grid's lines (`linePitch`) as its own height needs, with its text in the middle, as Word lays it out: at 360 twips, a line of Times New Roman of up to 15.5 points takes one, and from 16 points two. Multiple line spacing takes the grid's lines times the spacing when that is more, so 1.08 lines are 388.8 twips, at least a height takes that height when it is more, and exact spacing is as it is without the grid. The space before and after a paragraph isn't put on the grid's lines, a line of space before or after (in lines) is one of them, and the room below the last line's text can go below the bottom of the page. The lines of table cells, headers and footers aren't on the grid, nor the lines above footnotes and endnotes, but footnotes and endnotes are. A paragraph whose `snapToGrid` is off, in documents Word made, isn't on the grid's lines. A grid of lines and characters (`DocumentGridType.LINES_AND_CHARS`) also adds its `charSpace`, in 4096ths of a point, after each character, and a quarter of a character more between Chinese, Japanese or Korean characters and Latin letters, as Word does. One that snaps to characters (`DocumentGridType.SNAP_TO_CHARS`) puts each Chinese, Japanese or Korean character in as many cells as it needs, as many cells as fit across a column at the size of the Normal style's text and the `charSpace` more, spread evenly across it, and the other text between them on a line in as many cells as it needs together, with text spaced out by its run (`characterSpacing`) as wide as it is spaced. In columns of different widths each column has cells of its own. A left tab before Chinese, Japanese or Korean text, and a line beside a drawing, start at the next cell, a picture in the line takes as many cells as it needs, a word longer than its line goes on to the next, and a justified line isn't squeezed. Characters of indents are the grid's characters, and footnotes are on the grid as the body is. On a grid of lines and characters kerned text is kerned, and text in a font that isn't East Asian, such as digits in Calibri, has no quarter of a character beside Chinese, Japanese or Korean characters. Emphasis marks take their room in the line before it is put on the grid, with multiple line spacing too. A run with `snapToGrid: false` isn't on a grid of characters, and headers and footers aren't. Sections whose text direction (`page: { textDirection }`) runs across the page are laid out as those without one
- text that runs down the page (`page: { textDirection: PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT }`, and the other directions down it of documents Word made), as Chinese and Japanese documents have it, laid out as Word lays it out: each line runs from the top margin to the bottom one, and the lines go across the page from the right margin, or from the left for the directions that put them that way, each as far from the one before as it is tall, on the section's grid if it has one. Chinese, Japanese and Korean characters in fonts whose characters are all an em, such as MS Mincho and SimSun, are an em down the line, and Latin text is on its side, as wide as it is across a page. Indents are from the top and bottom margins, and the space before and after a paragraph is across the page. Half-width katakana are on their side, half an em each. A tab to a left stop, a border around text or around the paragraph, emphasis marks, superscript and subscript, and a justified line with spaces take the room they take across the page, and a footnote goes below the text, at the left of the page. Two digits set across the line (`w:eastAsianLayout w:vert`) take as much room along it as the line is tall. A gutter is beside the right margin, a negative top or bottom margin is as far from the edge as a positive one, and a grid that snaps to characters puts its cells along the lines. The header and footer stay across the top and bottom of the page, and a header doesn't push the lines down. A section whose text runs down the page starts a new page after one whose text runs across it, as a continuous section does too, and a continuous one goes on on the page after text that runs down it the same way
@@ -234,16 +234,16 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- a footnote in columns too long for the columns of a page, from the top of a later column, where no room for it below the columns leaves its reference on the page; one continued from columns of different widths, below footnotes across the page, or before a section on the same page; a footnote referred to below one that continues from columns; a reference that moves on as its columns are laid out again, on a page with table rows, or to the top of a later column, where a line stays, so the page would be laid out again for the footnote; and a footnote in a section that starts in the next column when none of it fits below the columns of the section before
- a paragraph kept with the next before a table whose header rows go on to the next page with the row after them, which Word may move with them, and a table's header rows alone at the foot of a column
- contextual spacing at the edges of table cells Word hasn't been seen with: at the top of a cell after a table's first, the bottom of a cell before a row's last, and in the paragraphs around a table, where the paragraph next to it in the document is of its style
-- a line in a table cell taller than a page, a table row whose paragraph is kept together that is taller than a column, or one set to a height taller than a page in columns, a row set to at least a height taller than a page whose text is taller than a page too, with a footnote, and one set to a height taller than a page with two footnotes or one with others on its page, the text of a cell merged down into it from a row above or out of it that doesn't fit in it, or as a header row
-- a table in a table cell where it breaks across pages with the text of a cell merged down its rows that goes on past the first of them, or with space between its cells
-- the text of a cell merged down table rows that goes on across a page break between its rows, or across more than two pages but in the last of them, and one that goes on across pages from a table's header rows, or with a footnote in it
+- a line in a table cell taller than a page, a row set to at least a height taller than a page whose text is taller than a page too, with a footnote, and one set to a height taller than a page with footnotes below others on its page, or with the text of a cell merged down into it that ends in it and doesn't fit in it, and a table whose header row is set to a height taller than a page at the end of its section
+- a table in a table cell where it breaks across pages between the rows of a cell merged down them whose text goes on past the first of them, or with space between its cells
+- the text of a cell merged down table rows that goes on across pages from a table's header rows, or with a footnote in it, or across columns
- a line whose multiple line spacing would go below the bottom of the page in a table row that breaks across pages, or above its paragraph's border below, a line whose room on a document grid would go into the footnotes at the bottom of the page, and a line of only pictures in a paragraph at multiple line spacing whose mark is in a larger font than the pictures' runs
- a footnote in a table row that holds back lines of a cell beside it, which would fit on the page above the footnote without it, and a table row that fits on an empty page, but not with its footnote
-- a table border in a style Word's PDFs haven't shown, such as a picture border, or a wave or 3D border of a width Word doesn't offer, and two cells' borders of different styles that meet beside text whose margin is less than half the wider, where Word draws the narrower
-- the last row of a table with space between its cells that breaks across pages, and such a table with borders and header rows that breaks across pages
-- text that runs up or down a cell of a table sized to its text whose other columns' widths depend on how wide Word makes it, which has been seen only of Calibri: one narrowed to fit or fitted to its width, one in a table cell or that text flows around, and a cell given less width than about a line of it; and text that runs up or down a cell with paragraph marks of different sizes or larger than its text, or a table or a text box in it
+- a table border in a style Word's PDFs haven't shown, such as a wave or 3D border of a width Word doesn't offer, or an art border wider than 31 points, and an art border left or right of a cell's text, which Word keeps from it by less than it takes above and below
+- a table row with space between its cells that breaks across pages below the table's header rows repeated on the next, and table rows of different space between their cells in a table sized to its text or with no width of its own, or beside rows with none
+- text that runs up or down a cell of a table sized to its text whose other columns' widths depend on how wide Word makes it, which has been seen only of Calibri, Times New Roman, Arial, Cambria and Courier New, and of empty paragraphs with no space around them: one narrowed to fit or fitted to its width, one in a table cell or that text flows around, and a cell given less width than about a line of it; a row of only such cells whose last paragraph's mark is in another font; and text that runs up or down a cell with a table or a text box in it
- a table row kept with the next before a row that then moves to the next page whole, such as one of a height that doesn't fit
-- a table whose rows give a column different widths, when its width is a share of the page, it has space between its cells and its layout is fixed, or a row starts past its first column; a table whose width is a share of more than the width it is in; a table given no widths of more than 63 columns, more than Word allows; a table whose cells' margins are wider than the room for it, such as one in a narrow cell; and a word longer than a table can make room for, when the table's width is a share of less than all of it, a cell is merged across columns, or a column's cells have different margins
+- a table whose rows give a column different widths, when it has space between its cells and its layout is fixed, or a row starts past its first column with no width before it in twips; a table whose width is a share of more than the width it is in; a table given no widths of more than 63 columns, more than Word allows; a table whose cells' margins are wider than the room for it, such as one in a narrow cell; and a word longer than a table can make room for, when a cell is merged across columns, or a column's cells have different margins
- a long word in a cell merged across columns, which Word makes room for in a way not yet followed: a word longer than those columns' longest words together, with or without more text beside it, when a table given no widths is narrowed to fit, and one whose share would leave a column narrower than its longest line or its width
- text in a font that isn't in the width tables, isn't given as a file (see [Measuring fonts from their files](#measuring-fonts-from-their-files)) and isn't embedded in the document, such as Garamond, Segoe UI or Roboto, so its lines may not be where Word puts them: Word draws it with the font's own widths, or in another font when it doesn't have it, such as Cambria on the Mac. Bold text in a font given or embedded without a bold face stops too: Word makes the bold face itself, each character 20 thousandths of an em wider, but from a file of its own, as it drew Pacifico, which a document embedded, in the copy of it Office downloads, whose letters are narrower
- text in a font given as a file or embedded in the document that Office also offers, such as Pacifico, Roboto or Lato, but for those of the width tables, such as Aptos, and the East Asian characters of the East Asian fonts in them, such as Microsoft YaHei, whose Latin letters stop: Word for Mac draws it in Office's own copy of the font, which it downloads, rather than in the file, as it drew Pacifico, whose letters in Office's copy are narrower and whose lines are shorter than in `demo/assets/Pacifico.ttf`'s. The fonts Office offers are those of Office's catalog of its cloud fonts, which has every font of Microsoft's list, [Cloud fonts in Office](https://support.microsoft.com/en-us/office/cloud-fonts-in-office-f7b009fe-037f-45ed-a556-b5fe6ede6adb), and those it has added since
@@ -254,7 +254,7 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- a soft hyphen where Word hasn't been seen breaking at it: in a line that fits a part of the word squeezed and a shorter part as it is with twice as much room or more, or in a distributed one, in a word whose first part doesn't fit after a tab, or that doesn't fit after a tab at the start of a line, and in a table whose columns Word sizes to their text or widens for long words
- a hidden paragraph mark Word hasn't been seen with, or lays out in a way not yet followed: between paragraphs of different styles, or that differ in more than their alignment, indents, space, line spacing, tab stops and borders, of exact or at-least line spacing, or more than two of different line spacing, before a content control, and ending a section, but for one of a paragraph with nothing shown before a section that starts on its page and is otherwise alike. So do a paragraph with nothing shown and its mark hidden at the end of a header or footer, or of a note, which Word joins to the next note's first paragraph, or with a field, note reference or list number after a paragraph joined to the next, and a footnote reference with a mark of its own in hidden text
- text at a decimal tab stop with a picture before where it would line up, a decimal tab stop in a document whose decimal symbol isn't a full stop, and one of a paragraph's own tab stops past the end of the line in a paragraph indented past the margin, a left one at the start of a line in an indented paragraph, and a centred or decimal one in a paragraph indented on the right, or a right one at the start of a line there; a tab stop past the right indent in a distributed line, or a left one whose text goes past the margin; and a picture, or a word after tabs in a row, that doesn't fit after a tab, and a picture that doesn't fit after a tab at the start of a line
-- borders Word hasn't been seen to draw, or to lay out in a box: a style such as an art border, thin and thick lines narrower than half a point, or wider than 2¼ with a small gap or 3 with a medium or large one, a shadow on a style other than single, or a frame; a paragraph at the top of a page in one box with the paragraph before, whose border between them is another; a box of borders across a section break that ends a paragraph with text in it; and a border in a footnote across pages or in columns, or with the same borders as the footnote before it
+- borders Word hasn't been seen to draw, or to lay out in a box: an art border wider than 31 points, lines of a width of an eighth of a point, thin and thick lines narrower than half a point, or wider than 2¼ with a small gap or 3 with a medium or large one, a shadow on a style other than single, or a frame; a paragraph at the top of a page in one box with the paragraph before, whose border between them is another; a box of borders across a section break that ends a paragraph with text in it; and a border in a footnote across pages or in columns, or with the same borders as the footnote before it
- automatic spacing in a footnote across pages or in columns, after the empty paragraph that ends a section before space of the next section's, and between the paragraphs of lists made from the same definition
- indents in characters where the size Word measures them in isn't known: a right indent of a paragraph whose mark is another size than its style, a first line indent of a list's paragraph whose number is another size than its text, and a hanging indent in characters with a left indent of 0 characters and one in twips
- emphasis marks with line spacing on a line with a picture or with marks both over and under text, and on a line taller than its fonts' own lines, such as one with raised text, at line spacing of less than a line or at least a height
@@ -270,7 +270,7 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- a page reference, number of pages or page number in a format other than those above, or with a picture Word's text isn't known for, as above, or past what its format writes, such as 781 in letters
- in a document in compatibility mode, which Word lays out as Word 2010, 2007 or 2003 did (one saved by those versions of Word, or by an application that writes their mode, or given `compatibility: { version: 14 }`, 12 or 11), what those versions lay out unlike Word 2013 or haven't been seen laying out: a tab to a stop past the end of the line, whose text they put past the margin, a line beside a picture or frame in a gap narrower than 135 points, which they may leave empty, a page break at the end of a paragraph, a table that text wraps around, a table sized to its text in a table cell, indented or as a share of the width, or widened for a long word with no width of its own, a distributed paragraph, or one justified for Thai or with a low kashida, ligatures unless Word's `enableOpenTypeFeatures` is on, as Word 2010 writes it, and any of the `compatibility` options, which Word 2013 leaves out in its own mode, but the older ones may follow; and in Word 2007's and 2003's modes, Chinese, Japanese and Korean text and VML drawings that take room. The rest is laid out as in Word 2013's mode, but that justified lines aren't squeezed, so they break as lines aligned left do, and a table sized to its text has its first and last cells' margins beside the page's text, as Word 2010 and before line a table's text up with the margins rather than its borders. A mode Word doesn't have, such as 13, stops the layout
- a compatibility setting that changes how Word lays out lines in compatibility mode 15 in a way not yet followed: with `suppressTopSpacing`, the first line of a page or column at at-least line spacing less than its text's height or at multiple spacing, a paragraph's line after its first at the top of a page, and such a line in a table cell, on a document grid, or below the space before a section's first paragraph or a border; with `useFELayout`, Chinese, Japanese and Korean text, and any text where another of the East Asian `compatibility` options is on too. `suppressTopSpacing` is followed otherwise: Word leaves out the space above the text of the first line of a page or column at exact spacing, all but 9.6 points of the 80% of the line above its baseline, and at at-least spacing, all but 9.6 points of the line, and leaves a line of single spacing as it is. `useFELayout` leaves the lines of other paragraphs as they are. The other `compatibility` options, which ask for an older Word's or another application's layout, Word lays out lines with as without them in its own mode, so they don't stop it, and `doNotUseHTMLParagraphAutoSpacing` is followed. In [templates](#templates), Word's own settings (`overrideTableStyleFontSizeAndJustification`, `enableOpenTypeFeatures`, `doNotFlipMirrorIndents`, `differentiateMultirowTableHeaders`, `useWord2013TrackBottomHyphenation`, `allowHyphenationAtTrackBottom` and `allowTextAfterFloatingTableBreak`) leave Word's lines as they are too, and those it doesn't know, such as ones a later Word may write, stop it whether they are on or off. Settings for other applications, whose `w:uri` isn't Word's, are left to them, as Word leaves them
-- in [templates](#templates), what `docx` doesn't write and Word lays out in ways not yet followed: space between a row's cells as a share of the table's width, rows with different space between their cells, space between cells of another type than twips, a table indented by a share of the width, a row with table properties of its own other than borders and cell margins, or with borders of its own in a table with space between its cells, a table style with formatting of its rows or cells other than its rows' height and its cells' margins, or a part of one for some cells with properties other than borders, margins, a height for its rows and space between cells, its parts for its bands of rows in a header of four rows or more with its first row turned off, text with a phonetic guide, text fitted to a width with other than text in it, wider than its line or in runs of other sizes or fonts, or fitted to its cell in a table sized to its text, two lines in one with brackets, of Chinese, Japanese or Korean text or at a size of a fraction of a point, and horizontal in vertical text, ink and other content parts, a subdocument, a paragraph in an HTML division, a table cell whose text doesn't wrap in a table sized to its text, cells merged across columns as old versions of Word wrote them with text after the first, footnotes in columns of their own, endnotes numbered afresh on each page, footnotes numbered afresh on each page of a section that shares a page with another, notes numbered on through the document after a section that numbers its own afresh, or in a format not yet written, footnotes anywhere but at the bottom of the page or just below the text, and below the text of columns, after space below the page's last paragraph or going on across pages, endnotes at the end of each section when the document's settings put them there, an endnote with a mark of its own in place of its number, a content control bound to custom XML or the document's properties that Word fills in with other text than is written in it when it opens the document (one whose text is already the XML's is laid out as it is), pages printed as a folded booklet, styles Word updates from the document's template when it opens it, and an imported document (`w:altChunk`) in another format than `.docx`, such as HTML, RTF or plain text, which Word converts its own way, of more than one section, whose formatting is kept as it is (`w:matchSrc`), with a style of its own where its defaults leave out some of the template's, or with a page reference or number of pages, whose number `docx` can't write in it
+- in [templates](#templates), what `docx` doesn't write and Word lays out in ways not yet followed: space between a row's cells as a share of the table's width, a table indent of a type other than twips or a share of the width, a row with table properties of its own other than borders and cell margins, a table style with formatting of its rows or cells other than its rows' height, its rows kept whole and its cells' margins, or a part of one for some cells with properties other than borders, margins, a height for its rows, its rows kept whole and space between cells, text with a phonetic guide, text fitted to a width with other than text in it, wider than its line or in runs of other sizes or fonts, two lines in one with brackets, of Chinese, Japanese or Korean text or at a size of a fraction of a point, and horizontal in vertical text, ink and other content parts, a subdocument, a paragraph in an HTML division, cells merged across columns as old versions of Word wrote them with text after the first, footnotes in columns of their own, endnotes numbered afresh on each page, footnotes numbered afresh on each page of a section that shares a page with another, notes numbered on through the document after a section that numbers its own afresh, or in a format not yet written, footnotes anywhere but at the bottom of the page or just below the text, and below the text of columns, after space below the page's last paragraph or going on across pages, endnotes at the end of each section when the document's settings put them there, an endnote with a mark of its own in place of its number, a content control bound to custom XML or the document's properties that Word fills in with other text than is written in it when it opens the document (one whose text is already the XML's is laid out as it is), pages printed as a folded booklet, styles Word updates from the document's template when it opens it, and an imported document (`w:altChunk`) in another format than `.docx`, such as HTML, RTF or plain text, which Word converts its own way, of more than one section, whose formatting is kept as it is (`w:matchSrc`), with a style of its own where its defaults leave out some of the template's, or with a page reference or number of pages, whose number `docx` can't write in it
When laying out the pages again with the page numbers it worked out still changes them after three passes, as when a table of contents wraps one way with a number and the other way without it, all of them are left blank, and `layoutDocument` lays out the pages without them.
The unique identifier for this abstract numbering definition.