跳到主要内容

TofPr

Table of figures properties.

Type

Object

Properties

NameTypeDescription
BuildFromCaptionLabel | stringSpecifies whether to generate the table of figures based on the specified caption label or the paragraph style name used (for example, "Heading 1").
FormatAsLinksbooleanSpecifies whether to format the table of figures as links.
LabelNumberbooleanSpecifies whether to include the label and number in the table of figures.
LeaderTypeTocLeaderThe leader type in the table of figures.
RightAlgnbooleanSpecifies whether to right-align page numbers in the table of figures.
ShowPageNumsbooleanSpecifies whether to show page numbers in the table of figures.
TofStyleTofStyleThe table of figures style type.

Example

This example adds a table of figures with the specified properties to the document.

let tofPr = {"ShowPageNums": true, "RightAlgn": true, "LeaderType": "dot", "FormatAsLinks": true, "BuildFrom": "Figure", "LabelNumber": true, "TofStyle": "distinctive"};
doc.AddTableOfFigures(tofPr);