Generate a section title
Only another report, called the owner, can create an instance of this class. The instance
fills a hole in a template that the owner specifies with a title that the owner specifies via
an instance template and the instance properties that it sets. For example, an
mlreportgen.report.Section reporter (the owner) uses an instance of this
class to fill the
Title hole in its template with a hierarchically numbered
The title generated by an instance of this class consists of static text and dynamic
content. The static text is specified by the instance template. The dynamic content is
specified by the instance
NumberSuffix properties. If the name of a template hole matches one of
these property names, this reporter fills the hole with the value property. For example, if
the title template contains a
Content hole and a
NumberPrefix hole, this reporter fills those holes with the values of the
The owner specifies the location of the title template with the instance
OutlineLevel properties. The
specifies the source of a template file whose template library contains the title template.
TemplateName property specifies the root name of the title template.
OutlineLevel property specifies the level in the report hierarchy of
the content generated by the owner. The
SectionTitle instance appends the
value of the
OutlineLevel property to the value of the
TemplateName property to create the full name of the title template.
For example, the
Section reporter template library contains six numbered title
templates, each corresponding to a section level. The names of the templates are
and so on. To specify use of the
SectionNumberedTemplate1 template to
generate a section title, the Section reporter sets the
TemplateName property to
OutlineLevel property to 1.
LinkTarget property is set, the instance precedes the generated title
with a link target having the specified target ID.
HoleId— Name of title hole in owner template
Name of the title hole in the owner template, specified as a character vector or string scalar.
Content— Title text
Title text, specified as one of these values:
String scalar or character vector
1-by-N or N-by-1 array of strings or DOM objects
1-by-N or N-by-1 cell array of strings, character arrays, and/or DOM objects
NumberPrefix— Prefix for a section number in the title
Prefix for a section number in the title, specified as a string scalar or character vector. If no prefix is specified, the default title prefix, translated based on the report locale, is used.
NumberSuffix— Suffix for a section number in the title
Suffix for a section number in the title, specified as a string or character array. If no suffix is specified, the default title suffix, translated based on the report locale, is used.
Translations— Translation map for the section title prefix and suffix
Translation map for the section title prefix and suffix, specified as a MATLAB® structure. If the specified translation map does not contain a translation
for the report locale, the
Translations property uses
en as the backup locale. See the Locale
mlreportgen.report.Report for information about valid
OutlineLevel— Outline level of owner reporter
Outline level of the owner reporter in the report section hierarchy, specified as a
positive integer in the range [1,6]. The
specifies the level of the section generated by the owner reporter in the section
hierarchy of a report. The
SectionTitle reporter appends the value of
this property to the value of the
TemplateName property to create
the full name of the title template. For example, if the value of the
TemplateName property is
and the value of the
OutlineLevel property is 2, this reporter
SectionNumberedTitle2 as the full name of the title
template. The template library specified by the
property must contain a template with the generated name. Otherwise, an error
TemplateSrc— Source of template for this reporter
Source of the template for this reporter, specified in one of these ways:
Character vector or string scalar that specifies the path of the file that contains the template for this reporter
Reporter or report whose template is used for this reporter or whose template library contains the template for this reporter
DOM document or document part whose template is used for this reporter or whose template library contains the template for this reporter
The specified template must be the same type as the report to which this
reporter is appended. For example, for a Microsoft® Word report,
TemplateSrc must be a Word reporter template.
TemplateSrc property is empty, this reporter uses the
default reporter template for the output type of the report.
TemplateName— Template root name
Template root name, specified as a character vector or string scalar. The template
for this reporter is in the template library of the template source
TemplateSrc) for this reporter.
LinkTarget— Hyperlink target for this reporter
(default) | character vector | string scalar |
Hyperlink target for this reporter, specified as a character vector or string scalar
that specifies the link target ID, or an
mlreportgen.dom.LinkTarget object. A character vector or string scalar
value is converted to a
LinkTarget object. The link target object
immediately precedes the content of this reporter in the output report.