Main Content

mlreportgen.report.Section.number

Class: mlreportgen.report.Section
Namespace: mlreportgen.report

Set section numbering

Syntax

mlreportgen.report.Section.number(report,numbering)

Description

mlreportgen.report.Section.number(report,numbering) indicates whether to include numbers before report section titles. Report sections are numbered consecutively by default.

Input Arguments

expand all

Report, specified as a report object. To create the report input, use mlreportgen.report.Report.

Choice to number report sections, specified as a logical. If numbering is true, the report sections are numbered consecutively. If numbering is false, numbers are not included for report sections. You can use the Numbered property of a section to override the numbering for that section.

Examples

expand all

Turn off section numbering in a Report API report.

import mlreportgen.report.*
import mlreportgen.dom.*
rpt = Report("My Report","pdf");
add(rpt,TitlePage("Title","My Report",...
     "Author","MathWorks"));
add(rpt,TableOfContents);
add(rpt,Chapter("Title","Boeing 747",...
     "Content","This report describes the Boeing 747."));
KeepWithNext(1);
add(rpt,Section("Title","Image of Boeing 747",...
     "Content",Image(which("b747.jpg")),"Numbered",0));
close(rpt);
rptview(rpt);

Version History

Introduced in R2017b