Lists¶
Define bulleted and numbered list styles, their nesting levels, and the text, number, or image label each level shows.
ListLevelType¶
-
class creator_studio_doc_format.core.ListLevelType(*, preset_identifier=
'', label_indent, text_indent, label, **extra_data)[source]¶ One nesting level of a list style.
- field label_indent : float [Required]¶
The indent, in points, from the paragraph’s leading edge to the list label for this level.
- Constraints:
ge = 0
- field text_indent : float [Required]¶
The additional indent from the list label to the paragraph text for this level, as a multiple of the paragraph’s font size rather than in points.
- Constraints:
ge = 0
- field label : ListLabelType [Required]¶
The kind of bullet or number shown at this level.
ListProperties¶
-
class creator_studio_doc_format.core.ListProperties(*, preset_identifier=
'', font_color=Override.not_set(), font_name=Override.not_set(), writing_direction=Override.not_set(), shadow=Override.not_set(), levels=Override.not_set(), **extra_data)[source]¶ The properties of a list style.
A
preset_identifierhere is matched against the document stylesheet’s list styles before the presets inpresets.json, and an identifier that matches neither is silently ignored, solevelsmust be written here for a label to be drawn. An omittedfont_color,font_name,shadow, orwriting_directionfollows the paragraph’s text styling, and anullclears it instead.-
field font_color : Override[Color] =
Override.not_set()¶ The color applied to list labels and numbers.
-
field font_name : Override[str] =
Override.not_set()¶ The PostScript name of the font used for list labels and numbers. Only the name is carried, not the font itself, so on a device that doesn’t have the font and can’t download it, the labels and numbers are drawn in a substitute font.
-
field writing_direction : Override[WritingDirectionType] =
Override.not_set()¶ The writing direction: left to right, right to left, or natural for the content.
-
field shadow : Override[Shadow] =
Override.not_set()¶ The shadow applied to the list label or number.
-
field levels : Override[list[ListLevelType]] =
Override.not_set()¶ The list definition for each nesting level, with index
0the top level. At most 9 levels are used: any beyond the ninth are ignored, and if fewer are supplied, the last one is repeated for the remaining levels.
-
field font_color : Override[Color] =
ListLabelType¶
-
class creator_studio_doc_format.core.ListLabelType(*, preset_identifier=
'', image=None, none=None, null_image=None, number=None, string=None, **extra_data)[source]¶ The kind of label shown at a list level.
The
stringandimagecases carry the label’s content, size, and offset;numbercarries a numbering format and size; andnoneandnull_imagecarry no value.-
field image : ListImageLabel | None =
None¶ An image label.
-
field none : Literal[True] | None =
None¶ No bullet or label for this level.
-
field null_image : Literal[True] | None =
None¶ An image label whose image is missing. Nothing is drawn for the level, which still counts as labeled rather than as
none.
-
field number : ListNumberLabel | None =
None¶ A number label.
-
field string : ListStringLabel | None =
None¶ A text bullet.
-
field image : ListImageLabel | None =
ListNumberLabel¶
-
class creator_studio_doc_format.core.ListNumberLabel(*, preset_identifier=
'', number_format=None, scale=None, tiered=None, **extra_data)[source]¶ A numbered list label.
Its numbers can be tiered, as in 1.1 and 1.2.
-
field number_format : NumberFormatType | None =
None¶ The numbering format for this level, such as numeric, Roman, or alphabetic. The default is a decimal number.
-
field scale : float | None =
None¶ The label’s size, as a multiple of the text size at the start of the paragraph. The default is 1.0.
-
field tiered : bool | None =
None¶ Whether the numbers are tiered. The default is
false.
-
field number_format : NumberFormatType | None =
ListStringLabel¶
-
class creator_studio_doc_format.core.ListStringLabel(*, preset_identifier=
'', string, scale=None, offset=None, **extra_data)[source]¶ A text list label, such as a bullet character or a short string.
- field string : str [Required]¶
The string shown as the label.
-
field scale : float | None =
None¶ The label’s size, as a multiple of the text size at the start of the paragraph. The default is 1.0.
-
field offset : float | None =
None¶ The vertical shift of the label from its default position, in points; a positive value raises it. The default is 0.0.
ListImageLabel¶
-
class creator_studio_doc_format.core.ListImageLabel(*, preset_identifier=
'', scale=None, offset=None, resource, **extra_data)[source]¶ An image bullet.
-
field scale : float | None =
None¶ The height of the bullet image, as a fraction of the text height at the start of the paragraph; the image keeps its aspect ratio. The default is 1.0.
-
field offset : float | None =
None¶ The vertical shift of the bullet image from its default position, in points; a positive value raises it. The default is 0.0.
-
field scale : float | None =