This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.



Get table of contents title reporter


reporter = getTitleReporter(toc)


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

Output Arguments

expand all

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


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.

rpt = Report();
toc = TableOfContents();
toc.Title = 'Report Contents'
toc.Title = getTitleReporter(toc);
toc.Title.TemplateSrc = 'MyTOCTemplate';

Introduced in R2017b