mlreportgen.dom.LOC Class
Namespace: mlreportgen.dom
Description
Use an object of the mlreportgen.dom.LOC
class to generate a list of
captioned report elements. To generate a list of figures with captions or tables with titles,
use objects of the mlreportgen.dom.LOF
and mlreportgen.dom.LOT
classes, respectively. To generate a list for other types of report elements, such as
equations, use an LOC
object.
Each list item contains the caption of a report element and links to the caption in the report. In a PDF or Microsoft® Word report, a list item also includes the page number and a leader that fills the space between the caption and page number.
In PDF and Word reports, the list of captions is placed at the location that you specified
in the report generation program. In HTML reports, the list of captions is placed in a side
panel and has a title that consists of List of
followed by the value of the
AutoNumberStreamName
property with the first letter capitalized.
To include report elements in the list:
Choose a numbering stream name, for example,
equation
. Set theAutoNumberStreamName
property of theLOC
object to the numbering stream name.Create captions or titles for the report elements using
mlreportgen.dom.Paragraph
objects.Associate the
Paragraph
objects with the numbering stream name by using anmlreportgen.dom.AutoNumber
object.
The way a list is generated depends on the report type.
PDF — The DOM API generates the list during report generation.
Word — The DOM API generates a placeholder for the list. To generate the list items, you must update the Word document in your report generation program or in Word. See Update Tables of Contents and Generated Lists in Word Documents.
HTML — The DOM API generates a placeholder for the list. When the report opens in an HTML browser, the browser generates the list.
Note
You can use an LOC
object for captions that follow a report element or
titles that precede a report element.
The mlreportgen.dom.LOC
class is a handle
class.
Class Attributes
ConstructOnLoad | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Creation
Description
creates an LOCObj
= mlreportgen.dom.LOC()
mlreportgen.dom.LOC
object and sets the LeaderPattern property to '.'
.
creates an LOCObj
= mlreportgen.dom.LOC(leaderPattern)
mlreportgen.dom.LOC
object and sets the LeaderPattern property to the specified leader pattern.
Properties
Methods
Examples
Version History
Introduced in R2020b