mlreportgen.dom.OrderedList Class
Namespace: mlreportgen.dom
Create ordered list
Description
Create an ordered (numbered) list.
The mlreportgen.dom.OrderedList class is a handle class.
Creation
Description
Input Arguments
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.Textmlreportgen.dom.Paragraphmlreportgen.dom.ExternalLinkmlreportgen.dom.InternalLinkmlreportgen.dom.Tablemlreportgen.dom.Imagemlreportgen.dom.CustomElement
Horizontal one-dimensional array (for a sublist)
Properties
Custom attributes of the document element, specified as an array of mlreportgen.dom.CustomAttribute objects. The custom attributes must be
supported by the output format of the document element to which this object is
appended.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Format specification for this document element object, specified as an array of DOM
format objects. The formats specified by this property override corresponding formats
specified by the StyleName property of this element. Formats that
do not apply to this document element object are ignored.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
The style specified by Stylename must be defined in
the template used to create the document element to which you append this
list.
Tag, specified as a character vector or string scalar. The DOM API 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. Use this value to help identify
where an issue occurs during document generation.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char | string
Methods
Examples
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 R2014bStarting 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.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)