Book

The book template consists of a title page, the table of contents, the body text and an index. The front matter pages are numbered using lowercase roman numerals. The template uses different templates for even and odd pages.

class rinoh.templates.book.Book(document_tree, configuration=None, backend=None)
stylesheet

The stylesheet to use for styling document elements (inherited from DocumentTemplate)

Accepts StyleSheet: the name of an installed style sheet or the filename of a stylesheet file (with the .rts extension)

Default: sphinx (= rinoh.stylesheets.sphinx) (overrides DocumentTemplate default)

parts

The parts making up this document (inherited from DocumentTemplate)

Accepts PartsList: a space-separated list of document part template names

Default: title front_matter contents back_matter (overrides DocumentTemplate default)

language

The main language of the document (inherited from DocumentTemplate)

Accepts Language: the code of one of the supported languages

Default: EN (English)

strings

Strings to override standard element names (inherited from DocumentTemplate)

Accepts Strings: strings need to be entered in INI sections named after the StringCollection subclasses

Default: none

cover

base: None

Overrides these defaults:

Type:

FixedDocumentPartTemplate

title

base: None

Overrides these defaults:

Type:

TitlePartTemplate

front_matter

base: None

Overrides these defaults:

Type:

FixedDocumentPartTemplate

contents

base: None

Overrides these defaults:

Type:

ContentsPartTemplate

back_matter

base: None

Overrides these defaults:

  • page_number_format = continue

  • end_at_page = left

Type:

BackMatterTemplate

page

base: None

Overrides these defaults:

Type:

BodyPageTemplate

cover_page

base: page

Type:

BodyPageTemplate

title_page

base: page

Type:

TitlePageTemplate

front_matter_page

base: page

Overrides these defaults:

Type:

BodyPageTemplate

front_matter_right_page

base: front_matter_page

Overrides these defaults:

Type:

BodyPageTemplate

front_matter_left_page

base: front_matter_page

Overrides these defaults:

Type:

BodyPageTemplate

contents_page

base: page

Overrides these defaults:

Type:

BodyPageTemplate

contents_right_page

base: contents_page

Overrides these defaults:

Type:

BodyPageTemplate

contents_left_page

base: contents_page

Overrides these defaults:

  • header_text = '{DOCUMENT_TITLE}' ', ' '{DOCUMENT_SUBTITLE}'

  • footer_text = '{PAGE_NUMBER}' '\t' '\t' '{SectionTitles.chapter}' ' ' '{SECTION_NUMBER(1)}' '.  ' '{SECTION_TITLE(1)}'

  • sideways = left

Type:

BodyPageTemplate

back_matter_page

base: page

Overrides these defaults:

Type:

BodyPageTemplate

back_matter_right_page

base: back_matter_page

Overrides these defaults:

Type:

BodyPageTemplate

back_matter_left_page

base: back_matter_page

Overrides these defaults:

Type:

BodyPageTemplate

Configuration

alias of BookConfiguration

ConfigurationFile

alias of BookConfigurationFile