diff --git a/api/classes/charts.ChartDataPatch.html b/api/classes/charts.ChartDataPatch.html
index be4d1274d2..a26fc96be5 100644
--- a/api/classes/charts.ChartDataPatch.html
+++ b/api/classes/charts.ChartDataPatch.html
@@ -45,7 +45,7 @@ placeholder in the document's text is left as it is.
diff --git a/api/classes/index.AbstractNumbering.html b/api/classes/index.AbstractNumbering.html
index 0c365bd6e9..8a32103dca 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 f10185ae5b..399c01ab72 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 275649cf6c..a39b887d91 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 bfd927a506..a262e096c6 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 5baa3d4655..9281063463 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 2fd6aea591..f7d4f93f28 100644
--- a/api/classes/index.CellMerge.html
+++ b/api/classes/index.CellMerge.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.CellMergeAttributes.html b/api/classes/index.CellMergeAttributes.html
index b16a4e41d3..aca3686e37 100644
--- a/api/classes/index.CellMergeAttributes.html
+++ b/api/classes/index.CellMergeAttributes.html
@@ -30,7 +30,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.CheckBoxSymbolElement.html b/api/classes/index.CheckBoxSymbolElement.html
index ed9c191db4..a0388fd5a7 100644
--- a/api/classes/index.CheckBoxSymbolElement.html
+++ b/api/classes/index.CheckBoxSymbolElement.html
@@ -33,7 +33,7 @@ specifying the Unicode character and font to render.
diff --git a/api/classes/index.CheckBoxUtil.html b/api/classes/index.CheckBoxUtil.html
index 7345fe3795..cda81f2cd3 100644
--- a/api/classes/index.CheckBoxUtil.html
+++ b/api/classes/index.CheckBoxUtil.html
@@ -33,7 +33,7 @@ including its checked state and the symbols used for checked and unchecked state
diff --git a/api/classes/index.CommentRangeEnd.html b/api/classes/index.CommentRangeEnd.html
index 6ca845f68b..e1756a2a99 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 42a29f520a..b3af740c67 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 8e11dc5412..0a461768c9 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 acc418b72c..27185b068d 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 57444cba32..41adf07ef7 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 117df0ca1e..a696b1b152 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 1406063a36..da2b95024c 100644
--- a/api/classes/index.DeletedTableCell.html
+++ b/api/classes/index.DeletedTableCell.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.DeletedTableRow.html b/api/classes/index.DeletedTableRow.html
index 5edb70acd9..c07d702da0 100644
--- a/api/classes/index.DeletedTableRow.html
+++ b/api/classes/index.DeletedTableRow.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.DocumentDefaults.html b/api/classes/index.DocumentDefaults.html
index 6e8fbdef4e..36261bde4a 100644
--- a/api/classes/index.DocumentDefaults.html
+++ b/api/classes/index.DocumentDefaults.html
@@ -34,7 +34,7 @@ paragraphs and runs in a document unless overridden by a style or direct formatt
diff --git a/api/classes/index.DrawingPatch.html b/api/classes/index.DrawingPatch.html
index ad0367401c..d439a1065c 100644
--- a/api/classes/index.DrawingPatch.html
+++ b/api/classes/index.DrawingPatch.html
@@ -27,7 +27,7 @@ is one: it replaces the data of a chart made in Word.
diff --git a/api/classes/index.EndnoteIdReference.html b/api/classes/index.EndnoteIdReference.html
index dec1a30a1b..857442ad14 100644
--- a/api/classes/index.EndnoteIdReference.html
+++ b/api/classes/index.EndnoteIdReference.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.EndnoteReferenceRunAttributes.html b/api/classes/index.EndnoteReferenceRunAttributes.html
index cc4c3e2c42..e0e0f0fc5d 100644
--- a/api/classes/index.EndnoteReferenceRunAttributes.html
+++ b/api/classes/index.EndnoteReferenceRunAttributes.html
@@ -30,7 +30,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.Endnotes.html b/api/classes/index.Endnotes.html
index a4fcf0983f..3eca6af012 100644
--- a/api/classes/index.Endnotes.html
+++ b/api/classes/index.Endnotes.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.ExternalHyperlink.html b/api/classes/index.ExternalHyperlink.html
index 34073c833a..3c2f4ac29b 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 0f36b08bac..580a0a4545 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 d4135530c4..34ea5f3ae4 100644
--- a/api/classes/index.FootNotes.html
+++ b/api/classes/index.FootNotes.html
@@ -36,7 +36,7 @@ line used when footnotes continue across pages.
diff --git a/api/classes/index.FooterWrapper.html b/api/classes/index.FooterWrapper.html
index 96e76f88b9..36a0679ef7 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 0d544743e0..657d60e747 100644
--- a/api/classes/index.FootnoteReference.html
+++ b/api/classes/index.FootnoteReference.html
@@ -27,7 +27,7 @@ and the footnote content by using a unique identifier.
diff --git a/api/classes/index.GridSpan.html b/api/classes/index.GridSpan.html
index 5456a70921..9db7e0f756 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 b5214576a9..75ce2e1ded 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 ff4be0cc83..7e6bfac771 100644
--- a/api/classes/index.HpsMeasureElement.html
+++ b/api/classes/index.HpsMeasureElement.html
@@ -33,7 +33,7 @@ Values can be specified as numbers (interpreted as half-points) or with explicit
diff --git a/api/classes/index.IgnoreIfEmptyXmlComponent.html b/api/classes/index.IgnoreIfEmptyXmlComponent.html
index 63ab79c29d..1a659de6d4 100644
--- a/api/classes/index.IgnoreIfEmptyXmlComponent.html
+++ b/api/classes/index.IgnoreIfEmptyXmlComponent.html
@@ -39,7 +39,7 @@ to be excluded from the output.
diff --git a/api/classes/index.ImageRun.html b/api/classes/index.ImageRun.html
index 0ea178afee..069004b2b7 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 26bab1d527..2cd09e91b1 100644
--- a/api/classes/index.ImportedXmlComponent.html
+++ b/api/classes/index.ImportedXmlComponent.html
@@ -30,7 +30,7 @@ templates or when you need to include pre-existing XML fragments.
diff --git a/api/classes/index.InitializableXmlComponent.html b/api/classes/index.InitializableXmlComponent.html
index 68ad448555..53b5900dd6 100644
--- a/api/classes/index.InitializableXmlComponent.html
+++ b/api/classes/index.InitializableXmlComponent.html
@@ -30,7 +30,7 @@ create a new component that shares or extends the children of an existing compon
diff --git a/api/classes/index.InsertedTableCell.html b/api/classes/index.InsertedTableCell.html
index a84be9072e..516ddd755a 100644
--- a/api/classes/index.InsertedTableCell.html
+++ b/api/classes/index.InsertedTableCell.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.InsertedTableRow.html b/api/classes/index.InsertedTableRow.html
index f893ea10b3..34b2aa3e65 100644
--- a/api/classes/index.InsertedTableRow.html
+++ b/api/classes/index.InsertedTableRow.html
@@ -31,7 +31,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/index.InsertedTextRun.html b/api/classes/index.InsertedTextRun.html
index c0a34d2b23..1ae1811c45 100644
--- a/api/classes/index.InsertedTextRun.html
+++ b/api/classes/index.InsertedTextRun.html
@@ -37,7 +37,7 @@ made the insertion and when.
diff --git a/api/classes/index.InternalHyperlink.html b/api/classes/index.InternalHyperlink.html
index 8ed89cd5af..438d478435 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 d36e9a3120..1c272c6adb 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 0d70a8ad9d..c28a6eac40 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 cc9400b673..16ff8bb792 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 3ad43a8096..fcc86a1f5d 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 d62d1f7efe..753b422bba 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 ed1149efc7..b99a64de5a 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 f13048d738..36a9794348 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 6200aa80bd..2bb6933cb2 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 7ef8743d19..1042a00fc8 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 4df4c2585e..09bf14f40b 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 2046d136fc..d001969d68 100644
--- a/api/classes/index.NextAttributeComponent.html
+++ b/api/classes/index.NextAttributeComponent.html
@@ -34,7 +34,7 @@ This gives more control but is more verbose than XmlAttributeComponent.
diff --git a/api/classes/index.OnOffElement.html b/api/classes/index.OnOffElement.html
index a8d6e814c0..f38a709b87 100644
--- a/api/classes/index.OnOffElement.html
+++ b/api/classes/index.OnOffElement.html
@@ -34,7 +34,7 @@ it is explicitly disabled. When the value is true, the attribute is often omitte
diff --git a/api/classes/index.Packer.html b/api/classes/index.Packer.html
index d9b37a9a90..d9fc11072d 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 adf177262c..170af1136f 100644
--- a/api/classes/index.PageBorders.html
+++ b/api/classes/index.PageBorders.html
@@ -34,7 +34,7 @@ including which pages display the borders and how they are positioned.
diff --git a/api/classes/index.PageTextDirection.html b/api/classes/index.PageTextDirection.html
index cf392b733f..c9a129e91c 100644
--- a/api/classes/index.PageTextDirection.html
+++ b/api/classes/index.PageTextDirection.html
@@ -30,7 +30,7 @@ for all pages in a section.
diff --git a/api/classes/index.Paragraph.html b/api/classes/index.Paragraph.html
index a8e480d02b..39f4fd1fa9 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 8ad82f0095..d0b868ffcf 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 8ee261a2f1..eedc4d0437 100644
--- a/api/classes/index.ParagraphPropertiesDefaults.html
+++ b/api/classes/index.ParagraphPropertiesDefaults.html
@@ -34,7 +34,7 @@ to all paragraphs in the document unless overridden.
diff --git a/api/classes/index.PositionalTab.html b/api/classes/index.PositionalTab.html
index 35e5829138..3b1d39e598 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 3b5e7bd977..ff50323a0a 100644
--- a/api/classes/index.RunPropertiesDefaults.html
+++ b/api/classes/index.RunPropertiesDefaults.html
@@ -34,7 +34,7 @@ to all text runs in the document unless overridden by styles or direct formattin
diff --git a/api/classes/index.SectionProperties.html b/api/classes/index.SectionProperties.html
index e9559fd300..8ae61b681f 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 21915071c1..4f2087dc8f 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 8deb7f8e3b..466ce0b14b 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 8a622bb233..79e2fbab7e 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 be1baab0b2..6c58c74db9 100644
--- a/api/classes/index.StringContainer.html
+++ b/api/classes/index.StringContainer.html
@@ -30,7 +30,7 @@ rather than an attribute.
diff --git a/api/classes/index.StringEnumValueElement.html b/api/classes/index.StringEnumValueElement.html
index 781202e4b1..0a1a871487 100644
--- a/api/classes/index.StringEnumValueElement.html
+++ b/api/classes/index.StringEnumValueElement.html
@@ -33,7 +33,7 @@ type parameter to enforce type safety for enum values.
diff --git a/api/classes/index.StyleForParagraph.html b/api/classes/index.StyleForParagraph.html
index 311f717306..9e96685e39 100644
--- a/api/classes/index.StyleForParagraph.html
+++ b/api/classes/index.StyleForParagraph.html
@@ -35,7 +35,7 @@ run-level properties (font, size, color) for text within the paragraph.
diff --git a/api/classes/index.StyleLevel.html b/api/classes/index.StyleLevel.html
index 2d7ba73c82..220e65a0f7 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 87cb61e9c7..d9437c4939 100644
--- a/api/classes/index.Styles.html
+++ b/api/classes/index.Styles.html
@@ -35,7 +35,7 @@ a way to define consistent formatting across a document.
diff --git a/api/classes/index.TDirection.html b/api/classes/index.TDirection.html
index 2cdbdf1caf..6098141560 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 190c509747..86b7799bb9 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 eff57ed4bd..a85831ea9c 100644
--- a/api/classes/index.TableCellBorders.html
+++ b/api/classes/index.TableCellBorders.html
@@ -34,7 +34,7 @@ can be configured independently with different styles, colors, and widths.
diff --git a/api/classes/index.TableRow.html b/api/classes/index.TableRow.html
index 609afc592a..8a2d7b8514 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 314e23236a..97cd8a08f0 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 57b2bfd289..e9fe07da53 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 54d942cb59..92057a446a 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 773566da7c..e5ca1873c8 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 55cf5a8d63..ff6d469e28 100644
--- a/api/classes/index.XmlAttributeComponent.html
+++ b/api/classes/index.XmlAttributeComponent.html
@@ -41,7 +41,7 @@ can define an xmlKeys map to specify the transformation.
diff --git a/api/classes/index.XmlComponent.html b/api/classes/index.XmlComponent.html
index 45dd46b8c2..ff436299b3 100644
--- a/api/classes/index.XmlComponent.html
+++ b/api/classes/index.XmlComponent.html
@@ -129,7 +129,7 @@ the intermediate object format used by the xml serialization library.
diff --git a/api/classes/math.MathBrackets.html b/api/classes/math.MathBrackets.html
index b7a2215fd7..8efe2f8c90 100644
--- a/api/classes/math.MathBrackets.html
+++ b/api/classes/math.MathBrackets.html
@@ -29,7 +29,7 @@ with what they hold.
diff --git a/api/classes/math.MathLargeOperator.html b/api/classes/math.MathLargeOperator.html
index 3443a2d90b..186ac26445 100644
--- a/api/classes/math.MathLargeOperator.html
+++ b/api/classes/math.MathLargeOperator.html
@@ -28,7 +28,7 @@ it applies to. MathSum and MathIntegral are two of the
diff --git a/api/classes/math.MathMatrix.html b/api/classes/math.MathMatrix.html
index 3dcd5ced91..30c4333829 100644
--- a/api/classes/math.MathMatrix.html
+++ b/api/classes/math.MathMatrix.html
@@ -30,7 +30,7 @@ and Pages centre every column.
diff --git a/api/classes/math.MathPhantom.html b/api/classes/math.MathPhantom.html
index cf15a06659..54f748937b 100644
--- a/api/classes/math.MathPhantom.html
+++ b/api/classes/math.MathPhantom.html
@@ -28,7 +28,7 @@ line things up with it. Or math that is seen but takes up no room, or less, as <
diff --git a/api/classes/shapes.ShapeCanvasRun.html b/api/classes/shapes.ShapeCanvasRun.html
index d5be2a274e..e2ace3176a 100644
--- a/api/classes/shapes.ShapeCanvasRun.html
+++ b/api/classes/shapes.ShapeCanvasRun.html
@@ -35,7 +35,7 @@ written in mc:AlternateContent, with the group as its fallback, unl
diff --git a/api/classes/shapes.ShapeGroupRun.html b/api/classes/shapes.ShapeGroupRun.html
index 7ccee92b0b..235ee20bb6 100644
--- a/api/classes/shapes.ShapeGroupRun.html
+++ b/api/classes/shapes.ShapeGroupRun.html
@@ -35,7 +35,7 @@ when shapes are moved on a
diff --git a/api/classes/shapes.ShapeRun.html b/api/classes/shapes.ShapeRun.html
index e5299627be..6b0015de38 100644
--- a/api/classes/shapes.ShapeRun.html
+++ b/api/classes/shapes.ShapeRun.html
@@ -33,7 +33,7 @@ and arrowheads, and text inside it. It sits inline with text unless floati
diff --git a/api/classes/watermarks.ImageWatermark.html b/api/classes/watermarks.ImageWatermark.html
index bc087a051f..062c61cea6 100644
--- a/api/classes/watermarks.ImageWatermark.html
+++ b/api/classes/watermarks.ImageWatermark.html
@@ -46,7 +46,7 @@ way as an ImageRun.
diff --git a/api/classes/watermarks.TextWatermark.html b/api/classes/watermarks.TextWatermark.html
index a8b0dba807..ddf0038bf0 100644
--- a/api/classes/watermarks.TextWatermark.html
+++ b/api/classes/watermarks.TextWatermark.html
@@ -44,7 +44,7 @@ recognizes it and can remove or replace it through that command.
\n option - causes the field result to be the paragraph number without trailing periods. No information about prior numbered levels is displayed unless it is included as part of the current level.
diff --git a/api/functions/index.convertToXmlComponent.html b/api/functions/index.convertToXmlComponent.html
index c69894e74d..56a33cc89d 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 dd9c52211c..333bbc4b37 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 72dcb69c49..5e98d5715d 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 d23677571c..1af800c40b 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 e08f581cbc..9f4881152a 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 f09886913c..66650dce05 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 90108492dd..e2dcce107d 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 004e616b39..9d9dd14844 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 93419eb322..2c108c85d7 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 fc2c641179..e42230c3a8 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 0e7098bbb9..e3fab08df7 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 4951ee5ead..056a54ab75 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 d86fb1828b..f8c29e830a 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 82c09620dd..19021696b6 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 af00a68382..9a66577566 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 1ea20767bc..064faa8915 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 d261d4a529..bb37543270 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 9e4ff0cf96..2cc49d54c7 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 826d0ada61..4ac2125316 100644
--- a/api/functions/index.fillPageNumbers.html
+++ b/api/functions/index.fillPageNumbers.html
@@ -29,7 +29,7 @@ numbers were worked out. The estimate is kept for the document's headers and foo
diff --git a/api/functions/index.fillPartPageNumbers.html b/api/functions/index.fillPartPageNumbers.html
index f465ba7e00..e30d1d5bf7 100644
--- a/api/functions/index.fillPartPageNumbers.html
+++ b/api/functions/index.fillPartPageNumbers.html
@@ -35,7 +35,7 @@ are left as they are
diff --git a/api/functions/index.fillSequenceNumbers.html b/api/functions/index.fillSequenceNumbers.html
index 95b7ce5195..166422d17b 100644
--- a/api/functions/index.fillSequenceNumbers.html
+++ b/api/functions/index.fillSequenceNumbers.html
@@ -27,7 +27,7 @@ tables of contents are filled in from its headings, as Word leaves a heading's S
diff --git a/api/functions/index.hpsMeasureValue.html b/api/functions/index.hpsMeasureValue.html
index 50b560e421..bbda803c4b 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 a427558380..854b26ed0e 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 151b2a6b72..3843b5fcc9 100644
--- a/api/functions/index.universalMeasureToTwips.html
+++ b/api/functions/index.universalMeasureToTwips.html
@@ -35,7 +35,7 @@ Strings are converted according to their unit suffix.
diff --git a/api/functions/layout.estimatePageNumbersWith.html b/api/functions/layout.estimatePageNumbersWith.html
index 0e855dea37..897e7399e4 100644
--- a/api/functions/layout.estimatePageNumbersWith.html
+++ b/api/functions/layout.estimatePageNumbersWith.html
@@ -32,7 +32,7 @@ options say. Give what it returns to a document as its pageNumbers,
diff --git a/api/functions/layout.layoutDocument.html b/api/functions/layout.layoutDocument.html
index 111ffd628c..003d64457c 100644
--- a/api/functions/layout.layoutDocument.html
+++ b/api/functions/layout.layoutDocument.html
@@ -37,7 +37,7 @@ text box, it stops, and gives the pages up to there, with why in stoppedAt
diff --git a/api/functions/layout.measureWithPretext.html b/api/functions/layout.measureWithPretext.html
index 37f21a244c..0ded88597d 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 a142f7987f..65521531f3 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 b31886415a..183b81a68f 100644
--- a/api/interfaces/index.IXmlableObject.html
+++ b/api/interfaces/index.IXmlableObject.html
@@ -31,7 +31,7 @@ to generate the final XML output. Objects typically have a structure like:
diff --git a/api/types/charts.BarChartBaseOptions.html b/api/types/charts.BarChartBaseOptions.html
index b37c85edd5..64daaeb9ba 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 7f623145b9..65584fd045 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 9b0def48be..714a5f97c7 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 93711e5d05..e08f9cc9d2 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 4029c6d618..102313d226 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 7c3f3c24b2..43b18a2356 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 e4890ba4b2..d6105aeccb 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 279bfb98b3..074d58ff49 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 7edab0fde4..14ad15a572 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 df01b2c44b..9f8d393568 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 ec55f30a77..b9f5f847e8 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 f569b52774..a6edda88ec 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 7029810578..2476a2f67a 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 37a98d8c82..89cf0a75e2 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 8c1fb9494d..fe8755ea54 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 c538a3c3f9..34ff6ffd4b 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 9ac142f3fc..57e713ea89 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 2542db859e..da8601553d 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 ad49c58c3a..e6ecbedc9c 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 27c084575f..4891c86040 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 e203318008..7ba03e65a4 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 b9423dd4f6..f9807aa4a4 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 8257f31ce4..3d0a3e0dee 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 84b48444cb..b65bb04da5 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 4d5b2b4b0f..a6fbeb3a41 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 139106b859..bab62d8fec 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 e07e374539..0a2e29d646 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 c6d7918aa4..99bb3f8041 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 957546885d..592370d128 100644
--- a/api/types/index.TableRowsPatch.html
+++ b/api/types/index.TableRowsPatch.html
@@ -32,7 +32,7 @@ none. The other patches are applied after the rows are repeated, so a placeholde
@@ -55,14 +55,14 @@ A field's patch can repeat rows of a table in the copy in turn, whose fields are
repeated for each part, with its item's fields, and an item without parts has no row
diff --git a/api/types/index.TemplatePageNumberEstimator.html b/api/types/index.TemplatePageNumberEstimator.html
index 0f5fbd0a82..a638c87958 100644
--- a/api/types/index.TemplatePageNumberEstimator.html
+++ b/api/types/index.TemplatePageNumberEstimator.html
@@ -33,7 +33,7 @@ pages, are written with it.
Specifies the height of the containing block of the shape. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the left of the containing block of the shape relative to the element left of it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline.
Specifies the position of the bottom of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the left of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the right of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the position of the top of the containing block of the shape relative to the shape anchor. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the type of positioning used to place an element. Default is static. When the element is contained inside a group, this property must be absolute.
Specifies relative horizontal position data for objects in WordprocessingML documents. This modifies the mso-position-horizontal property. Default is text.
Specifies relative vertical position data for objects in WordprocessingML documents. This modifies the mso-position-vertical property. Default is text.
Specifies the position of the top of the containing block of the shape relative to the element above it in the flow of the page. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element. This property shall not be used for shapes anchored inline.
Specifies the width of the containing block of the shape. Default is 0. It is specified in CSS units or, for elements in a group, in the coordinate system of the parent element.
Specifies the distance from the bottom of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the left side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the right side of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies the distance from the top of the shape to the text that wraps around it. Default is 0 pt. Note that this property is different from the CSS margin property, which changes the origin of the shape to include the margin areas. This property does not change the origin.
Specifies whether the wrap coordinates were customized by the user. If the wrap coordinates are generated by an editor, this property is true; otherwise they were customized by a user. Default is false.
@@ -43,7 +43,7 @@ it. Italic text in a font without an italic file is measured with the upright on
a font's file has no glyph for, as Word draws it in another font
diff --git a/api/types/layout.MeasureWidth.html b/api/types/layout.MeasureWidth.html
index c3d1e1e3b7..c71a949989 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 b69dfc863f..7fd70f4571 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 7f68a3e67b..8125e711a7 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 bb6f71d21d..e62528a5d1 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 a6a6e568f0..196ede92fa 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 b12a267624..7e841f94c0 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 c20ae484a5..968a32ed6e 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 1766e534c8..c4b0ddb3c4 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 bf6f8d8f50..14dc4a5644 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 52bee885e2..500d708d1d 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 6a6e609c99..f8156bcc1b 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 91238937c4..eb51fd39c1 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 8589cac603..70a3415865 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 77bd011694..23a9621114 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 15df0a5af9..8c5aedc7ca 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 219b9265ff..e15665eea9 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 beef5fb048..934dcd77fa 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 c0e1278fd0..e7baa7498a 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 1ab97f6257..8537e750c5 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 c9e8417167..6b6db69de5 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 db4254bc1b..0595b88ca5 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 37a987f10b..dd2714136f 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 76011b513c..6620d15a67 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 7f5591077b..cfb60995b5 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 ac08237ee4..46c8890829 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 51266fabfd..0a5dd006ce 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 89536bdaef..7bb607cce7 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 c751637152..0331c158af 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 d9e139dd15..bb9cd01bf7 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 eccf336d5c..64e3807be1 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 1ad1341ad6..a1352302ea 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 b2070467f3..48885d6ac4 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 ab733633c3..cbc317e82c 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 a0c366b3de..43743a022d 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 aff8226cdd..72b693f802 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 89ba6054c2..4db5f5e773 100644
--- a/api/variables/index.docPropertiesUniqueNumericId.html
+++ b/api/variables/index.docPropertiesUniqueNumericId.html
@@ -28,7 +28,7 @@ one counter rather than a generator per instance.
diff --git a/api/variables/layout.estimatePageNumbers.html b/api/variables/layout.estimatePageNumbers.html
index a89549698f..12d662e841 100644
--- a/api/variables/layout.estimatePageNumbers.html
+++ b/api/variables/layout.estimatePageNumbers.html
@@ -40,7 +40,7 @@ asking to update the fields, unless the document has updateFields o
diff --git a/live-examples/lib/layout.iife.js b/live-examples/lib/layout.iife.js
index c6cf1b66bc..864d0f867c 100644
--- a/live-examples/lib/layout.iife.js
+++ b/live-examples/lib/layout.iife.js
@@ -396,6 +396,10 @@ var docxLayout = (function(exports) {
var sizeOf$1 = ({ size = 10 }) => size;
/** Whether text is kerned: with kerning on (`w:kern`), and at its size or larger, as Word kerns it (word-fonts.docx F3) */
var isKerned = ({ kerning, size = 10 }) => kerning !== void 0 && size >= kerning;
+ var lineSizeOf = (font) => {
+ var _font$lineSize;
+ return (_font$lineSize = font.lineSize) !== null && _font$lineSize !== void 0 ? _font$lineSize : sizeOf$1(font);
+ };
/**
* How a font's characters are measured: an East Asian font's Latin letters with the widths of the font in the table they
* are measured as, or all of a monospaced one's as half an em or an em, and other fonts with their own widths, or those of
@@ -440,7 +444,7 @@ var docxLayout = (function(exports) {
*/
var measureLineHeight = (font = {}) => {
var _eastAsianFontOf, _font$font2;
- return ((_eastAsianFontOf = eastAsianFontOf((_font$font2 = font.font) !== null && _font$font2 !== void 0 ? _font$font2 : "Times New Roman")) !== null && _eastAsianFontOf !== void 0 ? _eastAsianFontOf : widthsOf(font.font)).lineHeight * sizeOf$1(font) / 1e3;
+ return ((_eastAsianFontOf = eastAsianFontOf((_font$font2 = font.font) !== null && _font$font2 !== void 0 ? _font$font2 : "Times New Roman")) !== null && _eastAsianFontOf !== void 0 ? _eastAsianFontOf : widthsOf(font.font)).lineHeight * lineSizeOf(font) / 1e3;
};
/**
* How far a line of single-spaced text goes below its baseline, in points. The rest of the line is above it, with the
@@ -449,7 +453,7 @@ var docxLayout = (function(exports) {
*/
var measureDescent = (font = {}) => {
var _eastAsianFontOf2, _font$font3;
- return ((_eastAsianFontOf2 = eastAsianFontOf((_font$font3 = font.font) !== null && _font$font3 !== void 0 ? _font$font3 : "Times New Roman")) !== null && _eastAsianFontOf2 !== void 0 ? _eastAsianFontOf2 : widthsOf(font.font)).descent * sizeOf$1(font) / 1e3;
+ return ((_eastAsianFontOf2 = eastAsianFontOf((_font$font3 = font.font) !== null && _font$font3 !== void 0 ? _font$font3 : "Times New Roman")) !== null && _eastAsianFontOf2 !== void 0 ? _eastAsianFontOf2 : widthsOf(font.font)).descent * lineSizeOf(font) / 1e3;
};
//#endregion
//#region src/text-layout/line-break-rules.ts
@@ -575,6 +579,8 @@ var docxLayout = (function(exports) {
themeFonts: OFFICE_THEME_FONTS
};
var SMALL_CAPS_SCALE = .8;
+ var SCRIPT_SCALE = .65;
+ var EIGHTHS_PER_POINT$2 = 8;
var SINGLE_LINE = 240;
/**
* A context for formatting parts of the document to read them. Formatting paragraph properties that refer to a
@@ -643,8 +649,9 @@ var docxLayout = (function(exports) {
/**
* Why how Word reads a length in formatted XML isn't known, when it isn't: a size in picas, which Word's PDFs didn't
* tell from one it ignores, or in another unit but points, which they showed it ignores only with no style giving a
- * size, and a negative length of a fraction of a centimeter or millimeter, whose minus sign and rounding together they
- * didn't show. Undefined when every length's reading is known.
+ * size, a negative length of a fraction of a centimeter or millimeter, and a lowered position (`w:position`) of a
+ * fraction of its unit, whose minus sign and rounding together they didn't show. Undefined when every length's reading
+ * is known.
*/
var unknownLengthIn = (element, name = "") => {
if (Array.isArray(element)) return element.reduce((found, child) => found !== null && found !== void 0 ? found : unknownLengthIn(child, name), void 0);
@@ -655,7 +662,9 @@ var docxLayout = (function(exports) {
const measure = typeof value === "string" ? MEASURE.exec(value) : null;
if (reason !== void 0 || !measure) return reason;
const [, minus, , fraction, unit] = measure;
- return (name === "w:sz" || name === "w:szCs") && unit !== "pt" ? "a size given in a unit other than points" : minus && fraction && METRIC.has(unit) ? "a negative length of a fraction of a centimeter or millimeter" : void 0;
+ if ((name === "w:sz" || name === "w:szCs") && unit !== "pt") return "a size given in a unit other than points";
+ if (name === "w:position" && minus && fraction) return "a lowered position of a fraction of its unit";
+ return minus && fraction && METRIC.has(unit) ? "a negative length of a fraction of a centimeter or millimeter" : void 0;
}, void 0);
}, void 0);
};
@@ -682,6 +691,7 @@ var docxLayout = (function(exports) {
if (theme.startsWith("major")) return themeFonts.headings;
return theme.startsWith("minor") ? themeFonts.body : void 0;
};
+ var readVerticalAlign = (value) => value === "superscript" || value === "subscript" ? value : value === void 0 ? void 0 : "baseline";
/**
* Reads run properties (`w:rPr`). A font of the theme (`w:asciiTheme`) takes the place of the font named beside it.
*/
@@ -707,7 +717,11 @@ var docxLayout = (function(exports) {
complexScriptItalic: onOff(children, "w:iCs"),
rightToLeft: onOff(children, "w:rtl"),
complexScript: onOff(children, "w:cs"),
- eastAsianLanguage: stringOf(attributesOf(find(children, "w:lang"))["w:eastAsia"])
+ eastAsianLanguage: stringOf(attributesOf(find(children, "w:lang"))["w:eastAsia"]),
+ verticalAlign: readVerticalAlign(valueOf(children, "w:vertAlign")),
+ position: pointsOf(attributesOf(find(children, "w:position"))["w:val"], 2),
+ emphasisMark: valueOf(children, "w:em"),
+ border: readBorder$1(find(children, "w:bdr"))
});
};
var readLineSpacing = (spacing) => {
@@ -762,9 +776,9 @@ var docxLayout = (function(exports) {
});
};
/**
- * Reads a border of a paragraph (`w:pBdr`), on one side.
+ * Reads a border of a paragraph (`w:pBdr`), on one side, or of a run (`w:bdr`).
*/
- var readParagraphBorder = (element) => {
+ var readBorder$1 = (element) => {
var _stringOf, _numberOf;
if (element === void 0) return;
const attributes = attributesOf(element);
@@ -790,7 +804,7 @@ var docxLayout = (function(exports) {
const twips = (...names) => names.map((name) => pointsOf(indent[name], 20)).find((value) => value !== void 0);
const chars = (...names) => names.map((name) => numberOf(indent[name])).find((value) => value !== void 0);
const automatic = (name) => spacing[name] === void 0 ? void 0 : !isOff(spacing[name]);
- const border = (...names) => names.map((name) => readParagraphBorder(find(borders, name))).find((value) => value !== void 0);
+ const border = (...names) => names.map((name) => readBorder$1(find(borders, name))).find((value) => value !== void 0);
const hanging = twips("w:hanging");
const hangingChars = chars("w:hangingChars");
return withoutUndefined({
@@ -939,18 +953,103 @@ var docxLayout = (function(exports) {
return walk(id, /* @__PURE__ */ new Set());
};
/**
- * The parts of run formatting that change the font text is measured in.
+ * A share of a size in points, to the nearest half-point, and down from a quarter, as Word draws superscript and small
+ * capitals: superscript is 3 points at 5, 9.5 at 15 and 16 at 25 (scripts/layout-probes/word-run-formatting.ts RF1)
*/
- var fontOf = ({ font, size, bold, italic, kerning, characterSpacing, scale }) => withoutUndefined({
+ var nearestHalfPoint = (size, share) => Math.ceil(size * 2 * share - .5 - ROUNDING) / 2;
+ /**
+ * Text in superscript or subscript, drawn smaller, in a line of its own size: a superscript or subscript doesn't make a line
+ * of its size taller, though Word raises its top above the line's (scripts/layout-probes/word-watertight-text.ts TX1a)
+ */
+ var scripted = (font, { verticalAlign }) => {
+ var _font$size;
+ if (verticalAlign !== "superscript" && verticalAlign !== "subscript") return font;
+ const size = (_font$size = font.size) !== null && _font$size !== void 0 ? _font$size : 10;
+ return _objectSpread2(_objectSpread2({}, font), {}, {
+ size: nearestHalfPoint(size, SCRIPT_SCALE),
+ lineSize: size
+ });
+ };
+ var BORDER_WIDTHS = _objectSpread2(_objectSpread2({}, Object.fromEntries([
+ "single",
+ "thick",
+ "dotted",
+ "dashed",
+ "dotDash",
+ "dotDotDash",
+ "dashSmallGap",
+ "inset",
+ "outset"
+ ].map((style) => [style, (size) => size]))), {}, {
+ double: (size) => 3 * size,
+ triple: (size) => 5 * size,
+ wave: () => 24,
+ dashDotStroked: () => 24,
+ doubleWave: () => 42
+ }, Object.fromEntries([
+ ["thinThickSmallGap", 12],
+ ["thickThinSmallGap", 12],
+ ["threeDEmboss", 12],
+ ["threeDEngrave", 12],
+ ["thinThickThinSmallGap", 24]
+ ].map(([style, more]) => [style, (size) => size >= 4 && size <= 18 ? size + more : void 0])));
+ /**
+ * How wide a run's border is as Word draws it, in eighths of a point: as a paragraph's of its style. A border of no style
+ * ("none") takes its space still, but no width (scripts/layout-probes/word-run-formatting.ts RF7h). Undefined when Word
+ * hasn't been seen to draw it.
+ */
+ var runBorderWidth = ({ style, size, space, shadow, frame }) => {
+ var _BORDER_WIDTHS$style;
+ if (shadow || frame || space > 31) return;
+ return style === "none" || size === void 0 || size < 2 || size > 96 ? style === "none" ? 0 : void 0 : (_BORDER_WIDTHS$style = BORDER_WIDTHS[style]) === null || _BORDER_WIDTHS$style === void 0 ? void 0 : _BORDER_WIDTHS$style.call(BORDER_WIDTHS, size);
+ };
+ /**
+ * The room a run's border takes, beside the run and above and below it: its space and its width, as Word gives it room (a
+ * single border of half a point 4 points away takes 90 twips on each side and above and below, RF7a). Undefined when it
+ * takes none, as one of "nil" takes none at all (word-run-formatting2.ts RF12), and when how much isn't known: see
+ * {@link unknownRunFormatting}.
+ */
+ var textBorderOf = (border) => {
+ const width = border === void 0 || border.style === "nil" ? void 0 : runBorderWidth(border);
+ const room = width === void 0 ? 0 : width / EIGHTHS_PER_POINT$2 + border.space;
+ return room > 0 ? {
+ room,
+ key: border.key
+ } : void 0;
+ };
+ var EMPHASIS = {
+ dot: "above",
+ comma: "above",
+ circle: "above",
+ underDot: "below"
+ };
+ var plainFontOf = ({ font, size, bold, italic, kerning, characterSpacing, scale, position, border, emphasisMark }) => withoutUndefined({
font,
size,
bold,
italic,
kerning,
characterSpacing,
- scale
+ scale,
+ raise: position === 0 ? void 0 : position,
+ border: textBorderOf(border),
+ emphasis: emphasisMark === void 0 ? void 0 : EMPHASIS[emphasisMark]
});
/**
+ * Why a run's formatting can't be laid out as Word lays it out, when it can't: a border of a style, width or space Word
+ * hasn't been seen to draw, or with a shadow or drawn as a frame, and emphasis marks of a kind the schema doesn't have.
+ */
+ var unknownRunFormatting = ({ border, emphasisMark }) => {
+ if (border !== void 0 && border.style !== "nil" && (border.shadow || border.frame)) return "a run border with a shadow or drawn as a frame";
+ if (border !== void 0 && border.style !== "nil" && runBorderWidth(border) === void 0) return "a run border of a style, width or space not yet followed";
+ return emphasisMark === void 0 || emphasisMark === "none" || EMPHASIS[emphasisMark] !== void 0 ? void 0 : "emphasis marks of a kind that isn't known";
+ };
+ /**
+ * The parts of run formatting that change the font text is measured in: its font, size, boldness, character spacing and
+ * scale, superscript and subscript, which draw it smaller, how far it is raised, its border, and its emphasis marks.
+ */
+ var fontOf = (format) => scripted(plainFontOf(format), format);
+ /**
* Which of a run's fonts Word draws a character in: the font for complex scripts, in their size, boldness and italics, for
* all of a run that is right to left or of a complex script; the East Asian font for Chinese, Japanese and Korean; the
* run's font for the rest. Hebrew in a run that isn't right to left is in the run's size, as Word lays it out. A mark is
@@ -967,15 +1066,15 @@ var docxLayout = (function(exports) {
* italics, and Word's defaults where the run doesn't give them.
*/
var fontOfSlot = (format, slot) => {
- const font = fontOf(format);
- if (slot === "latin") return font;
+ const font = plainFontOf(format);
+ if (slot === "latin") return scripted(font, format);
const { eastAsiaFont, complexScriptFont, complexScriptSize, complexScriptBold, complexScriptItalic } = format;
- return slot === "eastAsian" ? _objectSpread2(_objectSpread2({}, font), {}, { font: isEastAsianFont(eastAsiaFont) ? eastAsiaFont : FALLBACK_EAST_ASIAN_FONT }) : withoutUndefined(_objectSpread2(_objectSpread2({}, font), {}, {
+ return scripted(slot === "eastAsian" ? _objectSpread2(_objectSpread2({}, font), {}, { font: isEastAsianFont(eastAsiaFont) ? eastAsiaFont : FALLBACK_EAST_ASIAN_FONT }) : withoutUndefined(_objectSpread2(_objectSpread2({}, font), {}, {
font: complexScriptFont,
size: complexScriptSize,
bold: complexScriptBold,
italic: complexScriptItalic
- }));
+ })), format);
};
/**
* A span of text in its formatting: in the run's font for its script, capitals for all caps, and smaller capitals for the
@@ -997,10 +1096,14 @@ var docxLayout = (function(exports) {
text: character
}];
}, []).flatMap(({ slot, text: part }) => {
- var _font$size;
+ var _font$size2, _font$lineSize;
const font = fontOfSlot(format, slot);
if (allCaps || !smallCaps) return [_objectSpread2(_objectSpread2({}, font), {}, { text: allCaps ? part.toUpperCase() : part })];
- const small = _objectSpread2(_objectSpread2({}, font), {}, { size: ((_font$size = font.size) !== null && _font$size !== void 0 ? _font$size : 10) * SMALL_CAPS_SCALE });
+ const size = (_font$size2 = font.size) !== null && _font$size2 !== void 0 ? _font$size2 : 10;
+ const small = _objectSpread2(_objectSpread2({}, font), {}, {
+ size: nearestHalfPoint(size, SMALL_CAPS_SCALE),
+ lineSize: (_font$lineSize = font.lineSize) !== null && _font$lineSize !== void 0 ? _font$lineSize : size
+ });
return part.split(new RegExp("(\\p{Ll}+)", "u")).filter((piece) => piece.length > 0).map((piece) => new RegExp("^\\p{Ll}", "u").test(piece) ? _objectSpread2(_objectSpread2({}, small), {}, { text: piece.toUpperCase() }) : _objectSpread2(_objectSpread2({}, font), {}, { text: piece }));
});
};
@@ -1010,6 +1113,28 @@ var docxLayout = (function(exports) {
*/
var isEastAsianRun = ({ eastAsiaFont, eastAsianLanguage }) => isEastAsianFont(eastAsiaFont) || kinsokuLanguageOf(eastAsianLanguage) !== void 0;
//#endregion
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/objectWithoutPropertiesLoose.js
+ function _objectWithoutPropertiesLoose(r, e) {
+ if (null == r) return {};
+ var t = {};
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
+ if (e.includes(n)) continue;
+ t[n] = r[n];
+ }
+ return t;
+ }
+ //#endregion
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/objectWithoutProperties.js
+ function _objectWithoutProperties(e, t) {
+ if (null == e) return {};
+ var o, r, i = _objectWithoutPropertiesLoose(e, t);
+ if (Object.getOwnPropertySymbols) {
+ var s = Object.getOwnPropertySymbols(e);
+ for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
+ }
+ return i;
+ }
+ //#endregion
//#region src/text-layout/line-breaking.ts
/**
* Breaks a paragraph into lines as Word breaks it, for laying out pages: where each line wraps, how tall it is, and
@@ -1022,6 +1147,7 @@ var docxLayout = (function(exports) {
*
* @module
*/
+ var _excluded$1 = ["unsupported"];
var DEFAULT_MEASURER = {
measureWidth: (text, font) => measureTextWidth(text, font),
measureLineHeight,
@@ -1146,15 +1272,30 @@ var docxLayout = (function(exports) {
return Object.keys(first).length === Object.keys(second).length && Object.entries(first).every(([key, value]) => second[key] === value);
};
/**
- * How wide pieces of text are. Pieces next to each other in the same font, and kerned, are measured together, so the pairs
- * of characters across them are kerned, as Word kerns them across runs (word-fonts.docx F4). Others are measured
- * apart, as a measurer may measure a piece, such as a page number, differently on its own.
+ * The room borders take between text in one and text in another: the end of the one's box and the start of the other's.
+ * Text next to text with the same border is in one box with it, with no room between: two runs with the same border are
+ * as wide as one, and two with borders of other widths or colours are each in a box of their own
+ * (scripts/layout-probes/word-run-formatting.ts RF7i, RF7k, word-run-formatting2.ts RF12)
+ */
+ var roomBetween = (before, after) => {
+ var _before$room, _after$room;
+ return (before === null || before === void 0 ? void 0 : before.key) === (after === null || after === void 0 ? void 0 : after.key) ? 0 : ((_before$room = before === null || before === void 0 ? void 0 : before.room) !== null && _before$room !== void 0 ? _before$room : 0) + ((_after$room = after === null || after === void 0 ? void 0 : after.room) !== null && _after$room !== void 0 ? _after$room : 0);
+ };
+ /** The border of the start or end of pieces of text */
+ var firstBorder = (pieces) => pieces[0].font.border;
+ var lastBorder = (pieces) => pieces[pieces.length - 1].font.border;
+ /**
+ * How wide pieces of text are, with the room of the borders between them. Pieces next to each other in the same font, and
+ * kerned, are measured together, so the pairs of characters across them are kerned, as Word kerns them across runs
+ * (word-fonts.docx F4). Others are measured apart, as a measurer may measure a piece, such as a page number, differently on
+ * its own.
*/
var widthOf = (pieces, measurer) => {
if (pieces.length === 0) return 0;
let total = 0;
let [{ text, font }] = pieces;
for (const piece of pieces.slice(1)) {
+ total += roomBetween(font.border, piece.font.border);
if (isKerned(font) && sameFont(font, piece.font)) {
text += piece.text;
continue;
@@ -1173,21 +1314,57 @@ var docxLayout = (function(exports) {
};
/** The heights of a line, with text in this font on it too */
var withFont = (heights, font, measurer) => {
+ var _border$room;
const line = measurer.measureLineHeight(font);
const descent = measurer.measureDescent(font);
+ const { raise = 0, border, emphasis } = font;
+ const room = (_border$room = border === null || border === void 0 ? void 0 : border.room) !== null && _border$room !== void 0 ? _border$room : 0;
return _objectSpread2(_objectSpread2({}, heights), {}, {
- ascent: Math.max(heights.ascent, line - descent),
- descent: Math.max(heights.descent, descent),
- tallest: Math.max(heights.tallest, line)
- });
+ ascent: Math.max(heights.ascent, Math.max(0, line - descent + raise) + room),
+ descent: Math.max(heights.descent, Math.max(0, descent - raise) + room),
+ tallest: Math.max(heights.tallest, line + 2 * room)
+ }, emphasis === void 0 ? {} : { marks: _objectSpread2(_objectSpread2({}, heights.marks), {}, { [emphasis]: true }) });
+ };
+ var MARKS_OVER_SPACING = .1916;
+ var MARKS_IN_SPACING = .3405;
+ /**
+ * How tall a line with emphasis marks is: a quarter of the line more, over its text or under it, whatever the font and
+ * the size of the text they are on: 67.14 twips in a line of Calibri 11 and 122 of Calibri 20, 57.5 of Times New Roman 10
+ * and 63.25 of Arial 11, and 67.14 still for marks on a word of 7 points, or on a space, in a line of Calibri 11
+ * (scripts/layout-probes/word-run-formatting.ts RF6, word-watertight-text.ts TX15). A line taller than its fonts' own
+ * lines takes a quarter of itself: 616.95 for marks on Courier New 20 in a line of Times New Roman 20, and 485.69 for a
+ * line with a word raised 6 points (word-run-formatting2.ts RF10). Line spacing that adds a little room adds it below the
+ * marks' room, and spacing that adds enough holds the marks
+ */
+ var markedHeightOf = ({ tallest, picture, marks }, natural, spacing) => {
+ const room = natural / 4;
+ if (marks.above && marks.below) return {
+ height: natural + room,
+ unsupported: "emphasis marks over and under text on one line"
+ };
+ if (picture > 0) return {
+ height: natural + room,
+ unsupported: "emphasis marks on a line with a picture"
+ };
+ if (spacing === void 0 || spacing.rule === "exact") return { height: spacing === void 0 ? natural + room : spacing.height };
+ const extra = spacing.rule === "multiple" ? (spacing.multiple - 1) * tallest : Math.max(0, spacing.height - natural);
+ const share = extra / natural;
+ if (!(extra >= 0 && (extra === 0 || Math.abs(natural - tallest) <= TOLERANCE$1) && (share <= MARKS_OVER_SPACING || share >= MARKS_IN_SPACING))) return {
+ height: natural + room,
+ unsupported: "emphasis marks on a line whose line spacing Word hasn't shown with them"
+ };
+ const below = spacing.rule === "multiple" ? share <= MARKS_OVER_SPACING ? extra : extra - room : 0;
+ return _objectSpread2({ height: natural + extra + (share <= MARKS_OVER_SPACING ? room : 0) }, below > 0 ? { spacingBelow: below } : {});
};
/**
* How tall a line is, with the paragraph's line spacing, and how much of that multiple spacing adds below its text. Word
* doesn't round it: Calibri 11 is 268.55 twips, and 289.82 at 259 twips' multiple spacing, where LibreOffice rounds them
* to whole twips, 269 and 290.
*/
- var heightOf = ({ ascent, descent, tallest, picture }, spacing) => {
+ var heightOf = (heights, spacing) => {
+ const { ascent, descent, tallest, picture, marks } = heights;
const natural = Math.max(Math.max(picture, ascent) + descent, tallest);
+ if (marks !== void 0) return markedHeightOf(heights, natural, spacing);
if (spacing === void 0) return { height: natural };
if (spacing.rule !== "multiple") return { height: spacing.rule === "exact" ? spacing.height : Math.max(natural, spacing.height) };
const spacingBelow = (spacing.multiple - 1) * tallest;
@@ -1211,14 +1388,32 @@ var docxLayout = (function(exports) {
* stop. Spaces at its end aren't counted.
*/
var widthAfterTab = (tokens, measurer) => {
- const next = tokens.findIndex((token) => token.type === "tab");
- const text = next === -1 ? tokens : tokens.slice(0, next);
+ const text = textAfterTab(tokens);
const lastWord = text.findLastIndex((token) => token.type !== "space" && token.type !== "marker");
- return text.slice(0, lastWord + 1).reduce((total, token) => {
- if (token.type === "box") return total + token.width;
- return token.type === "word" || token.type === "space" ? total + widthOf(token.pieces, measurer) : total;
- }, 0);
+ return text.slice(0, lastWord + 1).reduce(({ total, border }, token) => {
+ if (token.type === "box") return {
+ total: total + roomBetween(border, void 0) + token.width,
+ border: void 0
+ };
+ return token.type === "word" || token.type === "space" ? {
+ total: total + roomBetween(border, firstBorder(token.pieces)) + widthOf(token.pieces, measurer),
+ border: lastBorder(token.pieces)
+ } : {
+ total,
+ border
+ };
+ }, {
+ total: 0,
+ border: void 0
+ }).total;
};
+ /** The tokens after a tab, up to the next tab or the end of the part */
+ var textAfterTab = (tokens) => {
+ const next = tokens.findIndex((token) => token.type === "tab");
+ return next === -1 ? tokens : tokens.slice(0, next);
+ };
+ /** Whether the text after a tab has a border */
+ var hasBorder = (tokens) => textAfterTab(tokens).some((token) => (token.type === "word" || token.type === "space") && token.pieces.some(({ font }) => font.border));
/**
* A paragraph's tab stops in order, and those of its first line, where a hanging indent is a stop too.
*/
@@ -1244,33 +1439,42 @@ var docxLayout = (function(exports) {
const { indentLeft = 0, indentRight = 0, firstLineIndent = 0 } = format;
const { stops, firstLineStops } = stopsOf(tabStops, format);
return segmentsOf(items, rulesOf(format, breakRules)).reduce((widths, { tokens }, segmentIndex) => {
+ var _endBorder$room;
const first = segmentIndex === 0;
let position = indentLeft + (first ? firstLineIndent : 0);
let end = position;
let { min } = widths;
+ let border;
+ let endBorder;
for (const [index, token] of tokens.entries()) {
+ var _border$room2, _firstBorder$room, _firstBorder;
if (token.type === "marker") continue;
if (token.type === "space") {
- position += widthOf(token.pieces, measurer);
+ position += roomBetween(border, firstBorder(token.pieces)) + widthOf(token.pieces, measurer);
+ border = lastBorder(token.pieces);
continue;
}
+ const lead = token.type === "word" ? roomBetween(border, firstBorder(token.pieces)) : roomBetween(border, void 0);
+ border = token.type === "word" ? lastBorder(token.pieces) : void 0;
+ endBorder = border;
if (token.type === "tab") {
- const stop = nextStop(position, first ? firstLineStops : stops, defaultTabStop, Infinity);
+ const stop = nextStop(position + lead, first ? firstLineStops : stops, defaultTabStop, Infinity);
const after = widthAfterTab(tokens.slice(index + 1), measurer);
const shift = stop.alignment === "left" ? 0 : stop.alignment === "center" ? after / 2 : after;
- position = Math.max(position, stop.position - shift);
+ position = Math.max(position + lead, stop.position - shift);
end = position;
continue;
}
const tokenWidth = token.type === "box" ? token.width : widthOf(token.pieces, measurer);
- const start = end === indentLeft + (first ? firstLineIndent : 0) ? position : indentLeft;
- min = Math.max(min, start + tokenWidth + indentRight);
- position += tokenWidth;
+ const close = (_border$room2 = border === null || border === void 0 ? void 0 : border.room) !== null && _border$room2 !== void 0 ? _border$room2 : 0;
+ const start = end === indentLeft + (first ? firstLineIndent : 0) ? position + lead : indentLeft + (token.type === "word" ? (_firstBorder$room = (_firstBorder = firstBorder(token.pieces)) === null || _firstBorder === void 0 ? void 0 : _firstBorder.room) !== null && _firstBorder$room !== void 0 ? _firstBorder$room : 0 : 0);
+ min = Math.max(min, start + tokenWidth + close + indentRight);
+ position += lead + tokenWidth;
end = position;
}
return {
min,
- max: Math.max(widths.max, min, end + indentRight)
+ max: Math.max(widths.max, min, end + ((_endBorder$room = endBorder === null || endBorder === void 0 ? void 0 : endBorder.room) !== null && _endBorder$room !== void 0 ? _endBorder$room : 0) + indentRight)
};
}, {
min: 0,
@@ -1357,12 +1561,14 @@ var docxLayout = (function(exports) {
first
};
const finish = (state, breakAfter) => {
- const heights = state.started ? state.heights : withFont(NOTHING, markFont, measurer);
- const unsupported = state.unknown ? "a justified line that only fits squeezed at an en, em or ideographic space" : markMatters(heights) ? "a picture alone in a line of a paragraph whose mark is larger" : void 0;
- lines.push(_objectSpread2(_objectSpread2(_objectSpread2({}, heightOf(heights, lineSpacing)), {}, { markers: [...state.markers, ...state.pending] }, breakAfter ? { breakAfter } : {}), {}, {
+ var _state$unsupported;
+ const heights = state.started ? state.heights : withFont(NOTHING, _objectSpread2(_objectSpread2({}, markFont), {}, { border: void 0 }), measurer);
+ const _heightOf = heightOf(heights, lineSpacing), { unsupported: unknownHeight } = _heightOf, height = _objectWithoutProperties(_heightOf, _excluded$1);
+ const unsupported = state.unknown ? "a justified line that only fits squeezed at an en, em or ideographic space" : (_state$unsupported = state.unsupported) !== null && _state$unsupported !== void 0 ? _state$unsupported : markMatters(heights) ? "a picture alone in a line of a paragraph whose mark is larger" : unknownHeight;
+ lines.push(_objectSpread2(_objectSpread2(_objectSpread2({}, height), {}, { markers: [...state.markers, ...state.pending] }, breakAfter ? { breakAfter } : {}), {}, {
text: state.text,
textWidth: Math.max(0, state.end - state.start)
- }, unsupported ? { unsupported } : {}));
+ }, unsupported === void 0 ? {} : { unsupported }));
};
const wrap = (state) => {
finish(_objectSpread2(_objectSpread2({}, state), {}, { pending: [] }));
@@ -1389,6 +1595,7 @@ var docxLayout = (function(exports) {
pending: []
});
for (const [index, token] of tokens.entries()) {
+ var _lastBorder$room, _lastBorder;
if (token.type === "marker") {
line = _objectSpread2(_objectSpread2({}, line), {}, { pending: [...line.pending, token.name] });
continue;
@@ -1396,15 +1603,20 @@ var docxLayout = (function(exports) {
if (token.type === "space") {
const spaces = widthOf(token.pieces, measurer);
line = _objectSpread2(_objectSpread2({}, line), {}, {
- position: line.position + spaces,
+ position: line.position + roomBetween(line.border, firstBorder(token.pieces)) + spaces,
text: line.text + textOf(token.pieces),
spaces: line.started ? line.spaces + spaces : 0,
spaceCount: line.started ? line.spaceCount + lengthOf(token.pieces) : 0,
otherSpaces: line.started ? line.otherSpaces + widthOf(othersOf(token.pieces), measurer) : 0,
- heights: withToken(line.heights, token)
+ heights: withToken(line.heights, token),
+ border: lastBorder(token.pieces)
});
continue;
}
+ line = token.type === "word" ? line : _objectSpread2(_objectSpread2({}, line), {}, {
+ position: line.position + roomBetween(line.border, void 0),
+ border: void 0
+ });
if (token.type === "tab") {
var _nextStop;
const stop = (_nextStop = nextStop(line.position, line.first ? firstLineStops : stops, defaultTabStop, limitOf())) !== null && _nextStop !== void 0 ? _nextStop : line.started ? nextStop(indentLeft, stops, defaultTabStop, limitOf(lines.length + 1)) : void 0;
@@ -1433,17 +1645,24 @@ var docxLayout = (function(exports) {
letters: 0,
otherSpaces: 0,
started: true
- });
+ }, shift > 0 && hasBorder(tokens.slice(index + 1)) ? { unsupported: "text with a border lined up with a tab stop" } : {});
continue;
}
const tokenWidth = token.type === "box" ? token.width : widthOf(token.pieces, measurer);
- const overflows = line.started && line.position + tokenWidth > limitOf() + TOLERANCE$1;
- if (overflows && unsure(line, tokenWidth)) line = _objectSpread2(_objectSpread2({}, line), {}, { unknown: true });
- const squeezed = overflows && !line.unknown && squeezesIn(line, tokenWidth);
+ const leadOf = (state) => token.type === "word" ? roomBetween(state.border, firstBorder(token.pieces)) : 0;
+ const boxEnd = token.type === "word" ? (_lastBorder$room = (_lastBorder = lastBorder(token.pieces)) === null || _lastBorder === void 0 ? void 0 : _lastBorder.room) !== null && _lastBorder$room !== void 0 ? _lastBorder$room : 0 : 0;
+ const needs = leadOf(line) + tokenWidth + boxEnd;
+ const overflows = line.started && line.position + needs > limitOf() + TOLERANCE$1;
+ if (overflows && unsure(line, needs)) line = _objectSpread2(_objectSpread2({}, line), {}, { unknown: true });
+ const squeezable = overflows && !line.unknown && squeezesIn(line, needs);
+ const boxed = line.boxed === true || token.type === "word" && token.pieces.some(({ font }) => font.border !== void 0);
+ if (squeezable && boxed) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a justified line with text in a border that only fits squeezed" });
+ const squeezed = squeezable && !boxed;
if (overflows && !squeezed) line = wrap(line);
- line = place(line);
+ line = _objectSpread2(_objectSpread2({}, place(line)), {}, { position: line.position + leadOf(line) });
if (token.type === "word" && !squeezed && line.position + tokenWidth > limitOf() + TOLERANCE$1 && limitOf() - indentLeft > 0) {
let placed = false;
+ if (token.pieces.some(({ font }) => font.border !== void 0)) line = _objectSpread2(_objectSpread2({}, line), {}, { unsupported: "a word longer than its line with a border" });
for (const character of charactersOf(token.pieces)) {
const characterWidth = widthOf(character, measurer);
if (placed && line.position + characterWidth > limitOf() + TOLERANCE$1 && limitOf(lines.length + 1) - indentLeft > 0) line = wrap(_objectSpread2(_objectSpread2({}, line), {}, {
@@ -1471,7 +1690,9 @@ var docxLayout = (function(exports) {
end: line.position,
between: line.spaceCount,
heights: withToken(line.heights, token),
- started: true
+ started: true,
+ border: token.type === "word" ? lastBorder(token.pieces) : void 0,
+ boxed: line.boxed === true || token.type === "word" && token.pieces.some(({ font }) => font.border !== void 0)
});
}
if (!end) finish(line);
@@ -1840,14 +2061,14 @@ var docxLayout = (function(exports) {
return text.split(" ").reduce((position, part, index) => (index === 0 ? 0 : (Math.floor(position / TAB_STOP$1) + 1) * TAB_STOP$1) + widthIn(face, part, font), 0);
},
measureLineHeight: (font) => {
- var _font$size;
+ var _ref2, _font$lineSize;
const face = faceOf(font);
- return face ? face.lineHeight * ((_font$size = font.size) !== null && _font$size !== void 0 ? _font$size : 10) : fallback.measureLineHeight(font);
+ return face ? face.lineHeight * ((_ref2 = (_font$lineSize = font.lineSize) !== null && _font$lineSize !== void 0 ? _font$lineSize : font.size) !== null && _ref2 !== void 0 ? _ref2 : 10) : fallback.measureLineHeight(font);
},
measureDescent: (font) => {
- var _font$size2;
+ var _ref3, _font$lineSize2;
const face = faceOf(font);
- return face ? face.descent * ((_font$size2 = font.size) !== null && _font$size2 !== void 0 ? _font$size2 : 10) : fallback.measureDescent(font);
+ return face ? face.descent * ((_ref3 = (_font$lineSize2 = font.lineSize) !== null && _font$lineSize2 !== void 0 ? _font$lineSize2 : font.size) !== null && _ref3 !== void 0 ? _ref3 : 10) : fallback.measureDescent(font);
},
unknownCharacter: (text, font) => {
var _fallback$unknownChar;
@@ -4727,28 +4948,6 @@ var docxLayout = (function(exports) {
});
};
//#endregion
- //#region \0@oxc-project+runtime@0.150.0/helpers/esm/objectWithoutPropertiesLoose.js
- function _objectWithoutPropertiesLoose(r, e) {
- if (null == r) return {};
- var t = {};
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
- if (e.includes(n)) continue;
- t[n] = r[n];
- }
- return t;
- }
- //#endregion
- //#region \0@oxc-project+runtime@0.150.0/helpers/esm/objectWithoutProperties.js
- function _objectWithoutProperties(e, t) {
- if (null == e) return {};
- var o, r, i = _objectWithoutPropertiesLoose(e, t);
- if (Object.getOwnPropertySymbols) {
- var s = Object.getOwnPropertySymbols(e);
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
- }
- return i;
- }
- //#endregion
//#region src/layout/read-document.ts
var _excluded = ["text"];
var _excluded2 = [
@@ -4829,19 +5028,15 @@ var docxLayout = (function(exports) {
bookmarks: bookmarksIn(elements.slice(index === 0 ? 0 : indexes[index - 1] + 1, at))
}));
};
- var SUPERSCRIPT_WIDTH = .65;
/**
- * The number of a footnote or endnote, at its reference or at the start of the note: as narrow as superscript, and as tall
- * as its font, as LibreOffice lays it out.
+ * The number of a footnote or endnote, at its reference or at the start of the note, in its run's font: in superscript
+ * where its style has it, as docx's FootnoteReference and EndnoteReference do.
*/
- var noteNumber = (text, font) => {
- var _font$scale;
- return {
- type: "text",
- text,
- font: _objectSpread2(_objectSpread2({}, font), {}, { scale: ((_font$scale = font.scale) !== null && _font$scale !== void 0 ? _font$scale : 100) * SUPERSCRIPT_WIDTH })
- };
- };
+ var noteNumber = (text, font) => ({
+ type: "text",
+ text,
+ font
+ });
/** A length in points, from twips or from a universal measure, such as "1in" */
var twips = (value) => pointsOf(value, 20);
/** Whether a field's switches give its number a format of its own, such as `\* roman`, or a picture, such as `\# "00"` */
@@ -4939,7 +5134,7 @@ var docxLayout = (function(exports) {
* Reads a run (`w:r`) in the paragraph's formatting, as its character style and its own formatting change it.
*/
var readRun = (element, paragraphRun, reader) => {
- var _valueOf;
+ var _valueOf, _unsupportedFormatOf;
const { styles } = reader;
const children = contentOf$2(element).filter(isObject);
const properties = find(children, "w:rPr");
@@ -4949,7 +5144,7 @@ var docxLayout = (function(exports) {
readRunFormat(properties, styles.themeFonts)
]);
const font = fontOf(format);
- const unsupportedFormat = unsupportedFormatOf(childrenOf(properties));
+ const unsupportedFormat = (_unsupportedFormatOf = unsupportedFormatOf(childrenOf(properties))) !== null && _unsupportedFormatOf !== void 0 ? _unsupportedFormatOf : format.hidden ? void 0 : unknownRunFormatting(format);
const items = children.map((child) => {
const name = nameOf(child);
if (name === "w:fldChar") return readFieldCharacter(child, font, reader);
@@ -4961,19 +5156,23 @@ var docxLayout = (function(exports) {
if (!isShown(reader) || name === "w:rPr") return [];
if (unsupportedFormat !== void 0) return unsupportedFormat;
switch (name) {
- case "w:t": return contentOf$2(child).filter((part) => typeof part === "string").join("").split(" ").flatMap((part, index) => [...index > 0 && !format.hidden ? [{
- type: "tab",
- font
- }] : [], ...(part.length === 0 ? [] : spansOf(part, format)).map((_ref) => {
- let { text } = _ref;
- return _objectSpread2(_objectSpread2({
- type: "text",
- text,
- font: _objectWithoutProperties(_ref, _excluded)
- }, format.eastAsianLanguage === void 0 ? {} : { language: format.eastAsianLanguage }), isEastAsianRun(format) ? { eastAsian: true } : {});
- })]);
+ case "w:t": {
+ const content = contentOf$2(child).filter((part) => typeof part === "string").join("");
+ if (font.border && !format.hidden && content.includes(" ")) return "a tab in text with a border";
+ return content.split(" ").flatMap((part, index) => [...index > 0 && !format.hidden ? [{
+ type: "tab",
+ font
+ }] : [], ...(part.length === 0 ? [] : spansOf(part, format)).map((_ref) => {
+ let { text } = _ref;
+ return _objectSpread2(_objectSpread2({
+ type: "text",
+ text,
+ font: _objectWithoutProperties(_ref, _excluded)
+ }, format.eastAsianLanguage === void 0 ? {} : { language: format.eastAsianLanguage }), isEastAsianRun(format) ? { eastAsian: true } : {});
+ })]);
+ }
case "w:tab":
- case "w:ptab": return format.hidden ? [] : [{
+ case "w:ptab": return format.hidden ? [] : font.border ? "a tab in text with a border" : [{
type: "tab",
font
}];
@@ -5015,7 +5214,7 @@ var docxLayout = (function(exports) {
}
case "w:footnoteRef":
case "w:endnoteRef": return reader.noteNumber === void 0 ? [] : [noteNumber(reader.noteNumber, font)];
- case "w:drawing": return readDrawing(child, font, reader);
+ case "w:drawing": return font.border ? "a picture in text with a border" : readDrawing(child, font, reader);
case "mc:AlternateContent": {
const choice = childrenOf(child["mc:AlternateContent"]).find((option) => "mc:Choice" in option);
return choice ? readRun({ "w:r": [...childrenOf(choice["mc:Choice"])] }, paragraphRun, reader) : [];
@@ -5163,32 +5362,6 @@ var docxLayout = (function(exports) {
return _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, spaced), right), leftChars === 0 ? {} : { indentLeft: characters(leftChars, mark) }), firstLineChars === 0 ? {} : { firstLineIndent: characters(firstLineChars, first) });
};
var NO_BORDER = /* @__PURE__ */ new Set(["none", "nil"]);
- var BORDER_WIDTHS = _objectSpread2(_objectSpread2({}, Object.fromEntries([
- "single",
- "thick",
- "dotted",
- "dashed",
- "dotDash",
- "dotDotDash",
- "dashSmallGap",
- "inset",
- "outset"
- ].map((style) => [style, (size) => size]))), {}, {
- double: (size) => 3 * size,
- triple: (size) => 5 * size,
- wave: () => 24,
- dashDotStroked: () => 24,
- doubleWave: () => 42
- }, Object.fromEntries([
- ["thinThickSmallGap", 12],
- ["thickThinSmallGap", 12],
- ["threeDEmboss", 12],
- ["threeDEngrave", 12],
- ["thinThickThinSmallGap", 24]
- ].map(([style, more]) => [style, (size) => size >= 6 && size <= 18 ? size + more : void 0])));
- var NARROWEST_BORDER = 2;
- var WIDEST_BORDER = 96;
- var FURTHEST_BORDER = 31;
/**
* The room a border of a paragraph takes, in points: its width and the space between it and the text, or why it isn't
* known. A shadow doubles a single line (B6)
@@ -5197,7 +5370,7 @@ var docxLayout = (function(exports) {
if (border === void 0 || NO_BORDER.has(border.style)) return 0;
const style = BORDER_WIDTHS[border.style];
if (style === void 0 || border.frame || border.shadow && border.style !== "single") return "a paragraph border of a style not yet followed";
- const width = border.size === void 0 || border.size < NARROWEST_BORDER || border.size > WIDEST_BORDER || border.space > FURTHEST_BORDER ? void 0 : style(border.size);
+ const width = border.size === void 0 || border.size < 2 || border.size > 96 || border.space > 31 ? void 0 : style(border.size);
return width === void 0 ? "a paragraph border of a width or space not yet followed" : (border.shadow ? 2 : 1) * width / EIGHTHS_PER_POINT + border.space;
};
/**
diff --git a/live-examples/lib/shapes.iife.js b/live-examples/lib/shapes.iife.js
index 41441fc624..fa279b99eb 100644
--- a/live-examples/lib/shapes.iife.js
+++ b/live-examples/lib/shapes.iife.js
@@ -3641,6 +3641,10 @@ var docxShapes = (function(exports, docx) {
return isWide(code) || FULL_WIDTH_SYMBOLS.has(character) || code >= 8592 && code <= 9983 ? 1e3 : 500;
};
var sizeOf$1 = ({ size = 10 }) => size;
+ var lineSizeOf = (font) => {
+ var _font$lineSize;
+ return (_font$lineSize = font.lineSize) !== null && _font$lineSize !== void 0 ? _font$lineSize : sizeOf$1(font);
+ };
/**
* How a font's characters are measured: an East Asian font's Latin letters with the widths of the font in the table they
* are measured as, or all of a monospaced one's as half an em or an em, and other fonts with their own widths, or those of
@@ -3671,7 +3675,7 @@ var docxShapes = (function(exports, docx) {
*/
var measureLineHeight = (font = {}) => {
var _eastAsianFontOf, _font$font2;
- return ((_eastAsianFontOf = eastAsianFontOf((_font$font2 = font.font) !== null && _font$font2 !== void 0 ? _font$font2 : "Times New Roman")) !== null && _eastAsianFontOf !== void 0 ? _eastAsianFontOf : widthsOf(font.font)).lineHeight * sizeOf$1(font) / 1e3;
+ return ((_eastAsianFontOf = eastAsianFontOf((_font$font2 = font.font) !== null && _font$font2 !== void 0 ? _font$font2 : "Times New Roman")) !== null && _eastAsianFontOf !== void 0 ? _eastAsianFontOf : widthsOf(font.font)).lineHeight * lineSizeOf(font) / 1e3;
};
/**
* Splits spans into words and the spaces between them. A word can be made of pieces of several spans, such as a bold
@@ -3812,6 +3816,8 @@ var docxShapes = (function(exports, docx) {
themeFonts: OFFICE_THEME_FONTS
};
var SMALL_CAPS_SCALE = .8;
+ var SCRIPT_SCALE = .65;
+ var EIGHTHS_PER_POINT = 8;
var SINGLE_LINE = 240;
/**
* A context for formatting parts of the document to read them. Formatting paragraph properties that refer to a
@@ -3880,8 +3886,9 @@ var docxShapes = (function(exports, docx) {
/**
* Why how Word reads a length in formatted XML isn't known, when it isn't: a size in picas, which Word's PDFs didn't
* tell from one it ignores, or in another unit but points, which they showed it ignores only with no style giving a
- * size, and a negative length of a fraction of a centimeter or millimeter, whose minus sign and rounding together they
- * didn't show. Undefined when every length's reading is known.
+ * size, a negative length of a fraction of a centimeter or millimeter, and a lowered position (`w:position`) of a
+ * fraction of its unit, whose minus sign and rounding together they didn't show. Undefined when every length's reading
+ * is known.
*/
var unknownLengthIn = (element, name = "") => {
if (Array.isArray(element)) return element.reduce((found, child) => found !== null && found !== void 0 ? found : unknownLengthIn(child, name), void 0);
@@ -3892,7 +3899,9 @@ var docxShapes = (function(exports, docx) {
const measure = typeof value === "string" ? MEASURE.exec(value) : null;
if (reason !== void 0 || !measure) return reason;
const [, minus, , fraction, unit] = measure;
- return (name === "w:sz" || name === "w:szCs") && unit !== "pt" ? "a size given in a unit other than points" : minus && fraction && METRIC.has(unit) ? "a negative length of a fraction of a centimeter or millimeter" : void 0;
+ if ((name === "w:sz" || name === "w:szCs") && unit !== "pt") return "a size given in a unit other than points";
+ if (name === "w:position" && minus && fraction) return "a lowered position of a fraction of its unit";
+ return minus && fraction && METRIC.has(unit) ? "a negative length of a fraction of a centimeter or millimeter" : void 0;
}, void 0);
}, void 0);
};
@@ -3919,6 +3928,7 @@ var docxShapes = (function(exports, docx) {
if (theme.startsWith("major")) return themeFonts.headings;
return theme.startsWith("minor") ? themeFonts.body : void 0;
};
+ var readVerticalAlign = (value) => value === "superscript" || value === "subscript" ? value : value === void 0 ? void 0 : "baseline";
/**
* Reads run properties (`w:rPr`). A font of the theme (`w:asciiTheme`) takes the place of the font named beside it.
*/
@@ -3944,7 +3954,11 @@ var docxShapes = (function(exports, docx) {
complexScriptItalic: onOff(children, "w:iCs"),
rightToLeft: onOff(children, "w:rtl"),
complexScript: onOff(children, "w:cs"),
- eastAsianLanguage: stringOf(attributesOf(find(children, "w:lang"))["w:eastAsia"])
+ eastAsianLanguage: stringOf(attributesOf(find(children, "w:lang"))["w:eastAsia"]),
+ verticalAlign: readVerticalAlign(valueOf(children, "w:vertAlign")),
+ position: pointsOf(attributesOf(find(children, "w:position"))["w:val"], 2),
+ emphasisMark: valueOf(children, "w:em"),
+ border: readBorder(find(children, "w:bdr"))
});
};
var readLineSpacing = (spacing) => {
@@ -3999,9 +4013,9 @@ var docxShapes = (function(exports, docx) {
});
};
/**
- * Reads a border of a paragraph (`w:pBdr`), on one side.
+ * Reads a border of a paragraph (`w:pBdr`), on one side, or of a run (`w:bdr`).
*/
- var readParagraphBorder = (element) => {
+ var readBorder = (element) => {
var _stringOf, _numberOf;
if (element === void 0) return;
const attributes = attributesOf(element);
@@ -4027,7 +4041,7 @@ var docxShapes = (function(exports, docx) {
const twips = (...names) => names.map((name) => pointsOf(indent[name], 20)).find((value) => value !== void 0);
const chars = (...names) => names.map((name) => numberOf(indent[name])).find((value) => value !== void 0);
const automatic = (name) => spacing[name] === void 0 ? void 0 : !isOff(spacing[name]);
- const border = (...names) => names.map((name) => readParagraphBorder(find(borders, name))).find((value) => value !== void 0);
+ const border = (...names) => names.map((name) => readBorder(find(borders, name))).find((value) => value !== void 0);
const hanging = twips("w:hanging");
const hangingChars = chars("w:hangingChars");
return withoutUndefined({
@@ -4176,18 +4190,94 @@ var docxShapes = (function(exports, docx) {
return walk(id, /* @__PURE__ */ new Set());
};
/**
- * The parts of run formatting that change the font text is measured in.
+ * A share of a size in points, to the nearest half-point, and down from a quarter, as Word draws superscript and small
+ * capitals: superscript is 3 points at 5, 9.5 at 15 and 16 at 25 (scripts/layout-probes/word-run-formatting.ts RF1)
*/
- var fontOf = ({ font, size, bold, italic, kerning, characterSpacing, scale }) => withoutUndefined({
+ var nearestHalfPoint = (size, share) => Math.ceil(size * 2 * share - .5 - ROUNDING) / 2;
+ /**
+ * Text in superscript or subscript, drawn smaller, in a line of its own size: a superscript or subscript doesn't make a line
+ * of its size taller, though Word raises its top above the line's (scripts/layout-probes/word-watertight-text.ts TX1a)
+ */
+ var scripted = (font, { verticalAlign }) => {
+ var _font$size;
+ if (verticalAlign !== "superscript" && verticalAlign !== "subscript") return font;
+ const size = (_font$size = font.size) !== null && _font$size !== void 0 ? _font$size : 10;
+ return _objectSpread2(_objectSpread2({}, font), {}, {
+ size: nearestHalfPoint(size, SCRIPT_SCALE),
+ lineSize: size
+ });
+ };
+ var BORDER_WIDTHS = _objectSpread2(_objectSpread2({}, Object.fromEntries([
+ "single",
+ "thick",
+ "dotted",
+ "dashed",
+ "dotDash",
+ "dotDotDash",
+ "dashSmallGap",
+ "inset",
+ "outset"
+ ].map((style) => [style, (size) => size]))), {}, {
+ double: (size) => 3 * size,
+ triple: (size) => 5 * size,
+ wave: () => 24,
+ dashDotStroked: () => 24,
+ doubleWave: () => 42
+ }, Object.fromEntries([
+ ["thinThickSmallGap", 12],
+ ["thickThinSmallGap", 12],
+ ["threeDEmboss", 12],
+ ["threeDEngrave", 12],
+ ["thinThickThinSmallGap", 24]
+ ].map(([style, more]) => [style, (size) => size >= 4 && size <= 18 ? size + more : void 0])));
+ /**
+ * How wide a run's border is as Word draws it, in eighths of a point: as a paragraph's of its style. A border of no style
+ * ("none") takes its space still, but no width (scripts/layout-probes/word-run-formatting.ts RF7h). Undefined when Word
+ * hasn't been seen to draw it.
+ */
+ var runBorderWidth = ({ style, size, space, shadow, frame }) => {
+ var _BORDER_WIDTHS$style;
+ if (shadow || frame || space > 31) return;
+ return style === "none" || size === void 0 || size < 2 || size > 96 ? style === "none" ? 0 : void 0 : (_BORDER_WIDTHS$style = BORDER_WIDTHS[style]) === null || _BORDER_WIDTHS$style === void 0 ? void 0 : _BORDER_WIDTHS$style.call(BORDER_WIDTHS, size);
+ };
+ /**
+ * The room a run's border takes, beside the run and above and below it: its space and its width, as Word gives it room (a
+ * single border of half a point 4 points away takes 90 twips on each side and above and below, RF7a). Undefined when it
+ * takes none, as one of "nil" takes none at all (word-run-formatting2.ts RF12), and when how much isn't known: see
+ * {@link unknownRunFormatting}.
+ */
+ var textBorderOf = (border) => {
+ const width = border === void 0 || border.style === "nil" ? void 0 : runBorderWidth(border);
+ const room = width === void 0 ? 0 : width / EIGHTHS_PER_POINT + border.space;
+ return room > 0 ? {
+ room,
+ key: border.key
+ } : void 0;
+ };
+ var EMPHASIS = {
+ dot: "above",
+ comma: "above",
+ circle: "above",
+ underDot: "below"
+ };
+ var plainFontOf = ({ font, size, bold, italic, kerning, characterSpacing, scale, position, border, emphasisMark }) => withoutUndefined({
font,
size,
bold,
italic,
kerning,
characterSpacing,
- scale
+ scale,
+ raise: position === 0 ? void 0 : position,
+ border: textBorderOf(border),
+ emphasis: emphasisMark === void 0 ? void 0 : EMPHASIS[emphasisMark]
});
/**
+ * The parts of run formatting that change the font text is measured in: its font, size, boldness, character spacing and
+ * scale, superscript and subscript, which draw it smaller, how far it is raised, its border, and its emphasis marks.
+ */
+ var fontOf = (format) => scripted(plainFontOf(format), format);
+ /**
* Which of a run's fonts Word draws a character in: the font for complex scripts, in their size, boldness and italics, for
* all of a run that is right to left or of a complex script; the East Asian font for Chinese, Japanese and Korean; the
* run's font for the rest. Hebrew in a run that isn't right to left is in the run's size, as Word lays it out. A mark is
@@ -4204,15 +4294,15 @@ var docxShapes = (function(exports, docx) {
* italics, and Word's defaults where the run doesn't give them.
*/
var fontOfSlot = (format, slot) => {
- const font = fontOf(format);
- if (slot === "latin") return font;
+ const font = plainFontOf(format);
+ if (slot === "latin") return scripted(font, format);
const { eastAsiaFont, complexScriptFont, complexScriptSize, complexScriptBold, complexScriptItalic } = format;
- return slot === "eastAsian" ? _objectSpread2(_objectSpread2({}, font), {}, { font: isEastAsianFont(eastAsiaFont) ? eastAsiaFont : FALLBACK_EAST_ASIAN_FONT }) : withoutUndefined(_objectSpread2(_objectSpread2({}, font), {}, {
+ return scripted(slot === "eastAsian" ? _objectSpread2(_objectSpread2({}, font), {}, { font: isEastAsianFont(eastAsiaFont) ? eastAsiaFont : FALLBACK_EAST_ASIAN_FONT }) : withoutUndefined(_objectSpread2(_objectSpread2({}, font), {}, {
font: complexScriptFont,
size: complexScriptSize,
bold: complexScriptBold,
italic: complexScriptItalic
- }));
+ })), format);
};
/**
* A span of text in its formatting: in the run's font for its script, capitals for all caps, and smaller capitals for the
@@ -4234,10 +4324,14 @@ var docxShapes = (function(exports, docx) {
text: character
}];
}, []).flatMap(({ slot, text: part }) => {
- var _font$size;
+ var _font$size2, _font$lineSize;
const font = fontOfSlot(format, slot);
if (allCaps || !smallCaps) return [_objectSpread2(_objectSpread2({}, font), {}, { text: allCaps ? part.toUpperCase() : part })];
- const small = _objectSpread2(_objectSpread2({}, font), {}, { size: ((_font$size = font.size) !== null && _font$size !== void 0 ? _font$size : 10) * SMALL_CAPS_SCALE });
+ const size = (_font$size2 = font.size) !== null && _font$size2 !== void 0 ? _font$size2 : 10;
+ const small = _objectSpread2(_objectSpread2({}, font), {}, {
+ size: nearestHalfPoint(size, SMALL_CAPS_SCALE),
+ lineSize: (_font$lineSize = font.lineSize) !== null && _font$lineSize !== void 0 ? _font$lineSize : size
+ });
return part.split(new RegExp("(\\p{Ll}+)", "u")).filter((piece) => piece.length > 0).map((piece) => new RegExp("^\\p{Ll}", "u").test(piece) ? _objectSpread2(_objectSpread2({}, small), {}, { text: piece.toUpperCase() }) : _objectSpread2(_objectSpread2({}, font), {}, { text: piece }));
});
};
diff --git a/usage/layout.md b/usage/layout.md
index 56b2e368c9..ebd59b038a 100644
--- a/usage/layout.md
+++ b/usage/layout.md
@@ -194,6 +194,7 @@ The pages are laid out with the widths and heights of the characters of the font
- keeping a paragraph with the next, keeping its lines together, widow and orphan control, and page breaks
- numbered and bulleted lists, including those a paragraph's style numbers it in
- 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. A table row refers to footnotes as a line does: it moves to the next page with a footnote that doesn't fit below it, and one that breaks across pages has each line's footnote on the page the line is on, and breaks after a line whose footnote continues. 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
+- run formatting that changes how much room text takes, as Word lays it out. Superscript and subscript (`superScript`, `subScript`) are drawn at 65% of the text's size, to the nearest half-point and down from a quarter, so 7 points at 11 and 9.5 at 15, and small capitals (`smallCaps`) at 80%, so 9 points at 11; both take up the line of their run's own size, so they never make a line taller. Raised and lowered text (`position`) raises the line's top or lowers its bottom by as much as it goes past the rest of the line: a word raised 6 points makes a line of Calibri 11 120 twips taller, and a smaller word raised a little none. Emphasis marks (`emphasisMark`) take a quarter of their line, over it, or under it for dots below; line spacing that gives a line a little more room adds it below the marks' room, and spacing that gives it enough, such as 1.5 lines, holds the marks. A border around text (`border` on a `TextRun`) takes its space and its width on each side of the text, and above and below it, as wide as a paragraph's border of its style: two runs next to each other with the same border are in one box, a box that goes on to the next line starts again there, and a line keeps room for its box to end after its last word
- pictures in the line, which stand on the baseline, so a line with text in it is as tall as the picture and the text below the baseline, as Word makes it. A line with a picture is at least as tall as a line of the picture's run's font, and its multiple line spacing adds a share of that, as Word's does
- 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, or its cells' own bottom borders. Header rows are repeated at the top of each page and column a table is on. The text of a cell merged down rows (`verticalMerge`) goes down from the top of its first row across the others, and makes the last of them taller when it needs the room. Where one of its rows breaks across pages, its text breaks with the row, as far down the page as its lines go, keeping to widow control, as Word breaks it, and the rest of it goes on from the top of its rows on the next page
- table formatting, as Word lays it out. Borders come from the table's style and the table (`borders`), side by side, from its cells (`TableCell`'s `borders`), and from the parts of its style for some of its cells. Where two cells meet, Word draws the wider of their borders, and each row is as much taller as the widest border above its cells. Double, triple and the other styles of border take the room Word gives them, such as three times their width for a double border, and a border's `space` adds to it. A cell's text is as far in from a border beside it as its margin, or half the border when that is more. A row is as tall as its tallest cell's text, with the largest margins above and below of its cells, which needn't be the same cell's. Space between cells (`cellSpacing`) goes around each cell and inside the table's edges, and the table keeps its width, its columns narrowed for the space as Word narrows them. A row whose first cell's first paragraph is kept with the next (`keepNext`) is kept on the page with the next row, or, for the last row, with the paragraph after the table, and rows kept together that don't fit on a page of their own start a new page and break where it ends. Text that runs up or down a cell (`textDirection`) makes its row only as tall as a line of its paragraph mark, as Word breaks it into lines as long as the row is tall. A table sized to its text that is indented (`indent`) is sized in the room the indent leaves. The parts of a table style for some cells, such as its first row, its last column or its bands of rows, apply where the table turns them on (`tableLook`), and where it doesn't say, as Word turns them on: its first row and column and its bands of rows. In [templates](#templates), an empty last paragraph of a cell whose mark is hidden (`w:hideMark`) takes no room
@@ -222,10 +223,12 @@ It stops at the first thing it can't lay out yet, and the page numbers of the he
- 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 character whose width in its font isn't known, so its line may not be where Word puts it: a letter or symbol its font doesn't have, or its font's file has no glyph for, which Word draws in another font, such as most mathematical symbols in Calibri, Arial and Courier New, which Word draws in Cambria Math; a few that Word drew in a way their widths can't be read from, such as Ž and Ё in Courier New; and a symbol font's own symbol, such as Wingdings' tick (`SymbolRun`), or a symbol whose character isn't four hexadecimal digits
- a document that hyphenates its words, compresses its punctuation, or uses Word's strict rules for the characters that can't start a line
-- borders Word hasn't been seen to draw, or to lay out in a box: a style such as thin and thick lines with a medium gap or an art border, thin and thick lines narrower than 3/4 of a point or wider than 2¼, a shadow on a style other than single, or a frame; two paragraphs with the same borders but for a border between them; a box of borders that goes on across a section break, or past a page break before a paragraph in it; and a border in a footnote, or on the empty paragraph that ends a section
+- borders Word hasn't been seen to draw, or to lay out in a box: a style such as thin and thick lines with a medium gap or an art border, thin and thick lines narrower than half a point or wider than 2¼, a shadow on a style other than single, or a frame; two paragraphs with the same borders but for a border between them; a box of borders that goes on across a section break, or past a page break before a paragraph in it; and a border in a footnote, or on the empty paragraph that ends a section
- automatic spacing in a footnote, on the empty paragraph that ends a section, and between the paragraphs of other levels of a list, or of lists made from the same definition
- indents in characters where the size Word measures them in isn't known: a left or right indent of a paragraph whose mark is another size than its style, a right indent of text of another size than its mark, a first line indent of a list's paragraph whose number is another size than its text, and a hanging indent in characters with a left indent of 0 characters and one in twips, or a left indent in characters with a first line indent in twips
-- a size given in a unit other than points, such as `size: "1cm"`, which Word ignores where no style gives a size, and a negative length of a fraction of a centimeter or millimeter
+- a size given in a unit other than points, such as `size: "1cm"`, which Word ignores where no style gives a size, a negative length of a fraction of a centimeter or millimeter, and text lowered by a fraction of its unit, such as `position: "-2.5pt"`
+- emphasis marks on a line with a picture, with marks both over and under text, at line spacing of less than a line, or between the spacing Word adds below the marks' room and the spacing that holds them, such as 1.25 lines, and with line spacing on a line taller than its fonts' own lines, such as one with raised text
+- a border around text of a style or width Word hasn't been seen to draw, as for paragraphs above, or with a shadow or a frame, a tab or picture in text with a border, text with a border lined up with a right or centered tab stop, and a word with a border that is longer than its line
- a paragraph justified for Arabic with a medium or high kashida (`MEDIUM_KASHIDA` and `HIGH_KASHIDA`), and Thai or Arabic text in one justified for Thai or with a low kashida, whose lines Word hasn't been seen breaking, and a justified or distributed line that only fits with its spaces squeezed when it has an en, em or ideographic space, which Word hasn't been seen squeezing
- 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
The unique identifier for this abstract numbering definition.