A document element who’s style can be configured.
Dictionary storing style attributes.
The style attributes associated with this
Styleare specified as class attributes of type
Style attributes can also be accessed as object attributes.
class rinoh.style.StyleSheet(name, matcher=
Dictionary storing a collection of related styles by name.
- name : str¶
a label for this style sheet
- matcher : StyledMatcher¶
the matcher providing the selectors the styles contained in this style sheet map to. If no matcher is given and base is specified, the base‘s matcher is used. If base is not set, the default matcher is used.
- base : StyleSheet or str¶
the style sheet to extend
- description : str¶
a short string describing this style sheet
- pygments_style : str¶
the Pygments style to use for styling code blocks
class rinoh.style.StyleSheetFile(filename, base=
Loads styles defined in a .rts file (INI format).
StyleSheetFiletakes the same optional arguments as
StyleSheet. These can also be specified in the
[STYLESHEET]section of the style sheet file. If an argument is specified in both places, the one passed as an argument overrides the one specified in the style sheet file.
Dictionary mapping labels to selectors.
This matcher can be initialized in the same way as a
dictby passing a mapping, an interable and/or keyword arguments.
- update([E, ]**F) None. Update D from dict/iterable E and F. ¶
If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]