Cross-References and Fields (rinoh.reference)¶
-
class rinoh.reference.ReferenceStyle(base=
None, **attributes)¶ Style class for
Reference- type¶
How the reference should be displayed
Accepts
ReferenceType:reference,number,title,page,customDefault:
reference
- quiet¶
If the given reference type does not existfor the target, resolve to an empty stringinstead of making a fuss about it
Accepts
Bool:trueorfalseDefault:
false
- typeface¶
Typeface to set the text in (inherited from
TextStyle)Accepts
Typeface: the name of a typeface. Seerinoh --list-fontsfor a list of the available typefaces.Default:
Times
- font_weight¶
Thickness of character outlines relative to their height (inherited from
TextStyle)Accepts
FontWeight:hairline,thin,ultra-light,extra-light,light,regular,normal,book,roman,medium,semi-bold,demi-bold,bold,extra-bold,ultra-bold,black,heavy,extra-black,ultra-blackDefault:
500
- font_slant¶
Slope style of the font (inherited from
TextStyle)Accepts
FontSlant:upright,oblique,italicDefault:
upright
- font_width¶
Stretch of the characters (inherited from
TextStyle)Accepts
FontWidth:ultra-condensed,extra-condensed,condensed,semi-condensed,normal,medium,semi-expanded,expanded,extra-expanded,ultra-expandedDefault:
5
- font_size¶
Height of characters (inherited from
TextStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
10pt
- font_color¶
Color of the font (inherited from
TextStyle)Accepts
Color: HEX string with optional alpha component (#RRGGBB,#RRGGBBAA,#RGBor#RGBA)Default:
#000
- font_variant¶
Variant of the font (inherited from
TextStyle)Accepts
FontVariant:normal,small capital,oldstyle figuresDefault:
normal
- position¶
Vertical text position (inherited from
TextStyle)Accepts
TextPosition:normal,superscript,subscriptDefault:
normal
- kerning¶
Improve inter-letter spacing (inherited from
TextStyle)Accepts
Bool:trueorfalseDefault:
true
- ligatures¶
Run letters together where possible (inherited from
TextStyle)Accepts
Bool:trueorfalseDefault:
true
- hyphenate¶
Allow words to be broken over two lines (inherited from
TextStyle)Accepts
Bool:trueorfalseDefault:
true
- hyphen_chars¶
Minimum number of characters in a hyphenated part of a word (inherited from
TextStyle)Accepts
Integer: a natural number (positive integer)Default:
2
- hyphen_lang¶
Language to use for hyphenation. Accepts locale codes such as ‘en_US’ (inherited from
TextStyle)Accepts
Locale: locale identifier in the<language ID>_<region ID>formatDefault:
en_US
- no_break_after¶
Prevent a line break after these words (inherited from
TextStyle)Accepts
NoBreakAfter:language-default, or a space-separated list of wordsDefault:
language-default
- before¶
Item to insert before this one (inherited from
InlineStyle)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)
- after¶
Item to insert after this one (inherited from
InlineStyle)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)
- hide¶
Suppress rendering this element (inherited from
Style)Accepts
Bool:trueorfalseDefault:
false
- number_format¶
How numbers are formatted (inherited from
NumberStyle)Accepts
NumberFormat:none,number,symbol,lowercase character,uppercase character,lowercase roman,uppercase romanDefault:
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:trueorfalseDefault:
false
-
class rinoh.reference.ReferenceField(type=
None, custom_title=None, style=None, parent=None, source=None)¶
- class rinoh.reference.ReferenceType¶
Accepts:
reference,number,title,page,custom
-
class rinoh.reference.ReferencingParagraph(target_id_or_flowable, id=
None, style=None, parent=None)¶ - style_class¶
alias of
ReferencingParagraphStyle
-
class rinoh.reference.Note(flowable, id=
None, style=None, parent=None)¶ -
-
flow(container, last_descender, state=
None, footnote=False, **kwargs)¶ Flow this flowable into container and return the vertical space consumed.
The flowable’s contents are preceded by a vertical space with a height as specified in its style’s space_above attribute. Similarly, the flowed content is followed by a vertical space with a height given by the space_below style attribute.
-
flow(container, last_descender, state=
-
class rinoh.reference.NoteStyle(base=
None, **attributes)¶ Style class for
Note- location¶
Where to place the note
Accepts
NoteLocation:in-place,footerDefault:
footer
- label_min_width¶
Minimum label width (inherited from
LabeledFlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
12pt
- label_max_width¶
Maximum label width (inherited from
LabeledFlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
80pt
- label_spacing¶
Spacing between a label and the labeled flowable (inherited from
LabeledFlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
3pt
- align_baselines¶
Line up the baselines of the label and the labeled flowable (inherited from
LabeledFlowableStyle)Accepts
Bool:trueorfalseDefault:
true
- wrap_label¶
Wrap the label at label_max_width (inherited from
LabeledFlowableStyle)Accepts
Bool:trueorfalseDefault:
false
- width¶
Width to render the flowable at (inherited from
FlowableStyle)Accepts
FlowableWidth:auto,fillor a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
auto
- horizontal_align¶
Horizontal alignment of the flowable (inherited from
FlowableStyle)Accepts
HorizontalAlignment:left,right,centerDefault:
left
- space_above¶
Vertical space preceding the flowable (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- space_below¶
Vertical space following the flowable (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- margin_left¶
Left margin (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- margin_right¶
Right margin (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- padding¶
Padding (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- padding_left¶
Left padding (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- padding_right¶
Right padding (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- padding_top¶
Top padding (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- padding_bottom¶
Bottom padding (inherited from
FlowableStyle)Accepts
Dimension: a numeric value followed by a unit (pt,in,pc,mm,cm,%,/2,/4)Default:
0
- keep_with_next¶
Keep this flowable and the next on the same page (inherited from
FlowableStyle)Accepts
Bool:trueorfalseDefault:
false
- border¶
Border surrounding the flowable (inherited from
FlowableStyle)Accepts
Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)Default:
none
- border_left¶
Border left of the flowable (inherited from
FlowableStyle)Accepts
Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)Default:
none
- border_right¶
Border right of the flowable (inherited from
FlowableStyle)Accepts
Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)Default:
none
- border_top¶
Border above the flowable (inherited from
FlowableStyle)Accepts
Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)Default:
none
- border_bottom¶
Border below the flowable (inherited from
FlowableStyle)Accepts
Stroke: the width (Dimension) and color (Color) of the stroke, separated by a comma (,)Default:
none
- background_color¶
Color of the area within the flowable’s borders (inherited from
FlowableStyle)Accepts
Color: HEX string with optional alpha component (#RRGGBB,#RRGGBBAA,#RGBor#RGBA)Default:
none
- page_break¶
Type of page break to insert before rendering this flowable (inherited from
FlowableStyle)Accepts
Break:none,any,left,right,any restart,left restart,right restartDefault:
None
-
class rinoh.reference.NoteMarkerBase(custom_label=
None, **kwargs)¶ - style_class¶
alias of
NoteMarkerStyle
- prepare(flowable_target)¶
Determine number labels and register references with the document
-
class rinoh.reference.NoteMarkerWithNote(referenceable, type=
'number', **kwargs)¶ - prepare(flowable_target)¶
Determine number labels and register references with the document