Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

getTitleReporter

Class: mlreportgen.report.TableOfContents
Package: 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

Use Nondefault Table of Contents Title Style

Assume that you want a style for your table of contents title that differs from the default. Before you run this example, create a template file named MyTOCTemplate and customize its TableOfContentsTitle style. Then, use the getTitleReporter method and the TemplateSrc property to use your template.

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

Introduced in R2017b

Was this topic helpful?