User`s guide
mlreportgen.dom.OutlineLevel class
12-231
Properties
Id — ID for document element
string
A session-unique ID is generated as part of document element creation. You can specify
an ID to replace the generated ID.
Tag — Tag for document element
string
Tag for document element, specified as a string.
A session-unique ID is generated as part of document element creation. The generated
tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value
of the Id property of the object. You can specify a tag to replace the generated tag.
Specify your own tag value, for example, to make it easier to identify where an issue
occurred during document generation.
Value — Specify the level of a paragraph in an outline
integer
Outline level for a paragraph, specified as a positive integer, from 1 to 9.
Data Types: int16
Examples
Add a Table of Contents
Add an automatically generated table of contents and set the outline level of the
“Glossary” paragraph so that the paragraph appears at the top level of the table of
contents. This example uses the default DOM Word template.
Create a document and document part for the table of contents. The document part uses
the ReportTOC building block from the default DOM Word template.
import mlreportgen.dom.*
d = Document('tocDoc','docx');