MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guide de l'utilisateur

Naviguer en ligne ou télécharger Guide de l'utilisateur pour Logiciel MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES. MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES User`s guide Manuel d'utilisatio

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 986
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 0
MATLAB
®
Report Generator™
User's Guide
R2015a
Vue de la page 0
1 2 3 4 5 6 ... 985 986

Résumé du contenu

Page 1 - User's Guide

MATLAB® Report Generator™User's GuideR2015a

Page 2 - How to Contact MathWorks

x ContentsHeader and Footers in Word Conversion Templates . . . . . . 6-10Copy a Conversion Template . . . . . . . . . . . . . . . . . . . . . . . . .

Page 3 - Revision History

4 Generate a Report4-10Report Generation ProcessingThe Report Options dialog box includes several options for controlling report processing.Option Pur

Page 4

Select Report Generation Options4-11Option Purposecontents. If a report requires multiple compilations, theprocessing can be quite time-consuming.To

Page 5 - Contents

4 Generate a Report4-12Report File NameIn the Report Explorer, in the Report Options dialog box, use the Filename field tospecify a file name for the

Page 6 - Set Up a Report

Report Generation Preferences4-13Report Generation PreferencesIn this section...“Report Generator Preferences Pane” on page 4-13“File Format and Exte

Page 7

4 Generate a Report4-14File Format and ExtensionTo specify the default file format for reports, use the Format ID preference. The defaultpreference is

Page 8

Report Generation Preferences4-15The Extension preference reflects the standard file extension for the file formatspecified with the Format ID prefer

Page 9

4 Generate a Report4-16Preference PurposeVisible in ReportExplorerDeselect this check box to make the current outputformat unavailable in the Report E

Page 10

Change Report Locale4-17Change Report LocaleVersions 2.0 and later of the MATLAB Report Generator and Simulink Report Generatorsoftware use the local

Page 11 - Create Custom Stylesheets

4 Generate a Report4-18Convert XML Documents to Different File FormatsIn this section...“Why Convert XML Documents?” on page 4-18“Convert XML Document

Page 12 - Comparing XML Files

Convert XML Documents to Different File Formats4-192Select your XML source file using one of the following options:• Click Browse in the Properties p

Page 13 - Create a Report Program

xiCreate Custom Components7About Custom Components . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2Create Custom Components . . . . . . . . .

Page 14

4 Generate a Report4-20For more information about customizing stylesheets, see “Create a NewStylesheet”.4Use the View Report when done converting chec

Page 15

Create a Report Log File4-21Create a Report Log FileA log file describes the report setup file report-generation settings and components. A logfile c

Page 16

4 Generate a Report4-22Generate MATLAB Code from Report Setup FileYou can generate MATLAB code versions of report setup files in the form of a MATLABf

Page 17

Generate MATLAB Code from Report Setup File4-235To generate the figloop_tutorial report from this MATLAB file, run thefollowing command in the MATLAB

Page 18

4 Generate a Report4-24

Page 19 - Getting Started

Troubleshooting Report Generation Issues4-25Troubleshooting Report Generation IssuesIn this section...“Memory Usage” on page 4-25“HTML Report Display

Page 21

5Add Content with Components• “Components” on page 5-2• “Report Structure Components” on page 5-4• “Table Formatting Components” on page 5-5• “Propert

Page 22 - Report Creation Workflow

5 Add Content with Components5-2ComponentsComponents are MATLAB objects that specify the content of a report. Add componentsto specify the types of co

Page 23 - Report Creation Workflow

Components5-3Component FormattingWhen you generate a report, in the Report Options dialog box, in the File format fieldyou specify the type of report

Page 24

xii ContentsEdit, Save, or Delete a Stylesheet . . . . . . . . . . . . . . . . . . . . . . 8-5Edit a Stylesheet . . . . . . . . . . . . . . . . . . .

Page 25 - Report Components

5 Add Content with Components5-4Report Structure ComponentsUse report structure components to organize the content of your report into chapters,sectio

Page 26 - Report Explorer

Table Formatting Components5-5Table Formatting ComponentsUse table formatting components to organize generated content into tables. The followingtabl

Page 27 - Library pane

5 Add Content with Components5-6Property Table ComponentsIn this section...“About Property Table Components” on page 5-6“Open the Example Report Templ

Page 28

