mlreportgen.dom.TemplateUnorderedListLevelStyle Class
Namespace: mlreportgen.dom
Style formats for a specific list level in a
TemplateUnorderedListStyle
object
Since R2024a
Description
This class represents a level of an unordered list style. Creating an
mlreportgen.dom.TemplateUnorderedListLevelStyle
object populates the object's Levels
property with instances of this class. Use the LevelStyles
property to
format the unordered list's levels.
The mlreportgen.dom.TemplateUnorderedListLevelStyle
class is a handle
class.
Properties
List level that this object formats, specified as an integer.
Attributes:
GetAccess | public |
SetAccess | private |
NonCopyable | true |
Data Types: double
Style sheet formats, specified as an array of DOM formatting objects. These formats define how this style affects report content.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Style of bullet used for this list level, specified as one of these values.
Value | Marker Description | Supported in Microsoft® Word | Supported in HTML and PDF |
---|---|---|---|
"circle" | Open circle | yes | yes |
"cjk-ideographic" | Plain ideographic numbers Example: | yes | yes |
"decimal" | Decimal number Example: | yes | yes |
"decimal-hierarchical" | Numbers that include the numbers of parent list levels. Example: 1. 1.1 1.2 1.2.1 1.2.2 2. | yes | no |
"decimal-leading-zero" | Decimal number with leading zero Example:
| yes | yes |
"disc" | Filled circle | yes | yes |
"hiragana" | Hiragana numbering Example: | no | yes |
"hiragana-iroha" | Hiragana-iroha numbering Example: | no | yes |
"katakana" | Katakana numbering Example: | yes | yes |
"katakana-iroha" | Katakana-iroha numbering Example: | yes | yes |
"lower-alpha" | Lowercase alphabetic numbering Example:
| yes | yes |
"lower-greek" | Lowercase Greek alphabetic numbering Example:
| no | yes |
"lower-latin" | Lowercase Latin alphabetic numbering Example:
| yes | yes |
"lower-roman" | Lowercase Roman numerals Example: | yes | yes |
"none" | No marker | yes | yes |
"upper-alpha" | Uppercase alphabetic numbering Example:
| yes | yes |
"upper-latin" | Uppercase alphabetic numbering Example:
| yes | yes |
"upper-roman" | Uppercase Roman numerals Example: | yes | yes |
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Formats that are applied to only the list bullets for this level, specified as an array of DOM formatting objects.
Note
The PDF template output ignores this property.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
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
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
Examples
Create a multilevel unordered list style in a template and then apply that style in your document.
Create the Style in the Template
Import the DOM API namespace so that you do not have to use long, fully qualified names.
import mlreportgen.dom.*; t = Template("myTemplate","pdf"); open(t);
Create a list style.
listStyle = TemplateUnorderedListStyle("myUnorderedListStyle");
Define formats for level 1.
level1Style = listStyle.LevelStyles(1); level1Style.Formats = [Color("blue"), FontSize("32pt")];
Define formats for level 2.
level2Style = listStyle.LevelStyles(2); level2Style.Formats = [Color("red"), FontSize("16pt")];
Add style to the stylesheet.
addStyle(t.Stylesheet,listStyle);
Close the template.
close(t);
Use the Style from the Template in a Document
Create a document using the generated template.
d = Document("myDoc","pdf","myTemplate"); open(d);
Create a list object with 2 levels.
list = UnorderedList(["first level item 1", "first level item 2"]); secondLevelList = UnorderedList(["second level item 1", "second level item 2"]); append(list, secondLevelList);
Set the style name.
list.StyleName = "myUnorderedListStyle";
Add the list to the document.
append(d,list);
Close and view the document.
close(d); rptview(d);
Version History
Introduced in R2024a
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.
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)