Main Content

mlreportgen.dom.ListStyleType class

Package: mlreportgen.dom

Bullet or number style for HTML and PDF output

Description

Use objects of the mlreportgen.dom.ListStyleType class to specify the bullet or number style for an mlreportgen.dom.ListItem object for HTML and PDF output.

Note

The default fonts used for PDF output support commonly used bulleted and numbered list item styles. For rarer styles, you must specify a font family that supports the style in the style sheet or the Style property of the item list. You must also configure the DOM API to use the specified font family. See Configure PDF Fonts.

The mlreportgen.dom.ListStyleType class is a handle class.

Creation

Description

ListStyleObj = ListStyleType() creates a ListStyleType object and sets the Value property to "disc".

example

ListStyleObj = ListStyleType(value) creates a ListStyleType object and sets the Value property to value.

Properties

expand all

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

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

Bullet or number style, specified as a string scalar or character vector with one of these values:

Style valueBullet or number type
"disc"Filled circle (default)
"circle"Open circle
"cjk-ideographic"Plain ideographic numbers
"decimal"Number
"decimal-leading-zero"Number with leading zeroes, i.e., 01, 02, 03, and so on
"hiragana"Hiragana numbering
"hiragana-iroha"Hiragana-iroha numbering
"katakana"Katakana numbering
"katakana-iroha"Katakana-iroha numbering
"lower-alpha"Lowercase alphabetic numbering
"lower-greek"Lowercase Greek alphabetic numbering
"lower-latin"Lowercase Latin alphabetic numbering
"lower-roman"Lowercase roman numerals
"none"No marker
"upper-alpha"Uppercase alphabetic numbering
"upper-latin"Uppercase Latin numbering
"upper-roman"Uppercase roman numerals

Examples

collapse all

Create a document mylist for HTML, the default output type. Add a paragraph to the document and define two list items, giving each the ListStyleType property of "lower-greek". Create an ordered list object procedure and append the two list items to it, and then append the unordered list to the document.

import mlreportgen.dom.*;
d = Document("mylist");
p = Paragraph("This list uses Greek numbering.");
append(d,p);

step1 = ListItem("Do this step first.");
step2 = ListItem("Now do this step.");
step1.Style = {ListStyleType("lower-greek")};
step2.Style = {ListStyleType("lower-greek")};
procedure = OrderedList();
append(procedure,step1);
append(procedure,step2);
append(d,procedure);

close(d);
rptview("mylist");

Version History

Introduced in R2016a