Toc
Creates a table of content. This works next to TocItem definition.
constructor(code: string)
new Toc('Table of content').end;
textStyle(style: IStyleDefinition): Toc
Defines the text style for toc items. It allows all the available methods IStyleDefinition provides as properties.
new Toc('Table of content').textStyle({
italics: true,
fontSize: 10
}).end;
numberStyle(style: IStyleDefinition): Toc
Defines the number (page number) style for toc items. It allows all the available methods IStyleDefinition provides as properties.
new Toc('Table of content').numberStyle({
bold: true,
fontSize: 15
}).end;
textMargin(margin: number | [number, number] | [number, number, number, number]): Toc
Defines the text (toc items) margins.
new Toc('Table of content').textMargin([50, 5]).end;
Types
IToc
Toc properties (extends from IStyleDefinition).
readonlytitle:any;readonlynumberStyle?:IStyleDefinition;readonlytextStyle?:IStyleDefinition;readonlytextMargin?:number| [number,number] | [number,number,number,number];