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

Overrides the default set in DocumentTemplate

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

Default: sphinx (= rinoh.stylesheets.sphinx)

Type

StyleSheet

parts

Overrides the default set in DocumentTemplate

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

Default: title`` ``front_matter`` ``contents`` ``back_matter

Type

PartsList

language

(DocumentTemplate) The main language of the document

Accepts: the code of one of the supported languages

Default: EN (English)

Type

Language

strings

(DocumentTemplate) Strings to override standard element names

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

Default: none

Type

Strings

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 = number

  • end_at_page = left

Type

BackMatterTemplate

page

base: None

Overrides these defaults:

Type

PageTemplate

cover_page

base: page

Type

PageTemplate

title_page

base: page

Type

TitlePageTemplate

front_matter_page

base: page

Overrides these defaults:

Type

PageTemplate

front_matter_right_page

base: front_matter_page

Overrides these defaults:

Type

PageTemplate

front_matter_left_page

base: front_matter_page

Overrides these defaults:

Type

PageTemplate

contents_page

base: page

Overrides these defaults:

Type

PageTemplate

contents_right_page

base: contents_page

Overrides these defaults:

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

  • footer_text = '{SECTION_NUMBER}' '.  ' '{SECTION_TITLE}' '\t' '\t' '{PAGE_NUMBER}'

  • chapter_header_text = None

  • chapter_footer_text = '\t' '\t' '{PAGE_NUMBER}'

  • chapter_title_height = 2.4in

  • chapter_title_flowables = [Paragraph[MixedStyledText[MixedStyledText[StringField(<class 'rinoh.structure.SectionTitles'>, 'chapter'), SingleStyledText(' ', style=None)] (style=None), Field({SECTION_NUMBER})] (style=None)] (style=body matter chapter label), Paragraph[Field({SECTION_TITLE})] (style=body matter chapter title)]

Type

PageTemplate

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}' '.  ' '{SECTION_TITLE}'

Type

PageTemplate

back_matter_page

base: page

Overrides these defaults:

Type

PageTemplate

back_matter_right_page

base: back_matter_page

Overrides these defaults:

Type

PageTemplate

back_matter_left_page

base: back_matter_page

Overrides these defaults:

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

  • footer_text = '{PAGE_NUMBER}' '\t' '\t' '{SECTION_TITLE}'

Type

PageTemplate

Configuration

alias of rinoh.template.BookConfiguration

ConfigurationFile

alias of rinoh.template.BookConfigurationFile