mlreportgen.report.ListOfCaptions Class
Namespace: mlreportgen.report
Superclasses: mlreportgen.report.Reporter
List of captions reporter
Description
Use an object of the mlreportgen.report.ListOfCaptions class to create a
reporter that adds a section for a list of captioned report elements to a report. To create a
reporter for a list of figures with captions or tables with titles, use objects of the
mlreportgen.report.ListOfFigure and
mlreportgen.report.ListOfTables classes, respectively. To create a reporter
for a list for other types of report elements, such as equations, use a
ListOfCaptions object.
To identify the report elements to include in the list of captions:
Choose a numbering stream name, for example,
equation. Set theAutoNumberStreamNameproperty of theListOfCaptionsobject to the numbering stream name.Create captions for the report objects as
mlreportgen.dom.Paragraphobjects.Associate the
Paragraphobjects with the numbering stream name by using anmlreportgen.dom.AutoNumberobject.
The generated list of captions contains the captions associated with the specified numbering stream name. The list entries link to the captions in the report. In PDF and Word reports, the list also includes the page numbers of the captions in the report. A leader fills the space between a caption and its page number.
The way the list of captions is generated depends on the report type:
PDF — The Report API generates the list during report generation.
Word — The Report 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 Report API generates a placeholder for the list. When the report opens in an HTML browser, the browser generates the list in a sidebar.
Note
You can use a ListOfCaptions reporter for captions that follow a report
element or titles that precede a report element.
The mlreportgen.report.ListOfCaptions class is a handle class.
Creation
Description
creates a loc = mlreportgen.report.ListOfCaptionsListOfCaptions reporter with default property values. Specify the
list of captions section title by setting the Title
property.
creates a lof = mlreportgen.report.ListOfCaptions(title)ListOfCaptions reporter with the Title property
set to the specified title.
sets properties using name-value arguments. You can specify multiple name-value arguments in any order.lof = mlreportgen.report.ListOfCaptions(Name=Value)
Properties
Methods
Examples
Version History
Introduced in R2020b
