Structure (rinoh.structure)

Sections

class rinoh.structure.Section(flowables, align=None, width=None, id=None, style=None, parent=None, source=None)

A subdivision of a document

A section usually has a heading associated with it, which is optionally numbered.

class rinoh.structure.Heading(title, custom_label=None, id=None, style=None, parent=None)

The title for a section

Parameters
  • title (StyledText) – the title text

  • custom_label (StyledText) – a frontend can supply a custom label to use instead of an automatically determined section number

style_class

alias of rinoh.structure.HeadingStyle

prepare(flowable_target)

Determine number labels and register references with the document

flow(container, last_descender, state=None, **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.

class rinoh.structure.SectionTitles(**strings)

Collection of localized titles for common sections

contents

Title for the table of contents section

Type

String

list_of_figures

Title for the list of figures section

Type

String

list_of_tables

Title for the list of tables section

Type

String

chapter

Label for top-level sections

Type

String

index

Title for the index section

Type

String

Lists

class rinoh.structure.List(list_items, start_index=1, id=None, style=None, parent=None)
style_class

alias of rinoh.structure.ListStyle

class rinoh.structure.DefinitionList(flowables, align=None, width=None, id=None, style=None, parent=None, source=None)

Table of Contents

class rinoh.structure.TableOfContentsSection
class rinoh.structure.TableOfContents(local=False, id=None, style=None, parent=None)
style_class

alias of rinoh.structure.TableOfContentsStyle

flowables(container)

Generator yielding the Flowables to group

class rinoh.structure.TableOfContentsEntry(flowable, id=None, style=None, parent=None)
style_class

alias of rinoh.structure.TableOfContentsEntryStyle

Adminitions

class rinoh.structure.Admonition(flowables, title=None, type=None, id=None, style=None, parent=None)
style_class

alias of rinoh.structure.AdmonitionStyle

flowables(container)

Generator yielding the Flowables to group

class rinoh.structure.AdmonitionTitles(**strings)

Collection of localized titles for common admonitions

attention

Title for attention admonitions

Type

String

caution

Title for caution admonitions

Type

String

danger

Title for danger admonitions

Type

String

error

Title for error admonitions

Type

String

hint

Title for hint admonitions

Type

String

important

Title for important admonitions

Type

String

note

Title for note admonitions

Type

String

tip

Title for tip admonitions

Type

String

warning

Title for warning admonitions

Type

String

seealso

Title for see-also admonitions

Type

String

Horizontal Rule

class rinoh.structure.HorizontalRule(align=None, width=None, id=None, style=None, parent=None, source=None)
style_class

alias of rinoh.structure.HorizontalRuleStyle

render(container, descender, state, **kwargs)

Renders the flowable’s content to container, with the flowable’s top edge lining up with the container’s cursor. descender is the descender height of the preceding line or None.