getTitleReporter
Class: mlreportgen.report.Section
Namespace: mlreportgen.report
Create a section title reporter
Syntax
reporter = getTitleReporter(section)
Description
creates an reporter
= getTitleReporter(section
)mlreportgen.report.SectionTitle
reporter that is partially configured to:
Format the value of the
Title
property of themlreportgen.report.Section
reporter specified bysection
.Fill the
Title
hole in theSection
reporter template with the formatted title.
The SectionTitle
reporter getImpl
method uses the
mlreportgen.report.Section.getTitleReporter
method to format inline
title content. You can use the
mlreportgen.report.Section.getTitleReporter
method to customize
inline title format as follows:
Invoke the
mlreportgen.report.Section.getTitleReporter
method to get a defaultSectionTitle
reporter.Customize the
SectionTitle
reporter properties. For example, specify a template source that contains customized title templates.Set the
Title
property of theSection
reporter to the customizedSectionTitle
reporter.
You can customize the title format by changing the default values of these
SectionTitle
reporter properties:
This property is set by default to the
Section
reporter template. The template library of this template contains default section title templates named:SectionTitle1
,SectionTitle2
, and so on, for unnumbered titlesSectionNumberedTitle1
,SectionNumberedTitle2
, and so on, for hierarchically numbered titles.
You can set this property to the source of a template file that contains custom definitions of these templates.
This property is set by default to
'SectionNumberedTitle'
if theSection
reporterNumbered
property istrue
(the default). Otherwise, this property is set to'SectionTitle'
. You do not need to change this setting if your custom template library customizes the definitions of the standard title templates, but not their names. For example, if your template library contains a template namedSectionNumberedTitle1
with a customized version of the standard definition forSectionNumberedTitle1
, you do not need to change the value of this property.This property is empty by default. The
Section
reportergetImpl
method, which invokes thegetTitleReporter
method by default, sets this property to a section level when theSection
reporter is added to the report. TheSectionTitle
reporter then appends the value of theOutlineLevel
property to the value of theTemplateName
property to create the full name of theSectionTitle
template for the section level, for example,SectionNumberedTitle2
for a second-level subsection.This property is set by default to the value of the
Section
reporterTitle
property.This property is set by default to
[]
.This property is set to
'. '
if theSection
Numbered
property istrue
(the default). Otherwise, this property is set to[]
.This property is not set by default. Set this property to localize the section title number prefix and suffix title content.
Input Arguments
Output Arguments
Examples
Version History
Introduced in R2017b