getCaptionReporter
Class: mlreportgen.report.FormalImage
Namespace: mlreportgen.report
Get image caption reporter
Syntax
reporter = getCaptionReporter(image)
Description
returns a reporter that generates the formal image caption based on the
reporter
= getCaptionReporter(image
) Caption
property of
mlreportgen.report.FormalImage
. The caption can be any MATLAB® or DOM object that can be appended to a DOM Paragraph. The caption formats
override any corresponding formats in the template. Use this
getCaptionReporter
method to override the default caption
formats.
Input Arguments
Output Arguments
Examples
Use Non-Default Caption Style
Create a style for your caption that differs from the default style. Before you
run this example, create a template named MyCaptionTemplate
and
customize its FormalImageCaption
style. Then, use the
getCaptionReporter
method and the
TemplateSrc
property to use your
template.
import mlreportgen.report.* rpt = Report(); image = FormalImage(); captionReporter = getCaptionReporter(image); image.TemplateSrc = 'MyCaptionTemplate'; add(rpt,image);
Version History
Introduced in R2017b