mlreportgen.dom.TOC Class
Namespace: mlreportgen.dom
Create placeholder for generating table of contents
Description
Create a placeholder for a document table of contents. When a generated Word document opens, Word replaces the placeholder with a TOC that it generates. Similarly, when a generated HTML document opens in an HTML browser, the browser replaces the placeholder with a TOC that it generates. For PDF, the DOM API replaces the placeholder with a TOC that it generates when outputting the document.
In all cases, the TOC entries consist of the content of paragraphs using the number of heading levels that you specify. For PDF and Word, the TOC placeholder also specifies a leader that fills the space between the content and the page number in the TOC entry.
The mlreportgen.dom.TOC
class is a handle
class.
Creation
Description
Input Arguments
Properties
Examples
Tips
The document template style determines the size, spacing, color, and other format
properties of the TOC generated by this object. Consequentially, you must redefine the
styles in the document template, not in the template used by a document part that
contains this object. To change the format of the entries in your TOC, create a custom
document template that redefines these styles and use the template when you generate
your document. The default Microsoft Word and PDF templates of your mlreportgen.dom.Document
object
contain default styles for each entry in the TOC. The styles are named
TOC1
, TOC2
, …, TOC6
, where
style TOC1
defines the format of level 1 entries, style
TOC2
defines the format of level 2 entries, etc.
Version History
Introduced in R2016a