MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guida Utente

Navigare online o scaricare Guida Utente per Software MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES. MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES User`s guide Manuale Utente

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 986
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 0
MATLAB
®
Report Generator™
User's Guide
R2015a
Vedere la pagina 0
1 2 3 4 5 6 ... 985 986

Sommario

Pagina 1 - User's Guide

MATLAB® Report Generator™User's GuideR2015a

Pagina 2 - How to Contact MathWorks

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

Pagina 3 - Revision History

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

Pagina 4

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

Pagina 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

Pagina 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

Pagina 7

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

Pagina 8

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

Pagina 9

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

Pagina 10

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

Pagina 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

Pagina 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

Pagina 13 - Create a Report Program

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

Pagina 14

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

Pagina 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

Pagina 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

Pagina 17

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

Pagina 18

4 Generate a Report4-24

Pagina 19 - Getting Started

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

Pagina 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

Pagina 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

Pagina 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

Pagina 24

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

Pagina 25 - Report Components

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

Pagina 26 - Report Explorer

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

Pagina 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

Pagina 28

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

Pagina 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

Pagina 30

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 35

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

Pagina 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

Pagina 37 - Specify Report Variables

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

Pagina 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

Pagina 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”

Pagina 40

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

Pagina 41

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

Pagina 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

Pagina 43

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

Pagina 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

Pagina 45

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

Pagina 46

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

Pagina 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

Pagina 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

Pagina 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

Pagina 51

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

Pagina 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

Pagina 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

Pagina 54

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

Pagina 55

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

Pagina 56

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

Pagina 57

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

Pagina 58

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

Pagina 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

Pagina 60

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

Pagina 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

Pagina 62

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

Pagina 63

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

Pagina 64

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

Pagina 65

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

Pagina 66

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

Pagina 67

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

Pagina 68

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

Pagina 69 - Generate a Report

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

Pagina 70

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

Pagina 71 - Generate a Report

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

Pagina 72

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

Pagina 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

Pagina 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)

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 79 - Open a Report Setup

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 91

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

Pagina 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

Pagina 93

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

Pagina 94

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

Pagina 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

Pagina 96

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

Pagina 97

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

Pagina 98

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

Pagina 99

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

Pagina 100 - 4 Generate a Report

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

Pagina 101

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

Pagina 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

Pagina 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

Pagina 104

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

Pagina 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

Pagina 106

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

Pagina 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

Pagina 108

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

Pagina 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

Pagina 110

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

Pagina 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

Pagina 112

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

Pagina 113

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

Pagina 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

Pagina 115 - Memory Usage

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

Pagina 116

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

Pagina 117 - Add Content with Components

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

Pagina 118 - Components

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

Pagina 119 - Component Formatting

Customized Components7-25

Pagina 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

Pagina 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

Pagina 123 - Property Table Components

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 131

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

Pagina 132

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

Pagina 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

Pagina 134

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

Pagina 135 - Add and Remove Properties

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

Pagina 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

Pagina 137

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

Pagina 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

Pagina 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

Pagina 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.

Pagina 141

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

Pagina 142

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

Pagina 143

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

Pagina 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

Pagina 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

Pagina 146

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

Pagina 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

Pagina 148

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

Pagina 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

Pagina 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

Pagina 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

Pagina 152

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 157

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

Pagina 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

Pagina 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

Pagina 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

Pagina 161

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

Pagina 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

Pagina 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

Pagina 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

Pagina 165

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

Pagina 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

Pagina 167

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

Pagina 168 - Delete a Hole

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 174

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

Pagina 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

Pagina 176

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

Pagina 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

Pagina 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

Pagina 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

Pagina 180

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

Pagina 181

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

Pagina 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

Pagina 183

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 189 - Specify Component Properties

10Components — Alphabetical List

Pagina 190

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

Pagina 191 - Build Components

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

Pagina 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

Pagina 193 - About Component Customization

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

Pagina 194

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

Pagina 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

Pagina 196

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

Pagina 197

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

Pagina 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

Pagina 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

Pagina 200

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

Pagina 201

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

Pagina 202

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

Pagina 203

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

Pagina 204

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

Pagina 205 - Customized Components

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

Pagina 206

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

Pagina 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

Pagina 208 - Stylesheets

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

Pagina 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

Pagina 210 - Create a New Stylesheet

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

Pagina 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•

Pagina 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.

Pagina 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

Pagina 214

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

Pagina 215 - Edit Stylesheet Data Items

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

Pagina 216

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

Pagina 217 - Edit Stylesheet Data Items

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

Pagina 218

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

Pagina 219 - Data Items

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

Pagina 220

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

Pagina 221

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

Pagina 222

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

Pagina 223

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

Pagina 225

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

Pagina 226

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

Pagina 227

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

Pagina 228

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

Pagina 229

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

Pagina 230

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

Pagina 231

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

Pagina 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

Pagina 233 - Insert Graphics Files

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

Pagina 234

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

Pagina 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

Pagina 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

Pagina 237 - Customized Stylesheets

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

Pagina 238

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

Pagina 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

Pagina 240

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

Pagina 241

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

Pagina 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

Pagina 243

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

Pagina 244

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

Pagina 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

Pagina 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

Pagina 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

Pagina 248

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

Pagina 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.”.

Pagina 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

Pagina 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

Pagina 252

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

Pagina 253

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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 258 - 9 Comparing XML Files

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

Pagina 259

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

Pagina 260

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

Pagina 261

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

Pagina 262

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

Pagina 263

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

Pagina 264

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

Pagina 265

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

Pagina 266

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

Pagina 267

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

Pagina 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

Pagina 269

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

Pagina 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

Pagina 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

Pagina 272 - Insert Anything into Report?

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

Pagina 273 - Axes Loop

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

Pagina 274

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

Pagina 275 - Axes Snapshot

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

Pagina 276 - Print Options

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

Pagina 277 - Display Options

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

Pagina 278

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

Pagina 279 - Chapter/Subsection

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

Pagina 280

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

Pagina 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

Pagina 282

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

Pagina 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

Pagina 284 - Evaluate MATLAB Expression

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

Pagina 285

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

Pagina 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

Pagina 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

Pagina 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

Pagina 289

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

Pagina 290

2 Create Your First Report2-6Title PagecomponentChaptercomponentTextcomponentFigureSnapshotcomponentTextcomponent

Pagina 291

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

Pagina 292 - For Loop

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

Pagina 293

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

Pagina 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

Pagina 295

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

Pagina 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

Pagina 297

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

Pagina 298 - Handle Graphics Name

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

Pagina 299

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

Pagina 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

Pagina 301

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

Pagina 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

Pagina 303 - Title Properties

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

Pagina 304

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

Pagina 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

Pagina 306 - Figure Selection

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

Pagina 307

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

Pagina 308

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

Pagina 309

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

Pagina 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

Pagina 311

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

Pagina 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

Pagina 313

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

Pagina 314

11Functions – Alphabetical List

Pagina 315 - Insert Variable

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

Pagina 316

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

Pagina 317

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

Pagina 318

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

Pagina 319 - Examples

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

Pagina 320

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

Pagina 321 - Generate the report

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

Pagina 322 - Explained.”

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

Pagina 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

Pagina 324

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

Pagina 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

Pagina 326

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

Pagina 327

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

Pagina 328

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

Pagina 329 - Logical Else

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

Pagina 330

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

Pagina 331 - Logical Elseif

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

Pagina 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

Pagina 333

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

Pagina 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

Pagina 336 - MATLAB Property Table

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

Pagina 337 - Cell Properties

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

Pagina 338

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

Pagina 339 - MATLAB/Toolbox Version Number

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

Pagina 340 - Table Columns

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

Pagina 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

Pagina 342

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

Pagina 343 - Paragraph

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

Pagina 344 - Style Name

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

Pagina 345

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

Pagina 346

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

Pagina 347 - Stop Report Generation

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

Pagina 348

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

Pagina 349

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

Pagina 350

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

Pagina 351

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

Pagina 352

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

Pagina 353 - Table Body

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

Pagina 354

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

Pagina 355 - Table Column Specification

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

Pagina 356

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

Pagina 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

Pagina 358

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

Pagina 359

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

Pagina 360 - Table Footer

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

Pagina 361

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

Pagina 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

Pagina 363

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

Pagina 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.•

Pagina 365

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

Pagina 366

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

Pagina 367

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

Pagina 368

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

Pagina 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

Pagina 370

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

Pagina 371

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

Pagina 372 - Title Page

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

Pagina 373 - Image Tab

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

Pagina 374 - Abstract Tab

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

Pagina 375 - Legal Notice Tab

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

Pagina 376

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

Pagina 377 - Variable Table

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

Pagina 378

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

Pagina 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

Pagina 380

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

Pagina 381

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

Pagina 382

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

Pagina 383 - Input Arguments

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

Pagina 384 - Output Arguments

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

Pagina 385

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

Pagina 386

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

Pagina 387

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

Pagina 388

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

Pagina 389

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

Pagina 390

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

Pagina 391

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

Pagina 392

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

Pagina 393

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

Pagina 394

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

Pagina 395

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

Pagina 396

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

Pagina 397

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

Pagina 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

Pagina 399

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

Pagina 400

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

Pagina 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

Pagina 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

Pagina 403

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

Pagina 404

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

Pagina 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

Pagina 406

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

Pagina 407

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

Pagina 408

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

Pagina 409

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

Pagina 410

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

Pagina 411

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

Pagina 412

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

Pagina 413

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

Pagina 414

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

Pagina 415

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

Pagina 416

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

Pagina 417

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

Pagina 418

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

Pagina 419

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

Pagina 420

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

Pagina 421

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

Pagina 422

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

Pagina 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

Pagina 424

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

Pagina 425

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

Pagina 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

Pagina 427

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

Pagina 428

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

Pagina 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

Pagina 430

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

Pagina 431

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

Pagina 432

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

Pagina 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

Pagina 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

Pagina 435

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

Pagina 436

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

Pagina 437

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

Pagina 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

Pagina 440

12Classes – Alphabetical List

Pagina 441

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

Pagina 442

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

Pagina 443

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

Pagina 444

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

Pagina 445

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

Pagina 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

Pagina 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

Pagina 448

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

Pagina 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

Pagina 450

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

Pagina 451

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

Pagina 452

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

Pagina 453

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

Pagina 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

Pagina 455

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

Pagina 456

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

Pagina 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

Pagina 458

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

Pagina 459

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

Pagina 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

Pagina 461

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

Pagina 462

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

Pagina 463

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

Pagina 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

Pagina 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

Pagina 466

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

Pagina 467

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

Pagina 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

Pagina 469

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

Pagina 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

Pagina 471

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

Pagina 472

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

Pagina 473

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

Pagina 474

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

Pagina 475

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

Pagina 476

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

Pagina 477

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

Pagina 478

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

Pagina 479

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

Pagina 480

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

Pagina 481

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

Pagina 482

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

Pagina 483

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

Pagina 484

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

Pagina 485

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

Pagina 486

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

Pagina 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.

Pagina 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

Pagina 489

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

Pagina 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

Pagina 491

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

Pagina 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

Pagina 493

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

Pagina 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

Pagina 495

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

Pagina 496 - Construction

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

Pagina 497

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

Pagina 498

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

Pagina 499

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

Pagina 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

Pagina 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

Pagina 502

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

Pagina 503

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

Pagina 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

Pagina 505

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

Pagina 506

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

Pagina 507

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

Pagina 508

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

Pagina 509

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

Pagina 510

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

Pagina 511

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

Pagina 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

Pagina 513

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

Pagina 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

Pagina 515 - mlreportgen.dom.Border class

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

Pagina 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

Pagina 517

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

Pagina 518

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

Pagina 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

Pagina 520

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

Pagina 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

Pagina 522

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

Pagina 523

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

Pagina 524

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

Pagina 525

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

Pagina 526

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

Pagina 527

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

Pagina 528

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

Pagina 529

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

Pagina 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

Pagina 531

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

Pagina 532

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

Pagina 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

Pagina 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

Pagina 535

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

Pagina 536

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

Pagina 537

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

Pagina 538

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

Pagina 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

Pagina 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

Pagina 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

Pagina 542

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

Pagina 543

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

Pagina 544

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

Pagina 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

Pagina 546

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

Pagina 547

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

Pagina 548

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

Pagina 549

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

Pagina 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

Pagina 551

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

Pagina 552

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

Pagina 553

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

Pagina 554

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

Pagina 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

Pagina 556

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

Pagina 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

Pagina 558

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

Pagina 559

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

Pagina 560

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

Pagina 561

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

Pagina 562

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

Pagina 563

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

Pagina 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

Pagina 565

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

Pagina 566

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

Pagina 567

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

Pagina 568

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

Pagina 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

Pagina 570

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

Pagina 571

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

Pagina 572

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

Pagina 573

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

Pagina 574

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

Pagina 575

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

Pagina 576

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

Pagina 577

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

Pagina 578

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

Pagina 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

Pagina 580

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

Pagina 581

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

Pagina 582

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

Pagina 583

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

Pagina 584

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

Pagina 585

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

Pagina 586

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

Pagina 587

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

Pagina 588

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

Pagina 589

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

Pagina 590

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

Pagina 591

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

Pagina 592

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

Pagina 593

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

Pagina 594

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

Pagina 595

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

Pagina 596

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

Pagina 597

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

Pagina 598

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

Pagina 599

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

Pagina 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

Pagina 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

Pagina 602

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

Pagina 603

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

Pagina 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

Pagina 605

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

Pagina 606

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

Pagina 607

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

Pagina 608

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

Pagina 609

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

Pagina 610

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

Pagina 611

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

Pagina 612

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

Pagina 613

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

Pagina 614

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

Pagina 615

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

Pagina 616

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

Pagina 617

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

Pagina 618

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

Pagina 619

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

Pagina 620

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

Pagina 621

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

Pagina 622

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

Pagina 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

Pagina 624

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

Pagina 625

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

Pagina 626

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

Pagina 627

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

Pagina 628

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

Pagina 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

Pagina 630

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

Pagina 631

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

Pagina 632

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

Pagina 633

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

Pagina 634

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

Pagina 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

Pagina 636

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

Pagina 637

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

Pagina 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

Pagina 639

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

Pagina 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

Pagina 641

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

Pagina 642

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

Pagina 643

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

Pagina 644

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

Pagina 645

2 Create Your First Report2-389Save the report.

Pagina 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

Pagina 647

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

Pagina 648

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

Pagina 649

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

Pagina 650

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

Pagina 651

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

Pagina 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

Pagina 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

Pagina 654

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

Pagina 655

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

Pagina 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

Pagina 657 - External Web Sites

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

Pagina 658

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

Pagina 659

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

Pagina 660

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

Pagina 661

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

Pagina 662

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

Pagina 663

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

Pagina 664

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

Pagina 665

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

Pagina 666

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

Pagina 667

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

Pagina 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

Pagina 669

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

Pagina 670

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

Pagina 671

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

Pagina 672

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

Pagina 673

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

Pagina 674

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

Pagina 675

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

Pagina 676

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

Pagina 677

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

Pagina 678

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

Pagina 679

Generate a Report2-41

Pagina 680

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

Pagina 681

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

Pagina 682

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

Pagina 683

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

Pagina 684

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

Pagina 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

Pagina 686

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

Pagina 687

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

Pagina 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

Pagina 689

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

Pagina 691

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

Pagina 692

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

Pagina 693

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

Pagina 694

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

Pagina 695

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

Pagina 696

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

Pagina 697

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

Pagina 698

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

Pagina 699

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

Pagina 700

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

Pagina 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

Pagina 702

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

Pagina 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

Pagina 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

Pagina 705

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

Pagina 706

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

Pagina 707

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

Pagina 708

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

Pagina 709

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

Pagina 710

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

Pagina 711

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

Pagina 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

Pagina 713

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

Pagina 714

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

Pagina 715

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

Pagina 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

Pagina 717

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

Pagina 718

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

Pagina 719

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

Pagina 720

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

Pagina 721

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

Pagina 722

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

Pagina 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

Pagina 724

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

Pagina 725

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

Pagina 726

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

Pagina 727

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

Pagina 728

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

Pagina 729

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

Pagina 730

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

Pagina 731

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

Pagina 732

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

Pagina 733

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

Pagina 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

Pagina 735

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

Pagina 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

Pagina 737

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

Pagina 738

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

Pagina 739

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

Pagina 740

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

Pagina 741

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

Pagina 742

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

Pagina 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

Pagina 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

Pagina 745

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

Pagina 746

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

Pagina 747

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

Pagina 748

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

Pagina 749

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

Pagina 750

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

Pagina 751

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

Pagina 752

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

Pagina 753

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

Pagina 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

Pagina 755

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

Pagina 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

Pagina 757

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

Pagina 758

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

Pagina 759

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

Pagina 760

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

Pagina 761

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

Pagina 762

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

Pagina 763

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

Pagina 764

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

Pagina 765

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

Pagina 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

Pagina 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

Pagina 768

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

Pagina 769

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

Pagina 770

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

Pagina 771

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

Pagina 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

Pagina 773

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

Pagina 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

Pagina 775

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

Pagina 776

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

Pagina 777

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

Pagina 778

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

Pagina 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

Pagina 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

Pagina 781

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

Pagina 782

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

Pagina 783

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

Pagina 784

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

Pagina 785

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

Pagina 786

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

Pagina 787

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

Pagina 788

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

Pagina 789

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

Pagina 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

Pagina 791

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

Pagina 792

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

Pagina 793

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

Pagina 794

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

Pagina 795

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

Pagina 796

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

Pagina 797

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

Pagina 798

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

Pagina 799

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

Pagina 800

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

Pagina 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

Pagina 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

Pagina 803

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

Pagina 804

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

Pagina 805

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

Pagina 806

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

Pagina 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

Pagina 808

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

Pagina 809

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

Pagina 810

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

Pagina 811

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

Pagina 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

Pagina 813

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

Pagina 814

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

Pagina 815

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

Pagina 816

mlreportgen.dom.UnorderedList class12-339• mlreportgen.dom.Table• mlreportgen.dom.Image• mlreportgen.dom.CustomElement• Horizontal one-dimensional ar

Pagina 817

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

Pagina 818

mlreportgen.dom.UnorderedList class12-341See Alsomlreportgen.dom.ListItem | mlreportgen.dom.OrderedList

Pagina 819

12 Classes – Alphabetical List12-342mlreportgen.dom.VAlign classPackage: mlreportgen.domVertical alignment of document objectDescriptionSpecifies vert

Pagina 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

Pagina 821

12 Classes – Alphabetical List12-344mlreportgen.dom.VerticalAlign classPackage: mlreportgen.domVertical alignment of textDescriptionSpecifies vertical

Pagina 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

Pagina 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

Pagina 824

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

Pagina 825

mlreportgen.dom.WarningMessage class12-347mlreportgen.dom.WarningMessage classPackage: mlreportgen.domWarning messageDescriptionCreate a warning mess

Pagina 826

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

Pagina 827

mlreportgen.dom.WarningMessage class12-349ExamplesCreate a Warning Messageimport mlreportgen.dom.*;d = Document('test','html');

Pagina 828

12 Classes – Alphabetical List12-350mlreportgen.dom.WhiteSpace classPackage: mlreportgen.domWhite space typeDescriptionPreserves white space and line

Pagina 829

mlreportgen.dom.WhiteSpace class12-351String Description'pre' White space is preserved by the browser. Text wraps only online breaks. Acts

Pagina 830

12 Classes – Alphabetical List12-352String specifying the white space type.String Description'preserve' Preserves white space and line break

Pagina 831

mlreportgen.dom.WhiteSpace class12-353 close(d);rptview('test',doctype);See Alsomlreportgen.dom.TextMore About• “Report Formatting Appr

Pagina 832

12 Classes – Alphabetical List12-354mlreportgen.dom.WidowOrphanControl classPackage: mlreportgen.domWidow and orphan handlingDescriptionSpecifies whet

Pagina 833

mlreportgen.dom.WidowOrphanControl class12-355PropertiesId — ID for document elementstringA session-unique ID is generated as part of document elemen

Pagina 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

Pagina 835

12 Classes – Alphabetical List12-356mlreportgen.dom.Width classPackage: mlreportgen.domObject widthDescriptionSpecifies the width of an object, such a

Pagina 836

mlreportgen.dom.Width class12-357Output ArgumentswidthObj — Object widthmlreportgen.dom.Width objectObject width, represented by an mlreportgen.dom.W

Pagina 837

12 Classes – Alphabetical List12-358• pt — points• px — pixels• % — percentExamplesSet Width and Other Formats for a Tableimport mlreportgen.dom.*;doc

Pagina 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

Pagina 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

Pagina 840

Create a Report Program13-3Create a Report ProgramThe MATLAB Report Generator includes a set of functions, called the DOM (DocumentObject Model) API,

Pagina 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

Pagina 842

Document Object Model13-5• “Import the DOM API Package” on page 13-7

Pagina 843

13 Create a Report Program13-6Construct a DOM ObjectThe DOM API includes a special set of MATLAB functions, called constructors, forcreating DOM objec

Pagina 844

Import the DOM API Package13-7Import the DOM API PackageAll DOM class names, and hence constructor names, include the prefixmlreportgen.dom. To avoid

Pagina 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

Pagina 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

Pagina 847

Create a Document Object to Hold Content13-9Create a Document Object to Hold ContentEvery report program must create an mlreportgen.dom.Document obje

Pagina 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

Pagina 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

Pagina 850

13 Create a Report Program13-12append(d,Table(tableArray)); See AlsoFunctionsmlreportgen.dom.Paragraph.appendRelated Examples• “Construct a DOM Object

Pagina 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

Pagina 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

Pagina 853

Add Content as a Group13-15p2.Bold = true;append(doc,p1);append(doc,p2);append(doc,disclaimer);close(doc);rptview('groupReport','html&

Pagina 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

Pagina 855

Report Packages13-17Report PackagesA Microsoft Word document packages all of its contents, text, images, style sheets, and soon, in a single compress

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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,

Pagina 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

Pagina 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

Pagina 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

Pagina 864

Format Inheritance13-25Format InheritanceThe DOM API allows you to use both template-based styles and format object-basedstyles (or equivalent format

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 872 - Report Formatting Approaches

13 Create a Report Program13-32More About• “Form-Based Reporting” on page 13-28

Pagina 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

Pagina 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

Pagina 875 - Use Format Objects

Create Document Part Template Libraries13-35Otherwise, select mlreportgen from the Category list.8In the Description field, enter a template descript

Pagina 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

Pagina 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-

Pagina 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

Pagina 879

13 Create a Report Program13-38Object-Oriented Report CreationNote: This section assumes that you are familiar with object-oriented programming inMATL

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 884

Create and Format Text13-43fontFamily = FontFamily('Arial');fontFamily.BackupFamilyNames = {'Helvetica'};t.Style = {fontFamily};t

Pagina 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

Pagina 886

Create and Format Text13-45if passed status = 'Passed'; statusStyle = 'Pass';else status = 'Failed'; statusStyle =

Pagina 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

Pagina 888

Create and Format Paragraphs13-47Format a ParagraphYou can format a paragraph programmatically, using DOM format objects or formatproperties. You can

Pagina 889

ixDisplay Property Name/Property Value Pairs . . . . . . . . . . . . 5-9Edit Table Titles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Pagina 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

Pagina 892

Create and Format Paragraphs13-49Formatting Format Object Format PropertyKeep paragraph on samepageKeepLinesTogether n/aEliminate widows andorphansWi

Pagina 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

Pagina 894

Create and Format Paragraphs13-51append(rpt, p);close(rpt);rptview(rpt.OutputPath);See AlsoClassesmlreportgen.dom.Bold | mlreportgen.dom.FontFamily |

Pagina 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

Pagina 896

Create and Format Lists13-53close(d);rptview('myListReport','html');You can also create an unordered list from an array by includ

Pagina 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

Pagina 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

Pagina 899 - Format a Paragraph

13 Create a Report Program13-56d = Document('orderedListReport','html');ol = OrderedList({'Start MATLAB', ... '

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 906

13 Create a Report Program13-62Formatting Format Object Format PropertyColor of border Border BorderColorThickness of border Border BorderWidthCreate

Pagina 907 - Create a Multilevel List

Create and Format Tables13-63Formatting Table Object PropertyAlign entries horizontally (left, right,center)TableEntriesValignCreate space (padding)

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 913 - Format a Table

13 Create a Report Program13-68row = TableRow();append(row,TableEntry('data11'));append(row,TableEntry('data12'));append(table,row

Pagina 914

Create and Format Tables13-69table = Table(magic(rank));table.Border = 'single';table.BorderWidth = '1px';grps(1) = TableColSpecG

Pagina 915

13 Create a Report Program13-70• Image• Table• OrderedList• UnorderedList• CustomElementFormat Table Entries ProgrammaticallyYou can use format object

Pagina 916

Create and Format Tables13-71t.TableEntriesStyle(Border('solid','black','1 px'));Properties you set for a TableEntry ob

Pagina 917

13 Create a Report Program13-72More About• “Report Formatting Approaches” on page 13-20

Pagina 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

Pagina 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

Pagina 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

Pagina 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”

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 928 - Create and Format Images

13 Create a Report Program13-82toc = CustomElement('div');toc.CustomAttributes = {CustomAttribute('id', 'toc')};append(t

Pagina 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

Pagina 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

Pagina 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

Pagina 932

13 Create a Report Program13-86close(d);rptview(d.OutputPath);See AlsoClassesmlreportgen.dom.Image | mlreportgen.dom.ImageArea |mlreportgen.dom.ImageM

Pagina 933

Automatically Number Document Content13-87Automatically Number Document ContentIn this section...“Automatically Number Content Programmatically” on p

Pagina 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

Pagina 935

13 Create a Report Program13-882Append the AutoNumber to a Text, Paragraph, or Heading object that contains thetext that precedes the automatic number

Pagina 936

Automatically Number Document Content13-89 chapHead.Style = {CounterInc('chapter'), ... CounterReset('table&ap

Pagina 937 - Create Image Maps

13 Create a Report Program13-90import mlreportgen.dom.*d = Document('MyReport','docx','MyReportTemplate');for rank = 3:5

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 946

13 Create a Report Program13-98 <td>Carlos Martinez</td> <td>38</td> <td>Lawyer</td> </tr></ta

Pagina 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

Pagina 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

Pagina 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

Pagina 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

Pagina 951

HTML Code Requirements for DOM Reports13-103For information about these elements, see the W3Schools tags documentation atwww.w3schools.com/tags.Suppo

Pagina 952

13 Create a Report Program13-104• font-style• font-weight• height• line-height• margin• margin-bottom• margin-left• margin-right• margin-top• padding•

Pagina 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

Pagina 954

13 Create a Report Program13-106Display Report Generation MessagesIn this section...“Report Generation Messages” on page 13-106“Display DOM Default Me

Pagina 955

Display Report Generation Messages13-1072Use the MessageDispatcher.Filter property to specify to display debugmessages.dispatcher.Filter.DebugMessage

Pagina 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

Pagina 957

13 Create a Report Program13-1081Create a message dispatcher.dispatcher = MessageDispatcher.getTheDispatcher;2Add a listener using the MATLAB addliste

Pagina 958

Display Report Generation Messages13-109See AlsoFunctionsmlreportgen.dom.MessageDispatcher.dispatch |mlreportgen.dom.MessageDispatcher.getTheDispatch

Pagina 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

Pagina 960

Create a Microsoft Word Template13-111Create a Microsoft Word TemplateUse one of these approaches to create a Word template for generating a report.•

Pagina 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

Pagina 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

Pagina 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

Pagina 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)

Pagina 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

Pagina 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

Pagina 967

Select Report Generation Options4-7Viewer Format Description StylesheetsDocBook DocBook (notransform)Produce a report inDocBook formatN/ATip To creat

Pagina 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

Pagina 969

Modify Styles in a Microsoft Word Template13-1192In the Style dialog box, click the Manage Styles button.

Pagina 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.

Pagina 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

Pagina 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

Pagina 973

Create an HTML Template13-123• “Create a Microsoft Word Template” on page 13-111

Pagina 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

Pagina 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

Pagina 976 - Add Holes in an HTML Template

13 Create a Report Program13-1265Zip the template using the zipTemplate command.See AlsoFunctionsunzipTemplate | zipTemplateRelated Examples• “Modify

Pagina 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

Pagina 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

Pagina 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

Pagina 980

Create Microsoft Word Page Layout Sections13-129rpt = Document('test','docx');open(rpt);sect = rpt.CurrentDOCXSection;pageSize =

Pagina 981

13 Create a Report Program13-130table = append(rpt,magic(22));table.Border = 'solid';table.ColSep = 'solid';table.RowSep = 's

Pagina 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“

Pagina 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

Pagina 984

Create Page Footers and Headers13-133 switch firstPageHeader.CurrentHoleId case 'Date' append(

Pagina 985

13 Create a Report Program13-134pageHeaders(1) = DOCXPageHeader('first',d,'FirstPageHeader');while ~strcmp(pageHeaders(1).CurrentH

Pagina 986

Select Report Generation Options4-9Web Stylesheet DescriptionTruth Table HTMLstylesheetHTML on multiple pages; suppresses chapter headingsand table o

Commenti su questo manuale

Nessun commento