主要内容

mlreportgen.report.reporterlayout类

Package:mlreportgen.report

Layout for reporter

Description

使用一个对象mlreportgen.report.ReporterLayout指定报告部分的页面布局选项,例如标题页,目录,图表列表,表格列表,字幕列表或章节。页面布局选项包括水印,第一页编号,页码格式,页面大小和方向以及边距。

Note

When you create the reporter for a report section, an instance of this class is created and assigned to the reporterLayout财产。您不会自己创建此对象。

Themlreportgen.report.ReporterLayout班级是handleclass.

Class Attributes

HandleCompatible
真的

For information on class attributes, seeClass Attributes

Properties

expand all

水印图像for the report section pages, specified as[]或者一个特征向量或者string scalar that contains the image path name. The watermark appears on all pages of the report section. If theWatermark属性是[],该部分的水印与报告的水印相同。如果是Watermarkproperty of the layout objects for the report section and the report are[],没有水印。

Valid image types are:

  • 。bmp

  • 。jpg

  • 。pdf(for PDF output types only)

  • 。png

  • .svg

  • .tiff

Number to use on the first page of the report section, specified as an integer or[]。如果是value of this property is-1或者[],从上一节继续进行编号。要指定首页号,请输入正整数。

Note

默认情况下,第一章的第一页的编号为1。

Type of page numbering to use for the report section in a Word or PDF report, specified as a string scalar or character vector. See the格式财产中mlreportgen.dom.PageNumberfor a list of valid page number formats.

报告部分的页面方向,指定为真的或者false。将此属性设置为真的to change portrait orientation to landscape orientation andfalseto change landscape orientation to portrait orientation. If the value is[],方向取决于部分布局指定的页面大小。

报告部分中的页面大小,指定为mlreportgen.dom.pageize目的。

Sizes of page margins, header, footer, and gutter in the report section, specified as anmlreportgen.dom.PageMargins目的。

页面边界,指定为mlreportgen.dom.PageBorder目的。

Examples

collapse all

Add three chapters to a report. The first chapter uses default values for the first page number. which is 1 and the default page orientation which is portrait. The second chapter resets the first page number to 1 and uses landscape page orientation. The page number and orientation are not set in the third chapter so it uses the default first page number, which continues from the previous chapter, and the default page orientation, which is portrait.

importmlreportgen.report.*rpt = Report('newreport');tp = titlepage();tp.title ='New Report';tp.Author ='MathWorks';添加(RPT,TP)CH1 = Chapter();ch1.title ='First Chapter';sec =部分('First Section of Chapter 1');txt = [“这是第1章的第一部分。”,。。。'The first page number for this ',。。。'第1章,这是默认值。',。。。'The page orientation is also the default.']; append(sec,txt); append(ch1,sec); append(rpt,ch1); ch2 = Chapter(); ch2.Title =“第二章”;ch2.layout.firstpagenumber = 1;ch2.layout.landscape = true;sec =部分('First Section of Chapter 2');txt = ['This is the first section of chapter 2. ',。。。'The first page number is set to 1 and the ',。。。'page orientation is set to landscape.']; append(sec,txt); append(ch2,sec); append(rpt,ch2); ch3 = Chapter(); ch3.Title =“第三章”;sec =部分(第三章的第一节);txt = ['This is the first section of chapter 3. ',。。。'Neither first page number nor page ',。。。'或者ientation is set for this chapter. ',。。。'The first page number uses the default, ',。。。'从上一页继续。',。。。'The page orientation also uses the default, ',。。。“这是肖像。”]; append(sec,txt); append(ch3,sec); append(rpt,ch3); close(rpt); rptview(rpt)

Version History

Introduced in R2017b