diff --git a/api/classes/index.AbstractNumbering.html b/api/classes/index.AbstractNumbering.html
index a9d6b314ea..9fab674aa8 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 fdac03d659..86aa95007a 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 04c2d253ac..e449eadf44 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 f784f04c82..763bc20fcd 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 7830f08360..2227782e2b 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 372a2f32f0..2e872dfdf4 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 521096690b..6096b64bd1 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 af1f6bbace..8123ba32f2 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 fabd0b660c..389a432fcd 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 fbb8638caa..7d561518bc 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 59b07fbfe1..a858729ec4 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 40e4cdaa60..1c3a682bbe 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 635ab6c7d4..803f38d2d9 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 6f447ff2cc..ad8e3c5ac0 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 f6acf7c9d2..2b50da7660 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 a3bfc5e675..34d935f35a 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 8c0b8fcded..ff0de60d42 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 4dbf2200a0..064c1c4e9c 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 5f5156ad3d..5d5ec5df07 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 166c3e39be..52913aa14d 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 d249de2152..a302e5be0f 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 9699478f8a..50cd8e4f96 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 351df85a40..a685174730 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 bb87826e91..bf52ee2e7d 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 c0b0f22169..734041d322 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 3c83221e0a..a0231b0bc3 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 176aa594cc..fb110ac19d 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 705713aadf..3c093220d5 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 ce98a76f60..7e3f6513f7 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 3f9a0fa6cb..42b876118f 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 d7eeb25ce0..5665915313 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 5aab117781..f159e7827e 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 4c49a87cb3..f98a77fc41 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 66096e9539..6e021a94d4 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 1f4156816a..68972a8089 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 6b40d7b5ba..0fd9cf1df2 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 d087b68561..3bd8db1fdc 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 9e676be96b..124939b8a1 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 aa4fae634d..26bb235b25 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 f578dd0811..240c7263d1 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 12059a1ae5..275897fff4 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 a9945fbe6e..732e66d975 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 a2a94f7834..3ba367a32f 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 b4de45fc3f..1b8f03470f 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 c552edf07e..9f7ac0ce8d 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 50ac87eb97..573ba0a835 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 0214db0a0d..eadcf4eda5 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 f52e7f8be3..0ae8fc899f 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 f8fc12ec41..bc57930121 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 fee6178abd..bc6e541e16 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 803c3827ab..2f6a445614 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 8d2ea96bce..e5de1245f2 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 f8ae903eb1..2bf00a271b 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 c9398cc9c7..3c36bd827f 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 c7fc003ae4..fdd1888014 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 c860f49260..2396670dde 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 6cb5a1deee..1add052e65 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 ded7531156..131451ea64 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 27677734e8..074591929b 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 44320da2b1..9341c0f5d0 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 d035d024e9..e9479d8d75 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 2e701ad7c7..f089aa2224 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 7c6dbeb74f..c1dcf9a07d 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 41ff072983..2f418f4fd8 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 c0a0670a89..40fee6fd59 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 1494f5b10e..7d19f439ab 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 ab4d44d9d7..d67443dde3 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 061bb8cc54..c29f6a2043 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 83c6d316a9..a29f1aef3b 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 68fd635d24..69bf4833d1 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 4400ead022..298b27d4c0 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 859f4bb1f7..6744710122 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 eb996d3251..c1f9e9c0b1 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 9bf6736ca4..014695b6b0 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 b08873f1b2..7c1d751889 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 7ae65910d4..a6bcea0c6e 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 b240dd3419..46bb892259 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 774b40e5d5..925dd8624d 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 f5b80113be..619c773c56 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 48ec84691b..7596832ffc 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 a6ab3d4a12..6d186a75a0 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 acba8f0b6b..a5211c59ff 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 575752a9fb..c6bbb1dcc0 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 83ed05919b..c30bcb9501 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 0290c7e3e1..e094bbeb1e 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 37b6a2e724..6661472c27 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 855aae92b7..d993f3b0e4 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 177eef0582..bbfd99d712 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 d4d63a5d84..97622cb416 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 8814148912..1b42ac4b93 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 c7511cab08..eec8e2e8c0 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 7e92157a77..fe64d0fe7a 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 f6d6f9c979..442572efb3 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 6be5571626..d84dfa80de 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 a39f748776..3af0a5de33 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 c9abe64f33..a351f6fce7 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 a7f1ee08f0..d19556930c 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 878fdb74e1..34ecf530ef 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 379de238c5..833941f326 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 fff4fc8dc0..3328b6fb44 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 9818c2af75..7073e39f9c 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 dbae137ee2..47722d3c32 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 512d3e733a..e47d710e23 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 01d84bbc23..43c7c74ca3 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 1dcb0eb093..b16da2e691 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 31945c0ce4..e3cc30cb5d 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 5236b9f358..d3a456cde5 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 f117674696..98327d1014 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 8b408a172c..4082a641ae 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 d143d380a7..7977029b94 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 bb5b80d493..1844d3f5ce 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 b0ff0ee21c..26c571e496 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 b5fc3ac41d..9582527159 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 1c222a6735..f04deffbac 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 5d1098b0af..7bfcf48f32 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 888d9aa147..75dcc9b8ff 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 ed04498b3c..48077dfbb2 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 d69ac7425d..17faa0b925 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 eaa3c11cdd..326253692e 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 0dd953f638..7c5274977d 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 1aa2fb746e..41c6291932 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 53563a192a..17e011bdb9 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 4eb39cb81d..f70913c759 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 efca83fcfa..19ec3d0646 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 de5f0a7d12..600d0baf88 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 898b4ddfda..3c49df8f75 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 1fd390496d..07effafc6d 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 e75a38f1e3..43753c52ea 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 772d54eb33..587f50178d 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 f98d03b705..5db00c720f 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 a4ea397f53..08889333f6 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 02fa6bbcc2..65804f160e 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 3b1a3646da..b3f5553a57 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 bd2c23e5e8..63c247d813 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 998d0bbb72..dbd9974226 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 40f2fd9120..967ba9e480 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 e385f11c33..84a6cfd553 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 4ae2670be5..b0d9595d78 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 794bc93297..d7bb8b9cd7 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 f7efc16854..b6ee4265f9 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 c6a942e93a..484a544e3b 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 6d92052e3f..58b60d4c13 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 eb957c72f5..e7913bdb13 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 1f5ff41964..4b544d0add 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 0009be4699..fa50905c16 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 75e683d521..bb9b746a29 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 5a2725138b..0c9ee88f00 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 7c24ec2435..f80d82d197 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 55f24e6eb5..94166778d8 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 a30dfeef64..d4fbe0c1fc 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 45f6de50e8..8cc3a7410d 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 abd0c07e7b..eb726b1d39 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 f4154c358f..79d7895996 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 c5878ed43d..38852d6285 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 cacf4e5cd2..798441c92c 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 9a1799e0ff..45af747430 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 5dab4d905f..7e7fc016a2 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 bb0e4815a6..e4e4ac84ed 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 7091edf6d0..2a3492f8b2 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 c9ccc154d0..e86307a38e 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 3575fee6d1..2fab16aeff 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 05608fcd32..153f9deb04 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 a8f5da8eba..02c413b90e 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 6538ea5039..090d6f0991 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 852dcebbe3..0dcb7ec239 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 f0b78c1e8f..834b58e7fd 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 9cf228e5dc..10c593f42c 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 349c1f92a7..bb753ad550 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 90b96c2378..3d47456a75 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 3f32056500..6ba1315e80 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 aef31b9873..c2adaf9f68 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 bcd5385098..fa4140e799 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 80ee7f8f74..25cdb98b9d 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 f4549fbb34..98a07ae468 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 55fa29be75..67acc2893f 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 3f064d1467..f1c18c9db6 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 5e9609c02d..9be36c4c84 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 0467afd3f4..c6ab1a7b38 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 1cd4d28abe..9f23d166ec 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 65b143a26a..3aa591b354 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 f70a7c8a19..d686ef021b 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 ce7c24147f..57f20eb49e 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -8508,6 +8508,23 @@ var docxLayout = (function(exports) {
return alignment === "center" ? width / 2 : width;
};
/**
+ * Where the text after a list number of a level numbered as Word 6 numbered lists (`w:legacy`) starts, from where the
+ * number starts and ends: at the level's indent from the number's start, or after its space from the number's end, where
+ * that is further. A number of 10000. with a space of 120 twips and an indent of 360 puts the text 120 after the number,
+ * at 1093, and 1. with a space of 120 and an indent of 720 puts it 720 from the number, at 1080, each from a number at
+ * 360 (stops2/word-stops-lists2.ts LI19a, LI19b), where a number of 1. and a space that fit in the indent put it as
+ * other lists do (`word-stops-list-definitions.docx` LI9)
+ */
+ var legacyStop = (numberStart, numberEnd, { space, indent }) => Math.max(numberStart + indent, numberEnd + space);
+ /**
+ * Where the box of a list number's border ends: where its tab or space ends, or after the border's room from the number's
+ * end where that is further, and the text after it starts right there. Word puts the text after a bordered number at the
+ * tab's stop, with the border's box drawn to the stop, where the number and its room end before it (stops2/word-stops-lists2.ts
+ * LI13a to LI13c), and right after the room where they don't: 747 twips after a number at 470 in a border of 1.5 points 4
+ * points away, with a tab (`word-stops-lists.docx` LI4a) and with a space (LI13d)
+ */
+ var numberBoxEnd = (numberEnd, suffixEnd, border) => Math.max(suffixEnd, numberEnd + border.room);
+ /**
* Where the tab after a right-aligned list number moves to, from the number's end at the start of the first line. Word
* moves it to the first stop past the number's end: the hanging indent's (`word-lists.docx` LJ1, LJ7, LJ9), or the next
* default stop past a first line indent, where the number ends on one (stops2/word-stops-lists.ts LI6c). Without either
@@ -8525,7 +8542,7 @@ var docxLayout = (function(exports) {
*
* @param items - The paragraph's content, in order
*/
- var measureContentWidths = (items, { format = {}, tabStops = [], defaultTabStop = DEFAULT_TAB_STOP, measurer = DEFAULT_MEASURER, breakRules, numberAlignment, hyphenation }) => {
+ var measureContentWidths = (items, { format = {}, tabStops = [], defaultTabStop = DEFAULT_TAB_STOP, measurer = DEFAULT_MEASURER, breakRules, numberAlignment, legacyNumber, hyphenation }) => {
var _items$;
const { indentLeft = 0, indentRight = 0, firstLineIndent = 0 } = format;
const { stops, firstLineStops } = stopsOf(tabStops, format);
@@ -8543,11 +8560,19 @@ var docxLayout = (function(exports) {
let endBorder;
const kerning = kerningBefore(tokens, measurer);
for (const [index, token] of tokens.entries()) {
- var _border$room2, _startBorderOf$room, _startBorderOf;
+ var _separatorFont$border, _border$room2, _startBorderOf$room, _startBorderOf;
if (token.type === "marker") continue;
+ const separatorFont = token.type === "tab" ? token.font : token.type === "space" ? token.pieces[0].font : void 0;
+ const separator = first && (separatorFont === null || separatorFont === void 0 ? void 0 : separatorFont.listNumber) === "separator";
+ const numberBorder = separator && border !== void 0 && border.key === (separatorFont === null || separatorFont === void 0 || (_separatorFont$border = separatorFont.border) === null || _separatorFont$border === void 0 ? void 0 : _separatorFont$border.key) ? border : void 0;
if (token.type === "space") {
+ const numberEnd = position;
position += roomBetween(border, firstBorder(token.pieces)) + kerning[index] + widthOf(token.pieces, measurer);
border = lastBorder(token.pieces);
+ if (numberBorder !== void 0) {
+ position = numberBoxEnd(numberEnd, position, numberBorder);
+ border = void 0;
+ }
continue;
}
const keepsBox = token.type === "tab" && token.font.border !== void 0 && token.font.border.key === (border === null || border === void 0 ? void 0 : border.key);
@@ -8556,10 +8581,19 @@ var docxLayout = (function(exports) {
endBorder = border;
if (token.type === "tab") {
var _ref, _shiftAt;
- const stop = (_ref = first && numberTab && tokens.findIndex((other) => other.type === "tab") === index ? numberTabStop(position + lead, firstLineStops, format, defaultTabStop, Infinity) : void 0) !== null && _ref !== void 0 ? _ref : nextStop(position + lead, first ? firstLineStops : stops, defaultTabStop, Infinity);
+ const numberEnd = position + lead;
+ const stop = separator && legacyNumber !== void 0 ? {
+ position: legacyStop(lineStart + beforeStart, numberEnd, legacyNumber),
+ alignment: "left"
+ } : (_ref = first && numberTab && tokens.findIndex((other) => other.type === "tab") === index ? numberTabStop(numberEnd, firstLineStops, format, defaultTabStop, Infinity) : void 0) !== null && _ref !== void 0 ? _ref : nextStop(numberEnd, first ? firstLineStops : stops, defaultTabStop, Infinity);
const rest = tokens.slice(index + 1);
const shift = (_shiftAt = shiftAt(stop.alignment, rest, measurer, border)) !== null && _shiftAt !== void 0 ? _shiftAt : widthAfterTab(rest, measurer, border);
- position = Math.max(position + lead, stop.position - shift);
+ position = Math.max(numberEnd, stop.position - shift);
+ if (numberBorder !== void 0) {
+ position = numberBoxEnd(numberEnd, position, numberBorder);
+ border = void 0;
+ endBorder = void 0;
+ }
end = position;
continue;
}
@@ -8768,7 +8802,7 @@ var docxLayout = (function(exports) {
*
* @param items - The paragraph's content, in order
*/
- var layoutLines = (paragraphItems, { width, format: givenFormat = {}, tabStops = [], defaultTabStop = DEFAULT_TAB_STOP, markFont = {}, measurer = DEFAULT_MEASURER, breakRules, numberAlignment, hyphenation, grid = {}, compatibilityMode }) => {
+ var layoutLines = (paragraphItems, { width, format: givenFormat = {}, tabStops = [], defaultTabStop = DEFAULT_TAB_STOP, markFont = {}, measurer = DEFAULT_MEASURER, breakRules, numberAlignment, legacyNumber, hyphenation, grid = {}, compatibilityMode }) => {
var _spaced$items, _ref2, _onCells$unsupported, _content$;
const items = withAcross(paragraphItems, measurer);
const { linePitch, characterSpace, characterPitch, characterRoom } = grid;
@@ -9044,11 +9078,13 @@ var docxLayout = (function(exports) {
}, unknownOnGrid === void 0 ? {} : { unsupported: unknownOnGrid });
const finish = (state, breakAfter) => {
var _ref4, _state$unsupported;
- const spacing = lineSpacingFrom !== void 0 && [
+ const seen = [
...lines.flatMap(({ markers }) => markers),
...state.markers,
...state.pending
- ].includes(lineSpacingFrom.marker) ? lineSpacingFrom.lineSpacing : lineSpacing;
+ ];
+ const joined = lineSpacingFrom === null || lineSpacingFrom === void 0 ? void 0 : lineSpacingFrom.findLast(({ marker }) => seen.includes(marker));
+ const spacing = joined === void 0 ? lineSpacing : joined.lineSpacing;
const marked = state.started ? withMarkOf(state.heights) : markHeightsOf();
const heights = typeof marked === "string" ? state.heights : marked;
const _ref3 = linePitch === void 0 ? heightOf(heights, spacing) : gridHeightOf(heights, spacing, linePitch), { unsupported: unknownHeight } = _ref3, height = _objectWithoutProperties(_ref3, _excluded$1);
@@ -9136,14 +9172,10 @@ var docxLayout = (function(exports) {
}
}
const beyond = line.position + needs > endOf(line) + TOLERANCE$2;
- if (beyond && line.afterNumber === true && token.type === "word" && startOf(lines.length + 1, false) + needs <= limitOf(lines.length + 1) + TOLERANCE$2) {
- var _line$unsupported3;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported3 = line.unsupported) !== null && _line$unsupported3 !== void 0 ? _line$unsupported3 : "a word that doesn't fit after a list number's tab, and would fit on the next line" });
- }
const overflows = line.started && beyond && (line.tabsOnly !== true || token.type === "box");
if (token.type === "box" && token.unbroken !== void 0 && beyond) {
- var _line$unsupported4;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported4 = line.unsupported) !== null && _line$unsupported4 !== void 0 ? _line$unsupported4 : token.unbroken });
+ var _line$unsupported3;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported3 = line.unsupported) !== null && _line$unsupported3 !== void 0 ? _line$unsupported3 : token.unbroken });
}
const neverSqueezed = snapping && (alignment === "justified" || alignment === "distributed");
if (overflows && !neverSqueezed && unsure(line, needs)) line = _objectSpread2(_objectSpread2({}, line), {}, { unknown: true });
@@ -9151,8 +9183,8 @@ var docxLayout = (function(exports) {
if (squeezable && snapping) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a line justified for Thai or with a kashida on a grid that snaps to characters that only fits squeezed" });
const squeezed = squeezable && !snapping;
if (overflows && (!squeezed || alignment !== "justified") && token.type === "word" && mayHyphenate(line, token, leadOf(line))) {
- var _line$unsupported5;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported5 = line.unsupported) !== null && _line$unsupported5 !== void 0 ? _line$unsupported5 : MAY_HYPHENATE });
+ var _line$unsupported4;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported4 = line.unsupported) !== null && _line$unsupported4 !== void 0 ? _line$unsupported4 : MAY_HYPHENATE });
}
if (overflows && !squeezed) {
line = wrap(line);
@@ -9164,12 +9196,12 @@ var docxLayout = (function(exports) {
let placed = false;
let partStart = line.position;
if (mayHyphenate(line, token, 0)) {
- var _line$unsupported6;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported6 = line.unsupported) !== null && _line$unsupported6 !== void 0 ? _line$unsupported6 : MAY_HYPHENATE });
+ var _line$unsupported5;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported5 = line.unsupported) !== null && _line$unsupported5 !== void 0 ? _line$unsupported5 : MAY_HYPHENATE });
}
if (token.pieces.some(({ font }) => hasLigatures(font))) {
- var _line$unsupported7;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported7 = line.unsupported) !== null && _line$unsupported7 !== void 0 ? _line$unsupported7 : "a word longer than its line with ligatures" });
+ var _line$unsupported6;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported6 = line.unsupported) !== null && _line$unsupported6 !== void 0 ? _line$unsupported6 : "a word longer than its line with ligatures" });
}
let onLine = [];
let from = line.position;
@@ -9223,8 +9255,7 @@ var docxLayout = (function(exports) {
heights: withToken(line.heights, token),
started: true,
border: endBorderOf(token),
- tabsOnly: false,
- afterNumber: false
+ tabsOnly: false
});
};
/**
@@ -9256,8 +9287,8 @@ var docxLayout = (function(exports) {
const shorter = squeezed ? splits.slice(index + 1).find((other) => other.fits) : void 0;
if (shorter !== void 0 && !squeezesForPart(line, shorter, withHyphen)) continue;
if (shorter !== void 0 && alignment === "distributed") {
- var _line$unsupported8;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported8 = line.unsupported) !== null && _line$unsupported8 !== void 0 ? _line$unsupported8 : "a distributed line that fits a soft hyphen's part squeezed, rather than a shorter one as it is" });
+ var _line$unsupported7;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported7 = line.unsupported) !== null && _line$unsupported7 !== void 0 ? _line$unsupported7 : "a distributed line that fits a soft hyphen's part squeezed, rather than a shorter one as it is" });
}
if (fits || squeezed) {
const placed = place(line);
@@ -9282,7 +9313,7 @@ var docxLayout = (function(exports) {
}
};
for (const [index, token] of tokens.entries()) {
- var _line$border;
+ var _line$border2;
if (token.type === "marker") {
var _tokens;
const before = (_tokens = tokens[index - 1]) === null || _tokens === void 0 ? void 0 : _tokens.type;
@@ -9290,7 +9321,10 @@ var docxLayout = (function(exports) {
continue;
}
if (token.type === "space") {
+ var _line$border, _firstBorder;
const spaces = widthOf(token.pieces, measurer);
+ const numberEnd = line.position;
+ const numberBorder = line.first && token.pieces[0].font.listNumber === "separator" && ((_line$border = line.border) === null || _line$border === void 0 ? void 0 : _line$border.key) === ((_firstBorder = firstBorder(token.pieces)) === null || _firstBorder === void 0 ? void 0 : _firstBorder.key) ? line.border : void 0;
line = _objectSpread2(_objectSpread2(_objectSpread2({}, line), !snapping ? { position: line.position + roomBetween(line.border, firstBorder(token.pieces)) + kerning[index] + spaces } : snapped(line, token.pieces, line.latin === void 0 ? 0 : kerning[index])), {}, {
text: line.text + textOf$2(token.pieces),
spaces: line.started ? line.spaces + spaces : 0,
@@ -9299,20 +9333,33 @@ var docxLayout = (function(exports) {
heights: withToken(line.heights, token),
border: lastBorder(token.pieces)
});
+ if (numberBorder !== void 0) line = _objectSpread2(_objectSpread2({}, line), {}, {
+ position: numberBoxEnd(numberEnd, line.position, numberBorder),
+ border: void 0
+ });
continue;
}
- line = token.type === "word" || token.type === "box" || token.type === "tab" && token.font.border !== void 0 && token.font.border.key === ((_line$border = line.border) === null || _line$border === void 0 ? void 0 : _line$border.key) ? line : _objectSpread2(_objectSpread2({}, line), {}, {
+ line = token.type === "word" || token.type === "box" || token.type === "tab" && token.font.border !== void 0 && token.font.border.key === ((_line$border2 = line.border) === null || _line$border2 === void 0 ? void 0 : _line$border2.key) ? line : _objectSpread2(_objectSpread2({}, line), {}, {
position: line.position + roomBetween(line.border, void 0),
border: void 0
});
if (snapping && token.type === "box" && token.descent !== void 0) {
- var _line$unsupported9;
- line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported9 = line.unsupported) !== null && _line$unsupported9 !== void 0 ? _line$unsupported9 : "an equation on a grid that snaps to characters" });
+ var _line$unsupported8;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported8 = line.unsupported) !== null && _line$unsupported8 !== void 0 ? _line$unsupported8 : "an equation on a grid that snaps to characters" });
}
if (snapping && token.type !== "word") line = _objectSpread2(_objectSpread2({}, line), {}, { latin: void 0 });
if (token.type === "tab") {
- var _nextStop, _line$unsupported13;
- const numbered = numberTab ? { stop: numberTabStop(line.position, firstLineStops, format, defaultTabStop, limitOf()) } : void 0;
+ var _nextStop, _token$font$border, _line$unsupported13;
+ const separator = line.first && token.font.listNumber === "separator";
+ const legacy = separator && legacyNumber !== void 0 ? legacyStop(line.start, line.position, legacyNumber) : void 0;
+ if (legacy !== void 0 && legacy > limitOf() + TOLERANCE$2) {
+ var _line$unsupported9;
+ line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: (_line$unsupported9 = line.unsupported) !== null && _line$unsupported9 !== void 0 ? _line$unsupported9 : "a list numbered as Word 6 numbered lists whose number and its room reach past the end of its line" });
+ }
+ const numbered = numberTab ? { stop: numberTabStop(line.position, firstLineStops, format, defaultTabStop, limitOf()) } : legacy !== void 0 ? { stop: {
+ position: legacy,
+ alignment: "left"
+ } } : void 0;
numberTab = false;
const given = line.first ? firstLineStops : stops;
const next = nextStop(line.position, given, defaultTabStop, Infinity);
@@ -9389,7 +9436,9 @@ var docxLayout = (function(exports) {
}
}
line = _objectSpread2(_objectSpread2(_objectSpread2({}, place(line)), pastIndent ? { pastIndent } : {}), olderPast ? { unbroken: olderPast } : {});
- const { lineUp, position, unsupported: pastEndAtStop } = startAt(stop, line);
+ const { lineUp, position: atStop, unsupported: pastEndAtStop } = startAt(stop, line);
+ const numberBorder = separator && line.border !== void 0 && line.border.key === ((_token$font$border = token.font.border) === null || _token$font$border === void 0 ? void 0 : _token$font$border.key) ? line.border : void 0;
+ const position = numberBorder === void 0 ? atStop : numberBoxEnd(line.position, atStop, numberBorder);
const misaligned = lineUp === void 0 ? "text at a decimal tab stop that Word hasn't been seen lining up" : pastEndAtStop;
if (snapping && !inCells(stop) && (stop.alignment !== "left" || starting === void 0)) {
var _line$unsupported12;
@@ -9406,8 +9455,8 @@ var docxLayout = (function(exports) {
letters: 0,
otherSpaces: 0,
started: true,
- tabsOnly: !line.started || line.tabsOnly === true || token.font.listNumber === "separator"
- }, token.font.listNumber === "separator" ? { afterNumber: true } : {}), misaligned === void 0 ? {} : { unsupported: (_line$unsupported13 = line.unsupported) !== null && _line$unsupported13 !== void 0 ? _line$unsupported13 : misaligned });
+ tabsOnly: !line.started || line.tabsOnly === true || separator
+ }, numberBorder === void 0 ? {} : { border: void 0 }), misaligned === void 0 ? {} : { unsupported: (_line$unsupported13 = line.unsupported) !== null && _line$unsupported13 !== void 0 ? _line$unsupported13 : misaligned });
continue;
}
const [space, nextWord] = token.type === "word" && format.rightToLeft !== true ? nextTwo(tokens, index) : [];
@@ -41429,6 +41478,7 @@ var docxLayout = (function(exports) {
var BOUND_CONTROL = "a content control Word fills in from custom XML with other text than is written in it";
var REMOVED_NOTES = /* @__PURE__ */ new Set(["w:footnoteReference", "w:endnoteReference"]);
var PARTLY_DELETED_FIELD = "a field partly deleted in a tracked change";
+ var DELETED_OWN_MARK = "a deleted footnote or endnote reference with a mark of its own";
var GUESS = "docx-layout:guess ";
/** A marker that stands in a paragraph's items for what the reader guessed at, for why */
var guessMarker = (reason) => ({
@@ -42406,9 +42456,8 @@ var docxLayout = (function(exports) {
]);
var REMOVALS = /* @__PURE__ */ new Set(["w:del", "w:moveFrom"]);
var STOP = "docx-layout:unsupported";
- var COUNTED = "docx-layout:counted";
var LEFT_OUT = "docx-layout:left-out";
- var JOINED_SPACING = "docx-layout:joined-spacing";
+ var JOINED_NEXT = "docx-layout:joined-next";
var KEPT_MARK = "docx-layout:kept-mark";
/**
* The items of the parts of a paragraph, or why it can't be laid out. Read to be laid out with a guess, a part that can't
@@ -42424,7 +42473,9 @@ var docxLayout = (function(exports) {
* the markup area beside the page, and breaks the lines without it, pictures, tabs and breaks too (`word-watertight-markup.docx`
* MK1, `word-tracked-changes.docx` MK10), but for its bookmarks. Word numbers a note whose reference is deleted, though it
* doesn't show it or lay the note out: a footnote (MK10e), and an endnote, the kept one after it ii
- * (`stops2/word-stops-tracked-edges.docx` TR3b). It numbers a note whose reference is moved elsewhere the same way, at the
+ * (`stops2/word-stops-tracked-edges.docx` TR3b). One whose reference has a mark of its own it lays out all the same, after
+ * the other endnotes, with i at its mark (`word-stops-tracked2.docx` TR17), which isn't followed yet: the layout stops
+ * there. It numbers a note whose reference is moved elsewhere the same way, at the
* reference's old place, and lays out the note of its new place: 1 there, and 2 at the new (`word-stops-moves.docx` TR3a).
* A footnote or endnote reference with a mark of its own isn't counted, as where it isn't deleted.
*/
@@ -42432,10 +42483,12 @@ var docxLayout = (function(exports) {
const name = nameOf$1(element);
if (name === "w:r") {
const children = contentOf$3(element).filter(isObject);
- children.filter((child) => REMOVED_NOTES.has(nameOf$1(child))).filter((reference) => !hasOwnMark(reference)).forEach((reference) => {
+ const references = children.filter((child) => REMOVED_NOTES.has(nameOf$1(child)));
+ references.filter((reference) => !hasOwnMark(reference)).forEach((reference) => {
var _reader$notes3;
return (_reader$notes3 = reader.notes) === null || _reader$notes3 === void 0 ? void 0 : _reader$notes3.skip("w:endnoteReference" in reference ? "endnote" : "footnote");
});
+ if (references.some(hasOwnMark)) return DELETED_OWN_MARK;
return itemsOf(children.map((child) => nameOf$1(child) === "w:fldChar" ? readFieldCharacter(child, {}, reader, true) : []), reader);
}
if (name === "w:bookmarkStart") return markerOf(element);
@@ -42539,10 +42592,6 @@ var docxLayout = (function(exports) {
if (name === "w:bookmarkStart") return markerOf(element);
if (name === "w:subDoc") return "a subdocument";
if (name === STOP) return String(element[name]);
- if (name === JOINED_SPACING) return [{
- type: "marker",
- name: JOINED_SPACING_MARKER
- }];
return name === "m:oMath" || name === "m:oMathPara" ? readEquation(element, paragraphRun, reader) : [];
}), reader);
/** The levels a level's text writes the numbers of (`%1` to `%9`), counted from 0 */
@@ -42556,24 +42605,22 @@ var docxLayout = (function(exports) {
var isLevelLeftOut = (level, levels) => level.alignedBoth === true || referredLevelsOf(level).some((at) => levels[at] === void 0);
/**
* Where the lists made from a definition are in their counting after a paragraph at a level Word leaves out: as they
- * were, as it isn't counted, but for the levels below it that have numbers, which it may start again
+ * were, as it isn't counted, but for the levels below it, which it starts again, as a paragraph at any level does: level
+ * 1's paragraphs either side of one at a left-out level 0 are both 1) (stops2/word-stops-lists2.ts LI14)
*/
var leftOutIn = (count, index) => {
- var _count$numbers, _count$uncertain, _count$started;
- const numbers = (_count$numbers = count === null || count === void 0 ? void 0 : count.numbers) !== null && _count$numbers !== void 0 ? _count$numbers : [];
- const below = numbers.flatMap((counted, at) => at > index && counted !== void 0 ? [at] : []);
- const uncertain = [.../* @__PURE__ */ new Set([...(_count$uncertain = count === null || count === void 0 ? void 0 : count.uncertain) !== null && _count$uncertain !== void 0 ? _count$uncertain : [], ...below])];
- return _objectSpread2({
- numbers,
+ var _count$numbers, _count$started;
+ return {
+ numbers: ((_count$numbers = count === null || count === void 0 ? void 0 : count.numbers) !== null && _count$numbers !== void 0 ? _count$numbers : []).map((counted, at) => at > index ? void 0 : counted),
started: (_count$started = count === null || count === void 0 ? void 0 : count.started) !== null && _count$started !== void 0 ? _count$started : []
- }, uncertain.length > 0 ? { uncertain } : {});
+ };
};
/**
* The number of a paragraph in a list, and what follows it, as its list's level writes it, and its number as a chapter
* number. A paragraph is in the list it gives, or else in its style's. The list's numbers move on.
*/
var readListNumber = (properties, style, markRun, reader) => {
- var _valueOf2, _numberOf3, _ref2, _levels$findIndex, _ref3, _before$uncertain, _ref4, _ref5, _level$unsupported, _exec, _reader$listIds$get;
+ var _valueOf2, _numberOf3, _ref2, _levels$findIndex, _ref3, _ref4, _ref5, _level$unsupported, _exec, _reader$listIds$get;
const numbering = childrenOf(find(properties, "w:numPr"));
const ownId = (_valueOf2 = valueOf(numbering, "w:numId")) !== null && _valueOf2 !== void 0 ? _valueOf2 : (_numberOf3 = numberOf(attributesOf(find(numbering, "w:numId"))["w:val"])) === null || _numberOf3 === void 0 ? void 0 : _numberOf3.toString();
const ownLevel = numberOf(attributesOf(find(numbering, "w:ilvl"))["w:val"]);
@@ -42593,8 +42640,6 @@ var docxLayout = (function(exports) {
reader.counters.set(list.definition, leftOutIn(reader.counters.get(list.definition), index));
return { items: [] };
}
- const before = reader.counters.get(list.definition);
- const restartedByLeftOut = (before === null || before === void 0 || (_before$uncertain = before.uncertain) === null || _before$uncertain === void 0 ? void 0 : _before$uncertain.includes(index)) === true;
const current = countIn(reader.counters, id, list, index);
const { started } = reader.counters.get(list.definition);
const numberAt = (at) => {
@@ -42614,7 +42659,7 @@ var docxLayout = (function(exports) {
});
const numberFont = singleFontOf(text, numberRun);
const font = numberFont !== null && numberFont !== void 0 ? numberFont : fontOf(numberRun);
- const unsupported = (_ref4 = (_ref5 = (_level$unsupported = level.unsupported) !== null && _level$unsupported !== void 0 ? _level$unsupported : unknownRunFont(text, numberRun)) !== null && _ref5 !== void 0 ? _ref5 : numberFont === void 0 ? "a list number of characters of both the font for ASCII and the high ANSI font of its run" : void 0) !== null && _ref4 !== void 0 ? _ref4 : levels.some((other) => (other === null || other === void 0 ? void 0 : other.alignedBoth) === true) ? "a list number at another level of a list with a level aligned both" : restartedByLeftOut ? "a list number after a paragraph at a level Word leaves out above it" : referred.some((at) => numberAt(at) === void 0) ? "a list number in a format not yet written" : referred.some(ownStart) ? "a list number of a level not counted yet, which its list starts at a number of its own" : font.border !== void 0 ? "a list number with a border" : void 0;
+ const unsupported = (_ref4 = (_ref5 = (_level$unsupported = level.unsupported) !== null && _level$unsupported !== void 0 ? _level$unsupported : unknownRunFont(text, numberRun)) !== null && _ref5 !== void 0 ? _ref5 : numberFont === void 0 ? "a list number of characters of both the font for ASCII and the high ANSI font of its run" : void 0) !== null && _ref4 !== void 0 ? _ref4 : referred.some((at) => numberAt(at) === void 0) ? "a list number in a format not yet written" : referred.some(ownStart) ? "a list number of a level not counted yet, which its list starts at a number of its own" : void 0;
const numbers = (_exec = /%[1-9](?:.*%[1-9])?/.exec(level.text)) === null || _exec === void 0 ? void 0 : _exec[0];
const separator = _objectSpread2(_objectSpread2({}, font), {}, { listNumber: "separator" });
const suffix = level.suffix === "nothing" ? [] : level.suffix === "space" ? [{
@@ -42644,6 +42689,7 @@ var docxLayout = (function(exports) {
return (_numberAt2 = numberAt(Number(digit) - 1)) !== null && _numberAt2 !== void 0 ? _numberAt2 : "";
}),
alignment: text.length > 0 ? level.alignment : void 0,
+ legacy: level.legacy,
unsupported
}));
};
@@ -42658,7 +42704,7 @@ var docxLayout = (function(exports) {
*/
var countIn = (counters, id, { levels, starts, definition }, index) => {
var _counters$get;
- const { numbers, started, uncertain = [] } = (_counters$get = counters.get(definition)) !== null && _counters$get !== void 0 ? _counters$get : {
+ const { numbers, started } = (_counters$get = counters.get(definition)) !== null && _counters$get !== void 0 ? _counters$get : {
numbers: [],
started: []
};
@@ -42675,11 +42721,10 @@ var docxLayout = (function(exports) {
const restart = (_levels$at = levels[at]) === null || _levels$at === void 0 ? void 0 : _levels$at.restart;
return restart !== void 0 && restart <= at && restart <= index ? numbers[at] : void 0;
});
- const stillUncertain = uncertain.filter((at) => at !== index && current[at] !== void 0);
- counters.set(definition, _objectSpread2({
+ counters.set(definition, {
numbers: current,
started: starting ? [...started, `${id} ${index}`] : started
- }, stillUncertain.length > 0 ? { uncertain: stillUncertain } : {}));
+ });
return current;
};
var ARABIC = new RegExp("\\p{Script=Arabic}", "u");
@@ -42866,19 +42911,60 @@ var docxLayout = (function(exports) {
return frame;
};
/**
+ * Reads a paragraph's content, with the content of each paragraph joined to it by a hidden mark in the formatting of its
+ * own style, from the paragraph's properties that stand where its text starts (see {@link joinedToNext}), and a marker
+ * there where the line spacing changes (`marker`)
+ */
+ var readJoinedInline = (children, paragraphRun, joined, reader) => {
+ const parts = [];
+ let from = 0;
+ let run = paragraphRun;
+ for (const { element, run: nextRun, marker } of joined) {
+ const at = children.indexOf(element);
+ parts.push(readInline(children.slice(from, at), run, reader), marker === void 0 ? [] : [{
+ type: "marker",
+ name: marker
+ }]);
+ from = at + 1;
+ run = nextRun;
+ }
+ parts.push(readInline(children.slice(from), run, reader));
+ return itemsOf(parts, reader);
+ };
+ /**
* Reads a paragraph (`w:p`), in the formatting of its styles, and of its table's style when it is in a table.
*/
var readParagraph = (element, reader, tableFormats = []) => {
- var _valueOf3, _exec2, _styleChain$slice$0$n, _styleChain$slice$, _ref6, _ref7, _ref8, _ref9, _list$unsupported, _ref10, _ref11, _unknownInOlderLayout;
+ var _valueOf3, _last$markRun, _exec2, _styleChain$slice$0$n, _styleChain$slice$, _ref6, _ref7, _ref8, _ref9, _list$unsupported, _ref10, _unknownInOlderLayout;
const { styles } = reader;
const children = contentOf$3(element);
const properties = childrenOf(find(children.filter(isObject), "w:pPr"));
const style = (_valueOf3 = valueOf(properties, "w:pStyle")) !== null && _valueOf3 !== void 0 ? _valueOf3 : styles.defaultParagraphStyle;
const paragraphStyles = [...tableFormats, ...styleChain(styles, style, "paragraph")];
const paragraphRun = combine([styles.run, ...paragraphStyles.map(({ run }) => run)]);
- const markRun = combine([paragraphRun, readRunFormat(find(properties, "w:rPr"), styles.themeFonts)]);
+ const joined = children.filter((child) => isObject(child) && JOINED_NEXT in child).map((joinedElement) => {
+ var _valueOf4;
+ const given = childrenOf(joinedElement[JOINED_NEXT]);
+ const joinedStyle = (_valueOf4 = valueOf(given, "w:pStyle")) !== null && _valueOf4 !== void 0 ? _valueOf4 : styles.defaultParagraphStyle;
+ const chain = [...tableFormats, ...styleChain(styles, joinedStyle, "paragraph")];
+ const run = combine([styles.run, ...chain.map((inChain) => inChain.run)]);
+ return {
+ element: joinedElement,
+ given,
+ style: joinedStyle,
+ run,
+ markRun: combine([run, readRunFormat(find(given, "w:rPr"), styles.themeFonts)]),
+ format: combine([
+ styles.paragraph,
+ ...chain.map((inChain) => inChain.paragraph),
+ readParagraphFormat(given)
+ ])
+ };
+ });
+ const last = joined[joined.length - 1];
+ const markRun = (_last$markRun = last === null || last === void 0 ? void 0 : last.markRun) !== null && _last$markRun !== void 0 ? _last$markRun : combine([paragraphRun, readRunFormat(find(properties, "w:rPr"), styles.themeFonts)]);
const list = readListNumber(properties, style, markRun, reader);
- children.filter((child) => isObject(child) && COUNTED in child).forEach(() => readListNumber(properties, style, markRun, reader));
+ joined.filter(({ given }) => isNumbered({ "w:p": [{ "w:pPr": given }] }, styles)).forEach(({ given, style: joinedStyle, markRun: joinedMarkRun }) => readListNumber(given, joinedStyle, joinedMarkRun, reader));
const headingLevel = (_exec2 = /^heading ([1-9])$/i.exec((_styleChain$slice$0$n = (_styleChain$slice$ = styleChain(styles, style, "paragraph").slice(-1)[0]) === null || _styleChain$slice$ === void 0 ? void 0 : _styleChain$slice$.name) !== null && _styleChain$slice$0$n !== void 0 ? _styleChain$slice$0$n : "")) === null || _exec2 === void 0 ? void 0 : _exec2[1];
const formats = [
styles.paragraph,
@@ -42886,10 +42972,22 @@ var docxLayout = (function(exports) {
...list.level ? [list.level.paragraph] : [],
readParagraphFormat(properties)
];
- const read = withEquations(withFitted(readInline(children, paragraphRun, reader)), list.items.length > 0, reader);
+ const firstSpacing = combine(formats).lineSpacing;
+ const markerAt = (index) => `${JOINED_SPACING_MARKER}${index === 0 ? "" : ` ${index + 1}`}`;
+ const spacedApart = joined.map(({ format: joinedFormat }, index) => {
+ const before = index === 0 ? firstSpacing : joined[index - 1].format.lineSpacing;
+ return JSON.stringify(joinedFormat.lineSpacing) !== JSON.stringify(before);
+ });
+ const lineSpacingFrom = joined.flatMap(({ format: joinedFormat }, index) => spacedApart[index] ? [_objectSpread2({ marker: markerAt(index) }, withoutUndefined({ lineSpacing: joinedFormat.lineSpacing }))] : []);
+ const read = withEquations(withFitted(readJoinedInline(children, paragraphRun, joined.map((part, index) => _objectSpread2(_objectSpread2({}, part), spacedApart[index] ? { marker: markerAt(index) } : {})), reader)), list.items.length > 0, reader);
const guessed = typeof read === "string" ? void 0 : read.map(guessOf).find((reason) => reason !== void 0);
const items = typeof read === "string" ? read : read.filter((item) => guessOf(item) === void 0);
- const ownFormat = combine(formats);
+ const AFTER = /* @__PURE__ */ new Set([
+ "spaceAfter",
+ "spaceAfterLines",
+ "autoSpaceAfter"
+ ]);
+ const ownFormat = last === void 0 ? combine(formats) : _objectSpread2(_objectSpread2({}, Object.fromEntries(Object.entries(combine(formats)).filter(([key]) => !AFTER.has(key)))), Object.fromEntries(Object.entries(last.format).filter(([key]) => AFTER.has(key))));
const division = readDivision(properties, ownFormat, reader);
const combined = division === void 0 ? ownFormat : combine([ownFormat, division.format]);
const own = typeof items === "string" ? [] : items;
@@ -42912,22 +43010,19 @@ var docxLayout = (function(exports) {
listNumber: list.items,
items: own
}, markFont, fontOf(paragraphRun), unitsOf(sectionGrid));
- const joined = children.filter((child) => isObject(child) && JOINED_SPACING in child);
- const joinedSpacing = joined.length === 0 ? void 0 : combine([...formats.slice(0, -1), readParagraphFormat(childrenOf(joined[0][JOINED_SPACING]))]).lineSpacing;
- const unjoinedSpacing = joined.length > 1 || joined.length > 0 && [combined.lineSpacing, joinedSpacing].some((spacing) => spacing !== void 0 && spacing.rule !== "multiple") ? "a hidden paragraph mark between paragraphs of exact or at least line spacing, or more than two of other line spacing" : void 0;
const borders = readBorders(typeof format === "string" ? combined : format);
const forThaiOrArabic = combined.alignment === "thaiDistributed" || combined.alignment === "lowKashida";
const tabStops = tabStopsOf(formats);
const otherDecimalSymbol = reader.decimalSymbol !== void 0 && reader.decimalSymbol !== "." && tabStops.some(({ alignment }) => alignment === "decimal");
const frame = readFrameOf(properties, styleChain(styles, style, "paragraph"), reader);
- const unsupported = (_ref6 = (_ref7 = (_ref8 = (_ref9 = (_list$unsupported = list.unsupported) !== null && _list$unsupported !== void 0 ? _list$unsupported : ownCells) !== null && _ref9 !== void 0 ? _ref9 : unknownEastAsianRules(reader.eastAsianRules, own, combined.alignment)) !== null && _ref8 !== void 0 ? _ref8 : joinedAcrossRuns(own) ? "Arabic letters joined across runs" : void 0) !== null && _ref7 !== void 0 ? _ref7 : reader.down === true ? unknownDownOf(own, tabStops) : void 0) !== null && _ref6 !== void 0 ? _ref6 : typeof frame === "string" ? frame : otherDecimalSymbol ? "a decimal tab stop in a document whose decimal symbol isn't a full stop" : (division === null || division === void 0 ? void 0 : division.unsupported) !== void 0 ? division.unsupported : combined.alignment === "mediumKashida" || combined.alignment === "highKashida" ? "a paragraph justified for Arabic with a medium or high kashida" : forThaiOrArabic && typeof items !== "string" && items.some((item) => item.type === "text" && ARABIC.test(item.text)) ? "Arabic text justified for Thai or with a kashida" : (_ref10 = (_ref11 = (_unknownInOlderLayout = unknownInOlderLayout(content, reader, onOff(properties, "w:autoSpaceDE") !== false || onOff(properties, "w:autoSpaceDN") !== false)) !== null && _unknownInOlderLayout !== void 0 ? _unknownInOlderLayout : unjoinedSpacing) !== null && _ref11 !== void 0 ? _ref11 : typeof format === "string" ? format : void 0) !== null && _ref10 !== void 0 ? _ref10 : typeof borders === "string" ? borders : void 0;
- return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
+ const unsupported = (_ref6 = (_ref7 = (_ref8 = (_ref9 = (_list$unsupported = list.unsupported) !== null && _list$unsupported !== void 0 ? _list$unsupported : ownCells) !== null && _ref9 !== void 0 ? _ref9 : unknownEastAsianRules(reader.eastAsianRules, own, combined.alignment)) !== null && _ref8 !== void 0 ? _ref8 : joinedAcrossRuns(own) ? "Arabic letters joined across runs" : void 0) !== null && _ref7 !== void 0 ? _ref7 : reader.down === true ? unknownDownOf(own, tabStops) : void 0) !== null && _ref6 !== void 0 ? _ref6 : typeof frame === "string" ? frame : otherDecimalSymbol ? "a decimal tab stop in a document whose decimal symbol isn't a full stop" : (division === null || division === void 0 ? void 0 : division.unsupported) !== void 0 ? division.unsupported : combined.alignment === "mediumKashida" || combined.alignment === "highKashida" ? "a paragraph justified for Arabic with a medium or high kashida" : forThaiOrArabic && typeof items !== "string" && items.some((item) => item.type === "text" && ARABIC.test(item.text)) ? "Arabic text justified for Thai or with a kashida" : (_ref10 = (_unknownInOlderLayout = unknownInOlderLayout(content, reader, onOff(properties, "w:autoSpaceDE") !== false || onOff(properties, "w:autoSpaceDN") !== false)) !== null && _unknownInOlderLayout !== void 0 ? _unknownInOlderLayout : typeof format === "string" ? format : void 0) !== null && _ref10 !== void 0 ? _ref10 : typeof borders === "string" ? borders : void 0;
+ return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
type: "paragraph",
items: content,
- format: _objectSpread2(_objectSpread2({}, typeof format === "string" ? combined : format), joined.length === 0 ? {} : { lineSpacingFrom: _objectSpread2({ marker: JOINED_SPACING_MARKER }, withoutUndefined({ lineSpacing: joinedSpacing })) }),
+ format: _objectSpread2(_objectSpread2({}, typeof format === "string" ? combined : format), lineSpacingFrom.length === 0 ? {} : { lineSpacingFrom }),
tabStops,
markFont
- }, unsupported === void 0 && typeof items !== "string" && children.some((child) => isObject(child) && LEFT_OUT in child) ? { hidden: true } : {}), list.list ? { list: list.list } : {}), list.alignment ? { numberAlignment: list.alignment } : {}), typeof borders === "object" ? { borders } : {}), paragraphGrid !== void 0 && Object.keys(paragraphGrid).length > 0 ? { grid: paragraphGrid } : {}), typeof frame === "object" ? { frame } : {}), (division === null || division === void 0 ? void 0 : division.division) === void 0 ? {} : {
+ }, unsupported === void 0 && typeof items !== "string" && children.some((child) => isObject(child) && LEFT_OUT in child) ? { hidden: true } : {}), list.list ? { list: list.list } : {}), list.alignment ? { numberAlignment: list.alignment } : {}), list.legacy ? { numberLegacy: list.legacy } : {}), typeof borders === "object" ? { borders } : {}), paragraphGrid !== void 0 && Object.keys(paragraphGrid).length > 0 ? { grid: paragraphGrid } : {}), typeof frame === "object" ? { frame } : {}), (division === null || division === void 0 ? void 0 : division.division) === void 0 ? {} : {
division: division.division,
unknownAtTop: "a paragraph in an HTML division at the top of a page or column"
}), {}, { style }, headingLevel === void 0 ? {} : { heading: _objectSpread2({ level: Number(headingLevel) }, withoutUndefined({ chapter: list.from === "style" ? list.chapter : void 0 })) }), typeof items === "string" || guessed || unsupported ? { unsupported: typeof items === "string" ? items : guessed !== null && guessed !== void 0 ? guessed : unsupported } : {});
@@ -43083,8 +43178,8 @@ var docxLayout = (function(exports) {
]);
/** Whether a section's text runs down the page (`w:textDirection`), from the right or the left. Undefined across it */
var downOf = (properties) => {
- var _valueOf4;
- const direction = (_valueOf4 = valueOf(properties, "w:textDirection")) !== null && _valueOf4 !== void 0 ? _valueOf4 : "";
+ var _valueOf5;
+ const direction = (_valueOf5 = valueOf(properties, "w:textDirection")) !== null && _valueOf5 !== void 0 ? _valueOf5 : "";
return DOWN_FROM_RIGHT.has(direction) ? "fromRight" : DOWN_FROM_LEFT.has(direction) ? "fromLeft" : void 0;
};
var VERTICAL = /* @__PURE__ */ new Set([...DOWN_FROM_RIGHT, ...DOWN_FROM_LEFT]);
@@ -43224,7 +43319,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$, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33, _withoutGuess$unsuppo, _read$find2, _givenWidth$share, _blocks$find, _read$0$cells, _read$, _roomOf, _roomOf2;
+ var _twips2, _reader$grid, _readTableLook, _kept$0$spacing, _kept$, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _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");
@@ -43306,7 +43401,7 @@ var docxLayout = (function(exports) {
}, 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, _numberOf5, _ref15, _onOff2;
+ var _formatsOf$height, _numberOf5, _ref14, _onOff2;
const rowChildren = contentOf$3(row).filter(isObject);
const rowProperties = childrenOf(find(rowChildren, "w:trPr"));
const rowParts = unwrap(rowChildren);
@@ -43331,8 +43426,8 @@ var docxLayout = (function(exports) {
const spacing = ownSpacing === void 0 ? tableSpacing : readCellSpacing(ownSpacing);
const deleted = deletedFlags[rowIndex];
const rowReader = deleted ? sizingReaderOf(cellReader, sized, true) : cellReader;
- const counts = deleted ? JSON.stringify([...rowReader.counters]) : "";
- (deleted ? elementsIn$1(rowChildren, (inner) => REMOVED_NOTES.has(inner)) : []).filter((reference) => !hasOwnMark(reference)).forEach((reference) => {
+ const rowReferences = deleted ? elementsIn$1(rowChildren, (inner) => REMOVED_NOTES.has(inner)) : [];
+ rowReferences.filter((reference) => !hasOwnMark(reference)).forEach((reference) => {
var _cellReader$notes;
return (_cellReader$notes = cellReader.notes) === null || _cellReader$notes === void 0 ? void 0 : _cellReader$notes.skip("w:endnoteReference" in reference ? "endnote" : "footnote");
});
@@ -43348,7 +43443,7 @@ var docxLayout = (function(exports) {
return typesAt(rowIndex, rows.length, headerRows) !== typesAt(rowIndex - deletedBefore, rows.length - deletedHeaderRows, headerRows - deletedHeaderRows);
});
const { cells, edges, column: end, unsupported: cellsUnsupported } = rowCells.reduce(({ column, cells: done, edges: before, unsupported: unsupportedBefore }, [{ element: cell }, ...across], cellIndex) => {
- var _ref12, _ref13, _ref14;
+ var _ref11, _ref12, _ref13;
const cellChildren = contentOf$3(cell).filter(isObject);
const cellProperties = childrenOf(find(cellChildren, "w:tcPr"));
const spanOf = (given) => {
@@ -43393,7 +43488,7 @@ var docxLayout = (function(exports) {
return _objectSpread2(_objectSpread2({
column: column + span,
edges: new Map([...before, [column + span, before.get(column) + width]])
- }, withoutUndefined({ unsupported: (_ref12 = (_ref13 = (_ref14 = unsupportedBefore !== null && unsupportedBefore !== void 0 ? unsupportedBefore : across.some((merged) => hasMergedContent(merged.element)) ? "cells merged across columns as old versions of Word wrote them, with text after the first" : void 0) !== null && _ref14 !== void 0 ? _ref14 : unsupportedCellOf(cellProperties)) !== null && _ref13 !== void 0 ? _ref13 : formatted.unsupported) !== null && _ref12 !== void 0 ? _ref12 : vertical ? unsupportedVerticalOf(cellBlocks) : void 0 })), {}, { cells: [...done, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({ column }, span > 1 ? { span } : {}), {}, { width: width - margins.left - margins.right }, hasWidth ? { ownWidth: width } : {}), {}, {
+ }, withoutUndefined({ unsupported: (_ref11 = (_ref12 = (_ref13 = unsupportedBefore !== null && unsupportedBefore !== void 0 ? unsupportedBefore : across.some((merged) => hasMergedContent(merged.element)) ? "cells merged across columns as old versions of Word wrote them, with text after the first" : void 0) !== null && _ref13 !== void 0 ? _ref13 : unsupportedCellOf(cellProperties)) !== null && _ref12 !== void 0 ? _ref12 : formatted.unsupported) !== null && _ref11 !== void 0 ? _ref11 : vertical ? unsupportedVerticalOf(cellBlocks) : void 0 })), {}, { cells: [...done, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({ column }, span > 1 ? { span } : {}), {}, { width: width - margins.left - margins.right }, hasWidth ? { ownWidth: width } : {}), {}, {
blocks: cellBlocks,
marginTop: margins.top,
marginBottom: margins.bottom,
@@ -43409,7 +43504,8 @@ var docxLayout = (function(exports) {
cells: [],
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" : deleted && JSON.stringify([...rowReader.counters]) !== counts ? "a list in a deleted table row" : 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));
+ if (deleted) for (const [definition, count] of rowReader.counters) cellReader.counters.set(definition, count);
+ 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" : rowReferences.some(hasOwnMark) ? DELETED_OWN_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,
@@ -43424,13 +43520,13 @@ var docxLayout = (function(exports) {
rule: rule === "exact" ? "exact" : "atLeast"
} } : {}), {}, {
header: onOff(rowProperties, "w:tblHeader") === true,
- cantSplit: ((_ref15 = (_onOff2 = onOff(rowProperties, "w:cantSplit")) !== null && _onOff2 !== void 0 ? _onOff2 : formatsOf({
+ cantSplit: ((_ref14 = (_onOff2 = onOff(rowProperties, "w:cantSplit")) !== null && _onOff2 !== void 0 ? _onOff2 : formatsOf({
row: rowIndex,
rows: rows.length,
cell: 0,
cells: rowCells.length,
headerRows
- }).cantSplit) !== null && _ref15 !== void 0 ? _ref15 : styleKept) === true
+ }).cantSplit) !== null && _ref14 !== void 0 ? _ref14 : styleKept) === true
}, widthBefore === void 0 ? {} : { before: widthBefore })
});
});
@@ -43457,20 +43553,7 @@ var docxLayout = (function(exports) {
})), tableBorders);
const spaced = followedSpacing > 0;
const keptGeometry = geometryOf(kept);
- const bordersOf = (index) => {
- var _read$index;
- return JSON.stringify((_read$index = read[index]) === null || _read$index === void 0 ? void 0 : _read$index.cells.map(({ borders }) => borders));
- };
- const bordered = () => ([
- tableBorders.top,
- tableBorders.bottom,
- tableBorders.insideH
- ].some(isDrawn) || read.some(({ cells }) => cells.some(({ borders }) => isDrawn(borders.top) || isDrawn(borders.bottom)))) && read.some(({ deleted }, index) => {
- const above = read.findLastIndex((row, at) => at < index && !row.deleted);
- const below = read.findIndex((row, at) => at > index && !row.deleted);
- 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 geometry = kept.length === read.length || typeof keptGeometry === "string" || spaced ? keptGeometry : withDeletedBorders(keptGeometry, geometryOf(read), deletedFlags);
const sizingGeometry = rowSpacings.size > 1 && typeof geometry !== "string" ? geometryOf(kept, followedSpacing) : geometry;
const tableRows = [];
let carried = [];
@@ -43494,9 +43577,9 @@ var docxLayout = (function(exports) {
breakTop: placed === null || placed === void 0 ? void 0 : placed.breakTop,
edgeTop: placed === null || placed === void 0 ? void 0 : placed.edgeTop,
edgeBottom: placed === null || placed === void 0 ? void 0 : placed.edgeBottom
- })), {}, { cells: cells.map((_ref16, cellIndex) => {
+ })), {}, { cells: cells.map((_ref15, cellIndex) => {
var _read, _above$cells$find, _unmerged;
- let { borders: _, margins, gridWidth: __ } = _ref16, cell = _objectWithoutProperties(_ref16, _excluded2);
+ let { borders: _, margins, gridWidth: __ } = _ref15, cell = _objectWithoutProperties(_ref15, _excluded2);
const pending = [...carried, ...cellBookmarks[cellIndex]];
const marked = pending.length === 0 ? void 0 : startingAtFirst(cell.blocks, pending);
carried = marked === void 0 ? pending : [];
@@ -43522,9 +43605,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((_ref17) => {
- let { borders: _, margins: __, gridWidth: ___ } = _ref17;
- return _objectWithoutProperties(_ref17, _excluded3);
+ cells: cells.map((_ref16) => {
+ let { borders: _, margins: __, gridWidth: ___ } = _ref16;
+ return _objectWithoutProperties(_ref16, _excluded3);
})
})) : [];
const blocks = [...tableRows.flatMap(({ cells }) => cells.flatMap((cell) => {
@@ -43543,7 +43626,7 @@ var docxLayout = (function(exports) {
const older = reader.compatibilityMode !== void 0;
const marginsBeside = older && sized && givenWidth.width === void 0 && reader.inCell !== true;
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 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_ref30 = (_ref31 = (_ref32 = (_ref33 = (_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 && _ref33 !== void 0 ? _ref33 : float !== void 0 && (reader.inCell || reader.inHeader) ? "a table that text flows around in a table cell, header or footer" : void 0) !== null && _ref32 !== void 0 ? _ref32 : typeof float === "object" && older && (marginsBeside || float.horizontal.align !== void 0) ? "a table that text flows around, sized to its text or lined up across the page, in a document in compatibility mode" : void 0) !== null && _ref31 !== void 0 ? _ref31 : marginsBeside && fits && givenWidth.share !== void 0 ? "a table sized to its text as a share of the width, in a document in compatibility mode" : void 0) !== null && _ref30 !== void 0 ? _ref30 : older && sized && fits && givenWidth.width === void 0 && reader.inCell === true && (indent !== 0 || givenWidth.share !== void 0) ? "a table sized to its text in a table cell, indented or as a share of the width, in a document in compatibility mode" : void 0) !== null && _ref29 !== void 0 ? _ref29 : typeof float === "string" ? float : void 0) !== null && _ref28 !== void 0 ? _ref28 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref27 !== void 0 ? _ref27 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref26 !== void 0 ? _ref26 : unmerged) !== null && _ref25 !== void 0 ? _ref25 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref24 !== void 0 ? _ref24 : verticalUnsupported) !== null && _ref23 !== void 0 ? _ref23 : spacingUnsupported) !== null && _ref22 !== void 0 ? _ref22 : typeof geometry === "string" ? geometry : void 0) !== null && _ref21 !== void 0 ? _ref21 : indent === void 0 ? "a table indent of a type not yet followed" : void 0) !== null && _ref20 !== void 0 ? _ref20 : ((_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 && _ref19 !== void 0 ? _ref19 : styleUnsupported) !== null && _ref18 !== void 0 ? _ref18 : (_blocks$find = blocks.find((block) => block.unsupported !== void 0)) === null || _blocks$find === void 0 ? void 0 : _blocks$find.unsupported;
+ const unsupported = (_ref17 = (_ref18 = (_ref19 = (_ref20 = (_ref21 = (_ref22 = (_ref23 = (_ref24 = (_ref25 = (_ref26 = (_ref27 = (_ref28 = (_ref29 = (_ref30 = (_ref31 = (_ref32 = (_withoutGuess$unsuppo = withoutGuess === null || withoutGuess === void 0 ? void 0 : withoutGuess.unsupported) !== null && _withoutGuess$unsuppo !== void 0 ? _withoutGuess$unsuppo : reader.down === true ? "a table on text that runs down the page" : void 0) !== null && _ref32 !== void 0 ? _ref32 : float !== void 0 && (reader.inCell || reader.inHeader) ? "a table that text flows around in a table cell, header or footer" : void 0) !== null && _ref31 !== void 0 ? _ref31 : typeof float === "object" && older && (marginsBeside || float.horizontal.align !== void 0) ? "a table that text flows around, sized to its text or lined up across the page, in a document in compatibility mode" : void 0) !== null && _ref30 !== void 0 ? _ref30 : marginsBeside && fits && givenWidth.share !== void 0 ? "a table sized to its text as a share of the width, in a document in compatibility mode" : void 0) !== null && _ref29 !== void 0 ? _ref29 : older && sized && fits && givenWidth.width === void 0 && reader.inCell === true && (indent !== 0 || givenWidth.share !== void 0) ? "a table sized to its text in a table cell, indented or as a share of the width, in a document in compatibility mode" : void 0) !== null && _ref28 !== void 0 ? _ref28 : typeof float === "string" ? float : void 0) !== null && _ref27 !== void 0 ? _ref27 : parts.some((part) => "w:sdt" in part) ? BOUND_CONTROL : void 0) !== null && _ref26 !== void 0 ? _ref26 : (_read$find2 = read.find((row) => row.unsupported !== void 0)) === null || _read$find2 === void 0 ? void 0 : _read$find2.unsupported) !== null && _ref25 !== void 0 ? _ref25 : unmerged) !== null && _ref24 !== void 0 ? _ref24 : fits ? unfitted : unequal && !evened ? "a table whose rows give a column different widths" : void 0) !== null && _ref23 !== void 0 ? _ref23 : verticalUnsupported) !== null && _ref22 !== void 0 ? _ref22 : spacingUnsupported) !== null && _ref21 !== void 0 ? _ref21 : typeof geometry === "string" ? geometry : void 0) !== null && _ref20 !== void 0 ? _ref20 : indent === void 0 ? "a table indent of a type not yet followed" : void 0) !== null && _ref19 !== void 0 ? _ref19 : ((_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 && _ref18 !== void 0 ? _ref18 : styleUnsupported) !== null && _ref17 !== void 0 ? _ref17 : (_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);
@@ -43739,12 +43822,21 @@ var docxLayout = (function(exports) {
var paragraphPropertiesOf = (paragraph) => childrenOf(find(contentOf$3(paragraph).filter(isObject), "w:pPr"));
/** How a paragraph's mark is removed in a tracked change, when it is: deleted (`w:del`), or moved elsewhere (`w:moveFrom`) */
var removedMarkOf = (paragraph) => childrenOf(find(paragraphPropertiesOf(paragraph), "w:rPr")).map(nameOf$1).find((name) => REMOVALS.has(name));
+ /**
+ * How many footnote references are among elements and in them, but for those in text boxes (`w:txbxContent`), which Word
+ * leaves out, reference and note
+ */
+ var countFootnoteReferences = (elements) => elements.filter(isObject).reduce((count, element) => {
+ const name = nameOf$1(element);
+ if (name === "w:footnoteReference") return count + 1;
+ return name === "w:txbxContent" || name === "_attr" ? count : count + countFootnoteReferences(contentOf$3(element));
+ }, 0);
/** The elements of the names given among elements and in them, in order */
var elementsIn$1 = (elements, named) => elements.filter(isObject).flatMap((element) => named(nameOf$1(element)) ? [element] : nameOf$1(element) === "_attr" ? [] : elementsIn$1(contentOf$3(element), named));
/** The run formatting a paragraph's styles give its text */
var paragraphRunOf = (paragraph, styles) => {
- var _valueOf5;
- return combine([styles.run, ...styleChain(styles, (_valueOf5 = valueOf(paragraphPropertiesOf(paragraph), "w:pStyle")) !== null && _valueOf5 !== void 0 ? _valueOf5 : styles.defaultParagraphStyle, "paragraph").map(({ run }) => run)]);
+ var _valueOf6;
+ return combine([styles.run, ...styleChain(styles, (_valueOf6 = valueOf(paragraphPropertiesOf(paragraph), "w:pStyle")) !== null && _valueOf6 !== void 0 ? _valueOf6 : styles.defaultParagraphStyle, "paragraph").map(({ run }) => run)]);
};
/**
* Whether a paragraph's mark is hidden (`w:vanish`), by its own formatting or its style's. `w:specVanish` alone doesn't
@@ -43759,12 +43851,12 @@ var docxLayout = (function(exports) {
var showsSomething = (elements, paragraphRun, styles) => elements.filter(isObject).some((element) => {
const name = nameOf$1(element);
if (name === "w:r") {
- var _valueOf6;
+ var _valueOf7;
const children = contentOf$3(element).filter(isObject);
const properties = find(children, "w:rPr");
const format = combine([
paragraphRun,
- ...styleChain(styles, (_valueOf6 = valueOf(childrenOf(properties), "w:rStyle")) !== null && _valueOf6 !== void 0 ? _valueOf6 : styles.defaultCharacterStyle, "character").map(({ run }) => run),
+ ...styleChain(styles, (_valueOf7 = valueOf(childrenOf(properties), "w:rStyle")) !== null && _valueOf7 !== void 0 ? _valueOf7 : styles.defaultCharacterStyle, "character").map(({ run }) => run),
readRunFormat(properties, styles.themeFonts)
]);
return children.some((child) => nameOf$1(child) !== "w:rPr") && format.hidden !== true;
@@ -43773,9 +43865,9 @@ var docxLayout = (function(exports) {
});
/** Whether a paragraph is in a list, its own or its style's */
var isNumbered = (paragraph, styles) => {
- var _valueOf7;
+ var _valueOf8;
const properties = paragraphPropertiesOf(paragraph);
- const style = (_valueOf7 = valueOf(properties, "w:pStyle")) !== null && _valueOf7 !== void 0 ? _valueOf7 : styles.defaultParagraphStyle;
+ const style = (_valueOf8 = valueOf(properties, "w:pStyle")) !== null && _valueOf8 !== void 0 ? _valueOf8 : styles.defaultParagraphStyle;
return find(properties, "w:numPr") !== void 0 || styleChain(styles, style, "paragraph").some(({ numbering }) => (numbering === null || numbering === void 0 ? void 0 : numbering.id) !== void 0);
};
var JOINED_FORMATTING = {
@@ -43797,19 +43889,45 @@ var docxLayout = (function(exports) {
"w:tabs": "all",
"w:pBdr": "all"
};
+ var JOINED_STYLE_FORMATTING = /* @__PURE__ */ new Set([
+ "alignment",
+ "indentLeft",
+ "indentRight",
+ "firstLineIndent",
+ "spaceBefore",
+ "spaceAfter",
+ "spaceBeforeLines",
+ "spaceAfterLines",
+ "autoSpaceBefore",
+ "autoSpaceAfter",
+ "lineSpacing",
+ "tabs",
+ "borderTop",
+ "borderBottom",
+ "borderLeft",
+ "borderRight",
+ "borderBetween",
+ "borderBar"
+ ]);
/**
- * A paragraph's own formatting, but for its mark's, its style when it names the default one, as none does, and the parts
- * that may differ between paragraphs joined by a hidden mark
+ * A paragraph's formatting, its own and its styles', but for its mark's, its style's name, and the parts that may differ
+ * between paragraphs joined by a hidden mark
*/
- var paragraphFormatOf = (paragraph, styles) => JSON.stringify(paragraphPropertiesOf(paragraph).flatMap((child) => {
- const name = nameOf$1(child);
- if (name === "w:rPr" || name === "w:pStyle" && valueOf([child], "w:pStyle") === styles.defaultParagraphStyle) return [];
- const joined = JOINED_FORMATTING[name];
- if (joined === "all") return [];
- if (joined === void 0) return [child];
- const kept = Object.entries(attributesOf(child[name])).filter(([key]) => !joined.includes(key));
- return kept.length === 0 ? [] : [{ [name]: Object.fromEntries(kept) }];
- }));
+ var paragraphFormatOf = (paragraph, styles) => {
+ var _valueOf9;
+ const properties = paragraphPropertiesOf(paragraph);
+ const style = (_valueOf9 = valueOf(properties, "w:pStyle")) !== null && _valueOf9 !== void 0 ? _valueOf9 : styles.defaultParagraphStyle;
+ const fromStyles = combine([styles.paragraph, ...styleChain(styles, style, "paragraph").map((inChain) => inChain.paragraph)]);
+ return JSON.stringify([properties.flatMap((child) => {
+ const name = nameOf$1(child);
+ if (name === "w:rPr" || name === "w:pStyle" || name === "w:sectPr") return [];
+ const joined = JOINED_FORMATTING[name];
+ if (joined === "all") return [];
+ if (joined === void 0) return [child];
+ const kept = Object.entries(attributesOf(child[name])).filter(([key]) => !joined.includes(key));
+ return kept.length === 0 ? [] : [{ [name]: Object.fromEntries(kept) }];
+ }), Object.fromEntries(Object.entries(fromStyles).filter(([key]) => !JOINED_STYLE_FORMATTING.has(key)))]);
+ };
/** The properties of the first section that ends among elements: in a paragraph, or the body's own */
var nextSectionIn = (elements) => elements.map(sectionPropertiesOf).find((section) => section !== void 0);
/** A paragraph the layout stops at, for why */
@@ -43827,37 +43945,32 @@ var docxLayout = (function(exports) {
};
/**
* A paragraph whose mark is hidden, joined to the next, after what is between them: the two paragraphs' text on its lines,
- * in the first one's formatting but for its space after, which is the next one's, with the next one's mark
- * (`word-breaks-and-tabs.docx` HM1a to HM1f). Where their line spacing differs, each line is spaced as the paragraph its
+ * in the first one's formatting, its style's too, but for its space after, which is the next one's, with the next one's
+ * mark (`word-breaks-and-tabs.docx` HM1a to HM1f), and each one's text in the formatting of its own style: 16-point text
+ * of the first one's style on a line with 11-point text of the next one's, and the first one's style's space before
+ * (stops2/word-stops-hidden2.ts HD15a, HD15b). Where their line spacing differs, each line is spaced as the paragraph its
* text ends in, from the line the next one's text starts on: with the first single and the next one double, or the other
* way round, or at 1.5 lines, the line that ends the first one's text and starts the next one's, and those after it, are
- * the next one's (HM1h, HM1i, `stops2/word-stops-hidden.docx` HD1f). The next one's number, when they are in a list, is
- * counted (HM4).
+ * the next one's (HM1h, HM1i, `stops2/word-stops-hidden.docx` HD1f), exactly 12 points or at least 20 as much as any (HD16a,
+ * HD16b), and of three paragraphs single, 1.5 and double, the line that ends the second's text and starts the third's is
+ * double (HD16c). The next one's number, when they are in a list, is counted (HM4). The next one's properties stand where
+ * its text starts, for all of that (see {@link JOINED_NEXT}, and `readParagraph`). A section break of the first one's is
+ * left out, as the paragraph is joined into the next section, which is as its own (stops2/word-stops-hidden2.ts HD14a),
+ * and one of the next one's, such as the empty paragraph docx ends each section with, ends the section with the joined
+ * paragraph, as the next one's mark is its own
*/
- var joinedToNext = (first, between, next, styles) => {
+ var joinedToNext = (first, between, next) => {
const isHead = (child) => isObject(child) && (nameOf$1(child) === "_attr" || nameOf$1(child) === "w:pPr");
- const own = paragraphPropertiesOf(first);
- const nextProperties = paragraphPropertiesOf(next);
- const lineOf = (given) => Object.fromEntries(Object.entries(attributesOf(find(given, "w:spacing"))).filter(([key]) => key === "w:line" || key === "w:lineRule"));
- const nextLine = lineOf(nextProperties);
- const spacedApart = JSON.stringify(lineOf(own)) !== JSON.stringify(nextLine);
- const { "w:after": after } = attributesOf(find(nextProperties, "w:spacing"));
- const spacing = _objectSpread2(_objectSpread2({}, Object.fromEntries(Object.entries(attributesOf(find(own, "w:spacing"))).filter(([key]) => key !== "w:after"))), after === void 0 ? {} : { "w:after": after });
- const mark = nextProperties.filter((child) => nameOf$1(child) === "w:rPr");
- const properties = [
- ...own.filter((child) => nameOf$1(child) !== "w:spacing" && nameOf$1(child) !== "w:rPr"),
- ...Object.keys(spacing).length === 0 ? [] : [{ "w:spacing": { _attr: spacing } }],
- ...mark
- ];
+ const own = paragraphPropertiesOf(first).filter((child) => nameOf$1(child) !== "w:rPr" && nameOf$1(child) !== "w:sectPr");
+ const nextSection = paragraphPropertiesOf(next).filter((child) => nameOf$1(child) === "w:sectPr");
const content = contentOf$3(first);
return { "w:p": [
...content.filter((child) => isObject(child) && nameOf$1(child) === "_attr"),
- { "w:pPr": properties },
+ { "w:pPr": [...own, ...nextSection] },
...content.filter((child) => !isHead(child)),
...between,
- ...spacedApart ? [{ [JOINED_SPACING]: [{ "w:spacing": { _attr: nextLine } }] }] : [],
- ...contentOf$3(next).filter((child) => !isHead(child)),
- ...isNumbered(next, styles) ? [{ [COUNTED]: {} }] : []
+ { [JOINED_NEXT]: paragraphPropertiesOf(next) },
+ ...contentOf$3(next).filter((child) => !isHead(child))
] };
};
var READ_IN_PLACE = /* @__PURE__ */ new Set([
@@ -43884,29 +43997,38 @@ var docxLayout = (function(exports) {
* sizes to their text, the two are sized as one, as they are laid out: a column as wide as their text on one line
* (`word-stops-hidden.docx` HD2, and `word-breaks-and-tabs.docx` HM7, narrowed beside a long cell). Where the
* paragraphs differ in their right and first line indents, tab stops and borders, they are in the first one's (HD1c,
- * HD1d, HD1g, HD1h), and in their line spacing, line by line (see {@link joinedToNext}). Where they differ otherwise,
- * such as in their style (HM1g), and what Word does with a hidden mark at the start of a content control (see
- * {@link openedAtEnds}), with another hidden section break, with one of a paragraph showing nothing at the end of a header or
- * footer, which a header too short to push the body down didn't show (HD4a), or of a note, where Word joins it to the
- * next note's first paragraph (HD4b), and before one showing nothing whose fields, note references or number would be
- * read out of order, isn't followed yet.
+ * HD1d, HD1g, HD1h), in their styles, each one's text in its own (`stops2/word-stops-hidden2.docx` HD15a, HD15b), and in
+ * their line spacing, line by line (see {@link joinedToNext}). One whose section ends with it, with text shown, before a
+ * section that starts on its page and is otherwise alike, is joined to the next section's first paragraph (HD14a), and
+ * one with nothing shown before a section on a new page takes no room, as the section starts its page all the same
+ * (HD14b). One with nothing shown at the end of a header takes no room, and the body starts below the header's other
+ * paragraphs (HD12), as does one at the end of the document's last footnote (HD13). Where they differ otherwise, such as
+ * in their indents in characters, and what Word does with a hidden mark at the end of a content control with nothing
+ * after it, or before one bound to custom XML (see {@link openedAtEnds}), with a hidden section break before a continuous
+ * section formatted otherwise or an even or odd page section, or before something that isn't a paragraph, with one of a
+ * paragraph showing nothing at the end of a footer, an endnote or a text box, or of a footnote with a note after it,
+ * where Word joins it to the next note's first paragraph (HD4b), and before one showing nothing whose fields, note
+ * references or number would be read out of order, isn't followed yet.
*/
var hiddenMarkJoin = (paragraph, next, { styles, edge, part, nextSection }) => {
const nextName = next === void 0 ? void 0 : nameOf$1(next);
const shown = showsSomething(contentOf$3(paragraph), paragraphRunOf(paragraph, styles), styles);
const section = sectionPropertiesOf(paragraph);
- if (section !== void 0) return !shown && startsOnItsPage(section, nextSection()) ? { leftOut: true } : { reason: "a hidden section break" };
- if (edge) return { reason: "a hidden paragraph mark at the edge of a content control" };
- if (next === void 0 || nextName === "w:sectPr") return shown || part === "cell" ? void 0 : part === "body" ? { leftOut: true } : { reason: "a paragraph with nothing shown and its mark hidden at the end of a header, footer or note" };
+ if (section !== void 0 && !shown) return startsOnItsPage(section, nextSection()) || sectionTypeOf(nextSection()) === "nextPage" ? { leftOut: true } : { reason: "a hidden section break of a paragraph with nothing shown, before a continuous section formatted otherwise, or an even or odd page section" };
+ if (section !== void 0 && (nextName !== "w:p" || !startsOnItsPage(section, nextSection()))) return { reason: "a hidden section break of a paragraph with text shown, before something that isn't a paragraph, or a section that doesn't start on its page or is formatted otherwise" };
+ if (edge) return { reason: HIDDEN_AT_EDGE };
+ if (next === void 0 || nextName === "w:sectPr") return shown || part === "cell" ? void 0 : part === "body" || part === "header" || part === "lastFootnote" ? { leftOut: true } : { reason: "a paragraph with nothing shown and its mark hidden at the end of a footer, an endnote, a text box, or a footnote with a note after it" };
if (nextName !== "w:p") return shown ? void 0 : nextName === "w:tbl" ? { leftOut: true } : { reason: "a paragraph with nothing shown and its mark hidden before something that isn't a paragraph or table" };
if (!shown) return { leftOut: true };
if (isLeftOut(next)) return { reason: "a hidden paragraph mark before a paragraph with nothing shown and its mark hidden" };
- return paragraphFormatOf(paragraph, styles) === paragraphFormatOf(next, styles) ? { joins: true } : { reason: "a hidden paragraph mark between paragraphs of other styles, or formatted differently otherwise" };
+ return paragraphFormatOf(paragraph, styles) === paragraphFormatOf(next, styles) ? { joins: true } : { reason: "a hidden paragraph mark between paragraphs formatted differently otherwise than in their alignment, indents, space, line spacing, tab stops, borders and styles" };
};
+ var HIDDEN_AT_EDGE = "a hidden paragraph mark at the end of a content control with nothing after it, or before one bound to custom XML or nested in another";
+ var DELETED_AT_EDGE = "a deleted paragraph mark at the end of a content control with nothing after it, or before one bound to custom XML or nested in another";
/** How a section starts (`w:type`): on a new page, unless it says otherwise */
var sectionTypeOf = (section) => {
- var _valueOf8;
- return (_valueOf8 = valueOf(childrenOf(section), "w:type")) !== null && _valueOf8 !== void 0 ? _valueOf8 : "nextPage";
+ var _valueOf10;
+ return (_valueOf10 = valueOf(childrenOf(section), "w:type")) !== null && _valueOf10 !== void 0 ? _valueOf10 : "nextPage";
};
/**
* Whether the section after a section break starts on the page the break is on, and is otherwise as the section before
@@ -43917,7 +44039,6 @@ var docxLayout = (function(exports) {
const rest = (properties) => JSON.stringify(childrenOf(properties).filter((child) => nameOf$1(child) !== "w:type"));
return sectionTypeOf(next) === "continuous" && rest(section) === rest(next) && ((_numberOf7 = numberOf(attributesOf(find(childrenOf(section), "w:cols"))["w:num"])) !== null && _numberOf7 !== void 0 ? _numberOf7 : 1) <= 1;
};
- var CONTROL_START = "docx-layout:control-start";
/** The content of a content control or custom XML, unless it is bound to custom XML, which is laid out as it is */
var openableContentOf = (element) => {
const name = nameOf$1(element);
@@ -43926,18 +44047,53 @@ var docxLayout = (function(exports) {
};
/** Whether a paragraph is joined to the paragraph after it: one whose mark is deleted, or hidden with text shown */
var joinsNext = (paragraph, styles, showDeleted) => !showDeleted && removedMarkOf(paragraph) !== void 0 || isMarkHidden(paragraph, styles) && showsSomething(contentOf$3(paragraph), paragraphRunOf(paragraph, styles), styles);
+ /** Whether a block starts with a paragraph: a paragraph, or a content control or custom XML whose first block does */
+ var startsWithParagraph = (element) => {
+ var _openableContentOf;
+ const first = (_openableContentOf = openableContentOf(element)) === null || _openableContentOf === void 0 ? void 0 : _openableContentOf.find((child) => BLOCK_ELEMENTS.has(nameOf$1(child)));
+ return "w:p" in element || first !== void 0 && startsWithParagraph(first);
+ };
/**
- * Elements, with the content of each content control and custom XML whose last paragraph is joined to the paragraph
- * after it in its place, after a marker of where it started. Word joins it as though the control weren't there, with its
- * mark hidden or deleted (`stops2/word-stops-hidden-edges.docx` HD3, `word-stops-tracked-edges.docx` TR8). What it does
- * with a paragraph joined to a control's first one hasn't been seen
+ * Whether a block ends with a paragraph joined to the paragraph after it: such a paragraph, or a content control or custom
+ * XML whose last block does
*/
- var openedAtEnds = (elements, styles, showDeleted) => elements.flatMap((element, index) => {
- const content = openableContentOf(element);
- const last = content === null || content === void 0 ? void 0 : content.findLast((child) => BLOCK_ELEMENTS.has(nameOf$1(child)));
- const following = elements.slice(index + 1).find((other) => BLOCK_ELEMENTS.has(nameOf$1(other)));
- return last !== void 0 && following !== void 0 && "w:p" in last && "w:p" in following && joinsNext(last, styles, showDeleted) ? [{ [CONTROL_START]: {} }, ...openedAtEnds(content, styles, showDeleted)] : [element];
- });
+ var endsJoining = (element, styles, showDeleted) => {
+ var _openableContentOf2;
+ const last = (_openableContentOf2 = openableContentOf(element)) === null || _openableContentOf2 === void 0 ? void 0 : _openableContentOf2.findLast((child) => BLOCK_ELEMENTS.has(nameOf$1(child)));
+ return "w:p" in element ? joinsNext(element, styles, showDeleted) : last !== void 0 && endsJoining(last, styles, showDeleted);
+ };
+ /**
+ * Elements, with the content of each content control and custom XML a paragraph is joined across an edge of in its
+ * place: one whose last paragraph is joined to the paragraph after it, and one whose first paragraph the paragraph before
+ * it is joined to. Word joins them as though the control weren't there, with its mark hidden or deleted, at the end of a
+ * control (`stops2/word-stops-hidden-edges.docx` HD3, `word-stops-tracked-edges.docx` TR8) and before one
+ * (`word-stops-hidden2.docx` HD11, `word-stops-tracked2.docx` TR12)
+ */
+ var openedAtEnds = (elements, styles, showDeleted, { start = false, end = false } = {}) => {
+ const blocks = elements.filter((element) => BLOCK_ELEMENTS.has(nameOf$1(element)));
+ return elements.flatMap((element) => {
+ const content = openableContentOf(element);
+ if (content === void 0) return [element];
+ const at = blocks.indexOf(element);
+ const following = blocks[at + 1];
+ const previous = blocks[at - 1];
+ const joinedAfter = endsJoining(element, styles, showDeleted) && (following === void 0 ? end : startsWithParagraph(following));
+ const joinedBefore = startsWithParagraph(element) && (previous === void 0 ? start : endsJoining(previous, styles, showDeleted));
+ return joinedAfter || joinedBefore ? openedAtEnds(content, styles, showDeleted, {
+ start: joinedBefore,
+ end: joinedAfter
+ }) : [element];
+ });
+ };
+ /**
+ * A block, or the first block of a content control or custom XML that isn't opened (see {@link openedAtEnds}), which a
+ * paragraph before it is before as though the control weren't there, unless it is bound to custom XML
+ */
+ var lookedThrough = (element) => {
+ var _openableContentOf3;
+ const first = nameOf$1(element) === "w:sdt" && isBound(element) ? void 0 : (_openableContentOf3 = openableContentOf(element)) === null || _openableContentOf3 === void 0 ? void 0 : _openableContentOf3.find((child) => BLOCK_ELEMENTS.has(nameOf$1(child)));
+ return first === void 0 ? element : lookedThrough(first);
+ };
/**
* Joins each paragraph whose mark is deleted in a tracked change, or moved elsewhere, to the paragraph after it, as Word
* lays it out: the next paragraph, with the deleted one's text at its start, all in the next one's formatting, style and
@@ -43948,9 +44104,13 @@ var docxLayout = (function(exports) {
* TR10b). A paragraph with no paragraph after it, before a table or at the end of a table cell or of the document, stays
* as it is, with its section break at the end of the document (MK8a, MK8b, MK8d, TR10a). Read as Word sizes a table's
* columns (`showDeleted`), a paragraph with a deleted mark stays as it is written: a column as wide as the longer of the two
- * paragraphs, which are laid out joined on two lines (`word-stops-tracked.docx` TR11). What Word does with a deleted mark
- * at the start of a content control, a deleted section break before a table, or between sections that start differently,
- * other than the document's first, hasn't been seen, so the layout stops there.
+ * paragraphs, which are laid out joined on two lines (`word-stops-tracked.docx` TR11). A section break deleted between
+ * sections that start differently leaves its section to the next too, the next's start and all: a section on a new page
+ * whose break is deleted before a continuous one goes on on the page before (`word-stops-tracked2.docx` TR13). A deleted
+ * section break of a paragraph with nothing shown before a table takes no room, and leaves its section to the table's
+ * (TR14). What Word does with a deleted mark at the end of a content control with nothing after it, or before one bound to
+ * custom XML, and with a deleted section break of a paragraph with text shown before something that isn't a paragraph,
+ * hasn't been seen, so the layout stops there.
*
* @param styles - The document's styles, which may hide a paragraph's mark
* @param options - Whether the elements are in a content control or custom XML (`nested`), whether deleted marks are read
@@ -43959,7 +44119,7 @@ var docxLayout = (function(exports) {
var joinRemovedMarks = (elements, styles, { nested, showDeleted, part }) => {
const opened = openedAtEnds(elements.filter(isObject), styles, showDeleted);
const after = [];
- for (const [index, element] of [...opened.entries()].reverse()) {
+ for (const element of [...opened].reverse()) {
const name = nameOf$1(element);
const mark = name === "w:p" && !showDeleted ? removedMarkOf(element) : void 0;
if (name === "w:p" && joinsNext(element, styles, showDeleted)) {
@@ -43971,9 +44131,9 @@ var docxLayout = (function(exports) {
}
}
const at = after.findLastIndex((other) => BLOCK_ELEMENTS.has(nameOf$1(other)));
- const next = after[at];
+ const next = at < 0 ? void 0 : lookedThrough(after[at]);
const nextName = next === void 0 ? void 0 : nameOf$1(next);
- const edge = nextName === "w:sdt" || nextName === "w:customXml" || next === void 0 && nested || after.slice(at + 1).some((other) => CONTROL_START in other);
+ const edge = nextName === "w:sdt" || next === void 0 && nested;
const nextSection = () => nextSectionIn([...after].reverse());
const hidden = mark === void 0 && name === "w:p" && isMarkHidden(element, styles) ? hiddenMarkJoin(element, next, {
styles,
@@ -43984,14 +44144,16 @@ var docxLayout = (function(exports) {
const unjoined = hidden !== void 0 && "reason" in hidden ? hidden.reason : void 0;
const joins = (mark !== void 0 || hidden !== void 0 && "joins" in hidden) && nextName === "w:p";
const section = mark === void 0 ? void 0 : sectionPropertiesOf(element);
- const reason = mark === void 0 ? unjoined : edge ? "a deleted paragraph mark at the edge of a content control" : joins && isLeftOut(next) ? "a deleted paragraph mark before a paragraph with nothing shown and its mark hidden" : section !== void 0 && !joins && next !== void 0 && nextName !== "w:sectPr" ? "a deleted section break before something that isn't a paragraph" : section !== void 0 && joins && sectionTypeOf(section) !== sectionTypeOf(nextSection()) && elementsIn$1(opened.slice(0, index), (inner) => inner === "w:sectPr").length > 0 ? "a deleted section break between sections that start differently, after the first" : void 0;
+ const unjoinedSection = section !== void 0 && !joins && next !== void 0 && nextName !== "w:sectPr";
+ const reason = mark === void 0 ? unjoined : edge ? DELETED_AT_EDGE : joins && isLeftOut(next) ? "a deleted paragraph mark before a paragraph with nothing shown and its mark hidden" : unjoinedSection && showsSomething(contentOf$3(element), paragraphRunOf(element, styles), styles) ? "a deleted section break of a paragraph with text shown before something that isn't a paragraph" : void 0;
if (reason !== void 0) after.push(stopIn(element, reason));
+ else if (unjoinedSection) after.push(...[...elementsIn$1(contentOf$3(element), (inner) => inner === "w:bookmarkStart")].reverse());
else if (section !== void 0 && !joins) after.push({ "w:p": [...contentOf$3(element), { [KEPT_MARK]: {} }] });
else if (hidden !== void 0 && "leftOut" in hidden) after.push({ "w:p": [...contentOf$3(element), { [LEFT_OUT]: {} }] });
else if (joins) {
const [, ...between] = after.splice(at);
const inOrder = between.reverse();
- after.push(hidden !== void 0 && "joins" in hidden ? joinedToNext(element, inOrder, next, styles) : joinedParagraph(element, inOrder, next));
+ after.push(hidden !== void 0 && "joins" in hidden ? joinedToNext(element, inOrder, next) : joinedParagraph(element, inOrder, next));
} else if (name === "w:customXml") after.push({ [name]: joinRemovedMarks(contentOf$3(element), styles, {
nested: true,
showDeleted,
@@ -44012,11 +44174,10 @@ var docxLayout = (function(exports) {
* Reads the paragraphs and tables in a part of a document, such as a table cell or a header, and in the content controls
* and custom XML in it. A bookmark between them starts with the next.
*/
- var readBlocks = (elements, reader, tableFormats) => {
+ var readBlocks = (elements, reader, tableFormats, part = tableFormats === void 0 ? "other" : "cell") => {
const blocks = [];
let bookmarks = [];
let hidden = [];
- const part = tableFormats === void 0 ? "other" : "cell";
for (const element of unwrap(joinRemovedMarks(elements, reader.styles, {
nested: false,
showDeleted: reader.showDeleted === true,
@@ -44260,7 +44421,7 @@ var docxLayout = (function(exports) {
var readReferences = (properties, name, readPart) => Object.fromEntries(properties.filter((child) => name in child).map((child) => {
var _attributes$wType;
const attributes = attributesOf(child[name]);
- return [String((_attributes$wType = attributes["w:type"]) !== null && _attributes$wType !== void 0 ? _attributes$wType : "default"), readPart(String(attributes["r:id"]))];
+ return [String((_attributes$wType = attributes["w:type"]) !== null && _attributes$wType !== void 0 ? _attributes$wType : "default"), readPart(String(attributes["r:id"]), name === "w:headerReference" ? "header" : "footer")];
}).filter(([type, blocks]) => blocks !== void 0 && [
"default",
"first",
@@ -44415,37 +44576,51 @@ var docxLayout = (function(exports) {
var NUMBER_ALIGNMENTS = {
left: void 0,
start: void 0,
+ distribute: void 0,
+ lowKashida: void 0,
center: "center",
+ thaiDistribute: "center",
right: "right",
- end: "right"
+ end: "right",
+ numTab: "right"
};
/**
* Reads a level of a list (`w:lvl`), in a definition or in a list's override of it. Word leaves out a level whose number
* is aligned both, as a paragraph's text can be: its paragraphs have no number, nor the level's indents
- * (`stops2/word-stops-list-definitions.docx` LI11). It says why Word's way with it isn't followed, when it isn't: a number
- * aligned in a way the schema has for paragraphs other than both, bullets that are pictures (`w:lvlPicBulletId`), which
- * Word didn't draw (`word-stops-picture-bullets.docx` LI8), and numbers laid out as Word 6 laid them out (`w:legacy`),
- * which Word put where it puts others where the number and its space fit in the indent (LI9), so the two weren't told
- * apart.
+ * (`stops2/word-stops-list-definitions.docx` LI11). Bullets that are pictures (`w:lvlPicBulletId`) Word draws nothing
+ * for, of 9 points or 20, with their shape type or without: the text at the tab's stop, and the line as tall as its text
+ * (`word-stops-picture-bullets.docx` LI8, stops2/word-stops-lists2.ts LI20a, LI20b). A level numbered as Word 6 numbered
+ * lists (`w:legacy`) puts its text after the room Word 6 gave the number (see {@link LegacyNumbering}), where a tab would
+ * follow the number: a number of 10000. with a space of 120 twips and an indent of 360 puts the text 120 after the number,
+ * and 1. with an indent of 720, 720 from the number (LI9, LI19a, LI19b). It says why Word's way with it isn't followed,
+ * when it isn't: a number aligned with a medium or high kashida, and one numbered as Word 6 numbered lists with a space
+ * or nothing after it, or not aligned to the left.
*/
var readLevel = (element, styles) => {
- var _valueOf9, _numberOf11, _valueOf10, _stringOf3, _valueOf11, _numberOf12;
+ var _valueOf11, _valueOf12, _twips22, _twips23, _numberOf11, _valueOf13, _stringOf3, _numberOf12;
const children = childrenOf(element);
- const jc = (_valueOf9 = valueOf(children, "w:lvlJc")) !== null && _valueOf9 !== void 0 ? _valueOf9 : "left";
+ const jc = (_valueOf11 = valueOf(children, "w:lvlJc")) !== null && _valueOf11 !== void 0 ? _valueOf11 : "left";
const restart = numberOf(attributesOf(find(children, "w:lvlRestart"))["w:val"]);
- const unsupported = !(jc in NUMBER_ALIGNMENTS) && jc !== "both" ? "a list number aligned in a way not yet followed" : find(children, "w:lvlPicBulletId") !== void 0 ? "a list whose bullets are pictures" : isOn(attributesOf(find(children, "w:legacy"))["w:legacy"]) ? "a list numbered as Word 6 numbered lists" : void 0;
+ const suffix = (_valueOf12 = valueOf(children, "w:suff")) !== null && _valueOf12 !== void 0 ? _valueOf12 : "tab";
+ const legacyAttributes = attributesOf(find(children, "w:legacy"));
+ const legacy = isOn(legacyAttributes["w:legacy"]) ? {
+ space: (_twips22 = twips(legacyAttributes["w:legacySpace"])) !== null && _twips22 !== void 0 ? _twips22 : 0,
+ indent: (_twips23 = twips(legacyAttributes["w:legacyIndent"])) !== null && _twips23 !== void 0 ? _twips23 : 0
+ } : void 0;
+ const unsupported = !(jc in NUMBER_ALIGNMENTS) && jc !== "both" ? "a list number aligned in a way not yet followed" : legacy !== void 0 && (suffix !== "tab" || NUMBER_ALIGNMENTS[jc] !== void 0) ? "a list numbered as Word 6 numbered lists with a space or nothing after its number, or not aligned to the left" : void 0;
return {
index: (_numberOf11 = numberOf(attributesOf(element)["w:ilvl"])) !== null && _numberOf11 !== void 0 ? _numberOf11 : 0,
level: _objectSpread2(_objectSpread2(_objectSpread2({}, withoutUndefined({ style: valueOf(children, "w:pStyle") })), {}, {
- format: (_valueOf10 = valueOf(children, "w:numFmt")) !== null && _valueOf10 !== void 0 ? _valueOf10 : "decimal",
+ format: (_valueOf13 = valueOf(children, "w:numFmt")) !== null && _valueOf13 !== void 0 ? _valueOf13 : "decimal",
text: (_stringOf3 = stringOf(attributesOf(find(children, "w:lvlText"))["w:val"])) !== null && _stringOf3 !== void 0 ? _stringOf3 : "",
- suffix: (_valueOf11 = valueOf(children, "w:suff")) !== null && _valueOf11 !== void 0 ? _valueOf11 : "tab",
+ suffix,
start: (_numberOf12 = numberOf(attributesOf(find(children, "w:start"))["w:val"])) !== null && _numberOf12 !== void 0 ? _numberOf12 : 0
}, withoutUndefined({
alignment: NUMBER_ALIGNMENTS[jc],
restart,
legal: onOff(children, "w:isLgl") === true ? true : void 0,
alignedBoth: jc === "both" ? true : void 0,
+ legacy,
unsupported
})), {}, {
paragraph: readParagraphFormat(find(children, "w:pPr")),
@@ -44794,7 +44969,7 @@ var docxLayout = (function(exports) {
* Reads the parts of the document's settings (`w:settings`) that change how it is laid out.
*/
var readSettings = (xml) => {
- var _find4, _twips22;
+ var _find4, _twips24;
const settings = childrenOf(xml === null || xml === void 0 ? void 0 : xml["w:settings"]);
const compatibility = childrenOf(find(settings, "w:compat"));
const lists = readKinsokuLists(settings);
@@ -44809,7 +44984,7 @@ var docxLayout = (function(exports) {
[onOff(settings, "w:linkStyles"), "styles updated from the document's template when Word opens it"]
].find(([applies]) => applies === true)) === null || _find4 === void 0 ? void 0 : _find4[1];
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
- defaultTabStop: (_twips22 = twips(attributesOf(find(settings, "w:defaultTabStop"))["w:val"])) !== null && _twips22 !== void 0 ? _twips22 : 36,
+ defaultTabStop: (_twips24 = twips(attributesOf(find(settings, "w:defaultTabStop"))["w:val"])) !== null && _twips24 !== void 0 ? _twips24 : 36,
evenAndOddHeaders: onOff(settings, "w:evenAndOddHeaders") === true,
addsParagraphSpacing: onOff(compatibility, "w:doNotUseHTMLParagraphAutoSpacing") === true
}, Object.keys(rules).length > 0 ? { breakRules: rules } : {}), onOff(settings, "w:autoHyphenation") === true ? { hyphenation: readHyphenation(settings) } : {}), olderMode === void 0 ? {} : { compatibilityMode: olderMode }), onOff(compatibility, "w:suppressTopSpacing") === true ? { suppressesTopSpacing: true } : {}), unsupported ? { unsupported } : {});
@@ -44903,7 +45078,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, _parts$webSettings, _fontOf$size2, _notesByKind$kind$get, _readNoteProperties$p, _ref34, _ref35, _ref36, _ref37, _documentContent$unsu;
+ var _writtenParts$dataSto, _parts$otherListIds, _parts$otherListIds2, _parts$settings, _parts$webSettings, _fontOf$size2, _notesByKind$kind$get, _readNoteProperties$p, _ref33, _ref34, _ref35, _ref36, _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), {}, {
@@ -44945,11 +45120,11 @@ var docxLayout = (function(exports) {
part: "body"
}), guess);
const headersAndFooters = /* @__PURE__ */ new Map();
- const readPart = (id) => {
+ const readPart = (id, part) => {
if (!headersAndFooters.has(id)) {
var _parts$pictures2;
const content = parts.headersAndFooters.get(id);
- headersAndFooters.set(id, content && readBlocks(content, readerOf(true, (_parts$pictures2 = parts.pictures) === null || _parts$pictures2 === void 0 || (_parts$pictures2 = _parts$pictures2.headersAndFooters) === null || _parts$pictures2 === void 0 ? void 0 : _parts$pictures2.get(id))));
+ headersAndFooters.set(id, content && readBlocks(content, readerOf(true, (_parts$pictures2 = parts.pictures) === null || _parts$pictures2 === void 0 || (_parts$pictures2 = _parts$pictures2.headersAndFooters) === null || _parts$pictures2 === void 0 ? void 0 : _parts$pictures2.get(id)), void 0, part));
}
return headersAndFooters.get(id);
};
@@ -44984,14 +45159,14 @@ var docxLayout = (function(exports) {
* The blocks of a note, with the number its mark shows (`shows`, see {@link Reader}), or of a separator, which has
* none, read from the content of the note given, or its own
*/
- const readNoteContent = (kind, id, shows, content = contentOf$3((_notesByKind$kind$get = notesByKind[kind].get(id)) !== null && _notesByKind$kind$get !== void 0 ? _notesByKind$kind$get : { [`w:${kind}`]: [] })) => {
+ const readNoteContent = (kind, id, shows, content = contentOf$3((_notesByKind$kind$get = notesByKind[kind].get(id)) !== null && _notesByKind$kind$get !== void 0 ? _notesByKind$kind$get : { [`w:${kind}`]: [] }), last = false) => {
var _parts$pictures3, _noteBlocks;
const separator = shows === void 0;
const section = kind === "endnote" ? lastSection : sections.length;
const grid = separator ? void 0 : gridOf(section);
const down = !separator && downOf(childrenOf(sectionElements[section])) !== void 0;
const readerOfNote = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, readerOf(false, (_parts$pictures3 = parts.pictures) === null || _parts$pictures3 === void 0 ? void 0 : _parts$pictures3[`${kind}s`])), {}, { inNote: true }, kind === "endnote" ? { inEndnote: true } : {}), separator ? {} : { noteNumber: shows }), grid === void 0 ? {} : { grid }), down ? { down } : {});
- const noteBlocks = readBlocks(content, readerOfNote);
+ const noteBlocks = readBlocks(content, readerOfNote, void 0, kind === "endnote" ? "endnote" : last ? "lastFootnote" : "footnote");
return separator || ((_noteBlocks = noteBlocks[noteBlocks.length - 1]) === null || _noteBlocks === void 0 ? void 0 : _noteBlocks.type) !== "table" ? noteBlocks : [...noteBlocks, paragraphAfterTable(kind, readerOfNote, noteBlocks)];
};
/**
@@ -45131,11 +45306,14 @@ var docxLayout = (function(exports) {
footnotes.set(marker, content);
footnoteNumbers.set(marker, label);
};
+ const footnoteReferences = countFootnoteReferences(contentOf$3(body));
+ /** Whether the footnote whose reference was just read is the document's last */
+ const isLast = (kind) => kind === "footnote" && countOf(noteCounts, kind).read === footnoteReferences;
const readNote = (kind, id) => {
const marker = markerNext(kind, noteCounts);
const numbered = numberNext(kind, noteCounts, marker);
const { label, onPage } = numbered;
- const content = readNoteContent(kind, id, onPage === void 0 ? label : { onPage });
+ const content = readNoteContent(kind, id, onPage === void 0 ? label : { onPage }, void 0, isLast(kind));
if (onPage !== void 0) {
const { start, format } = notePropertiesOf(kind, sections.length);
footnotesOnEachPage.set(marker, {
@@ -45154,7 +45332,7 @@ var docxLayout = (function(exports) {
read: readNote,
readOwn: (kind, id) => {
const marker = markerNext(kind, noteCounts);
- keepNote(kind, marker, readNoteContent(kind, id, null), "");
+ keepNote(kind, marker, readNoteContent(kind, id, null, void 0, isLast(kind)), "");
return {
label: "",
marker
@@ -45302,7 +45480,7 @@ var docxLayout = (function(exports) {
relativeReferences: markers.relative,
endnoteReferences
}, parts.fonts !== void 0 && parts.fonts.length > 0 ? { fonts: parts.fonts } : {}), readSettings(parts.settings));
- return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref34 = (_ref35 = (_ref36 = (_ref37 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref37 !== void 0 ? _ref37 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref36 !== void 0 ? _ref36 : endnoteEndsUnsupported) !== null && _ref35 !== void 0 ? _ref35 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref34 !== void 0 ? _ref34 : unseenNumbering }));
+ return _objectSpread2(_objectSpread2({}, documentContent), withoutUndefined({ unsupported: (_ref33 = (_ref34 = (_ref35 = (_ref36 = (_documentContent$unsu = documentContent.unsupported) !== null && _documentContent$unsu !== void 0 ? _documentContent$unsu : footnotes.size > 0 ? notesUnsupported("footnote") : void 0) !== null && _ref36 !== void 0 ? _ref36 : endnotes.length > 0 ? notesUnsupported("endnote") : void 0) !== null && _ref35 !== void 0 ? _ref35 : endnoteEndsUnsupported) !== null && _ref34 !== void 0 ? _ref34 : unwrittenNumber ? "notes numbered in a format not yet written" : void 0) !== null && _ref33 !== void 0 ? _ref33 : unseenNumbering }));
};
//#endregion
//#region src/layout/paginate.ts
@@ -45848,6 +46026,7 @@ var docxLayout = (function(exports) {
}) : measuring,
breakRules,
numberAlignment: paragraph.numberAlignment,
+ legacyNumber: paragraph.numberLegacy,
hyphenation,
grid: paragraph.grid,
compatibilityMode
@@ -45875,8 +46054,8 @@ var docxLayout = (function(exports) {
* is 14 points (`word-watertight-text.docx` TX6a, TX6b), but none above the first paragraph of the document, a table
* cell or a header, nor below the last of a cell (TX6c, `word-paragraph-formats.docx` A0, A3), and none between two
* paragraphs of the same list, of one level or two (stops2/word-stops-lists.ts LI12), where there is between a bulleted
- * and a numbered one (A1), and between lists of other definitions (LI12). What Word does between those of lists made
- * from the same definition isn't known: guessing, none, as in one list
+ * and a numbered one (A1), between lists of other definitions (LI12), and between two lists made from the same
+ * definition (`instance`), as between lists of other definitions (stops2/word-stops-lists2.ts LI17)
*/
const ownSpace = (paragraph, side, next, inCell) => {
const { format, list } = paragraph;
@@ -45886,9 +46065,7 @@ var docxLayout = (function(exports) {
}
if (next === void 0) return side === "before" || inCell ? 0 : AUTOMATIC_SPACE;
const other = next.type === "paragraph" ? next.list : void 0;
- if (list === void 0 || other === void 0 || list.id !== other.id && list.definition !== other.definition) return AUTOMATIC_SPACE;
- if (list.id !== other.id) stopAt("automatic spacing between paragraphs of lists made from the same definition");
- return 0;
+ return list === void 0 || other === void 0 || list.id !== other.id ? AUTOMATIC_SPACE : 0;
};
/**
* Whether a paragraph is in one box of borders with a block next to it: a paragraph with the same borders and indents,
@@ -45950,6 +46127,7 @@ var docxLayout = (function(exports) {
measurer: measuring,
breakRules,
numberAlignment: block.numberAlignment,
+ legacyNumber: block.numberLegacy,
hyphenation
});
const hyphenated = own.min > widths.min ? own.hyphenated : own.min < widths.min ? widths.hyphenated : own.hyphenated || widths.hyphenated;
@@ -47410,7 +47588,7 @@ var docxLayout = (function(exports) {
if (search !== void 0 && names.includes(search.marker)) noteSearches.set(pageCount, _objectSpread2(_objectSpread2({}, search), {}, { placed: true }));
const placed = names.flatMap((marker) => {
var _inNotes$get2;
- return [...footnotesOnEachPage.has(marker) ? [marker] : [], ...(_inNotes$get2 = inNotes.get(marker)) !== null && _inNotes$get2 !== void 0 ? _inNotes$get2 : isDrawingMarker(marker) || marker === "joined spacing" ? [] : [marker]];
+ return [...footnotesOnEachPage.has(marker) ? [marker] : [], ...(_inNotes$get2 = inNotes.get(marker)) !== null && _inNotes$get2 !== void 0 ? _inNotes$get2 : isDrawingMarker(marker) || marker.startsWith("joined spacing") ? [] : [marker]];
});
for (const name of placed) if (!places.has(name)) {
places.set(name, {
diff --git a/usage/layout.md b/usage/layout.md
index b5c59d5805..61e9f5cc41 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -194,7 +194,7 @@ A blank page that Word adds so a section starts on an odd or even page has nothi
The pages are laid out with the widths and heights of the characters of the fonts Word documents use most: Calibri, Cambria, Arial, Times New Roman and Courier New, and of Office's other fonts that Word installs: Calibri Light, Aptos, Aptos Narrow, Trebuchet MS, Georgia, Verdana, Tahoma, Century Gothic, Consolas, Candara, Corbel, Constantia, Book Antiqua, Franklin Gothic Book, Gill Sans MT and Impact; and the heights of the lines of the Chinese, Japanese and Korean fonts Office has, and how far each goes below its baseline, such as MS Mincho, Yu Gothic, SimSun, Microsoft YaHei, PMingLiU and Malgun Gothic. The widths are those of the letters of Western and Central European languages, Turkish, Vietnamese, Greek and Cyrillic, of punctuation and the spaces other than U+0020, and of currency signs, arrows and mathematical symbols, as Word draws them in each font, plain, bold, italic and bold italic, and in each of the fonts, plain and bold, and in Calibri's, Cambria's, Arial's, Times New Roman's and Courier New's italics, those of Hebrew, Thai, the Arabic-Indic and Devanagari digits, box drawing, shapes such as `docx`'s bullets ● ○ ■, symbols and dingbats, which Word draws in the font, or in another where the font lacks them, such as Calibri's Thai in Tahoma and its ★ in Segoe UI Symbol, whose ascent and descent a line with them takes, but for Cambria's and Times New Roman's Devanagari digits, and in Arial, Times New Roman, Cambria and Courier New, plain and bold, those of Arabic's and Persian's letters in each of the forms Word joins them in, isolated, final, initial and medial, and of the lam-alef ligatures, which Word draws in the font, and Cambria's in Times New Roman. Word doesn't kern Arabic's letters side by side in those fonts: every pair of them is as wide as its forms, so Arabic in them is laid out, with lam and an alef as the one glyph Word joins them into. Calibri's Arabic, which Word kerns by pairs of glyphs, isn't in the tables, so it stops. A letter a font doesn't have, Word draws in another font, whatever the text's language, such as Gill Sans MT's Cyrillic, Greek and Latin letters with a macron in Calibri, and Book Antiqua's less common Latin letters, such as ƀ, in Cambria, which the layout measures as Word does where that font is Calibri, Cambria, Arial, Times New Roman or Tahoma, with a line as tall as that font's. Italic text in a font without an italic face, such as Tahoma or Impact, is as wide as the upright text, as Word slants it, and Word draws Trebuchet MS bold italic as its bold, slanted. Bold text in a font without a bold face, Calibri Light, Franklin Gothic Book and Impact, is in the bold Word makes itself: each character 20 thousandths of an em wider than the regular at any size, but for the spaces, kerned and joined as the regular, and its lines as tall. It follows:
-- the document's styles, and each paragraph's and run's own formatting: fonts, sizes, bold, italics, kerning and ligatures (see [Kerning and ligatures](#kerning-and-ligatures)), capitals, and hidden text. A paragraph whose mark is hidden (`run: { vanish: true }`) is joined to the next, on its lines, as Word joins it, in its own alignment, indents, space before, tab stops and borders, and the next one's space after, and each line spaced as the paragraph whose text it ends in, from the line the next one's text starts on. One at the end of a content control is joined to the paragraph after it too. In a table sized to its text, the two size the columns as one. Where both are in a list, the next one's number is counted but not shown, so the paragraph after them has the number after it. One with no paragraph after it, before a table or at the end of a table cell or of the document, stays as it is. A paragraph with nothing shown whose mark is hidden, such as one of a hidden style, takes no room, whatever its formatting, as in Word: before another paragraph or a table, and at the end of the document, but for one at the end of a table cell, which is a line of its own. The paragraph after it keeps its own formatting, one in a list takes a number, its fields are counted where it is, and its bookmarks start with what is after it. The paragraphs around it go by its style for their contextual spacing, one kept with the next (`keepNext`) is kept with the paragraph after it, and two with the same borders either side of it are in one box, as Word lays them out. So does one that ends a section before a section that starts on its page and is otherwise alike. A page break or picture in hidden text takes no room either, and a footnote or endnote reference none, but Word lays out its note, and counts it in the numbers of the notes after it. Chinese, Japanese and Korean are in the run's East Asian font (`font: { eastAsia }`), or in MS Mincho when that font has none of their characters, as Word draws them. Characters past ASCII that aren't East Asian or of a complex script, such as accented letters, curly quotes and dashes, are in the run's high ANSI font (`font: { hAnsi }`), which is inherited on its own, as Word draws them: curly quotes in a run given SimSun for ASCII alone (`font: { ascii: "SimSun" }`) are in the document's Calibri, and accented letters in a run given Arial for high ANSI alone (`font: { hAnsi: "Arial" }`) are in Arial beside the document's Calibri. So are the characters of the blocks Word's rules leave out, such as Thai, Devanagari, Armenian, Georgian and Braille, which Word draws in the fonts it falls back on from either. Hebrew and Arabic in a run that isn't right to left are in the run's font for ASCII (`font: { ascii }`). With the run's hint for East Asian text (`font: { hint: "eastAsia" }`), the characters Word's rules move to its East Asian font (`font: { eastAsia }`), such as curly quotes, dashes, an ellipsis, a degree sign and some other symbols, are in it, a full width each, as Word draws them beside Chinese and Japanese, and in English with no East Asian character near them, and in Chinese (`language: { eastAsia: "zh-CN" }`) some accented letters and the Latin Extended-A to IPA Extensions blocks too. A right-to-left run (`rightToLeft`) is in the run's font, size, bold and italics for complex scripts (`font: { cs }`, `sizeComplexScript`, `boldComplexScript`, `italicsComplexScript`), as Word draws it
+- the document's styles, and each paragraph's and run's own formatting: fonts, sizes, bold, italics, kerning and ligatures (see [Kerning and ligatures](#kerning-and-ligatures)), capitals, and hidden text. A paragraph whose mark is hidden (`run: { vanish: true }`) is joined to the next, on its lines, as Word joins it, in its own alignment, indents, space before, tab stops and borders, its style's too, and the next one's space after, each one's text in its own style's formatting, and each line spaced as the paragraph whose text it ends in, from the line the next one's text starts on, three or more paragraphs and exact or at-least spacing alike. One at the end of a content control is joined to the paragraph after it too, and one before a content control to its first paragraph. One that ends a section with text shown, before a section that starts on its page and is otherwise alike, is joined to that section's first paragraph. In a table sized to its text, the two size the columns as one. Where both are in a list, the next one's number is counted but not shown, so the paragraph after them has the number after it. One with no paragraph after it, before a table or at the end of a table cell or of the document, stays as it is. A paragraph with nothing shown whose mark is hidden, such as one of a hidden style, takes no room, whatever its formatting, as in Word: before another paragraph or a table, and at the end of the document, but for one at the end of a table cell, which is a line of its own. The paragraph after it keeps its own formatting, one in a list takes a number, its fields are counted where it is, and its bookmarks start with what is after it. The paragraphs around it go by its style for their contextual spacing, one kept with the next (`keepNext`) is kept with the paragraph after it, and two with the same borders either side of it are in one box, as Word lays them out. So does one that ends a section before a section that starts on its page and is otherwise alike, or on a new page, and one at the end of a header, or of the document's last footnote. A page break or picture in hidden text takes no room either, and a footnote or endnote reference none, but Word lays out its note, and counts it in the numbers of the notes after it. Chinese, Japanese and Korean are in the run's East Asian font (`font: { eastAsia }`), or in MS Mincho when that font has none of their characters, as Word draws them. Characters past ASCII that aren't East Asian or of a complex script, such as accented letters, curly quotes and dashes, are in the run's high ANSI font (`font: { hAnsi }`), which is inherited on its own, as Word draws them: curly quotes in a run given SimSun for ASCII alone (`font: { ascii: "SimSun" }`) are in the document's Calibri, and accented letters in a run given Arial for high ANSI alone (`font: { hAnsi: "Arial" }`) are in Arial beside the document's Calibri. So are the characters of the blocks Word's rules leave out, such as Thai, Devanagari, Armenian, Georgian and Braille, which Word draws in the fonts it falls back on from either. Hebrew and Arabic in a run that isn't right to left are in the run's font for ASCII (`font: { ascii }`). With the run's hint for East Asian text (`font: { hint: "eastAsia" }`), the characters Word's rules move to its East Asian font (`font: { eastAsia }`), such as curly quotes, dashes, an ellipsis, a degree sign and some other symbols, are in it, a full width each, as Word draws them beside Chinese and Japanese, and in English with no East Asian character near them, and in Chinese (`language: { eastAsia: "zh-CN" }`) some accented letters and the Latin Extended-A to IPA Extensions blocks too. A right-to-left run (`rightToLeft`) is in the run's font, size, bold and italics for complex scripts (`font: { cs }`, `sizeComplexScript`, `boldComplexScript`, `italicsComplexScript`), as Word draws it
- lengths given with units, such as `margin: { top: "1in" }`, `size: "12pt"` or a table's `width: { size: "6in", type: WidthType.DXA }`, as well as those given in numbers. Word reads each as a whole number of twips: rounded down from inches, points and picas, and to the nearest from centimeters and millimeters, and a size in any unit rounded down to a half-point, so `size: "10.75pt"` is 10.5 points and `size: "1cm"` 28. It reads the minus sign of a negative length as the whole number's only, and adds the fraction: `"-10.7pt"` is -9.3 points, a position of `"-2.5pt"` lowers text 1.5 points, and `"-0.5mm"` and `"-0.3cm"` are as much more
- where lines break, as Word breaks them: at spaces, and at en, em, four-per-em and ideographic spaces, which go past the end of a line as spaces do, after hyphens, en and em dashes and zero-width spaces, and between Chinese and Japanese characters. A word breaks at a soft hyphen (`SoftHyphen`), at the last one whose part of the word and a hyphen fit on the line, as a word fits, with the hyphen at the end of the line, and again on the next line when the rest is longer than a line. A soft hyphen takes no room where the line doesn't break, and kerned text either side of it isn't kerned across it. A justified line squeezes a word with soft hyphens onto it whole where it would squeeze one without, and otherwise breaks it at the last soft hyphen whose part and hyphen it can squeeze on, unless a shorter part fits as it is with less than twice as much room as the longer part needs squeezed, as Word does. A word in a border breaks at its soft hyphens too, and one whose part before its first soft hyphen is longer than a line breaks after the last character that fits. Word doesn't break lines at the other spaces, such as the thin space, so neither does the layout. In text in Japanese or Chinese (`language: { eastAsia: "ja-JP" }`), Word's lists keep characters such as closing brackets and `、` from starting a line, and opening brackets from ending one, so the character before moves to the next line with it. Text with no East Asian language, or in Korean or English, has no such rules in Word. Korean, Thai and the other scripts without spaces between words break at their spaces, as Word breaks them, and a word wider than the line breaks after the last character that fits. A paragraph's `wordWrap`, which writes Word's "Allow Latin text to wrap in the middle of a word", lets the words of runs in an East Asian font or language break anywhere, as Word breaks them. Right-to-left paragraphs (`bidirectional`) break where left-to-right ones do. In a left-to-right one, a line of right-to-left words in a right-to-left run (`rightToLeft`) has room for the space after its last word when a right-to-left word follows it, as that space is in the line, between them, and the space between right-to-left and left-to-right words in runs that aren't right to left hangs past the end of the line, as Word lays them out
- 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, and at the start of a line in a paragraph indented on the left or right, 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. Paragraphs in the default style leave out their space beside other cells and rows in it too, and at the top of a table at the start of a cell, and the paragraph after a table is compared with the end of its last row
@@ -204,7 +204,7 @@ The pages are laid out with the widths and heights of the characters of the font
- 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
-- numbered and bulleted lists, including those a paragraph's style numbers it in, counted as Word counts them: lists made from the same definition count on from one another, and a list's own first number for a level, which `docx` writes for each `instance` of a list, starts that level there at the list's first paragraph of that level. A level starts again after any level above it, or only after the level it gives, or never (`w:lvlRestart`), and a legal level (`isLegalNumberingStyle`) writes every level's number in decimal. A number is in its paragraph mark's formatting (`run` on a `Paragraph`), but for what its level gives it (`style.run`), and makes its line taller only above the baseline, with multiple line spacing a share of its text's line more, as Word lays it out. Its emphasis marks, and a number raised or lowered, take room as text's do. A line with nothing but a number is as tall as its paragraph's mark, or as the number above the baseline where that is taller. A number aligned to the right (`AlignmentType.END` or `RIGHT`) ends at the start of its paragraph's first line, and a centred one, with the space after it, is centred there, so a wide number can go into the margin, as Word puts it, and the text after it goes on from its end, at the hanging indent or the next tab stop after it. After a number aligned to the right, the tab goes to the next stop past its end, or, without a first line or hanging indent, to the left indent, where the number ends. Word measures the space after a number (`LevelSuffix.SPACE`) in Arial, and so does the layout. Word writes Thai and Hindi words (`thaiCounting`, `hindiCounting`) from 1 to 5. A level whose text shows a level its list doesn't have, or aligned as justified text is (`w:lvlJc` both), Word leaves out, as though it weren't there: its paragraphs have no number, nor the level's indent, and another level's number shows nothing for it
+- numbered and bulleted lists, including those a paragraph's style numbers it in, counted as Word counts them: lists made from the same definition count on from one another, and a list's own first number for a level, which `docx` writes for each `instance` of a list, starts that level there at the list's first paragraph of that level. A level starts again after any level above it, or only after the level it gives, or never (`w:lvlRestart`), and a legal level (`isLegalNumberingStyle`) writes every level's number in decimal. A number is in its paragraph mark's formatting (`run` on a `Paragraph`), but for what its level gives it (`style.run`), and makes its line taller only above the baseline, with multiple line spacing a share of its text's line more, as Word lays it out. Its emphasis marks, and a number raised or lowered, take room as text's do. A line with nothing but a number is as tall as its paragraph's mark, or as the number above the baseline where that is taller. A number aligned to the right (`AlignmentType.END` or `RIGHT`) ends at the start of its paragraph's first line, and a centred one, with the space after it, is centred there, so a wide number can go into the margin, as Word puts it, and the text after it goes on from its end, at the hanging indent or the next tab stop after it. Word lines up a number aligned distribute or with a low kashida to the left, one aligned `numTab` to the right, and one aligned for Thai in the centre, and so does the layout. A number in a border (`style.run.border`) is in a box with the tab or space after it: the text after it starts at the tab's stop, or right after the border's room from the number where that is further, and the line is taller by the room above. A word that doesn't fit after a number's tab stays on the number's line, broken after the last character that fits, as a word after a tab that starts its line does. Bullets that are pictures Word draws nothing for, so the text is at the tab's stop and the line as tall as its text. A level numbered as Word 6 numbered lists (`w:legacy`) puts the text at the level's indent from the number, or after its space from the number's end where that is further. After a number aligned to the right, the tab goes to the next stop past its end, or, without a first line or hanging indent, to the left indent, where the number ends. Word measures the space after a number (`LevelSuffix.SPACE`) in Arial, and so does the layout. Word writes Thai and Hindi words (`thaiCounting`, `hindiCounting`) from 1 to 5. A level whose text shows a level its list doesn't have, or aligned as justified text is (`w:lvlJc` both), Word leaves out, as though it weren't there: its paragraphs have no number, nor the level's indent, another level's number shows nothing for it, and a paragraph at it starts the levels below it again, as a paragraph at any level does, while the list's other levels are numbered as usual. Word puts its automatic spacing between the paragraphs of two lists made from the same definition (`instance`), as between lists of other definitions, and so does the layout
- footnotes, which take room at the bottom of the page their reference is on, and endnotes, which follow the text. A footnote that doesn't fit below its reference continues at the bottom of the next page, as Word continues it: it breaks between its paragraphs and table rows, and inside a paragraph keeping to its widow and orphan control, and its reference's line moves to the next page with it when too little of it would stay. A first paragraph kept together, or kept with the next, stays with its reference whole, with the first lines of what it is kept with. A footnote breaks before a later paragraph kept together, and before paragraphs kept with the next with what they are kept with, as the text does, unless they start its part on the page, which would leave none of it, where it breaks as without them, as the text does at the top of a page. It breaks before a table row whose lines widow control keeps together, and in a row whose lines could go on both pages, between its cells' lines, as a row of the text breaks, with the rest of the row at the top of the next page's footnotes, as Word breaks it. A footnote or endnote that ends with a table has a line below it for the empty paragraph Word puts after the table. A table's header rows aren't repeated above the rest of a footnote on the next page, nor left alone at the bottom of a page, as the table goes on the next page then. The footnote of a line kept with a longer paragraph goes below the first lines of it that the line is kept with, and of one kept with a table, below its first row, and the rest goes on the next page. One longer than a page fills the pages after it, and the text goes on above its end. Before the next section, whether it starts on a new page or not, and before a paragraph with a page break before it, the rest of a footnote goes on pages of its own, which belong to the section its reference is in, and the new section or paragraph starts after them. Before a continuous section, those pages show that section's header and footer, as Word shows them, and in columns, the rest is evened out in the columns of its last page. After a footnote that continues from the page before, the text after a page break at the start of a paragraph goes on the page the footnote ends on, as Word puts it. Before a continuous section numbered afresh, Word numbers each of those pages with the section's first number, and so does `docx/layout`. Before a continuous section, the number of pages of the section the footnote is in isn't worked out, as Word counts it its own way, and the next section's is its own pages, as Word counts them. A line whose footnote can't go on a page with it, such as one that starts with a paragraph kept together that is taller than a page, goes at the top of a page, with the text after it, from the top of a later column too, and the footnote starts on the next page, with those referred to after it after it, the last of those going on to the next page as far as it doesn't fit below its end. So does the last of a line's footnotes that doesn't fit below the others, and the footnote of a table row at the top of a page that fits there, but not with it. In columns, a line referring to a footnote below one that continues on the next page goes on the next page with it. A table row refers to footnotes as a line does: it moves to the next page with a footnote that doesn't fit below it, and one that breaks across pages has each line's footnote on the page the line is on, and breaks after a line whose footnote continues. A table row in a footnote breaks across as many pages as it takes, as Word breaks it, and moves to the next page whole where a cell of it would have none of its lines on the page. Where its footnotes fit whole below fewer of its lines, with the lines that refer to them, it breaks there instead, as Word breaks a row with a table in a cell beside a line whose footnote would otherwise continue. In columns, the footnotes of a page are laid out in the columns too, as Word lays them out: one after the other from the first column, evened out, each part broken at the width of the column it is in, and every column ends above them. Footnotes from another section on the page go on in the columns of its first footnote's. A line or table row in columns whose footnotes don't fit below it moves to the next column, or the next page, with all of them, as Word moves it, and the page is left as it was when a reference moves on as its columns are laid out again for its footnote. At the top of the page's columns, or of the column a section starts in after the section before's, a line stays, and its footnote goes on the page as far as it fits below the lines of every column, with the text going on above it, and continues at the foot of the next page's columns. At the top of a later column, the columns before it are laid out again above as much of the footnote as leaves the line on the page, as Word lays them out: a footnote of 120 lines referred to from line 11 of the first of 2 columns takes 44 lines of each, the columns above it 6, and its reference goes on in the second. The separator above the endnotes goes on the page of their first line, and on each page after the first they are on, the continuation separator is above them, as Word puts them. Each is a line of its paragraph style's text tall, at single spacing, whatever its own spacing, line spacing, size, text and paragraphs, as Word lays them out. A footnote's paragraph borders take room as in the text. Below the continuation separator, as many lines of endnotes go on the page as fit on it without it, so the last can go past the bottom margin by as much as the separator takes, as Word puts them. Footnotes and endnotes are numbered as Word numbers them, 1, 2, 3 and i, ii, iii, or in the format and from the number a document or its sections give, afresh in each section when they say so, and footnotes afresh on each page. A section's own start number adds to the number of notes before it, as Word adds it: after 27 footnotes, a section numbered from 5 numbers its first 32. A footnote or endnote with a mark of its own in place of its number isn't counted, footnotes numbered afresh on each page are numbered on from those of the page numbered so in another section, and a section's footnotes can go just below the text of their page, rather than at its bottom, below the space after a section's last paragraph and the rest of one continued from the page before too, or in columns of their own, evened out, as Word puts them. Word puts the endnotes of a section that says they go at the end of it at the end of the document, unless the document's settings say so too, when each section's go after it, after a separator of their own, but for a section that suppresses its own, whose go after the next's, and so does `docx/layout`. After text in columns, the text is evened out above the endnotes, which are laid out in the columns below their separator, in the first column, the continuation separator at the top of the first column only on the next page, and evened out in the columns they end in, as Word lays them out
- run formatting that changes how much room text takes, as Word lays it out. Superscript and subscript (`superScript`, `subScript`) are drawn at 65% of the text's size, to the nearest half-point and down from a quarter, so 7 points at 11 and 9.5 at 15, and small capitals (`smallCaps`) at 80%, so 9 points at 11; both take up the line of their run's own size, so they never make a line taller. Raised and lowered text (`position`) raises the line's top or lowers its bottom by as much as it goes past the rest of the line: a word raised 6 points makes a line of Calibri 11 120 twips taller, and a smaller word raised a little none. Emphasis marks (`emphasisMark`) take a quarter of their line, over it, or under it for dots below, and both on a line with marks over and under it, with a picture in the line counted in it; line spacing that gives a line less room than a quarter of it adds it below the marks' room, and spacing that gives it at least that, such as 1.25 lines, holds the marks, and spacing of less than a line makes the line and the marks' room that share of themselves. A border around text (`border` on a `TextRun`) takes its space and its width on each side of the text, and above and below it, as wide as a paragraph's border of its style, an art border its size in points, and a space past 31 points only what is left over 32: two runs next to each other with the same border are in one box, a box that goes on to the next line starts again there, also in a word broken across lines, and a line keeps room for its box to end after its last word. A shadow doubles a border's width as Word draws it, whatever its style, and one drawn as a frame takes the room it takes without (`w:shadow`, `w:frame`, in documents Word made), and a picture in the line in a run with a border has its border's room around it, beside it and above and below it, in one box with text in the same border either side of it, and multiple line spacing adds its share of the run's line with the border's room above and below. Text fitted to a width (`w:fitText`, in documents Word made) is one box of that width, which goes on to the next line whole when it doesn't fit, or takes a line of its own and goes past its end when it is wider than the line, and runs one after the other fitted with the same id are one box, as tall as the tallest of their lines. Text with a phonetic guide over it (`w:ruby`, in documents Word made) is one box as wide as the wider of the guide and its base, and its line is as tall as the base makes it and as the guide raised over the base's baseline by its raise (`w:hpsRaise`), as text raised that far. Two lines in one (`w:eastAsianLayout` with `w:combine`) of text that isn't Chinese, Japanese or Korean is drawn at half its size on one row, as Word draws it
- pictures in the line, which stand on the baseline, so a line with text in it is as tall as the picture and the text below the baseline, as Word makes it. A line with a picture is at least as tall as a line of the picture's run's font, and its multiple line spacing adds a share of that, as Word's does. A line of only a picture isn't as tall as a larger paragraph mark, at single spacing
@@ -213,7 +213,7 @@ The pages are laid out with the widths and heights of the characters of the font
- text frames (a paragraph's `frame`) and drop caps, as Word lays them out: the paragraph is taken out of the text and put in a box of its own, which the paragraph after it is anchored in, and the text goes round the box as it goes round a picture with square wrapping. The box is placed against the page, its margins, the column, or the paragraph after it, at the place or lined up as `position` or `alignment` says, and its `space` keeps the text from it, `horizontal` left and right and `vertical` above and below. It is as wide as `width`, or its text when it has none, and as tall as `height` exactly with the rule `HeightRule.EXACT`, its text with `HeightRule.AUTO`, and at least `height` otherwise, as Word takes a height with no rule. Paragraphs next to each other with the same frame are in one box, with the space before the first and after the last in it. With `wrap` none, the box is in front of the text and takes no room, and with not beside, the text goes above and below it; around, tight, through and auto are all around it. A drop cap is a frame like any other, as wide as its letter, and the lines of the next paragraph beside it are those its box is beside, as Word lays it out. One that doesn't say what it is placed against (`w:hAnchor`, `w:vAnchor`, which docx always writes) is placed against the column across the page and the margins down it, and one lined up inline down the margins is at their top. Its borders take no room from its text across it, but keep the text beside it 1.5 points further than their width and space, and its `space` further again, and those above and below are in its box, as a paragraph's are. A frame with no paragraph after it, before a table or the end of its section, is anchored at the table's top, or in the empty paragraph that ends the section, which takes a line then, and one placed against the paragraph after it before a table is placed against the table's top. A paragraph's own frame that gives all its style's does is its frame. The bookmarks, fields and notes in a frame are on its anchor's page, and in a footnote or an endnote, a frame's paragraph is laid out in the note's text. The text in frames isn't among the lines of `layoutDocument`'s pages
- VML drawings (`w:pict`), as Word lays them out. A text box (`Textbox`) in the line is sized to its text, as Word sizes it whatever `height` it has: its paragraphs, broken in its `width` less its insets (0.1 inch left and right and 0.05 above and below, or its own) and its outline, with the insets above and below them and the outline's weight (0.72 points, or its own) inside the box and again in the line, or none when it is hidden or it has none. A line with a text box of another outline than Word's own, or of none, or one Word doesn't size to its text, which is as tall as its own height, is half a point taller again. It stands on the baseline, as a picture does, in a header or footer as in the text. A list in a text box is numbered from 1, apart from the text's lists, and a footnote referred to in a text box is left out, reference and note, as Word leaves it. A text box placed on the page (`position: "absolute"`) with no wrapping takes no room, as Word puts it in front of the text, as do docx's watermarks, and one with square wrapping (`wrapStyle`) is laid out as a picture with that wrapping, sized to its text, with VML's distances from the text, 9 points left and right, where it gives none, and its outline's room beside it: half its weight, in whole points, down on the left and up on the right. In [templates](#templates), a shape in the line is a box of its size and its outline's weight, a group of shapes a box of its size, one with no size 50 points square, and one placed on the page with square, tight, through or top and bottom wrapping is laid out as a picture with that wrapping, the text 1 point nearer on the right with tight or through wrapping. Lengths in pixels, or with no unit, are 96 to the inch, and a shape as wide as a share of the margins (`mso-width-percent`) is that wide. A shape that would go past the right edge of the page is moved back onto it. A picture (`v:imagedata`) in the line is a box of its shape's size, with no outline unless the shape has one of its own, as Word's type for pictures has none, but a picture of one pixel is 33 points at most across and down, as Word draws it; its size is read from its PNG, JPEG, GIF or BMP file. 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, a digit, a fraction or a closing bracket, and beside a fraction or dots (⋯) next to a letter, a digit, a bracket, a bar, punctuation after it or another fraction, and none beside brackets, bars and slashes otherwise, 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, and after scripts whose last letter has one. Fractions, superscripts and subscripts, and pre-scripts (`MathPreSubSuperScript`), roots, sums and integrals with their limits, brackets that grow, matrices and cases, accents, bars, functions and limits, braces, boxes (`MathBorderBox`), struck through or not, equation arrays lined up at an ampersand in each row, or centred where none has one, and phantoms, with or without their part's width, ascent or descent, 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, as a sum in a script's or a script's script's are; 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 superscript in a lower limit is lower, as in a denominator. An accent over one letter is the widest of its sizes that fits the letter's width, centred where the font attaches it; over more, the widest no wider than them. 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
+- 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 one before a content control to its first paragraph, 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, and starting as the next one starts, on its page or a new one, after the first section too. A paragraph with no paragraph after it to join, at the end of a table cell or of the document, stays as it is, as does one before a table, but for one with nothing shown whose section break is deleted, which takes no room before the table and leaves its section to the table's; 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, at the top and bottom of the table too, whatever borders of its own the deleted row has. The paragraphs of a deleted row still count in their lists, so a numbered paragraph after a table whose deleted row has one is numbered past 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. 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 the border there when that is more: its own, whichever of two borders that meet Word draws, but for the cell before them, whose text is kept from the border Word draws, as Word lays them out. 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; with space between cells, a row of an exact height has its own space and its cells' borders inside its height too, and only the table's edge, its border and the space inside it, outside. 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
@@ -255,10 +255,10 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- Arabic letters joined across runs, which are measured a run at a time, and Arabic in Calibri, whose letters Word kerns by pairs of their glyphs, by as much as a quarter of an em, and with the spaces beside them, which isn't followed. In Arial, Times New Roman, Cambria and Courier New it doesn't kern them: every pair of the letters is as wide as its forms
- text in Korean (`language: { eastAsia }`) in a document that compresses its punctuation, text in Chinese with it in a justified or distributed paragraph, and text in Japanese with it in a distributed paragraph, where Word fits more on a line; and text in Japanese with Word's strict rules for the characters that can't start a line, before half-width small katakana, or with the document's own list of the characters that can't end one, or its own list of those that can't start one with characters Word's strict list doesn't have. Word's strict rules keep each small kana and the prolonged sound mark from the start of a line of Japanese, in place of the document's own list, and change nothing in Chinese or Korean; its compressed punctuation leaves Japanese aligned left, centred, right or justified as it is, and Chinese aligned left, as it leaves text in no language, and so does the layout
- a soft hyphen where Word hasn't been seen breaking at it: in a distributed line that fits a part of the word squeezed, whose spaces and letters would stretch twice as far with a shorter part that fits as it is as they would be squeezed for the longer, 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 or endnote 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, or that goes past the end of the line, 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 of a paragraph with a hanging indent, and a decimal one in a paragraph indented on the right; a left tab stop past the right indent whose text goes past the margin; and a word that doesn't fit after a list number's tab and would fit on the next line
+- a hidden paragraph mark Word hasn't been seen with, or lays out in a way not yet followed: between paragraphs that differ in more than their alignment, indents, space, line spacing, tab stops, borders and styles, such as in keeping with the next or an indent in characters, at the end of a content control with nothing after it, or before one bound to custom XML, and ending a section with text shown before something that isn't a paragraph, or a section that doesn't start on its page or is formatted otherwise, or with nothing shown before a continuous section formatted otherwise, or an even or odd page section. So do a paragraph with nothing shown and its mark hidden at the end of a footer, an endnote or a text box, or of a footnote with a note after it, 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 or endnote 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, or that goes past the end of the line, 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 of a paragraph with a hanging indent, and a decimal one in a paragraph indented on the right; a left tab stop past the right indent whose text goes past the margin
- 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
+- automatic spacing in a footnote across pages or in columns, and after the empty paragraph that ends a section before space of the next section's
- 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
- on text that runs down the page: a table, endnotes from a section followed by one whose text runs as it does, before one whose text runs another way, a tab to a stop other than a left one, a soft hyphen or picture, a drawing that text wraps around, Chinese, Japanese or Korean text in a font whose characters aren't all an em, such as Yu Mincho, raised text and small capitals, two lines in one, text set across the line of more than two characters or of Chinese, Japanese or Korean ones, columns, mirrored margins, a gutter at the top or beside lines from the left, a footer that goes above the bottom margin, and a continuous section break after it into text that doesn't run down the page the same way; and text in a direction Word's documents don't write
@@ -267,8 +267,8 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- a paragraph justified for Arabic with a medium or high kashida (`MEDIUM_KASHIDA` and `HIGH_KASHIDA`), and Arabic text in one justified for Thai or with a low kashida, whose lines Word hasn't been seen breaking, and a justified or distributed line that only fits with its spaces squeezed when it has a four-per-em space
- page numbers in Thai and Hindi words (`thaiCounting` and `hindiCounting`), and page numbers Word writes as an error: any in `none`, 0 in Hebrew, Arabic, Thai and Hindi digits and Chicago's symbols, and those past where a format's letters run out, such as 781 in letters. Page numbers in Hebrew past 100, and in Hindi letters past 75 (`hindiVowels`) and 37 (`hindiConsonants`), haven't been checked in Word yet
- a chapter number from a heading in a table or a text frame
-- a list number whose text or place Word hasn't shown: one in a format not yet written, such as Thai and Hindi words (`thaiCounting`, `hindiCounting`) past 5, or past where Word's lists start over, such as 32768 in roman numerals; one that shows a level not counted yet that its list starts at a number of its own; a number with a border; a line with nothing but a number of another size or font than its paragraph's mark, before the paragraph's text; a number at another level of a list with a level aligned both; and a number after a paragraph at a level Word leaves out above it, which may start it again. So do bullets that are pictures, which Word drew none of, numbers laid out as Word 6 laid them out, a list defined by a list style that isn't found, or whose own list gives levels of its own, and numbers aligned other than to the left, the centre or the right, or both, which `docx` doesn't write
-- tracked changes Word hasn't been seen laying out: a field only part of which is deleted, a deleted paragraph mark before a content control, or at the end of one with no paragraph after it, a deleted section break before a table, or between sections that start differently, after the first, a list in a deleted table row, a cell merged down from a deleted row with something in it, a deleted row whose borders above and below it take different room, or, at the top or bottom of the table, other room than the table's own top or bottom border would, a deleted row in a table with borders and space between its cells at its top or bottom, or with borders other than the rows' around it, and a deleted row in a header of several rows (`tableHeader`) whose table style formats some of its rows by where they are, such as its first row or its bands
+- a list number whose text or place Word hasn't shown: one in a format not yet written, such as Thai and Hindi words (`thaiCounting`, `hindiCounting`) past 5, or past where Word's lists start over, such as 32768 in roman numerals; and one that shows a level not counted yet that its list starts at a number of its own. So do numbers laid out as Word 6 laid them out with a space or nothing after them, or not aligned to the left, or whose number and its room reach past the end of the line, a list defined by a list style that isn't found, or whose own list gives levels of its own, and numbers aligned with a medium or high kashida, which `docx` doesn't write
+- tracked changes Word hasn't been seen laying out: a field only part of which is deleted, a deleted paragraph mark at the end of a content control with no paragraph after it, or before one bound to custom XML, a deleted section break of a paragraph with text shown before a table, a deleted footnote or endnote reference with a mark of its own, whose note Word lays out after the others, a cell merged down from a deleted row with something in it, a deleted row whose borders above and below it take different room, or, at the top or bottom of the table, other room than the table's own top or bottom border would, and a deleted row in a header of several rows (`tableHeader`) whose table style formats some of its rows by where they are, such as its first row or its bands
- a date or time (a `DATE` or `TIME` field, or a `DayLong`, `MonthLong`, `YearLong` and the like) in the text, a footnote or an endnote, as Word writes the date and time it opens the document, whose width changes with them. One in a header or footer is laid out as it is written
- 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 and haven't been seen laying out: text after a tab past the end of the line that goes more than 941 points past the margin, a line beside a frame in a gap narrower than 100 points, or beside a picture or a table that text wraps around in one narrower than 50 points, or 94 for text not aligned left, which they may leave empty, a table that text wraps around sized to its text or lined up across the page, a table sized to its text as a share of the width, or in a table cell indented or as a share of its width, a table with no width of its own widened for a long word past the room for it or with its rows evened out, 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 in an East Asian language, and VML drawings that take room other than a text box in the line. The rest is laid out as in Word 2013's mode, but that: justified and distributed lines, and lines justified for Thai or with a low kashida, aren't squeezed, so they break as lines aligned left do; a tab to a stop past the end of the line goes to that stop on the line, past the margin, and the rest of the paragraph's text stays on that line; a table sized to its text has its first and last cells' margins beside the room for it, the page's text or what its indent leaves of it, as Word 2010 and before line a table's text up with its indent rather than its borders, but in a table cell; a table that text wraps around is placed with its first cell's text where it is placed across the page; ligatures are drawn only with Word's `enableOpenTypeFeatures` on, as Word 2010 writes it; and in Word 2007's and 2003's modes, Chinese and Japanese text breaks only at its spaces, as Latin text does, and a text box's outline takes no room in its line. A mode Word doesn't have, such as 13, stops the layout
The unique identifier for this abstract numbering definition.