mlreportgen.report.ReportLayout クラス
パッケージ: mlreportgen.report
レポートのページ レイアウト
説明
mlreportgen.report.ReportLayout
クラスのオブジェクトを使用して、透かし、先頭ページの番号付け、ページ番号形式、ページのサイズと方向、余白などのレポート ページ レイアウト オプションを指定します。
メモ
レポートは、このクラスのインスタンスを作成し、それを mlreportgen.report.Report
の Layout
プロパティに割り当てます。自分でオブジェクトを作成することはしません。
mlreportgen.report.ReportLayout
クラスは handle
クラスです。
プロパティ
Watermark
— 透かしイメージ
[]
(既定値) | string スカラー | 文字ベクトル
レポート ページの透かしイメージ。[]
として指定するか、イメージ パス名を含む文字ベクトルまたは string スカラーとして指定します。指定した透かしはレポートのすべてのページに表示されます。空の値 ([]
) は、透かしを使用しないことを示します。章などの個々のレポート セクションで異なる透かしを使用するには、セクション レポーターで使用される mlreportgen.report.ReporterLayout
オブジェクトの Watermark
プロパティを設定します。有効なイメージの種類は次のとおりです。
.bmp
.jpg
.pdf
(PDF 出力タイプのみ).png
.svg
.tiff
FirstPageNumber
— 先頭ページで使用する番号
[]
(既定値) | 正の整数
レポートの各セクションの先頭ページで使用する番号。[]
または正の整数として指定します。たとえば、レポートの先頭ページ番号を 4 に設定すると、レポートの各章の先頭ページ番号は 4 になります。個々のセクションで異なる先頭ページ番号を使用するには、セクション レポーターで使用される mlreportgen.report.ReporterLayout
オブジェクトの FirstPageNumber
プロパティを設定します。レポートの既定の番号付けは []
で、これは第 1 章の先頭ページがページ 1 であることを示します。レポートの後続のすべてのページには、順番に番号が付けられます。
PageNumberFormat
— ページの番号付けのタイプ
[]
(既定値) | string スカラー | 文字ベクトル
レポートに使用するページ番号付けのタイプ。string スカラーまたは文字ベクトルとして指定します。指定したページ番号形式がレポートのすべてのページに表示されます。章などの個々のセクションで異なるページ番号形式を使用するには、セクション レポーターで使用される mlreportgen.report.ReporterLayout
オブジェクトの PageNumberFormat
プロパティを設定します。有効なページ番号形式のリストについては、mlreportgen.dom.PageNumber
の Format
プロパティを参照してください。
Landscape
— ページの方向
[]
(既定値) | false
| true
レポートのページの方向。true
または false
として指定します。縦向きを横向きに変更するにはこのプロパティを true
に、横向きを縦向きに変更するには false
に設定します。値が []
の場合、方向はレポート レイアウトで指定されたページ サイズによって決定されます。
PageSize
— ページのサイズ
[]
(既定値) | mlreportgen.dom.PageSize
オブジェクト
レポートのページのサイズ。mlreportgen.dom.PageSize
オブジェクトとして指定します。
PageMargins
— ページ余白、ヘッダー、フッター、およびとじしろのサイズ
[]
(既定値) | mlreportgen.dom.PageMargins
オブジェクト
レポートのページ余白、ヘッダー、フッター、およびとじしろのサイズ。mlreportgen.dom.PageMargins
オブジェクトとして指定します。
PageBorder
— ページ境界線
[]
(既定値) | mlreportgen.dom.PageBorder
オブジェクト
ページ境界線。mlreportgen.dom.PageBorder
オブジェクトとして指定します。
例
レポート全体の先頭ページ番号の設定
レポート全体のページ番号形式をアラビア数字に設定し、目次のページ番号をローマ数字に設定します。各章は、レポート全体の既定の形式であるアラビア数字形式を使用します。最初の章の先頭ページの既定値は 1 です。
import mlreportgen.report.* rpt = Report('newreport'); rpt.Layout.PageNumberFormat = 'n'; tp = TitlePage(); tp.Title = 'New Report'; tp.Author = 'MathWorks'; append(rpt,tp); toc = TableOfContents(); toc.Layout.PageNumberFormat = 'i'; append(rpt,toc); ch = Chapter(); ch.Title = 'Introduction'; sec = Section('First Section of Chapter 1'); txt = ['This is the first section of chapter 1. ',... 'The page number format is Arabic numbers, ',... 'which is the default for the report.']; append(sec,txt); append(ch,sec); append(rpt,ch); ch = Chapter(); ch.Title = '2nd chapter'; sec = Section('First Section of Chapter 2'); txt = ['This is the first section of chapter 2. ',... 'The page number format is Arabic numbers, ',... 'which is the format defined for the report.']; append(sec,txt); append(ch,sec); append(rpt,ch); close(rpt); rptview(rpt);
バージョン履歴
R2017b で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)