Main Content

getTitleReporter

Class: mlreportgen.report.TableOfContents
Namespace: mlreportgen.report

Get table of contents title reporter

Syntax

reporter = getTitleReporter(toc)

Description

reporter = getTitleReporter(toc) returns a reporter that the TableOfContents reporter uses to format the content specified in its Title property. Use this reporter to customize the alignment, position, and appearance of the title.

Input Arguments

expand all

Table of contents of the report, specified as a reporter object. To create the toc input, you use mlreportgen.report.TableOfContents.

Output Arguments

expand all

Table of contents title reporter, returned as a reporter object.

Examples

expand all

  1. Create a template file named MyTOCTemplate.

  2. Customize the TableOfContentsTitle style.

  3. Use the getTitleReporter method and the TemplateSrc property to use your template.

    import mlreportgen.report.*
    rpt = Report();
    toc = TableOfContents();
    toc.Title = "Report Contents"
    toc.Title = getTitleReporter(toc);
    toc.Title.TemplateSrc = "MyTOCTemplate";
    add(rpt,toc)
    

Version History

Introduced in R2017b