diff --git a/api/classes/index.AbstractNumbering.html b/api/classes/index.AbstractNumbering.html
index 8615582e96..1d86d1dc92 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 770bcf830b..7a2277f5e5 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 1f6f683a4a..d5079f29ad 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 f3048a9f24..a836a3b6cb 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 098fd49eb4..5b55dc52c2 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 112ae3c3ca..712af80ff9 100644
--- a/api/classes/index.CellMerge.html
+++ b/api/classes/index.CellMerge.html
@@ -24,14 +24,14 @@ 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 d804e8e7cc..34e80b3b4e 100644
--- a/api/classes/index.CellMergeAttributes.html
+++ b/api/classes/index.CellMergeAttributes.html
@@ -23,14 +23,14 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.CheckBoxSymbolElement.html b/api/classes/index.CheckBoxSymbolElement.html
index b69dab3ad6..ee1770a4d3 100644
--- a/api/classes/index.CheckBoxSymbolElement.html
+++ b/api/classes/index.CheckBoxSymbolElement.html
@@ -26,14 +26,14 @@ specifying the Unicode character and font to render.
diff --git a/api/classes/index.CheckBoxUtil.html b/api/classes/index.CheckBoxUtil.html
index 8660195a5e..83df928a66 100644
--- a/api/classes/index.CheckBoxUtil.html
+++ b/api/classes/index.CheckBoxUtil.html
@@ -26,14 +26,14 @@ 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 2d5edc3624..076294a70b 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 583a007bd2..d85d988df6 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 ae0df3499f..9109cc9791 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 5a0f3a5122..84b0ef2b26 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 00df31821e..6aa5aa74c3 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 d6585aa353..e1fe6b7a70 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 5b6d1b87d3..ba34f309c7 100644
--- a/api/classes/index.DeletedTableCell.html
+++ b/api/classes/index.DeletedTableCell.html
@@ -24,14 +24,14 @@ 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 49793a55fb..deba1ac592 100644
--- a/api/classes/index.DeletedTableRow.html
+++ b/api/classes/index.DeletedTableRow.html
@@ -24,14 +24,14 @@ 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 0077cdf0ba..f89af8b04f 100644
--- a/api/classes/index.DocumentDefaults.html
+++ b/api/classes/index.DocumentDefaults.html
@@ -27,14 +27,14 @@ 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 d7dc4fdcf9..97cebfb349 100644
--- a/api/classes/index.DrawingPatch.html
+++ b/api/classes/index.DrawingPatch.html
@@ -20,14 +20,14 @@ 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 837c6fbcf5..8c41da1e3c 100644
--- a/api/classes/index.EndnoteIdReference.html
+++ b/api/classes/index.EndnoteIdReference.html
@@ -24,14 +24,14 @@ 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 78db532c06..2670c690cc 100644
--- a/api/classes/index.EndnoteReferenceRunAttributes.html
+++ b/api/classes/index.EndnoteReferenceRunAttributes.html
@@ -23,14 +23,14 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.Endnotes.html b/api/classes/index.Endnotes.html
index 3afb11ed9c..7104d32413 100644
--- a/api/classes/index.Endnotes.html
+++ b/api/classes/index.Endnotes.html
@@ -24,14 +24,14 @@ 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 3b8d6d5fea..dccae9274b 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 e382894b6f..a5c24aafc3 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 c953e6146f..17cb0b22c0 100644
--- a/api/classes/index.FootNotes.html
+++ b/api/classes/index.FootNotes.html
@@ -29,14 +29,14 @@ line used when footnotes continue across pages.
diff --git a/api/classes/index.FooterWrapper.html b/api/classes/index.FooterWrapper.html
index 474df2a80a..0e11f12cf6 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 487da9f1f0..cc28602b3b 100644
--- a/api/classes/index.FootnoteReference.html
+++ b/api/classes/index.FootnoteReference.html
@@ -20,14 +20,14 @@ and the footnote content by using a unique identifier.
diff --git a/api/classes/index.GridSpan.html b/api/classes/index.GridSpan.html
index a2bb4c5256..0bce36a730 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 bdfbea8693..544ed3209d 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 a6fecd04ac..f81611c98f 100644
--- a/api/classes/index.HpsMeasureElement.html
+++ b/api/classes/index.HpsMeasureElement.html
@@ -26,14 +26,14 @@ 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 d2891f0ce8..3f5e560165 100644
--- a/api/classes/index.IgnoreIfEmptyXmlComponent.html
+++ b/api/classes/index.IgnoreIfEmptyXmlComponent.html
@@ -24,7 +24,7 @@ to be excluded from the output.
diff --git a/api/classes/index.ImageRun.html b/api/classes/index.ImageRun.html
index 22fbca0a6c..87d1bed3ca 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 634c35869d..b81904c8d5 100644
--- a/api/classes/index.ImportedXmlComponent.html
+++ b/api/classes/index.ImportedXmlComponent.html
@@ -23,14 +23,14 @@ 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 bd4f6925bf..7d3a3c5158 100644
--- a/api/classes/index.InitializableXmlComponent.html
+++ b/api/classes/index.InitializableXmlComponent.html
@@ -23,14 +23,14 @@ 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 223e89f1b4..79df2c0e45 100644
--- a/api/classes/index.InsertedTableCell.html
+++ b/api/classes/index.InsertedTableCell.html
@@ -24,14 +24,14 @@ 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 99ecee586e..57a139f1ef 100644
--- a/api/classes/index.InsertedTableRow.html
+++ b/api/classes/index.InsertedTableRow.html
@@ -24,14 +24,14 @@ 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 959e15ff05..e8c922d124 100644
--- a/api/classes/index.InsertedTextRun.html
+++ b/api/classes/index.InsertedTextRun.html
@@ -30,14 +30,14 @@ made the insertion and when.
diff --git a/api/classes/index.InternalHyperlink.html b/api/classes/index.InternalHyperlink.html
index 0e61da44f6..c60f51dac8 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 82642c584a..612b7290b7 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 4c45068cc4..8466bad4ec 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 c6b0409466..131777c61c 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 2d10bba992..862dae87fb 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 3d8e049d42..3ee07ab6e4 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 527f356460..2f2626c4d3 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 52a73f4fee..d95cc743a6 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 82186ab326..7ecf8774c7 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 f6e467b6b5..6e7c4675ee 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 aa4567b506..5f77c4b670 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 8e2f51c211..ddf6e44fb8 100644
--- a/api/classes/index.NextAttributeComponent.html
+++ b/api/classes/index.NextAttributeComponent.html
@@ -27,14 +27,14 @@ 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 4757f0af61..06c4bbcd2a 100644
--- a/api/classes/index.OnOffElement.html
+++ b/api/classes/index.OnOffElement.html
@@ -27,14 +27,14 @@ 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 f26f31aefa..3949fb8ae9 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 6bf41a432e..05f06d2642 100644
--- a/api/classes/index.PageBorders.html
+++ b/api/classes/index.PageBorders.html
@@ -27,14 +27,14 @@ including which pages display the borders and how they are positioned.
diff --git a/api/classes/index.PageReference.html b/api/classes/index.PageReference.html
index cb8c90fa2a..9edffda68f 100644
--- a/api/classes/index.PageReference.html
+++ b/api/classes/index.PageReference.html
@@ -31,7 +31,7 @@ the specified bookmark, useful for cross-references like "see page 5".
diff --git a/api/classes/index.PageTextDirection.html b/api/classes/index.PageTextDirection.html
index bde3dc0b82..84e1fc6f81 100644
--- a/api/classes/index.PageTextDirection.html
+++ b/api/classes/index.PageTextDirection.html
@@ -23,14 +23,14 @@ for all pages in a section.
diff --git a/api/classes/index.Paragraph.html b/api/classes/index.Paragraph.html
index 6985b315c3..9846ee6ab0 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 fbed90f864..9e909c0b83 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 dcf1d7de84..5be7b03f6b 100644
--- a/api/classes/index.ParagraphPropertiesDefaults.html
+++ b/api/classes/index.ParagraphPropertiesDefaults.html
@@ -27,14 +27,14 @@ to all paragraphs in the document unless overridden.
diff --git a/api/classes/index.PositionalTab.html b/api/classes/index.PositionalTab.html
index 94adfa354b..f7d2e7d02c 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 c0e60ae6ff..257d28aa2e 100644
--- a/api/classes/index.RunPropertiesDefaults.html
+++ b/api/classes/index.RunPropertiesDefaults.html
@@ -27,14 +27,14 @@ 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 9b25bbea8c..b2f3bc4d17 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 e342001f36..88b2b7d80c 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 ac4d14da15..72aaf4f9fb 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 9f8f898425..de84463724 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 eb210c4fa3..c0063ae463 100644
--- a/api/classes/index.StringContainer.html
+++ b/api/classes/index.StringContainer.html
@@ -23,14 +23,14 @@ rather than an attribute.
diff --git a/api/classes/index.StringEnumValueElement.html b/api/classes/index.StringEnumValueElement.html
index c73508ab63..425713c8c3 100644
--- a/api/classes/index.StringEnumValueElement.html
+++ b/api/classes/index.StringEnumValueElement.html
@@ -26,14 +26,14 @@ type parameter to enforce type safety for enum values.
diff --git a/api/classes/index.StyleForParagraph.html b/api/classes/index.StyleForParagraph.html
index 2e9a5bee1a..3e2d8215ac 100644
--- a/api/classes/index.StyleForParagraph.html
+++ b/api/classes/index.StyleForParagraph.html
@@ -28,14 +28,14 @@ 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 ba1933e273..2d74cbc8bb 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 1f39bab137..a0c158f3d9 100644
--- a/api/classes/index.Styles.html
+++ b/api/classes/index.Styles.html
@@ -28,14 +28,14 @@ a way to define consistent formatting across a document.
diff --git a/api/classes/index.TDirection.html b/api/classes/index.TDirection.html
index 64e853f1ee..5f2ab58ed5 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 9ccd961f6c..15bb1e0146 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 e2143524c6..1b495b199c 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.TableOfContents.html b/api/classes/index.TableOfContents.html
index bfa4c5e443..ad7fb85396 100644
--- a/api/classes/index.TableOfContents.html
+++ b/api/classes/index.TableOfContents.html
@@ -33,14 +33,14 @@ The page numbers are left for Word to fill in when it updates the field.
diff --git a/api/classes/index.TableRow.html b/api/classes/index.TableRow.html
index a0e029ed01..75afbcd7ff 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 fa3a6ac800..843c2367bd 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 36b4a67bda..dc27a8041b 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 2185e9b0e4..c92938ef0d 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 be33b749cd..3b7037914f 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 82d5e7734c..004bb0f772 100644
--- a/api/classes/index.XmlAttributeComponent.html
+++ b/api/classes/index.XmlAttributeComponent.html
@@ -27,7 +27,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 2eb991870f..df48ce8b85 100644
--- a/api/classes/index.XmlComponent.html
+++ b/api/classes/index.XmlComponent.html
@@ -24,7 +24,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 26b8cecd8c..5911cc840a 100644
--- a/api/classes/math.MathBrackets.html
+++ b/api/classes/math.MathBrackets.html
@@ -22,14 +22,14 @@ with what they hold.
diff --git a/api/classes/math.MathLargeOperator.html b/api/classes/math.MathLargeOperator.html
index 3556eba729..02f3f88f58 100644
--- a/api/classes/math.MathLargeOperator.html
+++ b/api/classes/math.MathLargeOperator.html
@@ -21,14 +21,14 @@ 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 cb5f309365..cdabbf88af 100644
--- a/api/classes/math.MathMatrix.html
+++ b/api/classes/math.MathMatrix.html
@@ -23,14 +23,14 @@ and Pages centre every column.
diff --git a/api/classes/math.MathPhantom.html b/api/classes/math.MathPhantom.html
index 4639082767..1a7716da1f 100644
--- a/api/classes/math.MathPhantom.html
+++ b/api/classes/math.MathPhantom.html
@@ -21,14 +21,14 @@ 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 9078e87d82..6070b2979d 100644
--- a/api/classes/shapes.ShapeCanvasRun.html
+++ b/api/classes/shapes.ShapeCanvasRun.html
@@ -28,14 +28,14 @@ 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 a432fb663b..95b9b96187 100644
--- a/api/classes/shapes.ShapeGroupRun.html
+++ b/api/classes/shapes.ShapeGroupRun.html
@@ -28,14 +28,14 @@ when shapes are moved on a Copy
diff --git a/api/classes/shapes.ShapeRun.html b/api/classes/shapes.ShapeRun.html
index ffe7836f87..bdc4b950ec 100644
--- a/api/classes/shapes.ShapeRun.html
+++ b/api/classes/shapes.ShapeRun.html
@@ -26,14 +26,14 @@ 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 46c856a86f..c4bc4eec2b 100644
--- a/api/classes/watermarks.ImageWatermark.html
+++ b/api/classes/watermarks.ImageWatermark.html
@@ -39,14 +39,14 @@ way as an ImageRun.
diff --git a/api/classes/watermarks.TextWatermark.html b/api/classes/watermarks.TextWatermark.html
index 255c430090..cc01101811 100644
--- a/api/classes/watermarks.TextWatermark.html
+++ b/api/classes/watermarks.TextWatermark.html
@@ -37,14 +37,14 @@ 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 55c39e7dee..57b2c234ea 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 fbd23b5d69..302b56a7dd 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 6d2d598217..999ba779c8 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 a9bee9639e..28b030cde6 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 890e1f0fd7..6f2f5ce667 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 a8e1fb8766..bd39173a11 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 48b0969f04..55fa15aa54 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 5d22a28a59..b5e2507eca 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 c487b78779..1f5864c4e9 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 ec717627eb..1ca7a1cd0e 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 afb6d04adb..216d1a73d3 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 8a65aa9ae6..1529ab480f 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 39e65fd22d..a985410bff 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 71cce4eacd..febb619ed9 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 99b68d5f24..2fa52e0ec1 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 a38ace7ed0..42b9813fde 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 61ffbe2271..de0630321e 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 53ac7eb391..9ffcf58541 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.fillPageNumbers.html b/api/functions/index.fillPageNumbers.html
index e002b36562..c865106625 100644
--- a/api/functions/index.fillPageNumbers.html
+++ b/api/functions/index.fillPageNumbers.html
@@ -28,7 +28,7 @@ didn't work out is left as it is. The estimate is kept for the document's header
diff --git a/api/functions/index.fillPartPageNumbers.html b/api/functions/index.fillPartPageNumbers.html
index 1fc6f22440..7fe548704f 100644
--- a/api/functions/index.fillPartPageNumbers.html
+++ b/api/functions/index.fillPartPageNumbers.html
@@ -33,7 +33,7 @@ footer that show them, once the document's body is written.
diff --git a/api/functions/index.hpsMeasureValue.html b/api/functions/index.hpsMeasureValue.html
index 6c093a4531..125ee83920 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 7c66271a16..72ebea4630 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 831fb798b3..03a3dacece 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.estimatePageNumbers.html b/api/functions/layout.estimatePageNumbers.html
index 55c7af76e8..4c1f0490ed 100644
--- a/api/functions/layout.estimatePageNumbers.html
+++ b/api/functions/layout.estimatePageNumbers.html
@@ -41,7 +41,7 @@ Word to fill in when it updates the fields.
diff --git a/api/functions/layout.estimatePageNumbersWith.html b/api/functions/layout.estimatePageNumbersWith.html
index 2356efda28..c6c8874187 100644
--- a/api/functions/layout.estimatePageNumbersWith.html
+++ b/api/functions/layout.estimatePageNumbersWith.html
@@ -31,7 +31,7 @@ options say. Give what it returns to a document as its pageNumbers:
diff --git a/api/functions/layout.measureWithPretext.html b/api/functions/layout.measureWithPretext.html
index 3f6081a58b..f5e8afce64 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 659d66f71d..fdb2d2d34b 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 a218458b3f..91d7b99052 100644
--- a/api/interfaces/index.IXmlableObject.html
+++ b/api/interfaces/index.IXmlableObject.html
@@ -19,7 +19,7 @@ to generate the final XML output. Objects typically have a structure like:
-
+
Hierarchy
Record<string,unknown>
@@ -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 e2147564d2..6b80ee7ea0 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 ad80e1d9a8..ecffe4f095 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 62772c35cf..b2a5561533 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 b801d7e2a6..3e9887b69c 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 b093d90cfa..fd4e49d558 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 af259348b9..0ccfbcdfe7 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 ad30780fcd..32f840ac65 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 1d950db09c..ce94a43336 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 3b00507c54..6800d1f257 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 0148f66f7e..94dd1f98dc 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 49846bc4e4..a7772feedc 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 bc99ae459b..dd85d0ab32 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 05f4d99040..4bdc686409 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 6136ba3d4d..d8d5b3ea75 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.
@@ -57,7 +57,7 @@ name. The page references to a bookmark that isn't in it are left blank.
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 691c98b401..5155d0a112 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 e802f9a86f..731366f27d 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 9e5b314b58..0274aff3fa 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 afb61f96d8..ee40bded5e 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 b3afc24190..2848567d8f 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 745462fbdc..feda0a2da6 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 2ef4aa6d5c..e0ee680c68 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 d0baa77926..08a54638dc 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 544d09ca9b..e35111faa1 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 dc5a7bf60b..d432d633ec 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 198b197aef..e34fb35840 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 4032814189..56771e25ab 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 e29c302720..7808bc4263 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.
diff --git a/api/types/index.RelationshipType.html b/api/types/index.RelationshipType.html
index fd62a4e694..379551d0a6 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 1e2f533ccb..87c68f18c4 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
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.
diff --git a/api/types/layout.MeasureWidth.html b/api/types/layout.MeasureWidth.html
index ea5208ca46..78b9a006f6 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 019d92f2ec..843e5499cf 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 e889f599db..c63f9bf6c6 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 914dbf3b63..014c75ac74 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 9e321a5ef7..ba0469b9b3 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 7e3954c0c9..b25661b28f 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 053b3fb885..0cfa216442 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 ef9f547314..a2095ddb7b 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 bbf96d0742..7d7ac1ebea 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 19f69a7325..3b0a564824 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 11e0fe51d7..f4738d8fbe 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 da60f8c6fd..90eab0a8ba 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 7b120ed8eb..83aaad34fc 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 cc8f6ae467..333a68bbb5 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 eebd4622ef..8d8e1ea710 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 5b72034cfe..f7a7e29b70 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 7114f9f3b9..18d3061553 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 f9311ba672..ee2682d8f9 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 12da964b73..5973ca43a5 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 2a5aba4b05..4aa043bb28 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 58c41b10f7..8231c2fa63 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 58d023b1bc..b16ffda524 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 543e0bd457..99d4bfe000 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 c5fecb2438..dafbf4cb54 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 037dbb0a12..63893e6b2e 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 739c8f5925..cb4750e6c5 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 a4ad880886..bab9c21142 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 172fa4c3c6..e8c594e886 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 68cd3b607c..936cc4b180 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 45b738f2b1..df825c5124 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 9228540d2f..bfeff18dc8 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 f9e4666960..67aea129a5 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 fca8a615a6..f9b77bf676 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 940c17cf36..5041d08292 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 d897fd24a5..cac9d2a745 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 1fd501a4d5..05f43e26fc 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/live-examples/lib/index.d.ts b/live-examples/lib/index.d.ts
index d6e4a9dc3c..2827abdba2 100644
--- a/live-examples/lib/index.d.ts
+++ b/live-examples/lib/index.d.ts
@@ -2144,7 +2144,7 @@ export declare const createPageMargin: (top: number | UniversalMeasure, right: n
* });
* ```
*/
-export declare const createPageNumberType: ({ start, formatType, separator }: IPageNumberTypeAttributes) => XmlComponent;
+export declare const createPageNumberType: ({ start, formatType, separator, chapterHeadingLevel }: IPageNumberTypeAttributes) => XmlComponent;
/**
* This element specifies the properties (size and orientation) for all pages in the current section.
@@ -6377,6 +6377,7 @@ export declare type IPageMarginAttributes = {
* @property start - Starting page number for the section
* @property formatType - Number format (decimal, roman, letter, etc.)
* @property separator - Separator between chapter and page number
+ * @property chapterHeadingLevel - The level of the headings whose numbers are the chapter numbers
*/
export declare type IPageNumberTypeAttributes = {
/** Starting page number for the section */
@@ -6385,6 +6386,12 @@ export declare type IPageNumberTypeAttributes = {
readonly formatType?: (typeof NumberFormat)[keyof typeof NumberFormat];
/** Separator between chapter and page number (default: hyphen) */
readonly separator?: (typeof PageNumberSeparator)[keyof typeof PageNumberSeparator];
+ /**
+ * Puts the chapter number before each page number, such as "2-5" for page 5 of chapter 2. The chapter number is the
+ * number of the last heading of this level (1 to 9, for `HeadingLevel.HEADING_1` to `HEADING_9`), so those headings
+ * must be numbered through their style (`w:chapStyle`)
+ */
+ readonly chapterHeadingLevel?: number;
};
/**
@@ -10148,7 +10155,7 @@ export declare const PageNumberSeparator: {
readonly COLON: "colon";
/** Em dash separator (—) */
readonly EM_DASH: "emDash";
- /** En dash separator (–) */
+ /** En dash separator (–), written as `enDash` */
readonly EN_DASH: "endash";
};
diff --git a/live-examples/lib/index.iife.js b/live-examples/lib/index.iife.js
index 1317d40a72..cda65949c1 100644
--- a/live-examples/lib/index.iife.js
+++ b/live-examples/lib/index.iife.js
@@ -22067,7 +22067,7 @@ MAX: 9026 };
COLON: "colon",
/** Em dash separator (—) */
EM_DASH: "emDash",
- /** En dash separator (–) */
+ /** En dash separator (–), written as `enDash` */
EN_DASH: "endash"
};
/**
@@ -22097,7 +22097,7 @@ MAX: 9026 };
* });
* ```
*/
- var createPageNumberType = ({ start, formatType, separator }) => new BuilderElement({
+ var createPageNumberType = ({ start, formatType, separator, chapterHeadingLevel }) => new BuilderElement({
name: "w:pgNumType",
attributes: {
start: {
@@ -22110,7 +22110,11 @@ MAX: 9026 };
},
separator: {
key: "w:chapSep",
- value: separator
+ value: separator === PageNumberSeparator.EN_DASH ? "enDash" : separator
+ },
+ chapterHeadingLevel: {
+ key: "w:chapStyle",
+ value: chapterHeadingLevel === void 0 ? void 0 : decimalNumber(chapterHeadingLevel)
}
}
});
diff --git a/live-examples/lib/layout.iife.js b/live-examples/lib/layout.iife.js
index 16fec87e39..2601fb5ff6 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -2351,12 +2351,17 @@ var docxLayout = (function(exports) {
var _stringOf;
const children = childrenOf(child["w:style"]);
const attributes = attributesOf(child["w:style"]);
+ const numbering = childrenOf(find(childrenOf(find(children, "w:pPr")), "w:numPr"));
+ const list = attributesOf(find(numbering, "w:numId"))["w:val"];
+ const level = numberOf(attributesOf(find(numbering, "w:ilvl"))["w:val"]);
+ const name = valueOf(children, "w:name");
return {
id: stringOf(attributes["w:styleId"]),
isDefault: attributes["w:default"] !== void 0 && !isOff(attributes["w:default"]),
- definition: _objectSpread2({
- type: (_stringOf = stringOf(attributes["w:type"])) !== null && _stringOf !== void 0 ? _stringOf : "paragraph",
- basedOn: valueOf(children, "w:basedOn"),
+ definition: _objectSpread2(_objectSpread2(_objectSpread2({ type: (_stringOf = stringOf(attributes["w:type"])) !== null && _stringOf !== void 0 ? _stringOf : "paragraph" }, name === void 0 ? {} : { name }), {}, { basedOn: valueOf(children, "w:basedOn") }, list === void 0 && level === void 0 ? {} : { numbering: withoutUndefined({
+ id: list === void 0 ? void 0 : String(list),
+ level
+ }) }), {}, {
run: readRunFormat(find(children, "w:rPr"), themeFonts),
paragraph: readParagraphFormat(find(children, "w:pPr"))
}, attributes["w:type"] === "table" ? { cellMargins: readCellMargins(find(childrenOf(find(children, "w:tblPr")), "w:tblCellMar")) } : {})
@@ -2933,10 +2938,16 @@ var docxLayout = (function(exports) {
//#endregion
//#region src/layout/number-format.ts
/**
- * Writes numbers as Word writes page and list numbers in each of its formats (`ST_NumberFormat`).
+ * Writes numbers as Word writes list and page numbers in each of its formats (`ST_NumberFormat`). What Word writes was
+ * read from PDFs Word saved of the probes in `scripts/layout-probes/word-page-number-formats*.ts`.
*
* @module
*/
+ /**
+ * The largest number written in any format but decimal. Word's list numbers start over past it (32768 is "I" in roman
+ * numerals), and its page numbers past it haven't been seen
+ */
+ var LARGEST = 32767;
var ROMAN = [
[1e3, "m"],
[900, "cm"],
@@ -2959,8 +2970,19 @@ var docxLayout = (function(exports) {
rest: value,
text: ""
}).text;
- /** Letters as Word writes them: a to z, then aa to zz, then aaa and so on */
- var letters = (value) => String.fromCharCode(97 + (value - 1) % 26).repeat(Math.ceil(value / 26));
+ /**
+ * Letters of an alphabet as Word writes them: each letter in turn, then each twice, then three times and so on, as a to
+ * z, aa to zz, aaa. Characters of more than one code point, such as the Devanagari vowels with a sign, are strings
+ */
+ var repeated = (alphabet) => (value) => alphabet[(value - 1) % alphabet.length].repeat(Math.ceil(value / alphabet.length));
+ /** Letters of an alphabet in turn, starting from the first again after the last */
+ var cycled = (alphabet) => (value) => alphabet[(value - 1) % alphabet.length];
+ /** Each decimal digit of the number written with the digits given, from 0 to 9 */
+ var digits = (set) => (value) => [...String(value)].map((digit) => set[Number(digit)]).join("");
+ /** The first of a run of characters for 1 to the last number given, such as ① to ⑳, and decimal numbers past them */
+ var enclosed = (first, last) => (value) => value >= 1 && value <= last ? String.fromCodePoint(first + value - 1) : String(value);
+ /** One of the characters given for 1 to the last of them, and decimal numbers past them */
+ var listed = (set) => (value) => value >= 1 && value <= set.length ? set[value - 1] : String(value);
var ordinalSuffix = (value) => {
var _ref;
return value % 100 >= 11 && value % 100 <= 13 ? "th" : (_ref = [
@@ -2970,26 +2992,354 @@ var docxLayout = (function(exports) {
"rd"
][value % 10]) !== null && _ref !== void 0 ? _ref : "th";
};
- /**
- * A number in one of Word's number formats, such as `"iv"` for 4 in `lowerRoman`, or undefined for formats it doesn't
- * write, such as those of other languages' scripts. Word writes numbers that are zero or less in the letter and roman
- * formats as decimal numbers.
- */
- var formatNumber = (value, format = "decimal") => {
- const positive = value > 0;
- switch (format) {
- case "decimal": return String(value);
- case "decimalZero": return value >= 0 && value < 10 ? `0${value}` : String(value);
- case "numberInDash": return `- ${value} -`;
- case "ordinal": return positive ? `${value}${ordinalSuffix(value)}` : String(value);
- case "lowerRoman": return positive ? roman(value) : String(value);
- case "upperRoman": return positive ? roman(value).toUpperCase() : String(value);
- case "lowerLetter": return positive ? letters(value) : String(value);
- case "upperLetter": return positive ? letters(value).toUpperCase() : String(value);
- case "none": return "";
- default: return;
- }
+ var ONES = [
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "ten",
+ "eleven",
+ "twelve",
+ "thirteen",
+ "fourteen",
+ "fifteen",
+ "sixteen",
+ "seventeen",
+ "eighteen",
+ "nineteen"
+ ];
+ var TENS = [
+ "",
+ "",
+ "twenty",
+ "thirty",
+ "forty",
+ "fifty",
+ "sixty",
+ "seventy",
+ "eighty",
+ "ninety"
+ ];
+ /** A number in English words, as "one hundred one" and "twenty-one", without "and" */
+ var words = (value) => {
+ if (value < 20) return ONES[value];
+ if (value < 100) return TENS[Math.floor(value / 10)] + (value % 10 > 0 ? `-${ONES[value % 10]}` : "");
+ const [amount, name] = value < 1e3 ? [100, "hundred"] : [1e3, "thousand"];
+ const rest = value % amount;
+ return `${words(Math.floor(value / amount))} ${name}${rest > 0 ? ` ${words(rest)}` : ""}`;
};
+ var ORDINAL_WORDS = {
+ one: "first",
+ two: "second",
+ three: "third",
+ five: "fifth",
+ eight: "eighth",
+ nine: "ninth",
+ twelve: "twelfth"
+ };
+ /** A number in English ordinal words, such as "twenty-first": the last word made ordinal */
+ var ordinalWords = (value) => words(value).replace(/[a-z]+$/, (last) => {
+ var _ORDINAL_WORDS$last;
+ return (_ORDINAL_WORDS$last = ORDINAL_WORDS[last]) !== null && _ORDINAL_WORDS$last !== void 0 ? _ORDINAL_WORDS$last : last.endsWith("y") ? `${last.slice(0, -1)}ieth` : `${last}th`;
+ });
+ /** A group of up to four digits in a counting system. A 1 before ten is left out of a number that starts with 10 to 19 */
+ var countGroup = (value, counting, startsNumber) => {
+ const { digits: set, units, omitOne, zero } = counting;
+ const places = [
+ 3,
+ 2,
+ 1,
+ 0
+ ].map((place) => ({
+ place,
+ digit: Math.floor(value / Math.pow(10, place)) % 10
+ })).filter(({ digit }, index, all) => digit > 0 || all.slice(0, index).some((before) => before.digit > 0));
+ return places.map(({ place, digit }, index) => {
+ if (digit === 0) {
+ const next = places.slice(index + 1).find((other) => other.digit > 0);
+ return zero && next && places[index - 1].digit > 0 ? set[0] : "";
+ }
+ return (digit === 1 && place > 0 && (omitOne === "always" || omitOne === "teens" && place === 1 && startsNumber && index === 0) ? "" : set[digit]) + (place > 0 ? units[place - 1] : "");
+ }).join("");
+ };
+ var count = (counting) => (value) => {
+ if (value === 0) return counting.digits[0];
+ const high = Math.floor(value / 1e4);
+ const low = value % 1e4;
+ return (high === 0 ? "" : (high === 1 && counting.omitOneMyriad ? "" : countGroup(high, counting, true)) + counting.myriad) + (high > 0 && low > 0 && low < 1e3 && counting.zero ? counting.digits[0] : "") + (low > 0 ? countGroup(low, counting, high === 0) : "");
+ };
+ var CJK_DIGITS = [..."〇一二三四五六七八九"];
+ var TAIWANESE_DIGITS = [..."○一二三四五六七八九"];
+ var JAPANESE_COUNTING = {
+ digits: CJK_DIGITS,
+ units: [..."十百千"],
+ myriad: "万",
+ omitOne: "always"
+ };
+ var CHINESE_COUNTING = {
+ digits: CJK_DIGITS,
+ units: [..."十百千"],
+ myriad: "万",
+ omitOne: "teens",
+ zero: true
+ };
+ var KOREAN_COUNTING = {
+ digits: [..."영일이삼사오육칠팔구"],
+ units: [..."십백천"],
+ myriad: "만",
+ omitOne: "always",
+ omitOneMyriad: true
+ };
+ /** Chinese counting under 100, and digits from 100, as Word writes chineseCounting and taiwaneseCounting */
+ var countingUnderHundred = (set) => (value) => value < 100 ? count(_objectSpread2(_objectSpread2({}, CHINESE_COUNTING), {}, { digits: set }))(value) : digits(set)(value);
+ var KOREAN_ONES = [
+ "",
+ "하나",
+ "둘",
+ "셋",
+ "넷",
+ "다섯",
+ "여섯",
+ "일곱",
+ "여덟",
+ "아홉"
+ ];
+ var KOREAN_TENS = [
+ "",
+ "열",
+ "스물",
+ "서른",
+ "마흔",
+ "쉰",
+ "예순",
+ "일흔",
+ "여든",
+ "아흔"
+ ];
+ /** Korean's own words for 1 to 99, and Sino-Korean numbers from 100 */
+ var koreanLegal = (value) => value === 0 ? "0" : value < 100 ? KOREAN_TENS[Math.floor(value / 10)] + KOREAN_ONES[value % 10] : count(KOREAN_COUNTING)(value);
+ var VIETNAMESE = [
+ "không",
+ "một",
+ "hai",
+ "ba",
+ "bốn",
+ "năm",
+ "sáu",
+ "bảy",
+ "tám",
+ "chín"
+ ];
+ /** A number up to 1000 in Vietnamese words */
+ var vietnamese = (value) => {
+ if (value === 1e3) return "một ngàn";
+ const ones = value % 10;
+ const tens = Math.floor(value / 10) % 10;
+ if (value >= 100) {
+ const rest = value % 100;
+ const restText = rest === 0 ? "" : rest < 10 ? ` lẻ ${VIETNAMESE[rest]}` : ` ${vietnamese(rest)}`;
+ return `${VIETNAMESE[Math.floor(value / 100)]} trăm${restText}`;
+ }
+ if (value < 10) return VIETNAMESE[value];
+ const onesText = ones === 0 ? "" : ` ${ones === 5 ? "lăm" : ones === 1 && tens > 1 ? "mốt" : VIETNAMESE[ones]}`;
+ return (tens === 1 ? "mười" : `${VIETNAMESE[tens]} mươi`) + onesText;
+ };
+ var HEBREW_HUNDREDS = [
+ "",
+ "ק",
+ "ר",
+ "ש",
+ "ת",
+ "תק",
+ "תר",
+ "תש",
+ "תת",
+ "תתק"
+ ];
+ var HEBREW_TENS = [
+ "",
+ "י",
+ "כ",
+ "ל",
+ "מ",
+ "נ",
+ "ס",
+ "ע",
+ "פ",
+ "צ"
+ ];
+ var HEBREW_ONES = [
+ "",
+ "א",
+ "ב",
+ "ג",
+ "ד",
+ "ה",
+ "ו",
+ "ז",
+ "ח",
+ "ט"
+ ];
+ /** Hebrew numerals, in which 15 and 16 are written ט״ו and ט״ז, without the marks */
+ var hebrewNumerals = (value) => {
+ const rest = value % 100;
+ const tensAndOnes = rest === 15 ? "טו" : rest === 16 ? "טז" : HEBREW_TENS[Math.floor(rest / 10)] + HEBREW_ONES[rest % 10];
+ return HEBREW_HUNDREDS[Math.floor(value / 100)] + tensAndOnes;
+ };
+ var HEBREW_LETTERS = [..."אבגדהוזחטיכלמנסעפצקרשת"];
+ /** The Hebrew alphabet, and past its end, a tav for each time through it before the letter */
+ var hebrewLetters = (value) => "ת".repeat(Math.floor((value - 1) / HEBREW_LETTERS.length)) + HEBREW_LETTERS[(value - 1) % HEBREW_LETTERS.length];
+ /** Writes nothing for 0, as Word does in the formats of letters and symbols that repeat */
+ var orNothing = (write) => (value) => value === 0 ? "" : write(value);
+ /** Writes the decimal 0 for 0, as Word does in the formats of syllables that go round */
+ var orZero = (write) => (value) => value === 0 ? "0" : write(value);
+ var format = (write, smallest = 0, largest = LARGEST) => [
+ write,
+ smallest,
+ largest
+ ];
+ var LOWER_LETTERS = [..."abcdefghijklmnopqrstuvwxyz"];
+ var UPPER_LETTERS = LOWER_LETTERS.map((letter) => letter.toUpperCase());
+ var RUSSIAN = [..."абвгдежзиклмнопрстуфхцчшщыэюя"];
+ var capitalized = (text) => text.charAt(0).toUpperCase() + text.slice(1);
+ /**
+ * Each format's numbers, as Word writes them in lists. 0 is written in each as Word writes it, which is nothing in
+ * roman numerals and letters, and the decimal 0 in the formats of letters that go round. Word's lists of letters start
+ * over past 30 times through the alphabet (780 is 30 z's, and 1234 is 18 l's), except the Arabic and Hebrew ones, which
+ * start over from 784, and the Hindi ones, from 912.
+ */
+ var FORMATS = {
+ decimal: format(String, 0, Infinity),
+ decimalZero: format((value) => value < 10 ? `0${value}` : String(value)),
+ numberInDash: format((value) => `- ${value} -`),
+ ordinal: format((value) => `${value}${ordinalSuffix(value)}`),
+ cardinalText: format((value) => capitalized(words(value))),
+ ordinalText: format((value) => capitalized(ordinalWords(value))),
+ hex: format((value) => value.toString(16).toUpperCase(), 0, 65535),
+ upperRoman: format((value) => roman(value).toUpperCase()),
+ lowerRoman: format(roman),
+ upperLetter: format(orNothing(repeated(UPPER_LETTERS)), 0, 780),
+ lowerLetter: format(orNothing(repeated(LOWER_LETTERS)), 0, 780),
+ russianUpper: format(orNothing(repeated(RUSSIAN.map((letter) => letter.toUpperCase()))), 0, 870),
+ russianLower: format(orNothing(repeated(RUSSIAN)), 0, 870),
+ arabicAlpha: format(orNothing(repeated([..."أبتثجحخدذرزسشصضطظعغفقكلمنهوي"])), 0, 783),
+ arabicAbjad: format(orNothing(repeated([..."أبجدهوزحطيكلمنسعفصقرشتثخذضظغ"])), 0, 783),
+ hindiVowels: format(orNothing(repeated([..."कखगघङचछजझञटठडढणतथदधनऩपफबभमयरऱलळऴवशषसह"])), 0, 911),
+ hindiConsonants: format(orNothing(repeated([
+ ..."अआइईउऊऋऌऍऎएऐऑऒओऔ",
+ "अं",
+ "अः"
+ ])), 0, 911),
+ thaiLetters: format(orNothing(repeated([..."กขคงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรลวศษสหฬอฮ"])), 0, 1230),
+ hebrew1: format(orNothing(hebrewNumerals), 0, 783),
+ hebrew2: format(orNothing(hebrewLetters), 0, 783),
+ chicago: format(orNothing(repeated([..."*†‡§"])), 0, 120),
+ aiueo: format(orZero(cycled([..."アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン"]))),
+ aiueoFullWidth: format(orZero(cycled([..."アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン"]))),
+ iroha: format(orZero(cycled([..."イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセスン"]))),
+ irohaFullWidth: format(orZero(cycled([..."イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセスン"]))),
+ ganada: format(orZero(cycled([..."가나다라마바사아자차카타파하"]))),
+ chosung: format(orZero(cycled([..."ㄱㄴㄷㄹㅁㅂㅅㅇㅈㅊㅋㅌㅍㅎ"]))),
+ decimalHalfWidth: format(String),
+ decimalFullWidth: format(digits([..."0123456789"])),
+ decimalFullWidth2: format(digits([..."0123456789"])),
+ hindiNumbers: format(digits([..."०१२३४५६७८९"])),
+ thaiNumbers: format(digits([..."๐๑๒๓๔๕๖๗๘๙"])),
+ ideographDigital: format(digits(CJK_DIGITS)),
+ japaneseDigitalTenThousand: format(digits(CJK_DIGITS), 0, 9999),
+ taiwaneseDigital: format(digits(TAIWANESE_DIGITS)),
+ koreanDigital: format(digits([..."영일이삼사오육칠팔구"])),
+ koreanDigital2: format((value) => value === 0 ? "零" : digits([..."零一二三四五六七八九"])(value)),
+ japaneseCounting: format(count(JAPANESE_COUNTING)),
+ japaneseLegal: format(count({
+ digits: [..."〇壱弐参四伍六七八九"],
+ units: [..."拾百阡"],
+ myriad: "萬",
+ omitOne: "never"
+ })),
+ chineseCountingThousand: format(count(CHINESE_COUNTING)),
+ taiwaneseCountingThousand: format(count(_objectSpread2(_objectSpread2({}, CHINESE_COUNTING), {}, {
+ digits: [..."零一二三四五六七八九"],
+ myriad: "萬"
+ }))),
+ ideographLegalTraditional: format(count({
+ digits: [..."零壹貳參肆伍陸柒捌玖"],
+ units: [..."拾佰仟"],
+ myriad: "萬",
+ omitOne: "never",
+ zero: true
+ })),
+ chineseLegalSimplified: format(count({
+ digits: [..."零壹贰叁肆伍陆柒捌玖"],
+ units: [..."拾佰仟"],
+ myriad: "萬",
+ omitOne: "never",
+ zero: true
+ })),
+ chineseCounting: format(countingUnderHundred(TAIWANESE_DIGITS)),
+ taiwaneseCounting: format(countingUnderHundred(TAIWANESE_DIGITS)),
+ koreanCounting: format(count(KOREAN_COUNTING)),
+ koreanLegal: format(koreanLegal),
+ vietnameseCounting: format(vietnamese, 0, 1e3),
+ decimalEnclosedCircle: format(enclosed(9312, 20)),
+ decimalEnclosedFullstop: format(enclosed(9352, 20)),
+ decimalEnclosedParen: format(enclosed(9332, 20)),
+ decimalEnclosedCircleChinese: format(enclosed(9312, 10)),
+ ideographEnclosedCircle: format(enclosed(12832, 10)),
+ ideographTraditional: format(listed([..."甲乙丙丁戊己庚辛壬癸"])),
+ ideographZodiac: format(listed([..."子丑寅卯辰巳午未申酉戍亥"])),
+ ideographZodiacTraditional: format((value) => value === 0 ? "0" : [..."甲乙丙丁戊己庚辛壬癸"][(value - 1) % 10] + [..."子丑寅卯辰巳午未申酉戍亥"][(value - 1) % 12]),
+ bahtText: format(String),
+ dollarText: format(String),
+ bullet: format(() => ""),
+ none: format(() => "")
+ };
+ /**
+ * Where Word writes a page number differently from a list number: words without a capital, digits in
+ * taiwaneseCountingThousand, decimal numbers for bullets, and fewer numbers in some formats, past which it writes an
+ * error ("Error! Number cannot be represented in specified format."), nothing, or other letters, none of which are
+ * written here. That is any page number in none, 0 in Chicago's symbols, Hebrew, Arabic, Hindi and Thai digits, and the
+ * page numbers in Hebrew and Hindi letters that are more than the most seen in Word: 100 of Hebrew's, 75 of hindiVowels
+ * and 37 of hindiConsonants. Its pages in the other formats were the same as its lists.
+ */
+ var PAGE_FORMATS = _objectSpread2(_objectSpread2({}, Object.fromEntries(Object.entries(FORMATS).filter(([name]) => name !== "none"))), {}, {
+ cardinalText: format(words),
+ ordinalText: format(ordinalWords),
+ taiwaneseCountingThousand: format(digits(TAIWANESE_DIGITS)),
+ bullet: format(String),
+ chicago: format(FORMATS.chicago[0], 1, FORMATS.chicago[2]),
+ hebrew1: format(FORMATS.hebrew1[0], 1, 100),
+ hebrew2: format(FORMATS.hebrew2[0], 1, 100),
+ arabicAlpha: format(FORMATS.arabicAlpha[0], 1, FORMATS.arabicAlpha[2]),
+ arabicAbjad: format(FORMATS.arabicAbjad[0], 1, FORMATS.arabicAbjad[2]),
+ hindiVowels: format(FORMATS.hindiVowels[0], FORMATS.hindiVowels[1], 75),
+ hindiConsonants: format(FORMATS.hindiConsonants[0], FORMATS.hindiConsonants[1], 37),
+ hindiNumbers: format(FORMATS.hindiNumbers[0], 1, FORMATS.hindiNumbers[2]),
+ thaiNumbers: format(FORMATS.thaiNumbers[0], 1, FORMATS.thaiNumbers[2])
+ });
+ var writeIn = (formats, value, name) => {
+ const found = formats[name];
+ if (!found) return;
+ const [write, smallest, largest] = found;
+ return Number.isInteger(value) && value >= smallest && value <= largest ? write(value) : void 0;
+ };
+ /**
+ * A number in one of Word's number formats as it writes list numbers, such as `"iv"` for 4 in `lowerRoman`, or
+ * undefined for numbers and formats it doesn't write as Word does: those of formats whose text from Word isn't known,
+ * such as Thai and Hindi words, and those past where Word's lists start over.
+ */
+ var formatNumber = (value, name = "decimal") => writeIn(FORMATS, value, name);
+ /**
+ * A page number in one of Word's number formats, as it writes it in page numbers and page references, or undefined for
+ * those it doesn't write as Word does.
+ */
+ var formatPageNumber = (value, name = "decimal") => writeIn(PAGE_FORMATS, value, name);
//#endregion
//#region src/layout/paginate.ts
/**
@@ -3024,6 +3374,11 @@ var docxLayout = (function(exports) {
widowControl: false,
pageBreakBefore: false
};
+ /** The headings in a block: a paragraph's own, and those in a table's cells, whose chapter numbers aren't known yet */
+ var headingsIn = (block) => block.type === "paragraph" ? block.heading ? [block.heading] : [] : block.rows.flatMap(({ cells }) => cells.flatMap((cell) => cell.blocks.flatMap(headingsIn))).map(({ level }) => ({
+ level,
+ unsupported: "a chapter heading in a table"
+ }));
/** Thrown to stop laying out at something that can't be laid out yet */
var Unsupported = class extends Error {};
/** Thrown to stop laying out columns being balanced in a height they don't fit in */
@@ -3233,6 +3588,11 @@ var docxLayout = (function(exports) {
return missing > 0 && ((_rows$last$height = rows[last].height) === null || _rows$last$height === void 0 ? void 0 : _rows$last$height.rule) !== "exact" ? current.map((value, index) => index === last ? value + missing : value) : current;
}, heights);
};
+ let lastHeadings = [];
+ const chapterHeadings = blocks.map(({ block }) => {
+ for (const heading of headingsIn(block)) if (heading.chapter !== void 0 || heading.unsupported !== void 0) lastHeadings = Object.assign([...lastHeadings], { [heading.level - 1]: heading });
+ return lastHeadings;
+ });
const markersOf = (block) => block.type === "paragraph" ? block.items.flatMap((item) => item.type === "marker" ? [item.name] : []) : block.rows.flatMap(({ cells }) => cells.flatMap((cell) => cell.blocks.flatMap(markersOf)));
const bookmarks = /* @__PURE__ */ new Map();
const markedOn = /* @__PURE__ */ new Map();
@@ -3813,8 +4173,17 @@ var docxLayout = (function(exports) {
const [first, ...rest] = footnotes.get(name);
return rest.length > 0 || (first === null || first === void 0 ? void 0 : first.type) === "table" || first !== void 0 && measureParagraph(first, noteWidth()).lines.length > 1;
};
+ /** The number of the page as the section writes it, after the chapter number when it has one */
+ const pageText = () => {
+ const { numberFormat, chapters } = section();
+ const page = formatPageNumber(pageNumber, numberFormat);
+ if (page === void 0) throw new Unsupported("a page number its format isn't written for yet");
+ const heading = chapters && chapterHeadings[blockStart.index][chapters.level - 1];
+ if (heading === null || heading === void 0 ? void 0 : heading.unsupported) throw new Unsupported(heading.unsupported);
+ return (heading === null || heading === void 0 ? void 0 : heading.chapter) === void 0 ? page : `${heading.chapter}${chapters.separator}${page}`;
+ };
const mark = (names) => {
- const text = formatNumber(pageNumber, section().numberFormat);
+ const text = pageText();
for (const name of names) if (!bookmarks.has(name) && !footnotes.has(name)) {
bookmarks.set(name, text);
markedOn.set(name, pageCount);
@@ -4238,6 +4607,14 @@ var docxLayout = (function(exports) {
titlePage: false,
numberFormat: "decimal"
};
+ /** What goes between a chapter number and a page number, by `w:chapSep`. Word puts a hyphen when it isn't given */
+ var CHAPTER_SEPARATORS = {
+ hyphen: "-",
+ period: ".",
+ colon: ":",
+ emDash: "—",
+ enDash: "–"
+ };
var EMUS_PER_POINT = 12700;
/** How far apart, in points, the widths two rows give a column can be before they differ: rounding, not a choice */
var WIDTH_TOLERANCE = 1;
@@ -4473,24 +4850,31 @@ var docxLayout = (function(exports) {
return unsupported !== null && unsupported !== void 0 ? unsupported : parts.flatMap((part) => part);
};
/**
- * The number of a paragraph in a list, and what follows it, as its list's level writes it. The list's numbers move on.
+ * 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, paragraphRun, reader) => {
- var _valueOf2, _numberOf2, _numberOf3, _reader$counters$get, _counts$index;
+ var readListNumber = (properties, style, paragraphRun, reader) => {
+ var _valueOf2, _numberOf2, _ref, _levels$findIndex, _ref2, _reader$counters$get, _counts$index, _exec;
const numbering = childrenOf(find(properties, "w:numPr"));
- const id = (_valueOf2 = valueOf(numbering, "w:numId")) !== null && _valueOf2 !== void 0 ? _valueOf2 : String((_numberOf2 = numberOf(attributesOf(find(numbering, "w:numId"))["w:val"])) !== null && _numberOf2 !== void 0 ? _numberOf2 : "");
+ const ownId = (_valueOf2 = valueOf(numbering, "w:numId")) !== null && _valueOf2 !== void 0 ? _valueOf2 : (_numberOf2 = numberOf(attributesOf(find(numbering, "w:numId"))["w:val"])) === null || _numberOf2 === void 0 ? void 0 : _numberOf2.toString();
+ const ownLevel = numberOf(attributesOf(find(numbering, "w:ilvl"))["w:val"]);
+ const fromStyle = styleChain(reader.styles, style, "paragraph").reduce((inherited, { numbering: given }) => _objectSpread2(_objectSpread2({}, inherited), given), {});
+ const id = (_ref = ownId !== null && ownId !== void 0 ? ownId : fromStyle.id) !== null && _ref !== void 0 ? _ref : "";
const levels = reader.numbering.get(id);
- const index = (_numberOf3 = numberOf(attributesOf(find(numbering, "w:ilvl"))["w:val"])) !== null && _numberOf3 !== void 0 ? _numberOf3 : 0;
+ const linked = (_levels$findIndex = levels === null || levels === void 0 ? void 0 : levels.findIndex((other) => (other === null || other === void 0 ? void 0 : other.style) !== void 0 && other.style === style)) !== null && _levels$findIndex !== void 0 ? _levels$findIndex : -1;
+ const index = (_ref2 = ownLevel !== null && ownLevel !== void 0 ? ownLevel : ownId === void 0 ? fromStyle.level : void 0) !== null && _ref2 !== void 0 ? _ref2 : Math.max(linked, 0);
const level = levels === null || levels === void 0 ? void 0 : levels[index];
if (!levels || !level) return { items: [] };
const counts = (_reader$counters$get = reader.counters.get(id)) !== null && _reader$counters$get !== void 0 ? _reader$counters$get : [];
const current = [...counts.slice(0, index), ((_counts$index = counts[index]) !== null && _counts$index !== void 0 ? _counts$index : level.start - 1) + 1];
reader.counters.set(id, current);
- const text = level.text.replace(/%([1-9])/g, (_, digit) => {
- var _formatNumber, _ref, _current;
- const other = levels[Number(digit) - 1];
- return (_formatNumber = formatNumber((_ref = (_current = current[Number(digit) - 1]) !== null && _current !== void 0 ? _current : other === null || other === void 0 ? void 0 : other.start) !== null && _ref !== void 0 ? _ref : 1, other === null || other === void 0 ? void 0 : other.format)) !== null && _formatNumber !== void 0 ? _formatNumber : "1";
- });
+ const numberAt = (at) => {
+ var _formatNumber, _ref3, _current$at;
+ const other = levels[at];
+ return (_formatNumber = formatNumber((_ref3 = (_current$at = current[at]) !== null && _current$at !== void 0 ? _current$at : other === null || other === void 0 ? void 0 : other.start) !== null && _ref3 !== void 0 ? _ref3 : 1, other === null || other === void 0 ? void 0 : other.format)) !== null && _formatNumber !== void 0 ? _formatNumber : "1";
+ };
+ const text = level.text.replace(/%([1-9])/g, (_, digit) => numberAt(Number(digit) - 1));
+ const numbers = (_exec = /%[1-9](?:.*%[1-9])?/.exec(level.text)) === null || _exec === void 0 ? void 0 : _exec[0];
const font = fontOf(combine([paragraphRun, level.run]));
const suffix = level.suffix === "nothing" ? [] : level.suffix === "space" ? [{
type: "text",
@@ -4500,27 +4884,29 @@ var docxLayout = (function(exports) {
type: "tab",
font
}];
- return {
+ return _objectSpread2({
items: [...text.length > 0 ? [{
type: "text",
text,
font
}] : [], ...suffix],
- level
- };
+ level,
+ from: ownId === void 0 ? "style" : "paragraph"
+ }, withoutUndefined({ chapter: numbers === null || numbers === void 0 ? void 0 : numbers.replace(/%([1-9])/g, (_, digit) => numberAt(Number(digit) - 1)) }));
};
/**
* 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, tableStyle) => {
- var _valueOf3;
+ var _valueOf3, _exec2, _styleChain$slice$0$n, _styleChain$slice$;
const { styles } = reader;
const children = contentOf(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 = [...styleChain(styles, tableStyle, "table"), ...styleChain(styles, style, "paragraph")];
const paragraphRun = combine([styles.run, ...paragraphStyles.map(({ run }) => run)]);
- const list = readListNumber(properties, paragraphRun, reader);
+ const list = readListNumber(properties, style, paragraphRun, 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,
...paragraphStyles.map(({ paragraph }) => paragraph),
@@ -4529,20 +4915,20 @@ var docxLayout = (function(exports) {
];
const items = readInline(children, paragraphRun, reader);
const unsupported = find(properties, "w:framePr") === void 0 ? void 0 : "a text frame";
- return _objectSpread2({
+ return _objectSpread2(_objectSpread2({
type: "paragraph",
items: typeof items === "string" ? [] : [...list.items, ...items],
format: combine(formats),
tabStops: tabStopsOf(formats),
markFont: fontOf(combine([paragraphRun, readRunFormat(find(properties, "w:rPr"), styles.themeFonts)])),
style
- }, typeof items === "string" || unsupported ? { unsupported: typeof items === "string" ? items : unsupported } : {});
+ }, headingLevel === void 0 ? {} : { heading: _objectSpread2({ level: Number(headingLevel) }, withoutUndefined({ chapter: list.from === "style" ? list.chapter : void 0 })) }), typeof items === "string" || unsupported ? { unsupported: typeof items === "string" ? items : unsupported } : {});
};
var borderWidth = (borders, name) => {
- var _numberOf4;
+ var _numberOf3;
const attributes = attributesOf(find(borders, name));
const style = attributes["w:val"];
- return style === void 0 || style === "nil" || style === "none" ? 0 : ((_numberOf4 = numberOf(attributes["w:sz"])) !== null && _numberOf4 !== void 0 ? _numberOf4 : 0) / EIGHTHS_PER_POINT;
+ return style === void 0 || style === "nil" || style === "none" ? 0 : ((_numberOf3 = numberOf(attributes["w:sz"])) !== null && _numberOf3 !== void 0 ? _numberOf3 : 0) / EIGHTHS_PER_POINT;
};
/** The rows of a table, or of a content control or custom XML in it */
var rowsOf = (elements) => elements.filter(isObject).flatMap((element) => {
@@ -4578,7 +4964,7 @@ var docxLayout = (function(exports) {
* out.
*/
var readTable = (element, reader) => {
- var _ref2, _blocks$find;
+ var _ref4, _blocks$find;
const children = contentOf(element).filter(isObject);
const properties = childrenOf(find(children, "w:tblPr"));
const style = valueOf(properties, "w:tblStyle");
@@ -4598,18 +4984,18 @@ var docxLayout = (function(exports) {
const rows = rowsOf(children);
const gridWidth = (from, to) => grid.slice(from, to).reduce((total, value) => total + value, 0);
const read = rows.map((row, rowIndex) => {
- var _numberOf5;
+ var _numberOf4;
const rowChildren = contentOf(row).filter(isObject);
const rowProperties = childrenOf(find(rowChildren, "w:trPr"));
const heightAttributes = attributesOf(find(rowProperties, "w:trHeight"));
const height = twips(heightAttributes["w:val"]);
const { "w:hRule": rule } = heightAttributes;
- const skipped = (_numberOf5 = numberOf(attributesOf(find(rowProperties, "w:gridBefore"))["w:val"])) !== null && _numberOf5 !== void 0 ? _numberOf5 : 0;
+ const skipped = (_numberOf4 = numberOf(attributesOf(find(rowProperties, "w:gridBefore"))["w:val"])) !== null && _numberOf4 !== void 0 ? _numberOf4 : 0;
const { cells, edges, column: end } = cellsOf(rowChildren).reduce(({ column, cells: done, edges: before }, cell) => {
- var _numberOf6, _twips2, _shareOf;
+ var _numberOf5, _twips2, _shareOf;
const cellChildren = contentOf(cell).filter(isObject);
const cellProperties = childrenOf(find(cellChildren, "w:tcPr"));
- const span = (_numberOf6 = numberOf(attributesOf(find(cellProperties, "w:gridSpan"))["w:val"])) !== null && _numberOf6 !== void 0 ? _numberOf6 : 1;
+ const span = (_numberOf5 = numberOf(attributesOf(find(cellProperties, "w:gridSpan"))["w:val"])) !== null && _numberOf5 !== void 0 ? _numberOf5 : 1;
const mergeElement = find(cellProperties, "w:vMerge");
const merge = mergeElement === void 0 ? void 0 : attributesOf(mergeElement)["w:val"] === "restart" ? "restart" : "continue";
const margins = _objectSpread2(_objectSpread2({}, tableMargins), readCellMargins(find(cellProperties, "w:tcMar")));
@@ -4659,7 +5045,7 @@ var docxLayout = (function(exports) {
const fixed = attributesOf(find(properties, "w:tblLayout"))["w:type"] === "fixed";
const fits = !fixed && tableCells.some(({ ownWidth }) => ownWidth === void 0);
const unfitted = read.reduce((most, { end }) => Math.max(most, end), 0) > MOST_COLUMNS ? `a table given no widths of more than ${MOST_COLUMNS} columns` : void 0;
- const unsupported = (_ref2 = fits ? unfitted : unequal ? "a table whose rows give a column different widths" : void 0) !== null && _ref2 !== void 0 ? _ref2 : (_blocks$find = blocks.find((block) => block.unsupported !== void 0)) === null || _blocks$find === void 0 ? void 0 : _blocks$find.unsupported;
+ const unsupported = (_ref4 = fits ? unfitted : unequal ? "a table whose rows give a column different widths" : void 0) !== null && _ref4 !== void 0 ? _ref4 : (_blocks$find = blocks.find((block) => block.unsupported !== void 0)) === null || _blocks$find === void 0 ? void 0 : _blocks$find.unsupported;
return _objectSpread2(_objectSpread2(_objectSpread2({
type: "table",
rows: read.map(({ row }) => row)
@@ -4712,14 +5098,14 @@ var docxLayout = (function(exports) {
* the same space between them, unless the section gives each column's width.
*/
var readColumns = (element, width) => {
- var _numberOf7, _twips4;
+ var _numberOf6, _twips4;
const attributes = attributesOf(element);
const given = childrenOf(element).filter((child) => "w:col" in child);
if (isOff(attributes["w:equalWidth"]) && given.length > 0) return given.map((column) => {
var _twips3;
return (_twips3 = twips(attributesOf(column["w:col"])["w:w"])) !== null && _twips3 !== void 0 ? _twips3 : 0;
});
- const count = Math.max(1, (_numberOf7 = numberOf(attributes["w:num"])) !== null && _numberOf7 !== void 0 ? _numberOf7 : 1);
+ const count = Math.max(1, (_numberOf6 = numberOf(attributes["w:num"])) !== null && _numberOf6 !== void 0 ? _numberOf6 : 1);
const space = (_twips4 = twips(attributes["w:space"])) !== null && _twips4 !== void 0 ? _twips4 : DEFAULT_COLUMN_SPACE;
return Array.from({ length: count }, () => (width - space * (count - 1)) / count);
};
@@ -4728,7 +5114,7 @@ var docxLayout = (function(exports) {
* doesn't give a header or footer for a kind of page has the one of the section before.
*/
var readSection = (element, readPart, previous) => {
- var _stringOf, _twips5, _twips6, _margins$wLeft, _twips7, _margins$wRight, _twips8, _twips9, _twips10, _twips11, _twips12, _twips13;
+ var _stringOf, _twips5, _twips6, _margins$wLeft, _twips7, _margins$wRight, _twips8, _twips9, _twips10, _twips11, _twips12, _twips13, _CHAPTER_SEPARATORS$S;
const properties = childrenOf(element);
const size = attributesOf(find(properties, "w:pgSz"));
const margins = attributesOf(find(properties, "w:pgMar"));
@@ -4737,15 +5123,16 @@ var docxLayout = (function(exports) {
const start = valueOf(properties, "w:type");
const format = (_stringOf = stringOf(numbering["w:fmt"])) !== null && _stringOf !== void 0 ? _stringOf : "decimal";
const firstNumber = numberOf(numbering["w:start"]);
+ const chapterLevel = numberOf(numbering["w:chapStyle"]);
const pageWidth = (_twips5 = twips(size["w:w"])) !== null && _twips5 !== void 0 ? _twips5 : DEFAULT_SECTION.pageWidth;
const marginLeft = (_twips6 = twips((_margins$wLeft = margins["w:left"]) !== null && _margins$wLeft !== void 0 ? _margins$wLeft : margins["w:start"])) !== null && _twips6 !== void 0 ? _twips6 : DEFAULT_SECTION.marginLeft;
const marginRight = (_twips7 = twips((_margins$wRight = margins["w:right"]) !== null && _margins$wRight !== void 0 ? _margins$wRight : margins["w:end"])) !== null && _twips7 !== void 0 ? _twips7 : DEFAULT_SECTION.marginRight;
const gutter = (_twips8 = twips(margins["w:gutter"])) !== null && _twips8 !== void 0 ? _twips8 : DEFAULT_SECTION.gutter;
const columns = readColumns(find(properties, "w:cols"), pageWidth - marginLeft - marginRight - gutter);
- const unsupported = grid === "lines" || grid === "linesAndChars" || grid === "snapToChars" ? "a document grid" : numbering["w:chapStyle"] !== void 0 || formatNumber(1, format) === void 0 ? "page numbers in a format not yet written" : find(properties, "w:textDirection") !== void 0 ? "text that runs down the page" : void 0;
+ const unsupported = grid === "lines" || grid === "linesAndChars" || grid === "snapToChars" ? "a document grid" : formatPageNumber(1, format) === void 0 ? "page numbers in a format not yet written" : find(properties, "w:textDirection") !== void 0 ? "text that runs down the page" : void 0;
const headers = readReferences(properties, "w:headerReference", readPart);
const footers = readReferences(properties, "w:footerReference", readPart);
- return _objectSpread2(_objectSpread2({
+ return _objectSpread2(_objectSpread2(_objectSpread2({
pageWidth,
pageHeight: (_twips9 = twips(size["w:h"])) !== null && _twips9 !== void 0 ? _twips9 : DEFAULT_SECTION.pageHeight,
marginTop: (_twips10 = twips(margins["w:top"])) !== null && _twips10 !== void 0 ? _twips10 : DEFAULT_SECTION.marginTop,
@@ -4759,7 +5146,10 @@ var docxLayout = (function(exports) {
titlePage: onOff(properties, "w:titlePg") === true,
columns,
numberFormat: format
- }, firstNumber === void 0 ? {} : { firstNumber }), {}, {
+ }, chapterLevel === void 0 || chapterLevel < 1 || chapterLevel > 9 ? {} : { chapters: {
+ level: chapterLevel,
+ separator: (_CHAPTER_SEPARATORS$S = CHAPTER_SEPARATORS[String(numbering["w:chapSep"])]) !== null && _CHAPTER_SEPARATORS$S !== void 0 ? _CHAPTER_SEPARATORS$S : "-"
+ } }), firstNumber === void 0 ? {} : { firstNumber }), {}, {
headers: _objectSpread2(_objectSpread2({}, previous === null || previous === void 0 ? void 0 : previous.headers), headers),
footers: _objectSpread2(_objectSpread2({}, previous === null || previous === void 0 ? void 0 : previous.footers), footers)
}, unsupported ? { unsupported } : {});
@@ -4770,6 +5160,11 @@ var docxLayout = (function(exports) {
*/
var readNumbering = (context, styles) => {
const numbering = context.file.Numbering;
+ for (const style of styles.styles.values()) {
+ var _style$numbering$id, _style$numbering;
+ const placeholder = /^\{(.+)-(\d+)\}$/.exec((_style$numbering$id = (_style$numbering = style.numbering) === null || _style$numbering === void 0 ? void 0 : _style$numbering.id) !== null && _style$numbering$id !== void 0 ? _style$numbering$id : "");
+ if (placeholder) numbering.createConcreteNumberingInstance(placeholder[1], Number(placeholder[2]));
+ }
const root = childrenOf(numbering.prepForXml(READING_CONTEXT)["w:numbering"]);
const abstract = new Map(root.filter((child) => "w:abstractNum" in child).map((child) => {
const byIndex = childrenOf(child["w:abstractNum"]).filter((level) => "w:lvl" in level).map((level) => {
@@ -4777,14 +5172,14 @@ var docxLayout = (function(exports) {
const levelChildren = childrenOf(level["w:lvl"]);
return {
index: numberOf(attributesOf(level["w:lvl"])["w:ilvl"]),
- level: {
+ level: _objectSpread2(_objectSpread2({}, withoutUndefined({ style: valueOf(levelChildren, "w:pStyle") })), {}, {
format: (_valueOf4 = valueOf(levelChildren, "w:numFmt")) !== null && _valueOf4 !== void 0 ? _valueOf4 : "decimal",
text: (_stringOf2 = stringOf(attributesOf(find(levelChildren, "w:lvlText"))["w:val"])) !== null && _stringOf2 !== void 0 ? _stringOf2 : "",
suffix: (_valueOf5 = valueOf(levelChildren, "w:suff")) !== null && _valueOf5 !== void 0 ? _valueOf5 : "tab",
start: numberOf(attributesOf(find(levelChildren, "w:start"))["w:val"]),
paragraph: readParagraphFormat(find(levelChildren, "w:pPr")),
run: readRunFormat(find(levelChildren, "w:rPr"), styles.themeFonts)
- }
+ })
};
}).reduce((all, { index, level }) => {
const copy = [...all];
diff --git a/live-examples/lib/shapes.iife.js b/live-examples/lib/shapes.iife.js
index c9641accb0..0c27ee346b 100644
--- a/live-examples/lib/shapes.iife.js
+++ b/live-examples/lib/shapes.iife.js
@@ -5710,12 +5710,17 @@ var docxShapes = (function(exports, docx) {
var _stringOf;
const children = childrenOf(child["w:style"]);
const attributes = attributesOf(child["w:style"]);
+ const numbering = childrenOf(find(childrenOf(find(children, "w:pPr")), "w:numPr"));
+ const list = attributesOf(find(numbering, "w:numId"))["w:val"];
+ const level = numberOf(attributesOf(find(numbering, "w:ilvl"))["w:val"]);
+ const name = valueOf(children, "w:name");
return {
id: stringOf(attributes["w:styleId"]),
isDefault: attributes["w:default"] !== void 0 && !isOff(attributes["w:default"]),
- definition: _objectSpread2({
- type: (_stringOf = stringOf(attributes["w:type"])) !== null && _stringOf !== void 0 ? _stringOf : "paragraph",
- basedOn: valueOf(children, "w:basedOn"),
+ definition: _objectSpread2(_objectSpread2(_objectSpread2({ type: (_stringOf = stringOf(attributes["w:type"])) !== null && _stringOf !== void 0 ? _stringOf : "paragraph" }, name === void 0 ? {} : { name }), {}, { basedOn: valueOf(children, "w:basedOn") }, list === void 0 && level === void 0 ? {} : { numbering: withoutUndefined({
+ id: list === void 0 ? void 0 : String(list),
+ level
+ }) }), {}, {
run: readRunFormat(find(children, "w:rPr"), themeFonts),
paragraph: readParagraphFormat(find(children, "w:pPr"))
}, attributes["w:type"] === "table" ? { cellMargins: readCellMargins(find(childrenOf(find(children, "w:tblPr")), "w:tblCellMar")) } : {})
diff --git a/usage/layout.md b/usage/layout.md
index f871858885..f74634fa7b 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -70,11 +70,11 @@ The pages are laid out with the widths and heights of the characters of the font
- the document's styles, and each paragraph's and run's own formatting: fonts, sizes, bold, capitals, and hidden text
- spacing before and after paragraphs, line spacing, indents and tab stops. 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 the tallest of them. 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
- keeping a paragraph with the next, keeping its lines together, widow and orphan control, and page breaks
-- numbered and bulleted lists
+- numbered and bulleted lists, including those a paragraph's style numbers it in
- 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. One longer than a page fills the pages after it, and the text goes on above its end. 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, and every column ends above them
- pictures in the line
- 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. 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. Where a table breaks across pages, Word draws its bottom border below the last of it on the page, which takes room there too. Header rows are repeated at the top of each page and column a table is on
-- sections, with their page sizes, margins, columns, headers and footers, how they start, and their page numbering, such as roman numerals. 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 its columns' widths in a wider column. Columns before a continuous section break are evened out, as Word evens them out, unless a column break is in them, 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. 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. A section that ends with a table has a line below it for the empty paragraph that ends the section, as Word has it
+- 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 its columns' widths in a wider column. Columns before a continuous section break are evened out, as Word evens them out, unless a column break is in them, 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. 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. A section that ends with a table has a line below it for the empty paragraph that ends the section, as Word has it
## What it leaves blank
@@ -91,6 +91,8 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- a table whose rows give a column different widths, a table given no widths of more than 63 columns, more than Word allows, and, in a table whose cells all have widths, a word longer than the table can make room for, a long word in a table wider than its cells, or one in a table with cells merged across its columns
- a long word in a cell merged across the columns of a table given no widths, which Word makes room for in a way not yet followed: a word longer than those columns' longest words together, when the table is narrowed to fit, or than their longest lines together, when more than one of them has anything in it
- a document that hyphenates its words
+- 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
A wrong page number is worse than a blank one, so it doesn't guess.
diff --git a/usage/page-numbers.md b/usage/page-numbers.md
index 77da0006d1..32ecda094e 100644
--- a/usage/page-numbers.md
+++ b/usage/page-numbers.md
@@ -214,21 +214,33 @@ const doc = new Document({
});
```
-### Page Number Separator
+### Chapter Numbers
-You can also set the chapter number separator style using the `separator` property:
+Page numbers can start with the number of the chapter they are in, such as 2-5 for page 5 of chapter 2. Give the level of the headings that start chapters as `chapterHeadingLevel`, from 1 for `HeadingLevel.HEADING_1` to 9, and number those headings through their style, as Word does. The chapter number is the heading's number, from its first number to its last, so a heading numbered "Chapter 2" gives 2. Pages before the first numbered heading have no chapter number. Set what goes between the two numbers with `separator`:
```ts live
-import { Document, Footer, PageNumber, PageNumberSeparator, Paragraph, TextRun } from "docx";
+import { AlignmentType, Document, Footer, HeadingLevel, LevelFormat, PageNumber, PageNumberSeparator, Paragraph, TextRun } from "docx";
const doc = new Document({
+ numbering: {
+ config: [
+ {
+ reference: "chapters",
+ levels: [{ level: 0, format: LevelFormat.DECIMAL, text: "Chapter %1", alignment: AlignmentType.LEFT }],
+ },
+ ],
+ },
+ styles: {
+ paragraphStyles: [{ id: "Heading1", name: "Heading 1", paragraph: { numbering: { reference: "chapters", level: 0 } } }],
+ },
sections: [
{
properties: {
page: {
pageNumbers: {
start: 1,
- separator: PageNumberSeparator.EM_DASH, // e.g. "1—1"
+ chapterHeadingLevel: 1,
+ separator: PageNumberSeparator.EM_DASH, // "1—1"
},
},
},
@@ -237,13 +249,16 @@ const doc = new Document({
children: [new Paragraph({ children: [new TextRun({ children: ["Page ", PageNumber.CURRENT] })] })],
}),
},
- children: [new Paragraph("Document content")],
+ children: [
+ new Paragraph({ heading: HeadingLevel.HEADING_1, children: [new TextRun("The coast")] }),
+ new Paragraph("Document content"),
+ ],
},
],
});
```
-Available separators: `COLON`, `EM_DASH`, `EN_DASH`, `HYPHEN`, `PERIOD`.
+Available separators: `COLON`, `EM_DASH`, `EN_DASH`, `HYPHEN` (the default), `PERIOD`.
## Examples
The unique identifier for this abstract numbering definition.