mlreportgen.dom.OrderedList class
Package: mlreportgen.dom
Create ordered list
Description
Create an ordered (numbered) list.
The mlreportgen.dom.OrderedList
class is a handle
class.
Creation
Description
Input Arguments
items
— Content to include in ordered list
one-dimensional array of doubles | one-dimensional array of character vectors | one-dimensional categorical array | one-dimensional cell array
Content to include in an ordered list, specified as a:
One-dimensional array of doubles
One-dimensional array of character vectors
One-dimensional categorical array
One-dimensional cell array
The cell array can contain a combination of the following:
A character vector
A number
A Boolean value
One of the following DOM objects:
mlreportgen.dom.Text
mlreportgen.dom.Paragraph
mlreportgen.dom.ExternalLink
mlreportgen.dom.InternalLink
mlreportgen.dom.Table
mlreportgen.dom.Image
mlreportgen.dom.CustomElement
Horizontal one-dimensional array (for a sublist)
Properties
CustomAttributes
— Custom attributes of document element
array of mlreportgen.dom.CustomAttribute
objects
Custom attributes of this document element, specified as an array of mlreportgen.dom.CustomAttribute
objects. The custom attributes must be
supported by the output format.
Id
— ID for this document element
character vector | string scalar
ID for this document element, specified as a character vector or string scalar. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Style
— Format specification
array of format objects
Format objects that specify the format of a document element.
Stylename
— List style name
character vector
The style specified by Stylename
must be defined in
the template used to create the document element to which you append this
list.
Tag
— Tag for this document element
character vector | string scalar
Tag for this document element, specified as a character vector or string scalar.
The DOM generates a session-unique tag as part of the creation of this object. The
generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value
of the Id
property of the object. Specifying your own tag value can
help you to identify where an issue occurred during document generation.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Methods
Examples
Create an Ordered List
import mlreportgen.dom.*; d = Document('test','html'); ol = OrderedList({Text('a'), 'b', 1,... {'c', Paragraph('d')}}); append(d,ol); close(d); rptview('test','html');
Version History
Introduced in R2014bR2019b: Default Indentation for Ordered List in Word Report
Starting in R2019b, the default indentation for an ordered list in a Microsoft® Word report is 0.25 inches. In previous releases, by default, an ordered list was unindented in a Word report. In MATLAB® R2019b or a later release, to generate an unindented ordered list, set the outer margin of the list to 0.25 inches.
ol = OrderedList({'a', 'b', 'c'}); ol.Style = {mlreportgen.dom.OuterMargin('0.25in','0in')};
Specify 0.25 inches, not 0 inches, to allow for the 0.25 inches required for the list item numbers.
Apri esempio
Si dispone di una versione modificata di questo esempio. Desideri aprire questo esempio con le tue modifiche?
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)