Number (rinoh.number
)¶
- class rinoh.number.NumberFormat¶
How (or if) numbers are displayed
Instead of a numbering format, it’s possible to supply a custom label (
StyledText
) to show instead of the number.Accepts:
none
,number
,symbol
,lowercase character
,uppercase character
,lowercase roman
,uppercase roman
-
class rinoh.number.Label(custom_label=
None
)¶ Mixin class that formats a label
- Parameters:¶
- custom_label : StyledText¶
a frontend can supply a custom label to use instead of an automatically determined label (typically a number)
-
class rinoh.number.LabelStyle(base=
None
, **attributes)¶ Style class for
Label
- label_prefix¶
Text to prepend to the label
Accepts
StyledText
: a list of styled text strings, separated by spaces. A styled text string is a quoted string ('
or"
), optionally followed by a style name enclosed in braces:'text string' (style name)
Default: (no value)
- label_suffix¶
Text to append to the label
Accepts
StyledText
: a list of styled text strings, separated by spaces. A styled text string is a quoted string ('
or"
), optionally followed by a style name enclosed in braces:'text string' (style name)
Default: (no value)
-
class rinoh.number.NumberStyle(base=
None
, **attributes)¶ Style class for
Number
- number_format¶
How numbers are formatted
Accepts
NumberFormat
:none
,number
,symbol
,lowercase character
,uppercase character
,lowercase roman
,uppercase roman
Default:
number
- label_prefix¶
Text to prepend to the label (inherited from
LabelStyle
)Accepts
StyledText
: a list of styled text strings, separated by spaces. A styled text string is a quoted string ('
or"
), optionally followed by a style name enclosed in braces:'text string' (style name)
Default: (no value)
- label_suffix¶
Text to append to the label (inherited from
LabelStyle
)Accepts
StyledText
: a list of styled text strings, separated by spaces. A styled text string is a quoted string ('
or"
), optionally followed by a style name enclosed in braces:'text string' (style name)
Default: (no value)
- custom_label¶
Use a custom label if specified (inherited from
LabelStyle
)Accepts
Bool
:true
orfalse
Default:
false
- rinoh.number.format_number(number, format)¶
Format number according the given format (
NumberFormat
)