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
Level
— List level that this object formats
double
List level that this object formats, specified as an integer.
Attributes:
SetAccess | private |
NonCopyable | true |
Data Types: double
Formats
— Style sheet formats
[]
(default) | array of DOM formatting objects
Style sheet formats, specified as an array of DOM formatting objects. These formats define how this style affects report content.
Attributes:
NonCopyable | true |
BulletStyle
— Bullet style applied to this list level
"disc"
(default) | character vector | string scalar
Style of bullet used for this list level, specified as one of these values.
Value | Marker Description | Supported Output Types |
---|---|---|
"circle" | Open circle | All |
"cjk-ideographic" | Plain ideographic numbers Example: | All |
"decimal" | Decimal number Example: | All |
"decimal-hierarchical" | Numbers that include the numbers of parent list levels. Example: 1. 1.1 1.2 1.2.1 1.2.2 2. | DOCX |
"decimal-leading-zero" | Decimal number with leading zero Example:
| All |
"disc" | Filled circle | All |
"hiragana" | Hiragana numbering Example: | HTML, PDF |
"hiragana-iroha" | Hiragana-iroha numbering Example: | HTML, PDF |
"katakana" | Katakana numbering Example: | All |
"katakana-iroha" | Katakana-iroha numbering Example: | All |
"lower-alpha" | Lowercase alphabetic numbering Example:
| All |
"lower-greek" | Lowercase Greek alphabetic numbering Example:
| HTML, PDF |
"lower-latin" | Lowercase Latin alphabetic numbering Example:
| All |
"lower-roman" | Lowercase Roman numerals Example: | All |
"none" | No marker | All |
"upper-alpha" | Uppercase alphabetic numbering Example:
| All |
"upper-latin" | Uppercase alphabetic numbering Example:
| All |
"upper-roman" | Uppercase Roman numerals Example: | All |
Attributes:
NonCopyable | true |
BulletFormats
— Bullet formats applied to this list level
[]
(default) | array of DOM formatting objects
Formats that are applied to only the list bullets for this level, specified as an array of DOM formatting objects.
Note
This property is ignored for PDF template output.
Attributes:
NonCopyable | true |
Data Types: char
| string
Tag
— Tag for mlreportgen.dom.TemplateUnorderedListLevelStyle
object
character vector | string scalar
Tag for the mlreportgen.dom.TemplateUnorderedListLevelStyle
object, 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. Specify your own tag value to help
you identify where to look when an issue occurs during document generation.
Attributes:
NonCopyable | true |
Data Types: char
| string
Id
— Object identifier for mlreportgen.dom.TemplateUnorderedListLevelStyle
object
character vector | string scalar
Object identifier for the mlreportgen.dom.TemplateUnorderedListLevelStyle
object, specified as a
character vector or string scalar. The DOM API generates a session-unique identifier
when it creates the document element object. You can specify your own value for
Id
.
Attributes:
NonCopyable | true |
Data Types: char
| string
Examples
Create and Use a Multilevel Unordered List Style in a Template
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 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 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)