Property Table Components5-7Many types of property table components are available, including:• MATLAB Property Table• Simulink Property Table (requir

Page 29 - Supported Report Formats

5 Add Content with Components5-8Open the Example Report TemplateThis example uses the figloop-tutorial report template. To open the figure looptutoria

Page 30

Property Table Components5-9Select Object TypesProperty table components offer multiple object types on which to report. For example,the Handle Graph

Page 31 - Create Your First Report

5 Add Content with Components5-10split mode. Split mode supports only one property name/property value pair per cell.If more than one property pair ap

Page 32 - Create a MATLAB Report

Property Table Components5-11Format OptionsTo specify alignment for text in a given cell, in the toolbar at the bottom of the dialog boxuse the four

Page 33 - Create a Report Setup File

5 Add Content with Components5-12Edit Table TitlesTable titles can contain properties and text. By default, the title of a table is the same asthe val

Page 34 - 2 Create Your First Report

Property Table Components5-13If you type text outside the angle brackets, the text appears as is in the report. Textinside the table brackets must sp

Page 35

xiiiHow to Compare XML Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-4Select Files to Compare . . . . . . . . . . . . . . . . . . . .

Page 36

5 Add Content with Components5-14bIn the Properties Type drop-down list at the upper-right of the dialog box, selecta property type.cIn the Properties

Page 37 - Specify Report Variables

Property Table Components5-15Button ActionDelete selected columnAdd row (added above the selected row)Delete selected rowResize ColumnsTo resize the

Page 38

5 Add Content with Components5-16Zoom and ScrollYou can zoom in and out of the table with the zoom buttons, which are located to the leftof the horizo

Page 39 - Create a Title Page

Summary Table Components5-17Summary Table ComponentsIn this section...“About Summary Table Components” on page 5-17“Open the Example Report Template”

Page 40

5 Add Content with Components5-18Many types of summary table components are available, including:• Handle Graphics Summary Table• Simulink Summary Tab

Page 41

Summary Table Components5-19setedit figloop-tutorialSelect Object TypesYou can use the Object type selection list to choose Handle Graphics object ty

Page 42

5 Add Content with Components5-20To remove a property from the table:1Select the property in the Property columns table.2Click the Delete property b

Page 43

Logical and Looping Components5-21Logical and Looping ComponentsLogical and looping components execute conditionally, determining when a childcompone

Page 44

5 Add Content with Components5-22Edit Figure Loop ComponentsIn this section...“Figure Loop in a Report” on page 5-22“Figure Properties” on page 5-23“L

Page 45

Edit Figure Loop Components5-23Figure PropertiesFigure properties control which figures appear in the report. Table 1.1 of the figloop-tutorial repor

Page 46

xiv ContentsDocument Object Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4DOM Object Help and Documentation . . . . . . . . . .

Page 47

5 Add Content with Components5-24For this example, do not change these properties. For more information, see “Add,Replace, and Delete Properties in Ta

Page 48

Edit Figure Loop Components5-25in each loop appear in the report by using the options in the Figure Loop component'sSection Options pane.• Creat

Page 50

6Template-Based Report Formatting• “Report Conversion Templates” on page 6-2• “Generate a Report Using a Template” on page 6-4• “Conversion Template C

Page 51

6 Template-Based Report Formatting6-2Report Conversion TemplatesIn this section...“Templates for Report Conversion” on page 6-2“Custom Templates” on p

Page 52

Report Conversion Templates6-3• Does not use Java memory to convert report XML content to HTML, Word, or PDF.Converting report XML content without us

Page 53

6 Template-Based Report Formatting6-4Generate a Report Using a Template1In Report Explorer, in the Outline pane, select the report.2In the Report Opti

Page 54

Conversion Template Contents6-5Conversion Template ContentsIn this section...“Default Styles” on page 6-5“Part Templates” on page 6-9“Header and Foot

Page 55

6 Template-Based Report Formatting6-6Style Report Explorer Components the Style FormatsrgBody Text componentrgChapter Chapter componentrgChapterTitle

Page 56

Conversion Template Contents6-7Style Report Explorer Components the Style FormatsrgProgramListing Code generated by:• Text component with Show text a

Page 57

xvUse Subforms in a Report . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-31Create Document Part Template Libraries . . . . . . . . . . . .

Page 58

6 Template-Based Report Formatting6-8Style Report Explorer Components the Style FormatsrgSect3TitleText Text for Section title for third-levelsection

Page 59 - Create the Magic Square

Conversion Template Contents6-9Part TemplatesThe conversion templates include template parts to format specific elements of a report.Part Template Re

Page 60

6 Template-Based Report Formatting6-10Part Template Report Explorer Components the Part TemplateFormatsTable title, including prefix (such as Table,nu

Page 61

Conversion Template Contents6-11Related Examples• “Generate a Report Using a Template” on page 6-4• “Copy a Conversion Template” on page 6-12• “Custo

Page 62

6 Template-Based Report Formatting6-12Copy a Conversion TemplateCopy a Conversion Template1In Report Explorer, select Tools > Edit Document Convers

Page 63

Copy a Conversion Template6-13More About• “Report Conversion Templates” on page 6-2

Page 64

6 Template-Based Report Formatting6-14Open a Conversion Template1In Report Explorer, select Tools > Edit Document Conversion Template. TheTemplate

Page 65

Set Conversion Template Properties6-15Set Conversion Template PropertiesFor custom conversion templates, you can specify properties to describe the t

Page 66

6 Template-Based Report Formatting6-16Move a Conversion TemplateYou can change the location of a template file.1In Report Explorer, select Tools >

Page 67

Delete a Conversion Template6-17Delete a Conversion Template1In Report Explorer, select Tools > Edit Document Conversion Template. TheTemplate Bro

Page 68

xvi ContentsCreate a Link Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-73Create an External Link . . . . . . . . . . . . . . . .

Page 69 - Generate a Report

6 Template-Based Report Formatting6-18Customize Microsoft Word Report StylesIn this section...“Customize Default Microsoft Word Component Styles” on p

Page 70

Customize Microsoft Word Report Styles6-191In the Report Explorer, select Tools > Edit Document Conversion Template.2In the list of templates in t

Page 71 - Generate a Report

6 Template-Based Report Formatting6-20• “Conversion Template Contents” on page 6-5

Page 72

Customize Microsoft Word Part Templates6-21Customize Microsoft Word Part TemplatesIn this section...“Custom Word Part Templates” on page 6-21“Display

Page 73

6 Template-Based Report Formatting6-22Display the Developer Ribbon in WordTo work with holes in a Word template, use the Word Developer ribbon. If the

Page 74 - Report Setups

Customize Microsoft Word Part Templates6-2310In the Create New Building Block dialog box, set Name to the part template name(for example, rgChapter)

Page 75 - Create a Report Setup

6 Template-Based Report Formatting6-2410Select the part template and click the Quick Parts button.11Click Save Selection to Quick Part Gallery.12In th

Page 76 - Create a New Setup File

Customize Microsoft Word Part Templates6-25Distinguish Inline and Block HolesThe Report Explorer supports two types of holes: inline and block.• Use

Page 77 - Create a New Setup File

6 Template-Based Report Formatting6-26Avoid Changing Block Holes to Inline HolesDo not change a block hole to an inline hole.You can accidentally chan

Page 78 - Open a Report Setup

Customize Microsoft Word Part Templates6-27Tip To display Word markup for the part template, on the Word ribbon, in theDeveloper tab, click Design Mo

Page 79 - Open a Report Setup

xviiSupport for HTML Character Entities . . . . . . . . . . . . . . . 13-104Display Report Generation Messages . . . . . . . . . . . . . . . . 13-106R

Page 80 - Close a Report Setup

6 Template-Based Report Formatting6-28Add an Inline HoleThe only kind of holes that you can add to a part template are the holes that theReport Explor

Page 81 - Save a Report Setup

Customize Microsoft Word Part Templates6-2913In the template, select all of the contents of the part template and click the Deletebutton.14Save and c

Page 82 - 3 Set Up a Report

6 Template-Based Report Formatting6-30Customize a Microsoft Word Title Page TemplateIn this section...“Create a Custom Template” on page 6-30“Change t

Page 83 - Insert Components

Customize a Microsoft Word Title Page Template6-317Apply the properties by selecting another template in the list of templates.Change the Color of a

Page 84 - Set Component Properties

6 Template-Based Report Formatting6-325In the Modify Style dialog box for rgTitle, click the down arrow for Automatic.Select the blue color box and cl

Page 85 - Move Components

Customize a Microsoft Word Title Page Template6-336In the Manage Styles dialog box, click OK.7Save and close the template.Assign the Template to a Re

Page 86

6 Template-Based Report Formatting6-343In the Report Options pane, click Open report.4In the magic_squares report, add a Title Page component. In the

Page 87 - Delete Components

Customize a Microsoft Word Title Page Template6-354In the Quick Parts gallery, select rgRectoTitlePage to insert of the front title pagepart template

Page 88 - Deactivate Components

6 Template-Based Report Formatting6-36Create a Custom HTML TemplateIn this section...“Copy an HTML Template” on page 6-36“Select an HTML Editor” on pa

Page 89

Create a Custom HTML Template6-37Select an HTML EditorBy default, when you edit an HTML style sheet, the style sheet appears in the MATLABEditor.To u

Page 91

6 Template-Based Report Formatting6-38More About• “Report Conversion Templates”

Page 92

7Create Custom Components• “About Custom Components” on page 7-2• “Create Custom Components” on page 7-3• “Define Components” on page 7-6• “Specify Ta

Page 93

7 Create Custom Components7-2About Custom ComponentsIn most cases, the components provided with the MATLAB Report Generator softwareshould be more tha

Page 94

Create Custom Components7-3Create Custom ComponentsTo create a component:1Open the Report Explorer.2Select one of the component creation choices from

Page 95 - Report Output Format

7 Create Custom Components7-43Specify properties of the component in the Properties pane of the Report Explorer.For more information, see “Define Comp

Page 96

Create Custom Components7-5Note: You must restart the MATLAB software session before using a newly created orrebuilt component.

Page 97

7 Create Custom Components7-6Define ComponentsIn this section...“Required Component Data” on page 7-6“Specify the Location of Component Files” on page

Page 98

Define Components7-71Class Directory Field. Specify a class name for your component. The build processcreates a folder with the name you specify and

Page 99

7 Create Custom Components7-83Category Name. Specify the category of components to which the new componentbelongs. The component appears under this ca

Page 100 - 4 Generate a Report

Define Components7-9Specify Component PropertiesComponent properties determine how a component behaves and what information itinserts into a report.

Page 101

1Getting Started• “MATLAB Report Generator Product Description” on page 1-2• “MATLAB Code and Results Presentation” on page 1-3• “Report Creation Work

Page 102

7 Create Custom Components7-102Right-click the name of a predefined property in the Options pane in the middle.From the context menu, select Add prope

Page 103 - Report Generation Preferences

Define Components7-11Specify Component Properties1Property Name. Create a name for the new property. A property name must be avalid MATLAB variable n

Page 104

7 Create Custom Components7-12component and stores them in the specified folder. For more information about specifyingwhere components are stored, see

Page 105 - Report Viewing

Specify Tasks for a Component to Perform7-13Specify Tasks for a Component to PerformIn this section...“About Component Customization” on page 7-13“Re

Page 106

7 Create Custom Components7-14The execute command has the following syntax:out = execute(thisComp, parentDoc)Where:• thisComp is a handle to the compo

Page 107 - Change Report Locale

Specify Tasks for a Component to Perform7-15For more information, enter help(rptgen.cfr_list) at the MATLAB command line.Create TextTo create text, r

Page 108

7 Create Custom Components7-16olstring = getOutlineString(thisComp) Where:• thisComp is the component whose description you are specifying.• olstring

Page 109

Specify Tasks for a Component to Perform7-17Note: Do not modify fields that are not explicitly included in this file. These fields aresubject to chan

Page 110

7 Create Custom Components7-18compDesc = 'An example component';Change a Component Display NameThe display name in getName.m is the same val

Page 111 - Create a Report Log File

Customized Components7-19Customized ComponentsIn this section...“Fetching Securities Data and Displaying It in a Table” on page 7-19“Displaying Secur

Page 112

How to Contact MathWorksLatest news:www.mathworks.comSales and services:www.mathworks.com/sales_and_servicesUser community:www.mathworks.com/matlabcen

Page 113

1 Getting Started1-2MATLAB Report Generator Product DescriptionDesign and generate reports from MATLAB applicationsMATLAB Report Generator lets you cr

Page 114

7 Create Custom Components7-203To build the new component, click the Build button in the Report Explorer. TheEquity Values component now appears in th

Page 115 - Memory Usage

Customized Components7-21 stockQuote = fetch(GOOG, thisComp.Ticker);stockQuote.Date = datestr(stockQuote.Date,1);stockQuote.Time = datestr(stockQuote

Page 116

7 Create Custom Components7-226Modify the getdialogschema.m file to change the appearance of the Propertiespane. Enter the following text into this fi

Page 117 - Add Content with Components

Customized Components7-23 thisComp.dlgWidget('Ticker',... 'DialogRefresh',true,... 'RowSpan',[1 1],&

Page 118 - Components

7 Create Custom Components7-24Displaying Securities Data in Two TablesThis example, which shows how to use multiple properties within a component, exp

Page 119 - Component Formatting

Customized Components7-25

Page 121 - Table Formatting Components

8Create Custom Stylesheets• “Stylesheets” on page 8-2• “Create a New Stylesheet” on page 8-4• “Edit, Save, or Delete a Stylesheet” on page 8-5• “Edit

Page 122 - Property Table Components

8 Create Custom Stylesheets8-2StylesheetsIn this section...“Built-In Versus Custom Stylesheets” on page 8-2“Customize Stylesheets Using Data Items” on

Page 123 - Property Table Components

Stylesheets8-3Name DescriptionNote: This field is not editable.In most cases, the stylesheets provided with the MATLAB Report Generator softwareshoul

Page 124 - 5 Add Content with Components

MATLAB Code and Results Presentation1-3MATLAB Code and Results PresentationYou can use the MATLAB Report Generator to create reports for sharing your

Page 125 - Select Object Types

8 Create Custom Stylesheets8-4Create a New StylesheetTo create a stylesheet:1Open the Report Explorer.2From the menu bar, click Tools > Edit Styles

Page 126

Edit, Save, or Delete a Stylesheet8-5Edit, Save, or Delete a StylesheetIn this section...“Edit a Stylesheet” on page 8-5“Save a Stylesheet” on page 8

Page 127

8 Create Custom Stylesheets8-6You can use the Report Explorer to work with stylesheets as follows.Task Pane to Use ActionCreate a stylesheet Propertie

Page 128

Edit, Save, or Delete a Stylesheet8-7Task Pane to Use ActionOpen an existing stylesheet Properties Click the name of the stylesheet,which appear in t

Page 129

8 Create Custom Stylesheets8-82Select File > Save As from the menu bar and specify a new name for the stylesheet(to avoid overwriting built-in styl

Page 130

Edit Stylesheet Data Items8-9Edit Stylesheet Data ItemsIn this section...“Data Item Categories in Built-In Stylesheets” on page 8-9“Edit Data Items i

Page 131

8 Create Custom Stylesheets8-10Category Description of Data Items in CategoryPagination and GeneralStylesSpecifications of page orientation, margins,

Page 132

Edit Stylesheet Data Items8-11Category of Style Description of Data Items in CategoryChunking Options related to using an explicit TOC for chunking,d

Page 133 - Summary Table Components

8 Create Custom Stylesheets8-12• DocBook print parameters, see http://docbook.sourceforge.net/release/dsssl/current/doc/print/Categories of Styles in

Page 134

Edit Stylesheet Data Items8-13Category of Style Description of Data Items in CategoryTables Specification of width in simple listVariableLists Option

Page 135 - Add and Remove Properties

1 Getting Started1-4Report Creation WorkflowApproaches for Creating ReportsYou can create and generate reports :• Interactively, using the Report Expl

Page 136

8 Create Custom Stylesheets8-14stylesheet. The Options pane in the middle shows a list of available stylesheet dataitems. The Properties pane on the r

Page 137

Edit Stylesheet Data Items8-15Edit Boolean and Enumerated ValuesIn the previous figure, theShow Comments data item is of type Boolean. Its currentval

Page 138 - Edit Figure Loop Components

8 Create Custom Stylesheets8-16Edit StringsFor the values of some data items, the Report Explorer displays text in the editableValue field. You can sp

Page 139 - Figure Properties

Edit Stylesheet Data Items8-17To adjust the grid used to position the title page elements (such as the title and author)on the page, in the Propertie

Page 140

8 Create Custom Stylesheets8-181In the Properties pane, in the Include on title page list, select an element toexclude.2Click the right arrow button.

Page 141

Edit Stylesheet Data Items8-19Modify Title Placement PropertiesThe Title Placement data items, which are in the Miscellaneous category, control thepo

Page 142

8 Create Custom Stylesheets8-20Modify AttributesAn attribute is a data item that specifies information for an XML element. An attributemust be a child

Page 143

Edit Stylesheet Data Items8-21Edit Varpair ValuesData items in RTF stylesheets appear as varpair data items, which are name/valuepairs of information

Page 144 - Report Conversion Templates

8 Create Custom Stylesheets8-22on the right looks different from code associated with other kinds of MATLAB ReportGenerator stylesheets.Delete Data It

Page 145 - More About

Stylesheet Cells for Headers and Footers8-23Stylesheet Cells for Headers and FootersIn this section...“About Stylesheet Cells and Cell Groups” on pag

Page 146

Report Creation Workflow1-5OpenReportExplorer(GUI)Report GeneratorCreatesetupfileApplystylesheetGeneratereportAddcomponentsGenerateM-codeTo practice

Page 147 - Conversion Template Contents

8 Create Custom Stylesheets8-24You can use many combinations of conditions and values to customize content of headersand footers. The MATLAB Report Ge

Page 148

Stylesheet Cells for Headers and Footers8-25Label Definition DescriptionCondition Condition that mustbe met for content toappear in the reportThis is

Page 149 - Conversion Template Contents

8 Create Custom Stylesheets8-26Possible conditions and their values as coded in XML are shown in the following table.Name of ConditionPossible Values

Page 150

Stylesheet Cells for Headers and Footers8-27documents. For details about XSLT, see the Web site for the World Wide WebConsortium (W3C®) at http://ww

Page 151 - Part Templates

8 Create Custom Stylesheets8-28Each of these attribute sets is a pagination style data item for PDF stylesheets. You canedit a particular attribute in

Page 152

Customized Stylesheets8-29Customized StylesheetsIn this section...“Number Pages in a Report” on page 8-29“Add Graphics to Headers in PDF Reports” on

Page 153

8 Create Custom Stylesheets8-303Click Append.Add Graphics to Headers in PDF ReportsThis example shows how to include an image in the center of the hea

Page 154 - Copy a Conversion Template

Customized Stylesheets8-31Note: PDF reports only support bitmap (.bmp), jpeg (.jpg), and Scalable VectorGraphics (.svg) images.To include this image

Page 155

8 Create Custom Stylesheets8-32dDelete the text in the Value (XML) field.eSelect Graphic from the Append template selection list and click Append.The

Page 156 - Open a Conversion Template

Customized Stylesheets8-334By default, the name of the graphic is logo.bmp. Change all instances of this nameto sample_logo.bmp in the Value (XML) fi

Page 157

1 Getting Started1-6How MATLAB Report Generator and MATLAB Software InteractThe MATLAB Report Generator and MATLAB software interact to create reports

Page 158 - Move a Conversion Template

8 Create Custom Stylesheets8-34bBy default the value for the height of the header is 0.4 inch. Replace this valuewith 1.0in.cSave the stylesheet.7Gene

Page 159 - Delete a Conversion Template

Customized Stylesheets8-35Change Font Size, Page Orientation, and Paper Type of a GeneratedReportThis example shows how to:• Generate an XML source f

Page 160

8 Create Custom Stylesheets8-36The MATLAB Report Generator software converts the XML source file forwsvar-report to PDF format, and then opens the PDF

Page 161

Customized Stylesheets8-37The customheader.rgs stylesheet appears as an available stylesheet in theOptions pane in the middle of the Report Explorer.

Page 162

8 Create Custom Stylesheets8-384In the Attributes area of the Properties pane on the right, click Font Size - <xml>.The Report Explorer looks as

Page 163 - Custom Word Part Templates

Customized Stylesheets8-39The font size value is a product of $body.font.master and 2.0736. To change thefont size to a larger size, change the multi

Page 164

8 Create Custom Stylesheets8-40PDF Fonts for Non-English PlatformsIn this section...“PDF Font Support for Languages” on page 8-40“Identifying When to

Page 165

PDF Fonts for Non-English Platforms8-41Stylesheets Override PDF Font MappingPDF stylesheets for the MATLAB Report Generator specify fonts for body te

Page 166

8 Create Custom Stylesheets8-42• name_map — Contains name_mapping elements that specify the name of the font, thelanguage, and the font usage in the r

Page 167

PDF Fonts for Non-English Platforms8-43 <name_mapping lang="ru" platform="win" usage="body">Arial Unicode MS&l

Page 168 - Delete a Hole

Report Components1-7Report ComponentsTypes of Report ComponentsComponents are MATLAB objects that specify the content of a report. The MATLABReport G

Page 169

8 Create Custom Stylesheets8-44The approach you use to identify font names depends on your computer platform.Font names on WindowsTo identify a TrueTy

Page 170 - Add an Inline Hole

PDF Fonts for Non-English Platforms8-45Each name_mapping element has three attributes:• lang specifies the two letter ISO 639-1 code corresponding to

Page 171 - Add a Block Hole

8 Create Custom Stylesheets8-46• ~/Library/Fonts• /Library/Fonts• Network/Library/Fonts• System/Library/Fonts• System/Folder/FontsLinux Font File Loca

Page 172 - Create a Custom Template

9Comparing XML Files• “Compare XML Files” on page 9-2• “How to Compare XML Files” on page 9-4• “Explore the XML Comparison Report” on page 9-6• “How t

Page 173

9 Comparing XML Files9-2Compare XML FilesYou can use MATLAB Report Generator software to compare a pair of XML text files.The XML comparison tool proc

Page 174

Compare XML Files9-31“How to Compare XML Files” on page 9-42“Explore the XML Comparison Report” on page 9-6

Page 175

9 Comparing XML Files9-4How to Compare XML FilesIn this section...“Select Files to Compare” on page 9-4“Change Comparison Type” on page 9-5“XML Compar

Page 176

How to Compare XML Files9-5From the Comparison ToolTo compare files using the Comparison Tool, from the MATLAB Toolstrip, in the Filesection, select

Page 177

9 Comparing XML Files9-6Explore the XML Comparison ReportIn this section...“Navigate the XML Comparison Report” on page 9-6“Save Comparison Log Files

Page 178 - Create a Custom HTML Template

Explore the XML Comparison Report9-7Type of reportitemHighlighting NotesContainer None Rows with no highlighting indicate a container item thatcontai

Page 179 - Select an HTML Editor

1 Getting Started1-8Report ExplorerAbout the Report ExplorerUse the Report Explorer to:• Create and modify report setup files.• Apply stylesheets to f

Page 180

9 Comparing XML Files9-8Save Comparison Log Files in a Zip FileTemporary XML comparison files accumulate in tempdir/MatlabComparisons/XMLComparisons/T

Page 181

Explore the XML Comparison Report9-9Property of xmlcomp.Edits DescriptionLeftFileName File name of left file exported to XML.LeftRoot xmlcomp.Node ob

Page 182 - About Custom Components

9 Comparing XML Files9-10How the Matching Algorithm WorksIn this section...“Why Do I See Unexpected Results?” on page 9-10“How the Chawathe Algorithm

Page 183

How the Matching Algorithm Works9-11The Chawathe algorithm matches a particular label by extracting a flat sequence ofelements from the hierarchical

Page 184 - 7 Create Custom Components

9 Comparing XML Files9-12Why Use a Heuristic Algorithm?Chawathe’s algorithm is a heuristic. That is, it cannot guarantee to return the optimalmatching

Page 185 - Create Custom Components

How the Matching Algorithm Works9-13• A elements are scored on the ratio of matching B elements• For both A and B the score is compared with a thresh

Page 186 - Define Components

9 Comparing XML Files9-14In this case, the user might expect to see the very first C element on the left marked asdeleted, with the second and third C

Page 187 - Set Component Display Options

How the Matching Algorithm Works9-15Two Sequences of Elements Are Cross-MatchedIt is difficult to distinguish many similar potential matches and this

Page 189 - Specify Component Properties

10Components — Alphabetical List

Page 190

Report Explorer1-9Library paneThe Report Explorer has three panes:• The Outline pane on the left shows the hierarchy of components in currently opene

Page 191 - Build Components

10 Components — Alphabetical List10-2Array-Based TableConvert rectangular array into table and insert it into reportDescriptionThis component converts

Page 192

Array-Based Table10-3is truncated so that the number of elements equals the number of columns. If m isless than the number of columns in the table, t

Page 193 - About Component Customization

10 Components — Alphabetical List10-4Insert Anything into Report?Yes. Table.Classrptgen.cfr_tableSee AlsoTable, Table Body, Table Column Specification

Page 194

Axes Loop10-5Axes LoopRun child components for all axes objects in MATLAB workspaceDescriptionThe Axes Loop component runs its child components for a

Page 195

10 Components — Alphabetical List10-6Insert Anything into Report?Yes, inserts a section if you select the Create section for each object in loop optio

Page 196

Axes Snapshot10-7Axes SnapshotInsert image of selected MATLAB axes objects into the generated reportDescriptionInserts an image of selected MATLAB ax

Page 197

10 Components — Alphabetical List10-8• JPEG medium quality image• JPEG low quality image• PNG 24-bit image• TIFF - compressed• TIFF - uncompressed• Wi

Page 198

Axes Snapshot10-9• Custom: Specifies a custom image size. Specify the image size in the Size field andUnits list.• Size: Specifies the size of the fi

Page 199 - Customized Components

10 Components — Alphabetical List10-10• Max size: Specifies the maximum size of the snapshot in the format w h (width,height). This field is active on

Page 200

Chapter/Subsection10-11Chapter/SubsectionGroup portions of report into sections with titlesDescriptionThis component groups portions of the report in

Page 201

1 Getting Started1-10Outline Pane Context Library Pane ContentsNo report setup file is open. ReportsReport setup file is open. ComponentsStylesheet is

Page 202

10 Components — Alphabetical List10-12• Word (from template)• HTML (from template)• PDF (from template)2In the Chapter/Section properties dialog box,

Page 203

Comment10-13CommentInsert comment into XML source file created by report generation processDescriptionThis component inserts a comment into the XML s

Page 204

10 Components — Alphabetical List10-14Classrptgen.crg_commentSee Also“Convert XML Documents to Different File Formats”, Import File, Nest SetupFile, S

Page 205 - Customized Components

Empty Component10-15Empty ComponentGroup components to move, activate, or deactivate them, or create blank space in listDescriptionThis component doe

Page 206

10 Components — Alphabetical List10-16Evaluate MATLAB ExpressionEvaluate specified MATLAB expressionDescriptionThis component evaluates a specified MA

Page 207

Evaluate MATLAB Expression10-17To stop report generation when an error occurs in the MATLAB code that you added,change the second and third lines of

Page 208 - Stylesheets

10 Components — Alphabetical List10-18Figure LoopApply child components to specified graphics figuresDescriptionThis component applies each child comp

Page 209 - Stylesheets

Figure Loop10-19• Create link anchor for each object in loop: Creates a hyperlink to the object inthe generated report.Insert Anything into Report?Ye

Page 210 - Create a New Stylesheet

10 Components — Alphabetical List10-20Figure SnapshotInsert snapshot of Handle Graphics figure into reportDescriptionThis component inserts a snapshot

Page 211 - Edit a Stylesheet

Figure Snapshot10-21• JPEG medium quality image• JPEG low quality image• PNG 24-bit image• TIFF - compressed• TIFF - uncompressed• Windows metafile•

Page 212 - 8 Create Custom Stylesheets

Supported Report Formats1-11Supported Report FormatsWhen the report-generation process first creates a report, it generates a DocBookXML source file.

Page 213 - Save a Stylesheet

10 Components — Alphabetical List10-22• Custom: Specifies a custom image size. Set the image size in the Size field andUnits list.• Size: Specifies th

Page 214

Figure Snapshot10-23• Right• Left• Center• Title: Specifies a title for the figure:• Custom: Specifies a custom title.• Name: Specifies the figure na

Page 215 - Edit Stylesheet Data Items

10 Components — Alphabetical List10-24For LoopIteratively execute child componentsDescriptionThis component functions like the MATLAB for loop, except

Page 216

For Loop10-25Insert Anything into Report?No.Classrptgen_lo.clo_forSee AlsoLogical Else, Logical Elseif, Logical If, Logical Then, While Loop

Page 217 - Edit Stylesheet Data Items

10 Components — Alphabetical List10-26Graphics Object LoopRun child components for each Handle Graphics object open in MATLAB workspaceDescriptionThis

Page 218

Graphics Object Loop10-27Classrptgen_hg.chg_obj_loopSee AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Handle GraphicsLinking Anchor, Ha

Page 219 - Data Items

10 Components — Alphabetical List10-28Handle Graphics Linking AnchorDesignate location to which links pointDescriptionThis component designates a loca

Page 220

Handle Graphics Linking Anchor10-29See AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Graphics ObjectLoop, Handle Graphics Name, Handle

Page 221

10 Components — Alphabetical List10-30Handle Graphics NameInsert name of Handle Graphics object into the reportDescriptionThis component inserts the n

Page 222

Handle Graphics Name10-31See AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Graphics ObjectLoop, Handle Graphics Linking Anchor, Handle

Page 223

Revision HistoryJanuary 1999 First printing New (Release 11)December 2000 Second printing Revised (Release 12)June 2004 Third printing Revised for Ver

Page 225

10 Components — Alphabetical List10-32Handle Graphics ParameterInsert property name/property value pair from Handle Graphics figure, axes, or otherobj

Page 226

Handle Graphics Parameter10-33• Auto table/paragraph: Displays as a table or paragraph.• Inline text: Displays in line with the surrounding text.• Pa

Page 227

10 Components — Alphabetical List10-34Handle Graphics Property TableInsert table that reports on property name/property value pairsDescriptionThis com

Page 228

Handle Graphics Property Table10-35To apply a preset table, select the table and click Apply.• Split property/value cells: Splits property name/prope

Page 229

10 Components — Alphabetical List10-36• Double justified• Show as: Enables you to choose the format for the contents of the table cell. Optionsinclude

Page 230

Handle Graphics Summary Table10-37Handle Graphics Summary TableInsert table that summarizes Handle Graphics object propertiesDescriptionThis componen

Page 231

10 Components — Alphabetical List10-38Some entries in the list of available properties (such as Depth) are “virtual”properties which you cannot access

Page 232

Handle Graphics Summary Table10-39• Loop type:• All axes: Loops on all axes objects.• Current axes: Loops on the selected axes object.• Exclude objec

Page 233 - Insert Graphics Files

10 Components — Alphabetical List10-40See AlsoAxes Loop, Axes Snapshot, Figure Loop, Figure Snapshot, Graphics ObjectLoop, Handle Graphics Linking Anc

Page 234

Image10-41ImageInsert image from external file into reportDescriptionThis component inserts an image from an external file into the report. It can ha

Page 235 - Customized Stylesheets

2Create Your First Report• “Create a MATLAB Report” on page 2-2• “Create a Report Setup File” on page 2-3• “Add Report Content Using Components” on pa

Page 236

10 Components — Alphabetical List10-42• Use image size: Causes the image to appear the same size in the report as onscreen (default).• Fixed size: Spe

Page 237 - Customized Stylesheets

Image10-43Classrptgen.cfr_imageSee AlsoChapter/Subsection, Empty Component, List, Paragraph, Table, Text, TitlePage

Page 238

10 Components — Alphabetical List10-44Import FileImport ASCII text file into reportDescriptionThis component imports an ASCII text file into the repor

Page 239

Import File10-45There is a blank line above the third row.• Paragraphs defined by empty rows: Imports the file as text, in paragraphswith empty rows

Page 240

10 Components — Alphabetical List10-46• Text (retain line breaks)• Fixed-width text (retain line breaks)• Inserts paragraphs if you select one of the

Page 241

Insert Variable10-47Insert VariableInsert variable values into reportDescriptionThis component inserts the value (and, optionally, the name) of each

Page 242

10 Components — Alphabetical List10-48• Array size limit: Limits the width of the display in the generated report. Unitsare in pixels. The size limit

Page 243

Insert Variable10-49See AlsoEvaluate MATLAB Expression, MATLAB Property Table, MATLAB/ToolboxVersion Number, Variable Table

Page 244

10 Components — Alphabetical List10-50LinkInsert linking anchors or pointers into reportDescriptionThis component inserts linking anchors or pointers

Page 245

Link10-51• Emphasize link text: Italicizes the link text.ExamplesLink to an External Web Site1Open Report Explorer with the setedit command.2In the P

Page 246

2 Create Your First Report2-2Create a MATLAB ReportThis example shows how to create a report that explains and illustrates magic squares –matrices who

Page 247

10 Components — Alphabetical List10-528Click the link to open the MathWorks Web site.Link to Another Place in a Report1At the MATLAB command line, ent

Page 248

Link10-53• In Link text, enter For a detailed explanation, click here. (with theperiod).9Generate the report.

Page 249 - Locate Non-English Fonts

10 Components — Alphabetical List10-5410Click the link to move to near the top of the report, to “Chapter 1. Magic SquaresExplained.”.

Page 250

Link10-55Link to a ModelThis example shows how to add a link to a Simulink model. To view the model, you musthave the Simulink software installed.1Op

Page 251

10 Components — Alphabetical List10-567Click the “Open model” link to open the model.Insert Anything into Report?Yes. Text or anchor.Classrptgen.cfr_l

Page 252

List10-57ListCreate bulleted or numbered list from cell array or child componentsDescriptionThis component creates a bulleted or numbered list from a

Page 253

10 Components — Alphabetical List10-58• Numbered list.• Numbering style: Specifies a numbering style for numbered lists. This setting issupported only

Page 254 - Compare XML Files

List10-591. Example2. Example 1. Example 2. Example 1. Example 2. Example3. ExampleThis option is not available if you select Show parent number in

Page 255 - Compare XML Files

10 Components — Alphabetical List10-60• red• green• blueUse the following report setup file:[-] Report - Unnamed.rpt [-] Bulleted list from child co

Page 256 - How to Compare XML Files

Logical Else10-61Logical ElseSpecify an else condition for a Logical If componentDescriptionThis component acts as an else when it is the child of th

Page 257 - See Also

Create a Report Setup File2-3Create a Report Setup FileTo set up the magic squares report, first create a setup file to store the setup. Then addMATL

Page 258 - 9 Comparing XML Files

10 Components — Alphabetical List10-62See AlsoFor Loop, Logical Elseif, Logical If, Logical Then, While Loop

Page 259

Logical Elseif10-63Logical ElseifSpecify an elseif condition for a Logical If componentDescriptionThis component acts as an elseif when it is the chi

Page 260

10 Components — Alphabetical List10-64Logical IfSpecify logical if conditionDescriptionThis component acts as a logical if; it can have the Logical Th

Page 261

Logical If10-65Classrptgen_lo.clo_ifSee AlsoFor Loop, Logical Else, Logical Elseif, Logical Then, While Loop

Page 262

10 Components — Alphabetical List10-66Logical ThenSpecify a then condition for a Logical If componentDescriptionThis component acts as a then when it

Page 263

Logical Then10-67See AlsoFor Loop, Logical Else, Logical Elseif, Logical If, While Loop

Page 264

10 Components — Alphabetical List10-68MATLAB Property TableInsert table that includes MATLAB object property name/property value pairsDescriptionThis

Page 265

MATLAB Property Table10-69• Table Cells: Modifies table properties. The selection in this pane affects the availablefields in the Cell Properties pan

Page 266

10 Components — Alphabetical List10-70Insert Anything into Report?Yes. Table.Classrptgen.cml_prop_tableSee AlsoEvaluate MATLAB Expression, Insert Vari

Page 267

MATLAB/Toolbox Version Number10-71MATLAB/Toolbox Version NumberInsert table that shows version and release numbers and release date of MathWorksprodu

Page 268

2 Create Your First Report2-4The new file name appears in the Outline pane.To create the content for the report, see “Add Report Content Using Compone

Page 269

10 Components — Alphabetical List10-72Table Columns• Version number: Includes the product version number (for example, 3.4) for allinstalled MathWorks

Page 270 - Array-Based Table

Nest Setup File10-73Nest Setup FileAllow one report setup file (rpt file) to run inside anotherDescriptionThis component runs another report setup fi

Page 271 - Header/Footer Options

10 Components — Alphabetical List10-74The Nest Setup File dialog box displays the report description of the nested report, if thenested report has a r

Page 272 - Insert Anything into Report?

Paragraph10-75ParagraphInsert paragraph text into reportDescriptionThis component inserts a paragraph into the report. The paragraph text is taken fr

Page 273 - Axes Loop

10 Components — Alphabetical List10-76to generate the report. For more information about template styles, see “ReportConversion Templates”.Paragraph T

Page 274

Paragraph10-77StyleNote: If you use the Style Name field to specify a style for the paragraph text, the styleformats below override the corresponding

Page 275 - Axes Snapshot

10 Components — Alphabetical List10-78See AlsoChapter/Subsection, Empty Component, Image, Link, List, Table, Text, TitlePage

Page 276 - Print Options

Stop Report Generation10-79Stop Report GenerationHalt report generationDescriptionThis component acts like Stop during report generation. You can use

Page 277 - Display Options

10 Components — Alphabetical List10-80Insert Anything into Report?No.Classrptgen.crg_halt_genSee AlsoComment, Import File, Nest Setup File, Time/Date

Page 278

Table10-81TableInsert parent of tableDescriptionThis component is a parent of a component hierarchy that you specify to insert a tableinto a report.

Page 279 - Chapter/Subsection

Add Report Content Using Components2-5Add Report Content Using ComponentsIn this section...“Report Components” on page 2-5“Specify Report Variables”

Page 280

10 Components — Alphabetical List10-82• Word (from template)• HTML (from template)• PDF (from template)2Set Table style name to Specify.3In the Table

Page 281 - Properties

Table10-83• Right: Aligns content with the right side of the column• Double justified: Justifies the left and right sides of the entry content, toavo

Page 282

10 Components — Alphabetical List10-84See AlsoTable Body, Table Column Specification, Table Entry, Table Footer,Table Header, Table Row, Array-Based T

Page 283 - Empty Component

Table Body10-85Table BodyInsert parent of table bodyDescriptionThis component is a parent of the rows that define the body of a table.This component

Page 284 - Evaluate MATLAB Expression

10 Components — Alphabetical List10-86Insert Anything into Report?Yes. Table.Classrptgen.cfr_ext_table_bodySee AlsoTable, Table Column Specification,

Page 285

Table Column Specification10-87Table Column SpecificationSpecify table column propertiesDescriptionSpecifies the format of a table column. Add a Tabl

Page 286 - Figure Loop

10 Components — Alphabetical List10-88• Left: Aligns content with the left side of the column.• Center: Aligns content in the middle of the column.• R

Page 287

Table Entry10-89Table EntryInsert table entryDescriptionSpecifies the format of a table entry.This component must be a child of a descendant of a Tab

Page 288 - Figure Snapshot

10 Components — Alphabetical List10-90• Row separator: Use this property to override the Row separator setting of theTable Row component for the row i

Page 289

Table Entry10-91Insert Anything into Report?Yes. Table.Classrptgen.cfr_ext_table_entrySee AlsoTable, Table Body, Table Column Specification, Table Fo

Page 290

2 Create Your First Report2-6Title PagecomponentChaptercomponentTextcomponentFigureSnapshotcomponentTextcomponent

Page 291

10 Components — Alphabetical List10-92Table FooterInsert parent of table footerDescriptionThis component is a parent of the Table Row components that

Page 292 - For Loop

Table Footer10-93Classrptgen.cfr_ext_table_footSee AlsoTable, Table Body, Table Column Specification, Table Entry, Table Header,Table Row, Array-Base

Page 293

10 Components — Alphabetical List10-94Table HeaderInsert parent of table headerDescriptionThis component is a parent of the Table Row components that

Page 294 - Graphics Object Loop

Table Header10-95Classrptgen.cfr_ext_table_headSee AlsoTable, Table Body, Table Column Specification, Table Entry, Table Footer,Table Row, Array-Base

Page 295

10 Components — Alphabetical List10-96Table RowInsert parent of table row entriesDescriptionThis component is a parent of Table Entry components that

Page 296

Table Row10-97To override the text rotation for a specific table entry, use the Table Entry Textorientation property for that table entry.• Rotated t

Page 297

10 Components — Alphabetical List10-98TextFormat and insert text into reportDescriptionThis component formats and inserts text into the report. It mus

Page 298 - Handle Graphics Name

Text10-99Example1Enter the following text:I have a %<ObjName> and it has %<NumLeaves> leaves. The word '%<ObjName>' has %

Page 299

10 Components — Alphabetical List10-100• Enter an RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shade ofblue.Insert Anything into Report

Page 300 - Handle Graphics Parameter

Time/Date Stamp10-101Time/Date StampInsert time and date of report generation into reportDescriptionThis component inserts the time and date of the r

Page 301

Add Report Content Using Components2-7Specify Report VariablesThe magic squares report uses variables defined in the MATLAB workspace to specifythe n

Page 302 - Select Graphics Object

10 Components — Alphabetical List10-102• Date order: Specifies the order in which the day, month, and year appear. Optionsinclude:• Day Month Year• Mo

Page 303 - Title Properties

Time/Date Stamp10-103Classrptgen.crg_tdsSee AlsoComment, Import File, Nest Setup File, Stop Report Generation

Page 304

10 Components — Alphabetical List10-104Title PageInsert title page at beginning of reportDescriptionThis component inserts a title page at the beginni

Page 305 - Handle Graphics Summary Table

Title Page10-105• No author: Does not specify an author name.• Automatic author: Automatically includes your user name as the author name.The author

Page 306 - Figure Selection

10 Components — Alphabetical List10-106• Alignment: Only reports in PDF or RTF format support this property. Optionsinclude:• Auto• Right• Left• Cente

Page 307

Title Page10-107• Italic: Makes the text italic.• Underline: Underlines the text.• Strikethrough: Strikes through the text.• Retain spaces and carria

Page 308

10 Components — Alphabetical List10-108• Bold: Makes the text bold.• Italic: Makes the text italic.• Underline: Underlines the text.• Strikethrough: S

Page 309

Variable Table10-109Variable TableInsert table that displays all the variables in the MATLAB workspaceDescriptionThis component inserts a table that

Page 310

10 Components — Alphabetical List10-110Note: Large variable arrays collapse to [MxN CLASS]. For example, if you have a300-by-200 double array, it appe

Page 311

While Loop10-111While LoopIteratively execute child components while a specified condition is trueDescriptionThis component iteratively executes its

Page 312 - Import File

2 Create Your First Report2-8The icon in the upper left corner of the Eval component indicates that thiscomponent cannot have child components. By def

Page 313

10 Components — Alphabetical List10-112Classrptgen_lo.clo_whileSee AlsoFor Loop, Logical Else, Logical Elseif, Logical If, Logical Then

Page 314

11Functions – Alphabetical List

Page 315 - Insert Variable

11 Functions – Alphabetical List11-2compwizCreate custom MATLAB Report Generator componentsSyntaxcompwizcompwiz ('–browse')compwiz ('–v

Page 316

append11-3appendClass: mlreportgen.dom.ContainerPackage: mlreportgen.domAppend DOM object to containerSyntaxdomObjOut = append(containerObj,domObj)De

Page 317

11 Functions – Alphabetical List11-4• mlreportgen.dom.HTML• mlreportgen.dom.HTMLFile• mlreportgen.dom.Image• mlreportgen.dom.InternalLink• mlreportgen

Page 318

append11-5• mlreportgen.dom.Paragraph• mlreportgen.dom.RawText• mlreportgen.dom.Table• mlreportgen.dom.Text• mlreportgen.dom.TemplateHole• mlreportge

Page 319 - Examples

11 Functions – Alphabetical List11-6cloneClass: mlreportgen.dom.ContainerPackage: mlreportgen.domCopy container objectSyntaxclonedContainer = clone(so

Page 320

clone11-7import mlreportgen.dom.*;rpt = Document('MyReport','docx'); c = Container();Color all of the text in this container red.

Page 321 - Generate the report

11 Functions – Alphabetical List11-8mlreportgen.dom.CustomElement.appendPackage: mlreportgen.domAppend HTML content to custom elementSyntaxcustomEleme

Page 322 - Explained.”

mlreportgen.dom.CustomElement.append11-9append(d,ol);close(d);rptview('test','html');• “Add Content to a Report”Input Argumentscu

Page 323 - Link to a Model

Add Report Content Using Components2-9%This MATLAB code sets up two variables%that define how the report runs.%magicSizeVector is a list of MxM%Magic

Page 324

11 Functions – Alphabetical List11-10addHTMLClass: mlreportgen.dom.DocumentPackage: mlreportgen.domAppend HTML string to documentSyntaxhtmlObjOut = ad

Page 325 - List Formatting

addHTML11-11HTML object with appended content, returned as an mlreportgen.dom.HTML object.ExamplesAppend HTML Text to DocumentCreate an HTML object f

Page 326

11 Functions – Alphabetical List11-12addHTMLFileClass: mlreportgen.dom.DocumentPackage: mlreportgen.domAppend HTML file contents to documentSyntaxdocu

Page 327

addHTMLFile11-13ExamplesAppend HTML File Contents to a DocumentIn a text editor, create a file and enter this text:<!DOCTYPE html><html>&

Page 328

11 Functions – Alphabetical List11-14More About• “Appending HTML to DOM Reports”Introduced in R2015a

Page 329 - Logical Else

mlreportgen.dom.Document.append11-15mlreportgen.dom.Document.appendPackage: mlreportgen.domAppend DOM or MATLAB object to documentSyntaxdomObjOut = a

Page 330

11 Functions – Alphabetical List11-16import mlreportgen.dom.*;d = Document('mydoc','html');ol = OrderedList({'first step&apos

Page 331 - Logical Elseif

mlreportgen.dom.Document.append11-17Example: myTextObj = append(myDocument,'This is an introduction')listContent — Items to append to the d

Page 332 - Logical If

11 Functions – Alphabetical List11-18• A string• A number• A Boolean value• One of the following DOM objects:• mlreportgen.dom.Text• mlreportgen.dom.P

Page 333

mlreportgen.dom.Document.append11-19• mlreportgen.dom.HTML• mlreportgen.dom.Image• mlreportgen.dom.InternalLink• mlreportgen.dom.LinkTarget• mlreport

Page 335

2 Create Your First Report2-101In the Outline pane on the left, select the Eval component.2In the Options pane in the middle, under the Formatting cat

Page 336 - MATLAB Property Table

11 Functions – Alphabetical List11-20• mlreportgen.dom.Text• mlreportgen.dom.UnorderedListSee Alsomlreportgen.dom.Document

Page 337 - Cell Properties

mlreportgen.dom.Document.close11-21mlreportgen.dom.Document.closePackage: mlreportgen.domClose documentSyntaxclose(docObj)Descriptionclose(docObj) cl

Page 338

11 Functions – Alphabetical List11-22Document to close, specified as an mlreportgen.dom.Document object.See Alsomlreportgen.dom.Document | mlreportgen

Page 339 - MATLAB/Toolbox Version Number

mlreportgen.dom.Document.createAutoNumberStream11-23mlreportgen.dom.Document.createAutoNumberStreamPackage: mlreportgen.domCreate numbering streamSyn

Page 340 - Table Columns

11 Functions – Alphabetical List11-24 p = Paragraph('Chapter '); p.Style = {CounterInc('chapter')}; p.WhiteSpace = '

Page 341 - Nest Setup File

mlreportgen.dom.Document.createAutoNumberStream11-25Use a number, regardless of the type of stream. The initial value used by the streamdepends on th

Page 342

11 Functions – Alphabetical List11-26mlreportgen.dom.Document.createTemplatePackage: mlreportgen.domCreate DOM templateSyntaxcreateTemplate(path)creat

Page 343 - Paragraph

mlreportgen.dom.Document.createTemplate11-27Input Argumentspath — Path for new templatestringIf you use the path argument without the type argument,

Page 344 - Style Name

11 Functions – Alphabetical List11-28mlreportgen.dom.Document.fillPackage: mlreportgen.domFill document holes with generated contentSyntaxfill()Descri

Page 345

mlreportgen.dom.Document.fill11-29 end methods function rpt = MyReport(filename,type,template) rpt = [email protected]

Page 346

Add Report Content Using Components2-11aIn the Title text box, enter Magic Squares.bIn the Subtitle text box, enter Columns, Rows, Diagonals: Everyon

Page 347 - Stop Report Generation

11 Functions – Alphabetical List11-30mlreportgen.dom.Document.getAutoNumberStreamPackage: mlreportgen.domReturn numbering streamSyntaxautoNumStreamOut

Page 348

mlreportgen.dom.Document.getAutoNumberStream11-31Input ArgumentsdocObj — Document that uses numbering streammlreportgen.dom.Document objectDocument t

Page 349

11 Functions – Alphabetical List11-32mlreportgen.dom.Document.getCorePropertiesPackage: mlreportgen.domGet document or template core propertiesSyntaxc

Page 350

mlreportgen.dom.Document.getCoreProperties11-33 LastModifiedBy: '' Revision: '2' Subject: [] Ti

Page 351

11 Functions – Alphabetical List11-34mlreportgen.dom.Document.getImageDirectoryPackage: mlreportgen.domGet image folder of documentSyntaximageDirector

Page 352

mlreportgen.dom.Document.getImageDirectory11-35type — Type of document or package'docx' | 'html'Type document or template. For a

Page 353 - Table Body

11 Functions – Alphabetical List11-36mlreportgen.dom.Document.getImagePrefixPackage: mlreportgen.domGet generated image name prefixSyntaximagePrefix =

Page 354

mlreportgen.dom.Document.getImagePrefix11-37Path of the document or template packagetype — Type of document or package'docx' | 'html&a

Page 355 - Table Column Specification

11 Functions – Alphabetical List11-38mlreportgen.dom.Document.getMainPartPathPackage: mlreportgen.domReturn path of main part of document output packa

Page 356

mlreportgen.dom.Document.getMainPartPath11-39Output ArgumentspathOut — Path of main part of document output packagestringPath of the main part of doc

Page 357 - Table Entry

2 Create Your First Report2-12The pane should look as follows:5Save the report.Add a ChapterNote: This section builds on the previous tasks described

Page 358

11 Functions – Alphabetical List11-40mlreportgen.dom.Document.getOPCMainPartPackage: mlreportgen.domReturn main part of document, document part, or te

Page 359

mlreportgen.dom.Document.getOPCMainPart11-41mlreportgen.dom.Document.getOPCMainPart('MyDoc.htmx','html')ans =/root.htmlInput Argu

Page 360 - Table Footer

11 Functions – Alphabetical List11-42• “Report Packages”See Alsomlreportgen.dom.Document.getMainPartPath |mlreportgen.dom.Document.setCoreProperties |

Page 361

mlreportgen.dom.Document.moveToNextHole11-43mlreportgen.dom.Document.moveToNextHolePackage: mlreportgen.domMove document append point to next templat

Page 362 - Table Header

11 Functions – Alphabetical List11-44Output ArgumentsholeID — Template hole IDhole IDThe ID of the template hole that the method moves to (the new cur

Page 363

mlreportgen.dom.Document.open11-45mlreportgen.dom.Document.openPackage: mlreportgen.domOpen documentSyntaxopen(docObj)Descriptionopen(docObj) opens a

Page 364 - Table Row

11 Functions – Alphabetical List11-46More AboutTips• After you open a document, you can no longer change its generated document type orthe template.•

Page 365

mlreportgen.dom.Document.package11-47mlreportgen.dom.Document.packagePackage: mlreportgen.domAdd OPC part files to document packageSyntaxpartOut = pa

Page 366

11 Functions – Alphabetical List11-48Document OPC package to add files to, specified as an mlreportgen.dom.Documentobject.opcPart — OPC part that spec

Page 367

mlreportgen.dom.Document.setCoreProperties11-49mlreportgen.dom.Document.setCorePropertiesPackage: mlreportgen.domSet OPC core properties of output do

Page 368

Add Report Content Using Components2-13If you have not completed the previous sections of this example, see open the completedreport setup file: Magi

Page 369 - Time/Date Stamp

11 Functions – Alphabetical List11-50Path of document, document part, or template, specified as a string.corePropertiesObj — OPC core properties to us

Page 370

mlreportgen.dom.ExternalLink.append11-51mlreportgen.dom.ExternalLink.appendPackage: mlreportgen.domAppend custom element to external linkSyntaxextern

Page 371

11 Functions – Alphabetical List11-52Text to append, specified as a string.styleName — Name of style to apply to appended text stringstringThe style t

Page 372 - Title Page

mlreportgen.dom.FormalTable.appendFooterRow11-53mlreportgen.dom.FormalTable.appendFooterRowPackage: mlreportgen.domAppend row to table footerSyntaxro

Page 373 - Image Tab

11 Functions – Alphabetical List11-54footerRow = appendFooterRow(table,rowForFooter);close(myReport);rptview('myDoc','html');• “Cr

Page 374 - Abstract Tab

mlreportgen.dom.FormalTable.appendHeaderRow11-55mlreportgen.dom.FormalTable.appendHeaderRowPackage: mlreportgen.domAppend row to table headerSyntaxro

Page 375 - Legal Notice Tab

11 Functions – Alphabetical List11-56headerRow = appendHeaderRow(table,rowForHeader);close(myReport);rptview('myDoc','html');• “Cr

Page 376

mlreportgen.dom.Group.append11-57mlreportgen.dom.Group.appendPackage: mlreportgen.domAdd DOM object to groupSyntaxdomObjOut = append(groupObj,domObj)

Page 377 - Variable Table

11 Functions – Alphabetical List11-58Input ArgumentsgroupObj — Group object to append DOM object tomlreportgen.dom.Group objectGroup object to append

Page 378

mlreportgen.dom.Group.append11-59You can append the following DOM objects:• mlreportgen.dom.CustomElement• mlreportgen.dom.DocumentPart• mlreportgen.

Page 379 - While Loop

2 Create Your First Report2-14Add Introductory Text to the First ChapterNote: This section builds on the previous tasks described in the step-by-step

Page 380

11 Functions – Alphabetical List11-60appendClass: mlreportgen.dom.HTMLPackage: mlreportgen.domAppend HTML string to HTML objectSyntaxhtmlObjOut = appe

Page 381

append11-61Output ArgumentshtmlObjOut — HTML object with appended contentan mlreportgen.dom.HTML objectHTML object with appended content, returned as

Page 382

11 Functions – Alphabetical List11-62cloneClass: mlreportgen.dom.HTMLPackage: mlreportgen.domCopy HTML objectSyntaxclonedHTMLObj = clone(sourceHTMLObj

Page 383 - Input Arguments

clone11-63import mlreportgen.dom.*;rpt = Document('ClonedHTMLReport','docx'); htmlObj1 = HTML('<p><b>Hello&l

Page 384 - Output Arguments

11 Functions – Alphabetical List11-64appendClass: mlreportgen.dom.HTMLFilePackage: mlreportgen.domAppend HTML to HTMLFile objectSyntaxhtmlFileObjOut =

Page 385

append11-65HTML object to append, specified as an mlreportgen.dom.HTML object.htmlFileObjToAppend — HTMLFile object to appendmlreportgen.dom.HTMLFile

Page 386

11 Functions – Alphabetical List11-66See Alsomlreportgen.dom.HTML | mlreportgen.dom.HTMLFileMore About• “Appending HTML to DOM Reports”Introduced in R

Page 387

mlreportgen.dom.LinkTarget.append11-67mlreportgen.dom.LinkTarget.appendPackage: mlreportgen.domAppend content to link targetSyntaxtextObj = append(ta

Page 388

11 Functions – Alphabetical List11-68append(d,target);append(d,InternalLink('home','Go to Top');close(d);rptview('mydoc'

Page 389

mlreportgen.dom.LinkTarget.append11-69styleName — Name of stylestringName of style, specified as a string.textObj — Text object containing the text t

Page 390

Add Report Content Using Components2-153By default, the Paragraph component inherits its text from its child components.Add two Text components.Note:

Page 391

11 Functions – Alphabetical List11-70mlreportgen.dom.MessageDispatcher.dispatchPackage: mlreportgen.domDispatch DOM status messageSyntaxdispatch(dispa

Page 392

mlreportgen.dom.MessageDispatcher.dispatch11-71close(d);rptview('test',doctype); delete (l); Check the progress messages in the MATLAB

Page 393

11 Functions – Alphabetical List11-72mlreportgen.dom.MessageDispatcher.getTheDispatcherPackage: mlreportgen.domReturn DOM message dispatcherSyntaxgetT

Page 394

mlreportgen.dom.MessageDispatcher.getTheDispatcher11-73append(d, p); close(d);rptview('test',doctype); delete (l); Check the progre

Page 395

11 Functions – Alphabetical List11-74mlreportgen.dom.OrderedList.appendPackage: mlreportgen.domAppend content to ordered listSyntaxlistOut = append(or

Page 396

mlreportgen.dom.OrderedList.append11-75close(myReport);rptview('myDoc','html');Append an Unordered Listimport mlreportgen.dom.*;m

Page 397

11 Functions – Alphabetical List11-76Ordered list to append content to, specified as an mlreportgen.dom.OrderedListobject.listItemObj — List item to a

Page 398

mlreportgen.dom.OrderedList.append11-77The custom element must be a valid HTML or Word child of a list, depending on whetherthe output type of the do

Page 399

11 Functions – Alphabetical List11-78mlreportgen.dom.Paragraph.appendPackage: mlreportgen.domAppend content to paragraphSyntaxparaObjOut = append(para

Page 400

mlreportgen.dom.Paragraph.append11-79rptview('mydoc','html');Specify a Style for Appended Textimport mlreportgen.dom.*;doc = Docu

Page 401

2 Create Your First Report2-16square (shown in the upper right portion of the image)could aid in the cure of melancholy. The engraving's date (15

Page 402

11 Functions – Alphabetical List11-80styleName — Name of a style to apply to textstringName of the style to define the appearance of the text. Use a s

Page 403

mlreportgen.dom.Paragraph.clone11-81mlreportgen.dom.Paragraph.clonePackage: mlreportgen.domCopy paragraph objectSyntaxclonedPara = clone(sourcePara)D

Page 404

11 Functions – Alphabetical List11-82 Underline: [] WhiteSpace: [] FontFamilyName: [] FontSize: [] Str

Page 405

mlreportgen.dom.Paragraph.clone11-83• When you clone a paragraph, DOM copies all of the children objects of the sourceparagraph, but not the parent o

Page 406

11 Functions – Alphabetical List11-84p.Italicans = 13For the cloned paragraph, change turn off bold text. The change to the Boldformat in the clon

Page 407

mlreportgen.dom.ProgressMessage.formatAsHTML11-85mlreportgen.dom.ProgressMessage.formatAsHTMLPackage: mlreportgen.domWrap message in HTML tagsSyntaxh

Page 408

11 Functions – Alphabetical List11-86append(d,p);close(d);rptview('test',doctype); delete (l);• “Display Report Generation Messages”Inpu

Page 409

mlreportgen.dom.ProgressMessage.formatAsText11-87mlreportgen.dom.ProgressMessage.formatAsTextPackage: mlreportgen.domFormat message as textSyntaxtext

Page 410

11 Functions – Alphabetical List11-88append(d,p);close(d);rptview('test',doctype); delete(l);• “Display Report Generation Messages”Input

Page 411

mlreportgen.dom.ProgressMessage.passesFilter11-89mlreportgen.dom.ProgressMessage.passesFilterPackage: mlreportgen.domDetermine if message passes filt

Page 412

Add Report Content Using Components2-174With the Eval component still selected, do the following in the Properties pane onthe right:aClear the Insert

Page 413

11 Functions – Alphabetical List11-90p.Tag = 'chapter title';p.Style = { CounterInc('chapter'),... CounterReset('table&apo

Page 414

mlreportgen.dom.ProgressMessage.passesFilter11-91See Alsomlreportgen.dom.MessageFilter | mlreportgen.dom.ProgressMessage

Page 415

11 Functions – Alphabetical List11-92mlreportgen.dom.Table.entryPackage: mlreportgen.domAccess table entrySyntaxtableEntryOut = entry(tableObj,row,col

Page 416

mlreportgen.dom.Table.entry11-93row — Table row containing the entrynumberIndex number of the row (top row is row 1).Data Types: doublecolumn — Colum

Page 417

11 Functions – Alphabetical List11-94mlreportgen.dom.Table.rowPackage: mlreportgen.domAccess table rowSyntaxtableRowOut = row(tableObj,row)Description

Page 418

mlreportgen.dom.Table.row11-95Table containing the entry, specified as an mlreportgen.dom.Table ormlreportgen.dom.FormalTable object.row — Table rown

Page 419

11 Functions – Alphabetical List11-96mlreportgen.dom.TableRow.appendPackage: mlreportgen.domAppend content to table rowSyntaxentryOut = append(rowObj,

Page 420

mlreportgen.dom.TableRow.append11-97endAppend the table and display the report.append(myReport,table);close(myReport);rptview('myDoc',&apos

Page 421

11 Functions – Alphabetical List11-98reportGenerate reports from report setup fileSyntaxreportreport (filename,...)report ( ___ ,-oOPATH)report ( ___

Page 422

report11-99• -graphical — Shows hierarchy in Report Explorer• -debug — Enables debug mode• -quiet — Sets error echo level to 0• -sSTYLESHEETNAME — Se

Page 423

2 Create Your First Report2-18This MATLAB code displays the Dürer etching in a MATLAB figure window.cIn the Evaluate expression if there is an error t

Page 424

11 Functions – Alphabetical List11-100More About• “Generate Reports”See Alsosetedit | rptconvert | rptlist | compwiz

Page 425

rptconvert11-101rptconvertConvert DocBook XML files into supported document formatsSyntaxrptconvert()rptname = rptconvert (source)rptname = rptconver

Page 426

11 Functions – Alphabetical List11-102format is a unique identifier code for each output format type. If you omit thisargument, the XML file is conver

Page 427

rptlist11-103rptlistRetrieve list of all report setup files in MATLAB pathSyntaxrptlistrptlist ('system_name')list = rptlistDescriptionrptl

Page 428

11 Functions – Alphabetical List11-104rptviewDisplay DOM reportSyntaxrptview(reportPath)rptview(reportPath,'pdf')rptview(reportName,format)D

Page 429

rptview11-105rptview('mydoc.htmx');Convert a Word Report and Display It in a PDF ViewerUse the rptview function to convert a Word report to

Page 430

11 Functions – Alphabetical List11-106close(dWord);rptview('mydoc','docx');Input ArgumentsreportPath — Report file path including

Page 431

setedit11-107seteditStart Report ExplorerSyntaxsetedit (filename)Descriptionsetedit (filename) opens the Report Explorer and loads the report setup f

Page 432

11 Functions – Alphabetical List11-108unzipTemplateUnzip zipped DOM templateSyntaxunzipTemplate(zippedTemplatePath)unzipTemplate(zippedTemplatePath,un

Page 433

unzipTemplate11-109If you do not include a file extension in the path, the function assumes the extension is.htmtx.If you do not use the unzippedTemp

Page 434

Add Report Content Using Components2-195In the Outline pane on the left, select the Eval component.6In the Library pane in the middle, under the Hand

Page 435

11 Functions – Alphabetical List11-110zipTemplatePackage DOM HTML template in zip fileSyntaxzipTemplate(unzippedTemplateFolder)zipTemplate(zippedTempl

Page 436

zipTemplate11-111root.html and your document part template library file, if it exists, is in a file calleddocpart_templates.html.zipTemplate(zippedTe

Page 437

11 Functions – Alphabetical List11-112Full path for the zipped DOM template, including the file extension .htmtx, specified asa string.mainDocument —

Page 438

zipTemplate11-113If the unzipped template stores images in a folder other than one named images inthe root folder of the template, include a text fil

Page 440

12Classes – Alphabetical List

Page 441

12 Classes – Alphabetical List12-2mlreportgen.dom.AllowBreakAcrossPages classPackage: mlreportgen.domAllow row to straddle page breakDescriptionSpecif

Page 442

mlreportgen.dom.AllowBreakAcrossPages class12-3PropertiesId — ID for document elementstringA session-unique ID is generated as part of document eleme

Page 443

12 Classes – Alphabetical List12-4mlreportgen.dom.AutoNumber classPackage: mlreportgen.domAutomatically generated numberDescriptionAutomatically gener

Page 444

mlreportgen.dom.AutoNumber class12-5Name of number style defined in the template, specified as a string. The style specifiedby styleName must be defi

Page 445

vContentsGetting Started1MATLAB Report Generator Product Description . . . . . . . . . 1-2Key Features . . . . . . . . . . . . . . . . . . . . . . . .

Page 446

2 Create Your First Report2-20To inline an image component (such as Image or Figure Snapshot), include it withina Paragraph component.7In the Properti

Page 447

12 Classes – Alphabetical List12-6• The name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.html.• A hexadec

Page 448

mlreportgen.dom.AutoNumber class12-7• pt — points• px — pixelId — ID for document elementstringA session-unique ID is generated as part of document e

Page 449

12 Classes – Alphabetical List12-8The style specified by styleName must be defined in the template used to create thedocument element to which this nu

Page 450

mlreportgen.dom.AutoNumber class12-9Border String Description Supported Output Typessingle Single line HTML and Wordthick Thick line Wordwave Wavy li

Page 451

12 Classes – Alphabetical List12-10Border String Description Supported Output Typespre Preserves white space. Textwraps only on line breaks.Acts like

Page 452

mlreportgen.dom.AutoNumber class12-11doctype = 'html';d = Document('test',doctype);p = Paragraph('Chapter ');p.Style =

Page 453

12 Classes – Alphabetical List12-12mlreportgen.dom.AutoNumberStream classPackage: mlreportgen.domNumbering streamDescriptionA numbering stream generat

Page 454

mlreportgen.dom.AutoNumberStream class12-13The value of this property should be one less than the number that you want to begenerated first. For exam

Page 455

12 Classes – Alphabetical List12-14mlreportgen.dom.BackgroundColor classPackage: mlreportgen.domBackground color of document elementDescriptionSpecifi

Page 456

mlreportgen.dom.BackgroundColor class12-15Background color for a report object, represented by amlreportgen.dom.BackgroundColor objectPropertiesHexVa

Page 457

Add Report Content Using Components2-21The next three steps set up the report to delete the image from the MATLABworkspace after the image has been a

Page 458

12 Classes – Alphabetical List12-16ExamplesCreate and Apply a Background ColorCreate a deep sky blue background color object and apply it to a paragra

Page 459

mlreportgen.dom.Bold class12-17mlreportgen.dom.Bold classPackage: mlreportgen.domBold for text objectDescriptionSpecifies whether to use bold for a t

Page 460

12 Classes – Alphabetical List12-18A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate

Page 461

mlreportgen.dom.Bold class12-19rptview('test',doctype);See Alsomlreportgen.dom.ItalicMore About• “Report Formatting Approaches”

Page 462

12 Classes – Alphabetical List12-20mlreportgen.dom.Border classPackage: mlreportgen.domBorder properties of objectDescriptionSpecifies the border prop

Page 463

mlreportgen.dom.Border class12-21Applies ToStringDOCX HTML'dashsmallgap' X 'dotted' X X'dotdash' X 'dotdotdash&a

Page 464

12 Classes – Alphabetical List12-22You can specify:• The name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color

Page 465

mlreportgen.dom.Border class12-23• A hexadecimal RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shadeof blue.Id — ID for document elemen

Page 466

12 Classes – Alphabetical List12-24• px — pixelBottomColor — Bottom border segment colorstringBottom border segment color, specified as a string.Botto

Page 467

mlreportgen.dom.Border class12-25Left border segment width, specified as a string.RightColor — Right border segment colorstringRight border segment c

Page 468

2 Create Your First Report2-22• “Create the Magic Square” on page 2-29• “Add Display Logic” on page 2-32• “Display the Magic Square” on page 2-34Creat

Page 469

12 Classes – Alphabetical List12-26mlreportgen.dom.BorderCollapse classPackage: mlreportgen.domCollapse HTML table bordersDescriptionSpecifies whether

Page 470

mlreportgen.dom.BorderCollapse class12-27A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the g

Page 471

12 Classes – Alphabetical List12-28p = Paragraph('Separate Borders');append(d,p);table = Table(magicArray);table.Style = {Border('solid

Page 472

mlreportgen.dom.CharEntity class12-29mlreportgen.dom.CharEntity classPackage: mlreportgen.domCreate character entity referenceDescriptionCreate a ref

Page 473

12 Classes – Alphabetical List12-30Output ArgumentscharEntityObj — Reference to a character entitymlreportgen.dom.CharEntity objectReference to a char

Page 474

mlreportgen.dom.CharEntity class12-31Content — Text string contained by this document elementstringText string contained by this document element.Cus

Page 475

12 Classes – Alphabetical List12-32• pi — picas• pt — points• px — pixelId — ID for document elementstringA session-unique ID is generated as part of

Page 476

mlreportgen.dom.CharEntity class12-33• double — Use a double line for strikethrough for Word documentsSetting the Strike property adds a correspondin

Page 477

12 Classes – Alphabetical List12-34Border String Description Supported Output TypesdashDotDotHeavy Line with heavy dasheswith two dots betweenthe dash

Page 478

mlreportgen.dom.CharEntity class12-35To specify how to handle white space, use one of the following strings.Border String Description Supported Outpu

Page 479

Add Report Content Using Components2-23This For Loop component appears inside the Chapter component. However, themagic squares should be processed af

Page 480

12 Classes – Alphabetical List12-36Method PurposeUse CharEntity.append in a similar wayto how you use ExternalLink.append.cloneUse CharEntity.clone in

Page 481

mlreportgen.dom.CharEntity class12-37More About• “Report Formatting Approaches”

Page 482

12 Classes – Alphabetical List12-38mlreportgen.dom.Color classPackage: mlreportgen.domColor of document elementDescriptionSpecifies the color of a doc

Page 483

mlreportgen.dom.Color class12-39Color for document element, represented by an mlreportgen.dom.Color object.PropertiesHexValue — hexidecimal color val

Page 484

12 Classes – Alphabetical List12-40import mlreportgen.dom.*;doctype = 'html';d = Document('test',doctype);colorfulStyle = {Bold,Co

Page 485

mlreportgen.dom.ColSep class12-41mlreportgen.dom.ColSep classPackage: mlreportgen.domDraw lines between table columnsDescriptionDraw lines between ta

Page 486

12 Classes – Alphabetical List12-42Applies ToStringDOCX HTML'dashsmallgap' X 'dotted' X X'dotdash' X 'dotdotdash&

Page 487

mlreportgen.dom.ColSep class12-43You can specify:• The name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.

Page 488

12 Classes – Alphabetical List12-44• A hexadecimal RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shadeof blue.Id — ID for document eleme

Page 489

mlreportgen.dom.ColSep class12-45• mm — millimeters• pi — picas• pt — points• px — pixelData Types: charExamplesSpecify Table Column FormattingSet th

Page 490

2 Create Your First Report2-24aIn the End text box, replace the existing text with the following text:length(magicSizeVector)This is the length of the

Page 491

12 Classes – Alphabetical List12-46mlreportgen.dom.Container classPackage: mlreportgen.domContainer of document objectsDescriptionCreates a container

Page 492

mlreportgen.dom.Container class12-47• Use a group object to append the same content in multiple places in a documentwithout cloning the group.Constru

Page 493

12 Classes – Alphabetical List12-48Children — Children of containercell array of mlreportgen.dom.Element objectsThis read-only property lists child el

Page 494

mlreportgen.dom.Container class12-49Tag for document element, specified as a string.A session-unique ID is generated as part of document element crea

Page 495

12 Classes – Alphabetical List12-50See Alsomlreportgen.dom.GroupIntroduced in R2015a

Page 496 - Construction

mlreportgen.dom.CoreProperties class12-51mlreportgen.dom.CoreProperties classPackage: mlreportgen.domOPC core properties of document or templateDescr

Page 497

12 Classes – Alphabetical List12-52Creator — Creator of documentstringCreator of a document, specified as a string.Description — Description of docume

Page 498

mlreportgen.dom.CoreProperties class12-53Subject of a document, specified as a string.Tag — Tag for document elementstringTag for document element, s

Page 499

12 Classes – Alphabetical List12-54mlreportgen.dom.CounterInc classPackage: mlreportgen.domNumber stream counter incrementerDescriptionCreates a numbe

Page 500

mlreportgen.dom.CounterInc class12-55A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gener

Page 501

Add Report Content Using Components2-25Next create a chapter for each square by adding a Chapter component to the report as achild of the For Loop co

Page 502

12 Classes – Alphabetical List12-56See Alsomlreportgen.dom.AutoNumber | mlreportgen.dom.AutoNumberStream |mlreportgen.dom.CounterReset

Page 503

mlreportgen.dom.CounterReset class12-57mlreportgen.dom.CounterReset classPackage: mlreportgen.domReset numbering stream counterDescriptionReset a num

Page 504

12 Classes – Alphabetical List12-58A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate

Page 505

mlreportgen.dom.CounterReset class12-59p.Style = {CounterInc('chapter'),CounterReset('table'),... WhiteSpace('preserve&apo

Page 506

12 Classes – Alphabetical List12-60mlreportgen.dom.CustomAttribute classPackage: mlreportgen.domCustom element attributeDescriptionCustom element attr

Page 507

mlreportgen.dom.CustomAttribute class12-61PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element cr

Page 508

12 Classes – Alphabetical List12-62li = ListItem('Owl');li.CustomAttributes = {CustomAttribute('data-animal-type','bird'

Page 509

mlreportgen.dom.CustomElement class12-63mlreportgen.dom.CustomElement classPackage: mlreportgen.domCustom element of documentDescriptionUse a custom

Page 510

12 Classes – Alphabetical List12-64HTML or Microsoft Word must support the custom attributes of this document element.Id — ID for document elementstri

Page 511

mlreportgen.dom.CustomElement class12-65Method PurposecloneUse CustomElement.clone similar tohow you use Paragraph.clone.Copy custom element.Examples

Page 512

2 Create Your First Report2-264Save the report.Determine the Matrix SizeNote: This section builds on the previous tasks described in the step-by-step

Page 513

12 Classes – Alphabetical List12-66mlreportgen.dom.CustomText classPackage: mlreportgen.domPlain text appended to custom elementDescriptionPlain text

Page 514

mlreportgen.dom.CustomText class12-67A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gener

Page 515 - mlreportgen.dom.Border class

12 Classes – Alphabetical List12-68mlreportgen.dom.DebugMessage classPackage: mlreportgen.domDebugging messageDescriptionCreates debugging message tex

Page 516

mlreportgen.dom.DebugMessage class12-69A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gen

Page 517

12 Classes – Alphabetical List12-70import mlreportgen.dom.*;d = Document('test','html');Create a message dispatcher.dispatcher = M

Page 518

mlreportgen.dom.Document class12-71mlreportgen.dom.Document classPackage: mlreportgen.domReport definition documentDescriptionCreate mlreportgen.dom.

Page 519

12 Classes – Alphabetical List12-72Full path of output file or folder for this document. If you do not specify a file extension,the extension is based

Page 520

mlreportgen.dom.Document class12-73Output ArgumentsdocumentObj — Report definition documentmlreportgen.dom.Document objectReport definition document,

Page 521

12 Classes – Alphabetical List12-74only, then generating an output file using the same path as an existing output file causesan error.Data Types: logi

Page 522

mlreportgen.dom.Document class12-75For unzipped packaging, the document output is stored in a folder having the root filename of the OutputPath prope

Page 523

Add Report Content Using Components2-27Extract the size of each magic square matrix from magicSizeVector using an EvaluateMATLAB Expression component

Page 524

12 Classes – Alphabetical List12-76Type — Type of output'html' (default) | 'docx' | 'html-file'Type of output, specified

Page 525

mlreportgen.dom.Document class12-77Method PurposegetOPCMainPart Get full path of main part of outputdocument.moveToNextHole Move to next template hol

Page 526

12 Classes – Alphabetical List12-78close(d); rptview(d.OutputPath); See Alsomlreportgen.dom.DocumentPart

Page 527

mlreportgen.dom.DocumentPart class12-79mlreportgen.dom.DocumentPart classPackage: mlreportgen.domDocument partDescriptionThis class defines a form th

Page 528

12 Classes – Alphabetical List12-80Type of output, specified as 'html', 'docx' or 'html-file'.• 'html'— HTML o

Page 529

mlreportgen.dom.DocumentPart class12-81PropertiesChildren — Children of this documentcell array of mlreportgen.dom.Element objectsThis read-only prop

Page 530

12 Classes – Alphabetical List12-82A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, wher

Page 531

mlreportgen.dom.DocumentPart class12-83Method Purposeappend Append document element to the documentpart.close Close this document part.createTemplate

Page 532

12 Classes – Alphabetical List12-84mlreportgen.dom.DOCXPageFooter classPackage: mlreportgen.domPage footer definition for Microsoft Word documentDescr

Page 533

mlreportgen.dom.DOCXPageFooter class12-85• first— footer appears only on the first page of a section• even— footer appears on even pages in a section

Page 534

2 Create Your First Report2-284Save the report.Insert the Magic Square Size into the ReportNote: This section builds on the previous tasks described i

Page 535

12 Classes – Alphabetical List12-86This read-only property for a Word document is a mlreportgen.dom.DOCXSectionobject that specifies the properties, a

Page 536

mlreportgen.dom.DOCXPageFooter class12-87Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is g

Page 537

12 Classes – Alphabetical List12-88Method Purpose• Text• UnorderedListclose Close footer.fill Fill template hole.moveToNextHole Move to next template

Page 538

mlreportgen.dom.DOCXPageHeader class12-89mlreportgen.dom.DOCXPageHeader classPackage: mlreportgen.domPage header definition for Microsoft Word docume

Page 539

12 Classes – Alphabetical List12-90For example, to have a header appear on the first page and on even pages, define twoseparate headers, one with page

Page 540

mlreportgen.dom.DOCXPageHeader class12-91This read-only property is the type (inline or block) of the current template hole.• An inline hole is for d

Page 541

12 Classes – Alphabetical List12-92Tag for document element, specified as a string.A session-unique ID is generated as part of document element creati

Page 542

mlreportgen.dom.DOCXPageHeader class12-93Method Purposeclose Close header.fill Fill template hole.moveToNextHole Move to next template hole.open Open

Page 543

12 Classes – Alphabetical List12-94mlreportgen.dom.DOCXPageMargins classPackage: mlreportgen.domPage margins for Microsoft Word page layoutDescription

Page 544

mlreportgen.dom.DOCXPageMargins class12-95• pi — picas• pt — points• px — pixelsFooter — Footer sizestringSpecify the size using the same format used

Page 545

Add Report Content Using Components2-294In the Library pane, under the MATLAB category, double-click Insert Variable.5In the Properties pane on the r

Page 546

12 Classes – Alphabetical List12-96Specify your own tag value, for example, to make it easier to identify where an issueoccurred during document gener

Page 547

mlreportgen.dom.DOCXPageSize class12-97mlreportgen.dom.DOCXPageSize classPackage: mlreportgen.domSize and orientation of pages in Microsoft Word docu

Page 548

12 Classes – Alphabetical List12-98• pi — picas• pt — points• px — pixelswidth — Width of page'8.5in' (default) | stringThe string must have

Page 549

mlreportgen.dom.DOCXPageSize class12-99PropertiesHeight — Height of pages in Word page layout sectionstringString specifying the page height. The str

Page 550

12 Classes – Alphabetical List12-100A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe

Page 551

mlreportgen.dom.DOCXPageSize class12-101rptview('myreport','docx');• “Report Formatting Approaches”See Alsomlreportgen.dom.DOCXPa

Page 552

12 Classes – Alphabetical List12-102mlreportgen.dom.DOCXRawFormat classPackage: mlreportgen.domXML markup for array of Microsoft Word formatsDescripti

Page 553

mlreportgen.dom.DOCXRawFormat class12-103For information about XML markup for Word formats, see http://officeopenxml.com/anatomyofOOXML.php.Tag — Tag

Page 554

12 Classes – Alphabetical List12-104mlreportgen.dom.DOCXSection classPackage: mlreportgen.domPage format and layout for Microsoft Word document sectio

Page 555

mlreportgen.dom.DOCXSection class12-105A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gen

Page 556

vi ContentsAdd Report Content Using Components . . . . . . . . . . . . . . . . . 2-5Report Components . . . . . . . . . . . . . . . . . . . . . . . .

Page 557

2 Create Your First Report2-30To create the magic square and display the associated matrix or image, use the EvaluateMATLAB Expression component.1In t

Page 558

12 Classes – Alphabetical List12-106Style — Formats defining section stylearray of format objectsThe formats you specify using this property override

Page 559

mlreportgen.dom.DOCXSection class12-107p = Paragraph('Hello World');append(d,p);close(d);rptview('mydoc.docx');See Alsomlreportge

Page 560

12 Classes – Alphabetical List12-108mlreportgen.dom.DOCXSubDoc classPackage: mlreportgen.domReference to external Microsoft Word documentDescriptionRe

Page 561

mlreportgen.dom.DOCXSubDoc class12-109Path of Word document targeted by this reference, represented by anmlreportgen.dom.DOCXSubDoc object.Properties

Page 562

12 Classes – Alphabetical List12-110ExamplesAppend a Word Document to a Reportimport mlreportgen.dom.*info = Document('CompanyInfo','do

Page 563

mlreportgen.dom.ErrorMessage class12-111mlreportgen.dom.ErrorMessage classPackage: mlreportgen.domError messageDescriptionSpecifies error message tex

Page 564

12 Classes – Alphabetical List12-112A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generat

Page 565

mlreportgen.dom.ErrorMessage class12-113d = Document('test','html'); dispatcher = MessageDispatcher.getTheDispatcher;l = addl

Page 566

12 Classes – Alphabetical List12-114mlreportgen.dom.ExternalLink classPackage: mlreportgen.domHyperlink to a location outside of documentDescriptionDe

Page 567

mlreportgen.dom.ExternalLink class12-115textObj — Text object containing link textmlreportgen.dom.Text objectText object containing link text, specif

Page 568

Add Report Content Using Components2-31cIn the Evaluate expression if there is an error text box, replace the existingtext with the following:disp([&

Page 569

12 Classes – Alphabetical List12-116A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe

Page 570

mlreportgen.dom.FirstLineIndent class12-117mlreportgen.dom.FirstLineIndent classPackage: mlreportgen.domIndent first line of paragraphDescriptionInde

Page 571

12 Classes – Alphabetical List12-118• pt — points• px — pixelsstyle — Type of indentationstringString specifying the style of indentation of the first

Page 572

mlreportgen.dom.FirstLineIndent class12-119A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS

Page 573

12 Classes – Alphabetical List12-120mlreportgen.dom.FlowDirection classPackage: mlreportgen.domDirection of text or table column flowDescriptionSpecif

Page 574

mlreportgen.dom.FlowDirection class12-121PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element cre

Page 575

12 Classes – Alphabetical List12-122q = clone(p);q.Style = {FlowDirection('ltr')};append(d,q);close(d);rptview(d.OutputPath,doctype);

Page 576

mlreportgen.dom.FontFamily class12-123mlreportgen.dom.FontFamily classPackage: mlreportgen.domFont familyDescriptionProperties of font family to be u

Page 577

12 Classes – Alphabetical List12-124ComplexScriptFamilyName — Font family for complex scriptsstringFor Word documents only. String specifying a font f

Page 578

mlreportgen.dom.FontSize class12-125mlreportgen.dom.FontSize classPackage: mlreportgen.domFont sizeDescriptionSpecifies the size of a font.Constructi

Page 579

2 Create Your First Report2-32Add Display LogicNote: This section builds on the previous tasks described in the step-by-step examplesummarized in “Cre

Page 580

12 Classes – Alphabetical List12-126Font size, represented by an mlreportgen.dom.FontSize object.PropertiesId — ID for document elementstringA session

Page 581

mlreportgen.dom.FontSize class12-127More About• “Report Formatting Approaches”

Page 582

12 Classes – Alphabetical List12-128mlreportgen.dom.FormalTable classPackage: mlreportgen.domFormal tableDescriptionDefines a formal table, which is a

Page 583

mlreportgen.dom.FormalTable class12-129Input Argumentsncols — Number of columns in tablenumeric valueNumber of columns in a table, specified as a num

Page 584

12 Classes – Alphabetical List12-130• Character array (strings)• One- or two-dimensional cell array• double• mlreportgen.dom.Text object• mlreportgen.

Page 585

mlreportgen.dom.FormalTable class12-131Output ArgumentsformalTableObj — Formal tablemlreportgen.dom.FormalTable objectFormal table, represented by an

Page 586

12 Classes – Alphabetical List12-132Border String Description Supported Output Typesdotdash Line with alternating dotsand dashesWorddotdotdash Line wi

Page 587

mlreportgen.dom.FormalTable class12-133Border String Description Supported Output Typesthinthicklargegap Dashed line withalternating thin and thickda

Page 588

12 Classes – Alphabetical List12-134• A hexadecimal RGB (truecolor) value as #RRGGBB. For example, #0000ff is a shadeof blue.BorderWidth — Table borde

Page 589

mlreportgen.dom.FormalTable class12-135ColSepWidth — Width of line separating table columnsstringString having the format valueUnits, where Units is

Page 590

Add Report Content Using Components2-33magic_Square_Size<=largestDisplayedArrayThis command tests whether the current matrix size (magic_Square_Si

Page 591

12 Classes – Alphabetical List12-136Footer — Footer for this tablemlreportgen.dom.TableFooter objectThe table constructor creates a table footer objec

Page 592

mlreportgen.dom.FormalTable class12-137• pi — picas• pt — points• px — pixelsParent — Parent of document elementDOM objectThis read-only property lis

Page 593

12 Classes – Alphabetical List12-138Style — Format for tablearray of format objectsArray of format objects (such as Bold objects) that specify the for

Page 594

mlreportgen.dom.FormalTable class12-139• pt — points• px — pixelsTag — Tag for document elementstringTag for document element, specified as a string.

Page 595

12 Classes – Alphabetical List12-140Method PurposecloneUse FormalTable.clone the same wayyou use Paragraph.clone.Copy the table.See Alsomlreportgen.do

Page 596

mlreportgen.dom.Group class12-141mlreportgen.dom.Group classPackage: mlreportgen.domGroup of document objectsDescriptionGroup of document objects tha

Page 597

12 Classes – Alphabetical List12-142PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.

Page 598

mlreportgen.dom.Group class12-143Related Examples• “Add Content as a Group”• “Create Object Containers”

Page 599

12 Classes – Alphabetical List12-144mlreportgen.dom.HAlign classPackage: mlreportgen.domSpecify horizontal alignment of document objectDescriptionSpec

Page 600

mlreportgen.dom.HAlign class12-145A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate

Page 601

2 Create Your First Report2-347On the Library pane, under Logical and Flow Control, double-click LogicalThen.The then component appears above the else

Page 602

12 Classes – Alphabetical List12-146mlreportgen.dom.Heading classPackage: mlreportgen.domHeading paragraphDescriptionCreate a heading paragraph.Constr

Page 603

mlreportgen.dom.Heading class12-147The style specified by styleName must specify a paragraph style defined in the templateused to create the document

Page 604

12 Classes – Alphabetical List12-148Data Types: logicalColor — Text colorstringSpecify one of these as a string:• The name of a color. The name must b

Page 605

mlreportgen.dom.Heading class12-149To specify substitutions for this font, do not set this property. Instead create and add amlreportgen.dom.FontFami

Page 606

12 Classes – Alphabetical List12-150Data Types: logicalOuterLeftMargin — Left margin (indentation) of document elementstringString specifying the left

Page 607

mlreportgen.dom.Heading class12-151Style — Text formattingarray of mlreportgen.dom.DOCXSection objectsAn array of mlreportgen.dom.DOCXSection objects

Page 608

12 Classes – Alphabetical List12-152Border String Description Supported Output Typesdotted Dotted line WorddottedHeavy Thick dotted line WorddotDash D

Page 609

mlreportgen.dom.Heading class12-153Border String Description Supported Output Typesnowrap Sequences of white spacecollapse into a single whitespace.

Page 610

12 Classes – Alphabetical List12-154Method PurposecloneUse Heading.clone the similar to howyou use Paragraph.clone.Copy heading.See Alsomlreportgen.do

Page 611

mlreportgen.dom.Height class12-155mlreportgen.dom.Height classPackage: mlreportgen.domHeight of objectDescriptionSpecifies the height of an image.Con

Page 612

Add Report Content Using Components2-352In the Library pane in the middle, under the MATLAB category, double-click InsertVariable.3In the Properties

Page 613

12 Classes – Alphabetical List12-156Height of object, represented by an mlreportgen.dom.Height object.PropertiesId — ID for document elementstringA se

Page 614

mlreportgen.dom.Height class12-157More About• “Report Formatting Approaches”

Page 615

12 Classes – Alphabetical List12-158mlreportgen.dom.HTML classPackage: mlreportgen.domConvert HTML text to container of DOM objectsDescriptionConverts

Page 616

mlreportgen.dom.HTML class12-159HTML Element Attributesp class, style, alignpre class, styles class, stylespan class, stylestrike class, stylesub cla

Page 617

12 Classes – Alphabetical List12-160• border-left-color• border-left-style• boder-left-width• border-right• border-right-color• border-rigtht-style• b

Page 618

mlreportgen.dom.HTML class12-161• text-decoration• text-indent• vertical-align• white-space• widthFor information about these formats, see the W3Scho

Page 619

12 Classes – Alphabetical List12-162Parent — Parent of this HTML objecta DOM objectThis read-only property lists the parent of this HTML object.Style

Page 620

mlreportgen.dom.HTML class12-163rpt = Document('MyRep1','docx');html = HTML('<p><b>Hello</b> <i style=&

Page 621

12 Classes – Alphabetical List12-164mlreportgen.dom.HTMLFile classPackage: mlreportgen.domConvert contents of HTML file to container of DOM objectsDes

Page 622

mlreportgen.dom.HTMLFile class12-165HTML Element Attributespre class, styles class, stylespan class, stylestrike class, stylesub class, stylesup clas

Page 623

2 Create Your First Report2-367In the Library pane, under the Handle Graphics category, double-click FigureSnapshot.8In the Properties pane:aIn the Pa

Page 624

12 Classes – Alphabetical List12-166• border-left-style• boder-left-width• border-right• border-right-color• border-rigtht-style• border-right-width•

Page 625

mlreportgen.dom.HTMLFile class12-167• text-indent• vertical-align• white-space• widthFor information about these formats, see the W3Schools CSS docum

Page 626

12 Classes – Alphabetical List12-168Style — Formatting to apply to HTMLFile objectcell array of format objectsFormatting to apply to the HTMLFile obje

Page 627

mlreportgen.dom.HTMLFile class12-169rpt = Document('MyHTMLReport','docx');Create the first HTMLFile object and append HTML markup

Page 628

12 Classes – Alphabetical List12-170mlreportgen.dom.Image classPackage: mlreportgen.domCreate image to be included in reportDescriptionCreate an image

Page 629

mlreportgen.dom.Image class12-171• .png• .tif• .tiffFor HTML reports, you can use the same image formats as for a Word report, plus youcan use .svg f

Page 630

12 Classes – Alphabetical List12-172Image.Style = {Height('4in')};Id — ID for document elementstringA session-unique ID is generated as part

Page 631

mlreportgen.dom.Image class12-173Possible values are:• top• bottom• middleWidth — Image widthstringString having the format valueUnits, where Units i

Page 632

12 Classes – Alphabetical List12-174Related Examples• “Create and Format Images”

Page 633

mlreportgen.dom.ImageArea class12-175mlreportgen.dom.ImageArea classPackage: mlreportgen.domDefine image area as hyperlinkDescriptionDefine an area i

Page 634

Add Report Content Using Components2-37The Outline pane looks like the following.

Page 635

12 Classes – Alphabetical List12-176Text to display if the image is not visible, specified as a string.x1 — x coordinate of top-left corner of rectang

Page 636

mlreportgen.dom.ImageArea class12-177The radius, in pixels.Data Types: uint16polygonCoordinates — Coordinates of polygonal image areaarraySpecify an

Page 637

12 Classes – Alphabetical List12-178• 'circle' — circular image area• 'poly' — polygonal image areaCoords — Coordinates for image

Page 638

mlreportgen.dom.ImageArea class12-179x = 0:pi/100:2*pi;y = sin(x);plot(x,y);annotation('textbox', [0.2,0.4,0.1,0.1],... 'Str

Page 639

12 Classes – Alphabetical List12-180mlreportgen.dom.ImageMap classPackage: mlreportgen.domMap of hyperlink areas in imageDescriptionMap of image areas

Page 640

mlreportgen.dom.ImageMap class12-181A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, wh

Page 641

12 Classes – Alphabetical List12-182plot1.Map = map;append(map,area1);close(d);rptview(d.OutputPath);• “Create and Format Images”See Alsomlreportgen.d

Page 642

mlreportgen.dom.InnerMargin class12-183mlreportgen.dom.InnerMargin classPackage: mlreportgen.domMargin between content and bounding boxDescriptionSpe

Page 643

12 Classes – Alphabetical List12-184• cm — centimeters• in — inches• mm — millimeters• pi — picas• pt — points• px — pixelleft — Left margin sizestrin

Page 644

mlreportgen.dom.InnerMargin class12-185PropertiesBottom — Size of bottom marginstringString specifying the bottom margin. String must have the format

Page 645

2 Create Your First Report2-389Save the report.

Page 646

12 Classes – Alphabetical List12-186A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe

Page 647

mlreportgen.dom.InternalLink class12-187mlreportgen.dom.InternalLink classPackage: mlreportgen.domHyperlink to a location in same documentDescription

Page 648

12 Classes – Alphabetical List12-188Name of style to use for the link text.textObj — Text object containing link textmlreportgen.dom.Text objectText o

Page 649

mlreportgen.dom.InternalLink class12-189Name of link style defined in the template, specified as a string. The style specified bystyleName must be de

Page 650

12 Classes – Alphabetical List12-190ExamplesAdd Internal Linkimport mlreportgen.dom.*d = Document('mydoc');append(d, InternalLink('bio&

Page 651

mlreportgen.dom.Italic class12-191mlreportgen.dom.Italic classPackage: mlreportgen.domItalic for text objectDescriptionSpecifies whether text should

Page 652

12 Classes – Alphabetical List12-192A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generat

Page 653 - mlreportgen.dom.HTML class

mlreportgen.dom.Italic class12-193p.Style = {Italic};append(d,p);t = Text('upright text');t.Style = {Italic(false)};append(p,t);close(d);rp

Page 654

12 Classes – Alphabetical List12-194mlreportgen.dom.KeepLinesTogether classPackage: mlreportgen.domStart paragraph on new page if necessaryDescription

Page 655

mlreportgen.dom.KeepLinesTogether class12-195Start paragraph on new page if necessary, represented by anmlreportgen.dom.KeepLinesTogether object.Prop

Page 656

Generate a Report2-39Generate a ReportNote: This section builds on the step-by-step example presented in “Create a MATLABReport” on page 2-2.To see t

Page 657 - External Web Sites

12 Classes – Alphabetical List12-196mlreportgen.dom.KeepWithNext classPackage: mlreportgen.domKeep paragraph on same page as nextDescriptionKeep parag

Page 658

mlreportgen.dom.KeepWithNext class12-197Output ArgumentskeepWithNextObj — Keep paragraph on same page as nextmlreportgen.dom.keepWithNext objectKeep

Page 659

12 Classes – Alphabetical List12-198More About• “Report Formatting Approaches”

Page 660

mlreportgen.dom.LineSpacing class12-199mlreportgen.dom.LineSpacing classPackage: mlreportgen.domSpacing between lines of paragraphDescriptionSpecifie

Page 661

12 Classes – Alphabetical List12-200• in — inches• mm — millimeters• pi — picas• pt — pointsspacingType — Line spacing typestringType of line spacing,

Page 662

mlreportgen.dom.LineSpacing class12-201Specify your own tag value, for example, to make it easier to identify where an issueoccurred during document

Page 663

12 Classes – Alphabetical List12-202mlreportgen.dom.LinkTarget classPackage: mlreportgen.domTarget for internal or external links or image area linksD

Page 664

mlreportgen.dom.LinkTarget class12-203Link target, represented by an mlreportgen.dom.LinkTarget object.PropertiesCustomAttributes — Custom attributes

Page 665

12 Classes – Alphabetical List12-204MethodsMethod Purposeappend Append content to link target.cloneUse LinkTarget.clone in a similar wayto how you use

Page 666

mlreportgen.dom.ListItem class12-205mlreportgen.dom.ListItem classPackage: mlreportgen.domCreate item for ordered or unordered listDescriptionSpecifi

Page 667

viiSave a Report Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9Save a Setup Under Its Existing Name . . . . . . . . . . .

Page 668

2 Create Your First Report2-402An image of the etching appears briefly.3Images of two magic square images of sizes 16 and 32 appear briefly.4In the Ou

Page 669

12 Classes – Alphabetical List12-206• mlreportgen.dom.Paragraph• mlreportgen.dom.Image• mlreportgen.dom.Table• mlreportgen.dom.FormalTable• mlreportge

Page 670

mlreportgen.dom.ListItem class12-207Format objects that specify the format of a document element.Parent — Parent of document elementDOM objectThis re

Page 671

12 Classes – Alphabetical List12-208Method PurposecloneUse ListItem.clone the same way youuse Paragraph.clone.Clone a list item.ExamplesCreate List It

Page 672

mlreportgen.dom.MessageDispatcher class12-209mlreportgen.dom.MessageDispatcher classPackage: mlreportgen.domDOM message dispatcherDescriptionDispatch

Page 673

12 Classes – Alphabetical List12-210MethodsMethod Purposedispatch Dispatch a document generation statusmessage.getTheDispatcher Get the message dispat

Page 674

mlreportgen.dom.MessageDispatcher class12-211See Alsomlreportgen.dom.MessageDispatcher.dispatch |mlreportgen.dom.MessageDispatcher.getTheDispatcher |

Page 675

12 Classes – Alphabetical List12-212mlreportgen.dom.MessageEventData classPackage: mlreportgen.domHolds message triggering message eventDescriptionCon

Page 676

mlreportgen.dom.MessageEventData class12-213PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element

Page 677

12 Classes – Alphabetical List12-214 open(d);dispatch(dispatcher, ProgressMessage('starting chapter', d));p = Paragraph('Chapter &a

Page 678

mlreportgen.dom.MessageFilter class12-215mlreportgen.dom.MessageFilter classPackage: mlreportgen.domFilter to control message dispatcherDescriptionFi

Page 679

Generate a Report2-41

Page 680

12 Classes – Alphabetical List12-216• true— Pass progress messages.• false— Block progress messages.Data Types: logicalGlobalFilter — Pass or block al

Page 681

mlreportgen.dom.OPCPart class12-217mlreportgen.dom.OPCPart classPackage: mlreportgen.domDocument part to include in OPC packageDescriptionDocument pa

Page 682

12 Classes – Alphabetical List12-218PropertiesContentType — Content type of partstringSpecifies the content type, using a file extension. For a list o

Page 683

mlreportgen.dom.OPCPart class12-219Id — ID for document elementstringA session-unique ID is generated as part of document element creation. You can s

Page 684

12 Classes – Alphabetical List12-220File Type File ExtensionIcon .curWindows metafile .emfEncapsulated PostScript .epsGIF image .gifHTML .htmlJPEG ima

Page 685

mlreportgen.dom.OPCPart class12-221ExamplesAdd a File to an OPC PackageThis code inserts a copy of the data.json file in the data subfolder of the my

Page 686

12 Classes – Alphabetical List12-222mlreportgen.dom.OrderedList classPackage: mlreportgen.domCreate ordered listDescriptionCreate an ordered (numbered

Page 687

mlreportgen.dom.OrderedList class12-223• mlreportgen.dom.CustomElement• Horizontal one-dimensional array (for a sublist)To append an ordered list, us

Page 688

12 Classes – Alphabetical List12-224A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID, whe

Page 689

mlreportgen.dom.OuterMargin class12-225mlreportgen.dom.OuterMargin classPackage: mlreportgen.domMargin between bounding box and its surroundingsDescr

Page 691

12 Classes – Alphabetical List12-226• cm — centimeters• in — inches• mm — millimeters• pi — picas• pt — points• px — pixelsleft — Outer left margin si

Page 692

mlreportgen.dom.OuterMargin class12-227PropertiesBottom — Size of bottom marginstringString specifying the bottom margin. String must have the format

Page 693

12 Classes – Alphabetical List12-228Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is generat

Page 694

mlreportgen.dom.OuterMargin class12-229More About• “Report Formatting Approaches”

Page 695

12 Classes – Alphabetical List12-230mlreportgen.dom.OutlineLevel classPackage: mlreportgen.domLevel of paragraph in outlineDescriptionSpecifies the le

Page 696

mlreportgen.dom.OutlineLevel class12-231PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element crea

Page 697

12 Classes – Alphabetical List12-232open(d);dp = DocumentPart(d,'ReportTOC');append(d,dp);Set the OutlineLevel property internally, so that

Page 698

mlreportgen.dom.PageBreakBefore class12-233mlreportgen.dom.PageBreakBefore classPackage: mlreportgen.domStart paragraph on new pageDescriptionSpecifi

Page 699

12 Classes – Alphabetical List12-234PropertiesTag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID

Page 700

mlreportgen.dom.Paragraph class12-235mlreportgen.dom.Paragraph classPackage: mlreportgen.domFormatted block of text (paragraph)DescriptionUse a mlrep

Page 701

3Set Up a Report• “Report Setups” on page 3-2• “Create a New Setup File” on page 3-4• “Open a Report Setup” on page 3-6• “Close a Report Setup” on pag

Page 702

12 Classes – Alphabetical List12-236A DOM object to include in a paragraph. You can specify these DOM objects:• mlreportgen.dom.ExternalLink• mlreport

Page 703

mlreportgen.dom.Paragraph class12-237Specify one of these as a string:• The name of a color. The name must be a CSS color name. See http://www.crockf

Page 704

12 Classes – Alphabetical List12-238The name of a font family.To specify substitutions for this font, do not set this property. Instead create and add

Page 705

mlreportgen.dom.Paragraph class12-239String Description Supported Output Typesjustify Align left side of paragraphon left side of page, andright side

Page 706

12 Classes – Alphabetical List12-240Setting the OuterLeftMargin property adds a correspondingmlreportGen.dom.OuterMargin format object to the Style pr

Page 707

mlreportgen.dom.Paragraph class12-241• double — Use a double line for strikethrough for Word documentsSetting the Strike property adds a correspondin

Page 708

12 Classes – Alphabetical List12-242Border String Description Supported Output TypesdashDotDotHeavy Line with heavy dasheswith two dots betweenthe das

Page 709

mlreportgen.dom.Paragraph class12-243To specify how to handle white space, use one of the following strings.Border String Description Supported Outpu

Page 710

12 Classes – Alphabetical List12-244Method Purposeclone Copy paragraph.ExamplesAdd ParagraphsAdd a paragraph with text and another with an external li

Page 711

mlreportgen.dom.ProgressMessage class12-245mlreportgen.dom.ProgressMessage classPackage: mlreportgen.domProgress messageDescriptionCreate a progress

Page 712

3 Set Up a Report3-2Report SetupsIn this section...“Setup Hierarchy” on page 3-2“Setup Files” on page 3-2“Create a Report Setup” on page 3-3A report s

Page 713

12 Classes – Alphabetical List12-246PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.

Page 714

mlreportgen.dom.ProgressMessage class12-247ExamplesCreate a Progress MessageCreate the report document.import mlreportgen.dom.*;d = Document('te

Page 715

12 Classes – Alphabetical List12-248mlreportgen.dom.RawText classPackage: mlreportgen.domWord XML or HTML markup to insert in documentDescriptionWord

Page 716

mlreportgen.dom.RawText class12-249Word XML markup or HTML markup, specified as a string. For a Word document, themarkup must be valid Word XML marku

Page 717

12 Classes – Alphabetical List12-250Parent — Parent of document elementDOM objectThis read-only property lists the parent of this document element.Tag

Page 718

mlreportgen.dom.RepeatAsHeaderRow class12-251mlreportgen.dom.RepeatAsHeaderRow classPackage: mlreportgen.domRepeat table rowDescriptionSpecifies to r

Page 719

12 Classes – Alphabetical List12-252Repeat table row, represented by an mlreportgen.dom.RepeatAsHeaderRow object.PropertiesId — ID for document elemen

Page 720

mlreportgen.dom.RepeatAsHeaderRow class12-253import mlreportgen.dom.*;doctype = 'docx';d = Document('repeatHeader',doctype);

Page 721

12 Classes – Alphabetical List12-254mlreportgen.dom.ResizeToFitContents classPackage: mlreportgen.domAllow table to resize its columnsDescriptionSpeci

Page 722

mlreportgen.dom.ResizeToFitContents class12-255PropertiesId — ID for document elementstringA session-unique ID is generated as part of document eleme

Page 723

Report Setups3-3.rpt. For example, the name of the setup file for a setup named myreport would bemyreport.rpt.Create a Report SetupTo create a report

Page 724

12 Classes – Alphabetical List12-256table1.entry(1,2).Children(1).Content = 'MathWorks';table1.Style = {ResizeToFitContents(true),Width(&apo

Page 725

mlreportgen.dom.RowHeight class12-257mlreportgen.dom.RowHeight classPackage: mlreportgen.domHeight of table rowDescriptionSpecifies the height of a t

Page 726

12 Classes – Alphabetical List12-258heightType — Use specified height or height that is at least specified height'exact' | 'atleast&apo

Page 727

mlreportgen.dom.RowHeight class12-259String having the format valueUnits, where Units is an abbreviation for the units inwhich the height is expresse

Page 728

12 Classes – Alphabetical List12-260close(d);rptview('myTableDoc','docx');• “Create and Format Tables”See Alsomlreportgen.dom.Tabl

Page 729

mlreportgen.dom.RowSep class12-261mlreportgen.dom.RowSep classPackage: mlreportgen.domDraw lines between table rowsDescriptionDraw lines (separators)

Page 730

12 Classes – Alphabetical List12-262Applies ToStringWord HTML'dotdash' X 'dotdotdash' X 'double' X X'doublewave&a

Page 731

mlreportgen.dom.RowSep class12-263width — Width of table row separatorstringString specifying the color of the table row separator. String must have

Page 732

12 Classes – Alphabetical List12-264Style — Line style of table row separatorstringLine style for the row separator. See the description of the style

Page 733

mlreportgen.dom.RowSep class12-265import mlreportgen.dom.*;doctype = 'html';d = Document('test',doctype);t = Table(magic(5));t.St

Page 734

3 Set Up a Report3-4Create a New Setup FileIn this section...“Create Setup File Using the Report Explorer” on page 3-4“Create Setup File Programmatica

Page 735

12 Classes – Alphabetical List12-266mlreportgen.dom.ScaleToFit classPackage: mlreportgen.domScale image to fit pageDescriptionSpecifies whether to sca

Page 736

mlreportgen.dom.ScaleToFit class12-267A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the gene

Page 737

12 Classes – Alphabetical List12-268mlreportgen.dom.Strike classPackage: mlreportgen.domStrike through textDescriptionSpecifies whether to use a strik

Page 738

mlreportgen.dom.Strike class12-269PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.

Page 739

12 Classes – Alphabetical List12-270mlreportgen.dom.Table classPackage: mlreportgen.domCreate tableDescriptionUse an mlreportgen.dom.Table object to d

Page 740

mlreportgen.dom.Table class12-271• mlreportgen.dom.Paragraph• mlreportgen.dom.Text (CharEntity included)• mlreportgen.dom.Image• mlreportgen.dom.Tabl

Page 741

12 Classes – Alphabetical List12-272Specify one of the following as a string.Border String Description Supported Output Typesdashed Dashed line Word a

Page 742

mlreportgen.dom.Table class12-273Border String Description Supported Output Typesthickthinmediumgap Dashed line withalternating thick and thindashes

Page 743

12 Classes – Alphabetical List12-274BorderColor — Border colorstringYou can specify:• Name of a color. The name must be a CSS color name. See http://w

Page 744

mlreportgen.dom.Table class12-275You can specify:• Name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.html

Page 745

Create a New Setup File3-5• “Save a Report Setup” on page 3-9

Page 746

12 Classes – Alphabetical List12-276FlowDirection — Text flow directionstringString specifying the direction for text to flow.• 'ltr' — flow

Page 747

mlreportgen.dom.Table class12-277This read-only property lists the parent of this document element.RowSep — Style of lines separating rowsstringThe s

Page 748

12 Classes – Alphabetical List12-278StyleName — Style in document or document part stylesheetstringName of a style specified in the stylesheet of the

Page 749

mlreportgen.dom.Table class12-279Cell array of format objects that specify the format for table entries.Tag — Tag for document elementstringTag for d

Page 750

12 Classes – Alphabetical List12-280Method Purposerow Create a table row.ExamplesCreate a Table import mlreportgen.dom.*; d = Document('m

Page 751

mlreportgen.dom.TableBody class12-281mlreportgen.dom.TableBody classPackage: mlreportgen.domBody of formal tableDescriptionSpecifies the body of a fo

Page 752

12 Classes – Alphabetical List12-282ColSepColor — Color of line separating columnsstringYou can specify:• Name of a color. The name must be a CSS colo

Page 753

mlreportgen.dom.TableBody class12-283RowSepColor — Color of lines separating table rowsstringString specifying one of these values:• The name of a co

Page 754

12 Classes – Alphabetical List12-284The inner margin is the margin between table cell content and the cell borders.The string must have the format val

Page 755

mlreportgen.dom.TableBody class12-285See Alsomlreportgen.dom.FormalTable | mlreportgen.dom.Table |mlreportgen.dom.TableEntry | mlreportgen.dom.TableF

Page 756

3 Set Up a Report3-6Open a Report SetupIn this section...“Opening a Setup on the MATLAB Path” on page 3-6“Opening a Setup Not on the MATLAB Path” on p

Page 757

12 Classes – Alphabetical List12-286mlreportgen.dom.TableColSpec classPackage: mlreportgen.domFormatting for one or more adjacent table columnsDescrip

Page 758

mlreportgen.dom.TableColSpec class12-287Span — Number of adjacent table columns to which this document element appliesnumber of adjacent table column

Page 759

12 Classes – Alphabetical List12-288mlreportgen.dom.TableColSpecGroup classPackage: mlreportgen.domDefine style for group of table columnsDescriptionD

Page 760

mlreportgen.dom.TableColSpecGroup class12-289Id — ID for document elementstringA session-unique ID is generated as part of document element creation.

Page 761

12 Classes – Alphabetical List12-290 table = Table(magic(5)); table.ColSpecGroups = grps; close(doc); rptview(doc.OutputPath);• “Creat

Page 762

mlreportgen.dom.TableEntry class12-291mlreportgen.dom.TableEntry classPackage: mlreportgen.domTable entryDescriptionSpecifies the content and style o

Page 763

12 Classes – Alphabetical List12-292String containing the text for the table entry.textObj — Text object containing the text for the table entrymlrepo

Page 764

mlreportgen.dom.TableEntry class12-293Specify one of the following as a string.Border String Description Supported Output Typesdashed Dashed line Wor

Page 765

12 Classes – Alphabetical List12-294Border String Description Supported Output Typesthickthinmediumgap Dashed line withalternating thick and thindashe

Page 766

mlreportgen.dom.TableEntry class12-295• Name of a color. The name must be a CSS color name. See http://www.crockford.com/wrrrld/color.html.• A hexade

Page 767 - mlreportgen.dom.Table class

Open a Report Setup3-7Opening a Setup Not on the MATLAB PathTip Use the setedit command to obtain a list of all the report setups on the MATLABpath.T

Page 768

12 Classes – Alphabetical List12-296String specifying the inner margin. String must have the format valueUnits whereUnits is an abbreviation for the u

Page 769

mlreportgen.dom.TableEntry class12-297A session-unique ID is generated as part of document element creation. The generatedtag has the form CLASS:ID,

Page 770

12 Classes – Alphabetical List12-298mlreportgen.dom.TableFooter classPackage: mlreportgen.domFormal table footerDescriptionSpecifies the content and f

Page 771

mlreportgen.dom.TableFooter class12-299ColSepColor — Color of line separating columnsstringYou can specify:• Name of a color. The name must be a CSS

Page 772

12 Classes – Alphabetical List12-300The style of a line separating the rows of a table or table section (header, body, or footer).See the description

Page 773

mlreportgen.dom.TableFooter class12-301Data Types: charTableEntriesHAlign — Horizontal alignment of table entriescenter (default) | left | rightData

Page 774

12 Classes – Alphabetical List12-302Tag for document element, specified as a string.A session-unique ID is generated as part of document element creat

Page 775

mlreportgen.dom.TableHeader class12-303mlreportgen.dom.TableHeader classPackage: mlreportgen.domTable headerDescriptionTable header for labeling colu

Page 776

12 Classes – Alphabetical List12-304ColSepColor — Color of line separating columnsstringYou can specify:• Name of a color. The name must be a CSS colo

Page 777

mlreportgen.dom.TableHeader class12-305RowSepColor — Color of lines separating table rowsstringString specifying one of these values:• The name of a

Page 778

viii ContentsReport Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-12Report Generation Preferences . . . . . . . . . . .

Page 779

3 Set Up a Report3-8Close a Report SetupIn this section...“Close a Setup Using the Report Explorer” on page 3-8“Close a Setup Programmatically” on pag

Page 780

12 Classes – Alphabetical List12-306Name of a style specified in the stylesheet of the document or document part to which thetable header is appendedT

Page 781

mlreportgen.dom.TableHeader class12-307Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is gen

Page 782

12 Classes – Alphabetical List12-308mlreportgen.dom.TableHeaderEntry classPackage: mlreportgen.domEntry in table headerDescriptionSpecifies a table he

Page 783

mlreportgen.dom.TableHeaderEntry class12-309Border String Description Supported Output Typesdashdotstroked Line with alternatingdiagonal dashes and d

Page 784

12 Classes – Alphabetical List12-310Border String Description Supported Output Typesthickthinsmallgap Dashed line withalternating thick and thindashes

Page 785

mlreportgen.dom.TableHeaderEntry class12-311BorderWidth — Table border widthstringString specifying the width of the border. The string must have the

Page 786

12 Classes – Alphabetical List12-312• no abbreviation — pixels• cm — centimeters• in — inches• mm — millimeters• pi — picas• pt — points• px — pixelsR

Page 787

mlreportgen.dom.TableHeaderEntry class12-313Specify your own tag value, for example, to make it easier to identify where an issueoccurred during docu

Page 788

12 Classes – Alphabetical List12-314mlreportgen.dom.TableRow classPackage: mlreportgen.domTable rowDescriptionCreates a table row.ConstructiontableRow

Page 789

mlreportgen.dom.TableRow class12-315String having the format valueUnits, where Units is an abbreviation for the units inwhich the height is expressed

Page 790

Save a Report Setup3-9Save a Report SetupIn this section...“Save a Setup Under Its Existing Name” on page 3-9“Save a Setup Under a New Name” on page

Page 791

12 Classes – Alphabetical List12-316Specify your own tag value, for example, to make it easier to identify where an issueoccurred during document gene

Page 792

mlreportgen.dom.Template class12-317mlreportgen.dom.Template classPackage: mlreportgen.domCreate document templateDescriptionCreate a template for a

Page 793

12 Classes – Alphabetical List12-318• 'docx'— Word output• 'html-file'— HTML output consisting of a single file that contains the

Page 794

mlreportgen.dom.Template class12-319• A block hole can contain a Paragraph, Table, OrderedList, UnorderedList,DocumentPart, and Group.CurrrentDOCXSec

Page 795

12 Classes – Alphabetical List12-320PackageType — Packaging for files generated from document'zipped' (default) | 'unzipped' | &ap

Page 796

mlreportgen.dom.Template class12-321TitleBarText — Title for HTML browser title barstringFor HTML documents, this property specifies the text for the

Page 797

12 Classes – Alphabetical List12-322Method PurposegetImagePrefix Get generated image name prefix for thedocument.getMainPartPath Get relative path of

Page 798

mlreportgen.dom.Template class12-323• “Create an HTML Template”• “Use Style Sheets”See Alsomlreportgen.dom.Document.createTemplate |mlreportgen.dom.T

Page 799

12 Classes – Alphabetical List12-324mlreportgen.dom.TemplateHole classPackage: mlreportgen.domHole to append to templateDescriptionHole to append to a

Page 800

mlreportgen.dom.TemplateHole class12-325determine the purpose of the hole when viewing the template in Microsoft Word (forWord templates) or in a Web

Page 801

3 Set Up a Report3-10Load Report Setup into MATLAB WorkspaceTo load a setup into the MATLAB workspace without loading it into the Report Explorer,use

Page 802

12 Classes – Alphabetical List12-326A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generat

Page 803

mlreportgen.dom.Text class12-327mlreportgen.dom.Text classPackage: mlreportgen.domText objectDescriptionText string to include in a document elementC

Page 804

12 Classes – Alphabetical List12-328Output ArgumentstextObj — Text stringmlreportgen.dom.Text objectText string, represented by an mlreportgen.dom.Tex

Page 805

mlreportgen.dom.Text class12-329Content — Text string contained by this document elementstringText string contained by this document element.CustomAt

Page 806

12 Classes – Alphabetical List12-330• pi — picas• pt — points• px — pixelsId — ID for document elementstringA session-unique ID is generated as part o

Page 807

mlreportgen.dom.Text class12-331The style specified by styleName must be defined in the template used to create thedocument element to which this tex

Page 808

12 Classes – Alphabetical List12-332Border String Description Supported Output Typessingle Single line HTML and Wordthick Thick line Wordwave Wavy lin

Page 809

mlreportgen.dom.Text class12-333Border String Description Supported Output Typespre Preserves white space. Textwraps only on line breaks.Acts like th

Page 810

12 Classes – Alphabetical List12-334More About• “Report Formatting Approaches”

Page 811

mlreportgen.dom.Underline class12-335mlreportgen.dom.Underline classPackage: mlreportgen.domDraw line under textDescriptionDraw line under textConstr

Page 812

Insert Components3-11Insert ComponentsIn this section...“Point-and-Click Method” on page 3-11“Drag-and-Drop Method” on page 3-11“Fix Context Violatio

Page 813

12 Classes – Alphabetical List12-336Applies ToString DescriptionDOCX HTML'dashed' Dashed underline X 'dashedHeavy' Thick, dashed

Page 814

mlreportgen.dom.Underline class12-337Data Types: charColor — Color of underlinemlreportgen.dom.Color objectColor of the underline, specified by an ml

Page 815

12 Classes – Alphabetical List12-338mlreportgen.dom.UnorderedList classPackage: mlreportgen.domUnordered (bulleted) listDescriptionSpecifies an unorde

Page 816

mlreportgen.dom.UnorderedList class12-339• mlreportgen.dom.Table• mlreportgen.dom.Image• mlreportgen.dom.CustomElement• Horizontal one-dimensional ar

Page 817

12 Classes – Alphabetical List12-340Tag — Tag for document elementstringTag for document element, specified as a string.A session-unique ID is generat

Page 818

mlreportgen.dom.UnorderedList class12-341See Alsomlreportgen.dom.ListItem | mlreportgen.dom.OrderedList

Page 819

12 Classes – Alphabetical List12-342mlreportgen.dom.VAlign classPackage: mlreportgen.domVertical alignment of document objectDescriptionSpecifies vert

Page 820

mlreportgen.dom.VAlign class12-343A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the generate

Page 821

12 Classes – Alphabetical List12-344mlreportgen.dom.VerticalAlign classPackage: mlreportgen.domVertical alignment of textDescriptionSpecifies vertical

Page 822

mlreportgen.dom.VerticalAlign class12-345A session-unique ID is generated as part of document element creation. You can specifyan ID to replace the g

Page 823 - mlreportgen.dom.Text class

3 Set Up a Report3-12Set Component PropertiesIn this section...“Edit Component Property Values” on page 3-12“Computed Property Values” on page 3-12Edi

Page 824

12 Classes – Alphabetical List12-346More About• “Report Formatting Approaches”

Page 825

mlreportgen.dom.WarningMessage class12-347mlreportgen.dom.WarningMessage classPackage: mlreportgen.domWarning messageDescriptionCreate a warning mess

Page 826

12 Classes – Alphabetical List12-348PropertiesId — ID for document elementstringA session-unique ID is generated as part of document element creation.

Page 827

mlreportgen.dom.WarningMessage class12-349ExamplesCreate a Warning Messageimport mlreportgen.dom.*;d = Document('test','html');

Page 828

12 Classes – Alphabetical List12-350mlreportgen.dom.WhiteSpace classPackage: mlreportgen.domWhite space typeDescriptionPreserves white space and line

Page 829

mlreportgen.dom.WhiteSpace class12-351String Description'pre' White space is preserved by the browser. Text wraps only online breaks. Acts

Page 830

12 Classes – Alphabetical List12-352String specifying the white space type.String Description'preserve' Preserves white space and line break

Page 831

mlreportgen.dom.WhiteSpace class12-353 close(d);rptview('test',doctype);See Alsomlreportgen.dom.TextMore About• “Report Formatting Appr

Page 832

12 Classes – Alphabetical List12-354mlreportgen.dom.WidowOrphanControl classPackage: mlreportgen.domWidow and orphan handlingDescriptionSpecifies whet

Page 833

mlreportgen.dom.WidowOrphanControl class12-355PropertiesId — ID for document elementstringA session-unique ID is generated as part of document elemen

Page 834

Move Components3-13Move ComponentsIn this section...“Point-and-Click Method” on page 3-13“Drag-and-Drop Method” on page 3-14Point-and-Click Method1In

Page 835

12 Classes – Alphabetical List12-356mlreportgen.dom.Width classPackage: mlreportgen.domObject widthDescriptionSpecifies the width of an object, such a

Page 836

mlreportgen.dom.Width class12-357Output ArgumentswidthObj — Object widthmlreportgen.dom.Width objectObject width, represented by an mlreportgen.dom.W

Page 837

12 Classes – Alphabetical List12-358• pt — points• px — pixels• % — percentExamplesSet Width and Other Formats for a Tableimport mlreportgen.dom.*;doc

Page 838

13Create a Report Program• “Create a Report Program” on page 13-3• “Document Object Model” on page 13-4• “Construct a DOM Object” on page 13-6• “Impor

Page 839

13 Create a Report Program13-2• “Create and Format Text” on page 13-41• “Create and Format Paragraphs” on page 13-46• “Create and Format Lists” on pag

Page 840

Create a Report Program13-3Create a Report ProgramThe MATLAB Report Generator includes a set of functions, called the DOM (DocumentObject Model) API,

Page 841

13 Create a Report Program13-4Document Object ModelThe DOM API creates a representation of a report document in your system's memory.Such a repre

Page 842

Document Object Model13-5• “Import the DOM API Package” on page 13-7

Page 843

13 Create a Report Program13-6Construct a DOM ObjectThe DOM API includes a special set of MATLAB functions, called constructors, forcreating DOM objec

Page 844

Import the DOM API Package13-7Import the DOM API PackageAll DOM class names, and hence constructor names, include the prefixmlreportgen.dom. To avoid

Page 845

3 Set Up a Report3-14Move Command orButtonEffectMove Right Moves a component down one level in the hierarchy. Thecomponent becomes the child of the si

Page 846

13 Create a Report Program13-8Get and Set DOM Object PropertiesTo get or set the property of a document object, use dot notation, which involvesappend

Page 847

Create a Document Object to Hold Content13-9Create a Document Object to Hold ContentEvery report program must create an mlreportgen.dom.Document obje

Page 848

13 Create a Report Program13-10• “Construct a DOM Object” on page 13-6More About• “Form-Based Reporting” on page 13-28• “Document Object Model” on pag

Page 849

Add Content to a Report13-11Add Content to a ReportThe DOM append function allows you to add content to documents, paragraphs, tables,and other DOM o

Page 850

13 Create a Report Program13-12append(d,Table(tableArray)); See AlsoFunctionsmlreportgen.dom.Paragraph.appendRelated Examples• “Construct a DOM Object

Page 851

Clone a DOM Object13-13Clone a DOM ObjectIf you attempt to append an object more than once to the same object or to append anobject to multiple objec

Page 852

13 Create a Report Program13-14Add Content as a GroupYou can use a group to include the same content in different parts of a report. The DOMAPI clones

Page 853

Add Content as a Group13-15p2.Bold = true;append(doc,p1);append(doc,p2);append(doc,disclaimer);close(doc);rptview('groupReport','html&

Page 854 - 13 Create a Report Program

13 Create a Report Program13-16Stream a ReportThe DOM API supports two modes of appending content to a document:• In-memory — Creates the document ent

Page 855

Report Packages13-17Report PackagesA Microsoft Word document packages all of its contents, text, images, style sheets, and soon, in a single compress

Page 856 - Document Object Model

Delete Components3-15Delete Components1In the Report Explorer, in the Outline pane, select the component that you want todelete.2Delete the component

Page 857 - Document Object Model

13 Create a Report Program13-18Close a ReportThe last step in creating a report with the DOM API is to close the report. Closing areport writes out an

Page 858 - Construct a DOM Object

Display a Report13-19Display a ReportThe DOM API rptview function allows you to display a generated report in a viewerappropriate to its document typ

Page 859 - Import the DOM API Package

13 Create a Report Program13-20Report Formatting ApproachesThe DOM API supports three approaches to formatting document objects in reports:• Style she

Page 860

Use Style Sheets13-21Use Style SheetsA style is a collection of formats that together define the appearance of a documentobject, such as a paragraph,

Page 861

13 Create a Report Program13-22Related Examples• “Create a Microsoft Word Template” on page 13-111• “Modify Styles in a Microsoft Word Template” on pa

Page 862

Use Format Objects13-23Use Format ObjectsA format object is a MATLAB program entity that defines the properties and functionsof a specific type of do

Page 863 - Add Content to a Report

13 Create a Report Program13-24Use Format PropertiesMost DOM objects have a set of properties corresponding to the format options mostcommonly used fo

Page 864

Format Inheritance13-25Format InheritanceThe DOM API allows you to use both template-based styles and format object-basedstyles (or equivalent format

Page 865 - Clone a DOM Object

13 Create a Report Program13-26Create Object ContainersYou can use an mlreportgen.dom.Container object to create an HTML containerobject, such as a di

Page 866 - Add Content as a Group

Create Object Containers13-27Related Examples• “Use Style Sheets” on page 13-21• “Use Format Objects” on page 13-23More About• “Report Formatting App

Page 867

3 Set Up a Report3-16Deactivate ComponentsYou can deactivate any component in a report setup. Deactivating a component causes itto be skipped during g

Page 868 - Stream a Report

13 Create a Report Program13-28Form-Based ReportingThe DOM API supports a form-based approach to report generation. You can useMicrosoft Word or an HT

Page 869 - Report Packages

Fill the Blanks in a Report Form13-29Fill the Blanks in a Report FormNavigate Holes in the FormWhen you create a form template, you associate an ID w

Page 870 - Close a Report

13 Create a Report Program13-30Related Examples• “Use Subforms in a Report” on page 13-31• “Create a Microsoft Word Template” on page 13-111• “Add Hol

Page 871 - Display a Report

Use Subforms in a Report13-31Use Subforms in a ReportA document part is a form that you can add to a document or to another document part.Document pa

Page 872 - Report Formatting Approaches

13 Create a Report Program13-32More About• “Form-Based Reporting” on page 13-28

Page 873 - Use Style Sheets

Create Document Part Template Libraries13-33Create Document Part Template LibrariesIn this section...“Create a Document Part Template Library in a Mi

Page 874

13 Create a Report Program13-343On the Word ribbon, select the Insert tab.4Select the content that you have created for the document part template.5On

Page 875 - Use Format Objects

Create Document Part Template Libraries13-35Otherwise, select mlreportgen from the Category list.8In the Description field, enter a template descript

Page 876 - Use Format Properties

13 Create a Report Program13-36API. You can modify these templates and add your own templates by editing this file,using the markup conventions.You ca

Page 877 - Format Inheritance

Create Document Part Template Libraries13-37• “Create a Microsoft Word Template” on page 13-111• “Add Holes in a Microsoft Word Template” on page 13-

Page 878 - Create Object Containers

Send Components to the MATLAB Workspace3-17Send Components to the MATLAB WorkspaceYou can send the components of a setup from the Report Explorer to

Page 879

13 Create a Report Program13-38Object-Oriented Report CreationNote: This section assumes that you are familiar with object-oriented programming inMATL

Page 880 - Form-Based Reporting

Simplify Filling in Forms13-39Simplify Filling in FormsThe object-oriented approach allows you to exploit the DOM fill method to simplifyform-based r

Page 881 - Navigate Holes in the Form

13 Create a Report Program13-40Related Examples• “Use Subforms in a Report” on page 13-31• “Fill the Blanks in a Report Form” on page 13-29• “Create a

Page 882

Create and Format Text13-41Create and Format TextIn this section...“Create Text” on page 13-41“Create Special Characters” on page 13-41“Append HTML o

Page 883 - Use Subforms in a Report

13 Create a Report Program13-42p = Paragraph(CharEntity('pound'));append(d,p);append(p,'3');close(d);rptview('test',&apo

Page 884

Create and Format Text13-43fontFamily = FontFamily('Arial');fontFamily.BackupFamilyNames = {'Helvetica'};t.Style = {fontFamily};t

Page 885

13 Create a Report Program13-441Open the Word template used with the report.2Open the Styles pane.3Click the Manage Styles button .4Click New Style.5

Page 886

Create and Format Text13-45if passed status = 'Passed'; statusStyle = 'Pass';else status = 'Failed'; statusStyle =

Page 887

13 Create a Report Program13-46Create and Format ParagraphsIn this section...“Create a Paragraph” on page 13-46“Create a Heading” on page 13-46“Format

Page 888

Create and Format Paragraphs13-47Format a ParagraphYou can format a paragraph programmatically, using DOM format objects or formatproperties. You can

Page 889

ixDisplay Property Name/Property Value Pairs . . . . . . . . . . . . 5-9Edit Table Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 891 - Simplify Filling in Forms

13 Create a Report Program13-48Formatting Format Object Format PropertyEast Asian font FontFamily n/aFont size FontSize FontSizeForeground color Color

Page 892

Create and Format Paragraphs13-49Formatting Format Object Format PropertyKeep paragraph on samepageKeepLinesTogether n/aEliminate widows andorphansWi

Page 893 - Create and Format Text

13 Create a Report Program13-50}For more information about using HTML styles with DOM objects, see “Modify Styles inan HTML Template” on page 13-127.A

Page 894

Create and Format Paragraphs13-51append(rpt, p);close(rpt);rptview(rpt.OutputPath);See AlsoClassesmlreportgen.dom.Bold | mlreportgen.dom.FontFamily |

Page 895

13 Create a Report Program13-52Create and Format ListsIn this section...“Create an Unordered List” on page 13-52“Create an Ordered List” on page 13-53

Page 896

Create and Format Lists13-53close(d);rptview('myListReport','html');You can also create an unordered list from an array by includ

Page 897

13 Create a Report Program13-54• Creating an ordered list from a cell array allows you to include items of differenttypes in the list.• Creating a lis

Page 898 - Create and Format Paragraphs

Create and Format Lists13-55Create a Multilevel ListA multilevel list is an ordered or unordered list whose list items contain ordered orunordered li

Page 899 - Format a Paragraph

13 Create a Report Program13-56d = Document('orderedListReport','html');ol = OrderedList({'Start MATLAB', ... '

Page 900

Create and Format Lists13-57Create a Word List StyleTo define a list style in a Word template, select List as the style type in the CreateNew Style f

Page 901

4Generate a Report• “Generate a Report” on page 4-2• “Select Report Generation Options” on page 4-4• “Report Generation Preferences” on page 4-13• “Ch

Page 902

13 Create a Report Program13-58Create and Format TablesIn this section...“Two Types of Tables” on page 13-58“Create a Table from a Two-Dimensional Arr

Page 903

Create and Format Tables13-59Create a Table from a Two-Dimensional ArrayYou can create a table by appending a two-dimensional numeric array or a cell

Page 904 - Create and Format Lists

13 Create a Report Program13-60table = Table(a);text = table.entry(i(i1),i1).Children(1);text.Color = 'red';append(doc,table);close(doc);rpt

Page 905 - Create an Ordered List

Create and Format Tables13-61close(doc);rptview(doc.OutputPath);Format a TableYou can format a table programmatically, using DOM format objects or fo

Page 906

13 Create a Report Program13-62Formatting Format Object Format PropertyColor of border Border BorderColorThickness of border Border BorderWidthCreate

Page 907 - Create a Multilevel List

Create and Format Tables13-63Formatting Table Object PropertyAlign entries horizontally (left, right,center)TableEntriesValignCreate space (padding)

Page 908

13 Create a Report Program13-64 append(rpt, ca); close(rpt);rptview(rpt.OutputPath);Format a Table Using Microsoft Word Style SheetsYou can format tab

Page 909

Create and Format Tables13-65 font-family: Arial, Helvetica, sans-serif; font-size: 11pt; text-align: center;}Apply a Table Style to a TableOnce y

Page 910 - Create and Format Tables

13 Create a Report Program13-66Create a Formal TableTo create a formal table, use the same basic approaches as with an informal table, exceptthat you

Page 911

Create and Format Tables13-67as a whole. Not all formal table formats apply to formal table sections. For example, youcannot indent a header, body, o

Page 912

4 Generate a Report4-2Generate a ReportIn this section...“Run a Report” on page 4-2“Report Output Options” on page 4-2Run a ReportYou can generate a M

Page 913 - Format a Table

13 Create a Report Program13-68row = TableRow();append(row,TableEntry('data11'));append(row,TableEntry('data12'));append(table,row

Page 914

Create and Format Tables13-69table = Table(magic(rank));table.Border = 'single';table.BorderWidth = '1px';grps(1) = TableColSpecG

Page 915

13 Create a Report Program13-70• Image• Table• OrderedList• UnorderedList• CustomElementFormat Table Entries ProgrammaticallyYou can use format object

Page 916

Create and Format Tables13-71t.TableEntriesStyle(Border('solid','black','1 px'));Properties you set for a TableEntry ob

Page 917

13 Create a Report Program13-72More About• “Report Formatting Approaches” on page 13-20

Page 918

Create Links13-73Create LinksIn this section...“Links” on page 13-73“Create a Link Target” on page 13-73“Create an External Link” on page 13-74“Creat

Page 919 - Create and Format Table Rows

13 Create a Report Program13-74Create an External LinkUse an mlreportgen.dom.ExternalLink object to create an external link, specifyingthe link target

Page 920

Create Links13-75Related Examples• “Create Image Maps” on page 13-85• “Add Content to a Report” on page 13-11More About• “Report Formatting Approache

Page 921

13 Create a Report Program13-76Create and Format ImagesIn this section...“Create an Image” on page 13-76“Resize an Image” on page 13-77“Image Storage”

Page 922

Create and Format Images13-77close(d);rptview(d.OutputPath);For a list of supported image formats, see mlreportgen.dom.Image.Resize an ImageTo resize

Page 923

Generate a Report4-3• “Create a Report Log File” on page 4-21• “Report Description” on page 4-12• “Change Report Locale” on page 4-17

Page 924

13 Create a Report Program13-78Create a Table of ContentsIn this section...“Create a Microsoft Word Table of Contents” on page 13-78“Create an HTML Ta

Page 925 - Create Links

Create a Table of Contents13-795Select a TOC format option to generate a table of contents. For example, select theBuilt-In format option. The TOC ap

Page 926

13 Create a Report Program13-80However, if you open a newly generated report yourself in Word, without first usingrptview, perform these steps to get

Page 927

Create a Table of Contents13-81Create an HTML TOC PlaceholderAn HTML TOC placeholder element is an HTML div element with an id attribute set totoc.&l

Page 928 - Create and Format Images

13 Create a Report Program13-82toc = CustomElement('div');toc.CustomAttributes = {CustomAttribute('id', 'toc')};append(t

Page 929 - Create and Format Images

Create a Table of Contents13-83Use Template-Defined Styles to Set Outline LevelsYou can use styles defined in the report’s template to set the outlin

Page 930 - Create a Table of Contents

13 Create a Report Program13-84object alone or in combination with template-based styles or format object-based styles.This example assumes that the t

Page 931 - Create a Table of Contents

Create Image Maps13-85Create Image MapsYou can specify areas of an image to be links. Clicking the link area in an image in anHTML browser opens the

Page 932

13 Create a Report Program13-86close(d);rptview(d.OutputPath);See AlsoClassesmlreportgen.dom.Image | mlreportgen.dom.ImageArea |mlreportgen.dom.ImageM

Page 933

Automatically Number Document Content13-87Automatically Number Document ContentIn this section...“Automatically Number Content Programmatically” on p

Page 934

4 Generate a Report4-4Select Report Generation OptionsIn this section...“Report Options Dialog Box” on page 4-4“Report Output Format” on page 4-5“PDF

Page 935

13 Create a Report Program13-882Append the AutoNumber to a Text, Paragraph, or Heading object that contains thetext that precedes the automatic number

Page 936

Automatically Number Document Content13-89 chapHead.Style = {CounterInc('chapter'), ... CounterReset('table&ap

Page 937 - Create Image Maps

13 Create a Report Program13-90import mlreportgen.dom.*d = Document('MyReport','docx','MyReportTemplate');for rank = 3:5

Page 938

Appending HTML to DOM Reports13-91Appending HTML to DOM ReportsIn this section...“Why Append HTML to a DOM Report?” on page 13-91“Workflow for Append

Page 939

13 Create a Report Program13-92The HTML content that you append must be XML parsable. For a summary of thoserequirements and for a list of supported H

Page 940

Append HTML Content to DOM Reports13-93Append HTML Content to DOM ReportsIn this section...“Use an addHTML Method” on page 13-93“Append an HTML Objec

Page 941

13 Create a Report Program13-94Append an HTML ObjectYou can create an mlreportgen.dom.HTML object and append it to a DOM report. Toappend the content

Page 942

Append HTML File Contents to DOM Reports13-95Append HTML File Contents to DOM ReportsIn this section...“Use an addHTMLFile Method” on page 13-95“Appe

Page 943 - Appending HTML to DOM Reports

13 Create a Report Program13-96For example, you can convert the contents of two HTML files to a DOM report in Wordformat. This example assumes that th

Page 944

Use an HTML Cleanup Program13-97Use an HTML Cleanup ProgramYou can use an HTML cleanup program such as HTML Tidy to fix many issues andto identify is

Page 945 - Use an addHTML Method

Select Report Generation Options4-5To set defaults for report generation options that you can override with the ReportOptions dialog box or with indi

Page 946

13 Create a Report Program13-98 <td>Carlos Martinez</td> <td>38</td> <td>Lawyer</td> </tr></ta

Page 947 - Append an HTMLFile Object

Use an HTML Cleanup Program13-99Parsing HTML text: "simple_html_example.html" caused error: "HTML error: "expected end of tag &ap

Page 948

13 Create a Report Program13-100• “Append HTML File Contents to DOM Reports” on page 13-95More About• “HTML Code Requirements for DOM Reports” on page

Page 949 - Use an HTML Cleanup Program

HTML Code Requirements for DOM Reports13-101HTML Code Requirements for DOM ReportsIn this section...“XML-Parsable HTML Code” on page 13-101“Supported

Page 950

13 Create a Report Program13-102HTML Element Attributesbr n/adel class, stylefont class, style, color, face, sizeh1, h2, h3, h4,h5, h6class, style, al

Page 951

HTML Code Requirements for DOM Reports13-103For information about these elements, see the W3Schools tags documentation atwww.w3schools.com/tags.Suppo

Page 952

13 Create a Report Program13-104• font-style• font-weight• height• line-height• margin• margin-bottom• margin-left• margin-right• margin-top• padding•

Page 953 - XML-Parsable HTML Code

HTML Code Requirements for DOM Reports13-105• The numeric character entity reference &003c;For more information, see http://en.wikipedia.org/wiki

Page 954

13 Create a Report Program13-106Display Report Generation MessagesIn this section...“Report Generation Messages” on page 13-106“Display DOM Default Me

Page 955

Display Report Generation Messages13-1072Use the MessageDispatcher.Filter property to specify to display debugmessages.dispatcher.Filter.DebugMessage

Page 956

4 Generate a Report4-6File Format Using Report TemplatesTo use a template for report generation, select one of these options:• PDF (from template)• HT

Page 957

13 Create a Report Program13-1081Create a message dispatcher.dispatcher = MessageDispatcher.getTheDispatcher;2Add a listener using the MATLAB addliste

Page 958

Display Report Generation Messages13-109See AlsoFunctionsmlreportgen.dom.MessageDispatcher.dispatch |mlreportgen.dom.MessageDispatcher.getTheDispatch

Page 959

13 Create a Report Program13-110Compile a Report ProgramIf the MATLAB Compiler™ product is installed on your system, you can use it to compileyour DOM

Page 960

Create a Microsoft Word Template13-111Create a Microsoft Word TemplateUse one of these approaches to create a Word template for generating a report.•

Page 961

13 Create a Report Program13-112Add Holes in a Microsoft Word TemplateIn this section...“Display the Developer Ribbon in Word” on page 13-112“Inline a

Page 962 - Compile a Report Program

Add Holes in a Microsoft Word Template13-1132On the Word ribbon, select the Developer tab.3Click Design Mode to see the hole marks with the title tag

Page 963

13 Create a Report Program13-114Set Default Text Style for a HoleYour template can specify the name of a default style to use to format Text andParagr

Page 964

Add Holes in a Microsoft Word Template13-11512In the Create New Building Block dialog box, set Name to the part template name(for example, rgChapter)

Page 965 - Create a Block-Level Hole

13 Create a Report Program13-116Related Examples• “Modify Styles in a Microsoft Word Template” on page 13-117• “Create an HTML Template” on page 13-12

Page 966

Modify Styles in a Microsoft Word Template13-117Modify Styles in a Microsoft Word TemplateIn this section...“Edit Styles in a Word Template” on page

Page 967

Select Report Generation Options4-7Viewer Format Description StylesheetsDocBook DocBook (notransform)Produce a report inDocBook formatN/ATip To creat

Page 968

13 Create a Report Program13-1183In the Manage Styles dialog box, click Modify. The Modify Style dialog box appears.4In the Modify Style dialog box, c

Page 969

Modify Styles in a Microsoft Word Template13-1192In the Style dialog box, click the Manage Styles button.

Page 970

13 Create a Report Program13-1203If applicable, select an existing style to use as a starting point for the new style.4Click the New Style button.

Page 971

Modify Styles in a Microsoft Word Template13-1215Specify a name for the new style and define the style characteristics. To save the newstyle definiti

Page 972

13 Create a Report Program13-122Create an HTML TemplateUse one of these approaches to create an HTML template for generating a report.• Use mlreportge

Page 973

Create an HTML Template13-123• “Create a Microsoft Word Template” on page 13-111

Page 974 - Create an HTML Template

13 Create a Report Program13-124Add Holes in an HTML TemplateIn this section...“Inline and Block Holes” on page 13-124“Create an Inline Hole” on page

Page 975 - Create an HTML Template

Add Holes in an HTML Template13-125Replace STYLE_NAME with the name of a default text (HTML span element) style touse for formatting Text objects app

Page 976 - Add Holes in an HTML Template

13 Create a Report Program13-1265Zip the template using the zipTemplate command.See AlsoFunctionsunzipTemplate | zipTemplateRelated Examples• “Modify

Page 977 - Create a Block Hole

Modify Styles in an HTML Template13-127Modify Styles in an HTML TemplateYou can customize or add format styles in a custom HTML template.1In a text o

Page 978

4 Generate a Report4-8Note: Some Web and Print stylesheets include an automatically generated list of titles,which includes table titles and figures w

Page 979

13 Create a Report Program13-128Create Microsoft Word Page Layout SectionsIn this section...“Define Page Layouts in a Template” on page 13-128“Navigat

Page 980

Create Microsoft Word Page Layout Sections13-129rpt = Document('test','docx');open(rpt);sect = rpt.CurrentDOCXSection;pageSize =

Page 981

13 Create a Report Program13-130table = append(rpt,magic(22));table.Border = 'solid';table.ColSep = 'solid';table.RowSep = 's

Page 982

Create Page Footers and Headers13-131Create Page Footers and HeadersIn this section...“Create Page Headers and Footers in a Template” on page 13-131“

Page 983

13 Create a Report Program13-132template-defined headers and footers for the current section of a document or documentpart.The value of the CurrentDOC

Page 984

Create Page Footers and Headers13-133 switch firstPageHeader.CurrentHoleId case 'Date' append(

Page 985

13 Create a Report Program13-134pageHeaders(1) = DOCXPageHeader('first',d,'FirstPageHeader');while ~strcmp(pageHeaders(1).CurrentH

Page 986

Select Report Generation Options4-9Web Stylesheet DescriptionTruth Table HTMLstylesheetHTML on multiple pages; suppresses chapter headingsand table o

Commentaires sur ces manuels

Pas de commentaire