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.rtsextension)Default:
sphinx(=rinoh.stylesheets.sphinx) (overridesDocumentTemplatedefault)
- parts¶
The parts making up this document (inherited from
DocumentTemplate)Accepts
PartsList: a space-separated list of document part template namesDefault:
titlefront_mattercontentsback_matter(overridesDocumentTemplatedefault)
- language¶
The main language of the document (inherited from
DocumentTemplate)Accepts
Language: the code of one of the supported languagesDefault:
EN(English)
- strings¶
Strings to override standard element names (inherited from
DocumentTemplate)Accepts
Strings: strings need to be entered in INI in a section named ‘STRINGS’Default:
none
- Attributes¶
cover (
FixedDocumentPartTemplate): base:NoneOverrides these defaults:
drop_if_empty=Falsepage_number_format=Noneend_at_page=left
title (
TitlePartTemplate): base:NoneOverrides these defaults:
page_number_format=numberend_at_page=left
front_matter (
FixedDocumentPartTemplate): base:NoneOverrides these defaults:
flowables=[TableOfContentsSection(), ListOfFiguresSection(), ListOfTablesSection()]page_number_format=lowercase romanend_at_page=left
contents (
ContentsPartTemplate): base:NoneOverrides these defaults:
page_number_format=numberend_at_page=left
back_matter (
BackMatterTemplate): base:NoneOverrides these defaults:
page_number_format=continueend_at_page=left
page (
BodyPageTemplate): base:NoneOverrides these defaults:
page_size=$(paper_size)left_margin=1inright_margin=1intop_margin=1inbottom_margin=1in
cover_page (
BodyPageTemplate): base:pagetitle_page (TitlePageTemplate): base:pagefront_matter_page (BodyPageTemplate): base:pageOverrides these defaults:
header_text=None
front_matter_right_page (
BodyPageTemplate): base:front_matter_pageOverrides these defaults:
footer_text='\t' '\t' '{PAGE_NUMBER}'chapter_header_text=Nonechapter_footer_text='\t' '\t' '{PAGE_NUMBER}'chapter_title_height=2.5inchapter_title_flowables=[<rinoh.paragraph.Paragraph object at 0x7f210e6efb60>]sideways=right
front_matter_left_page (
BodyPageTemplate): base:front_matter_pageOverrides these defaults:
footer_text='{PAGE_NUMBER}'sideways=left
contents_page (
BodyPageTemplate): base:pageOverrides these defaults:
contents_right_page (
BodyPageTemplate): base:contents_pageOverrides these defaults:
header_text='\t' '\t' '{DOCUMENT_TITLE}' ', ' '{DOCUMENT_SUBTITLE}'footer_text='{SECTION_NUMBER(2)}' '. ' '{SECTION_TITLE(2)}' '\t' '\t' '{PAGE_NUMBER}'chapter_header_text=Nonechapter_footer_text='\t' '\t' '{PAGE_NUMBER}'chapter_title_height=2.4inchapter_title_flowables=[<rinoh.paragraph.Paragraph object at 0x7f210de76e90>, <rinoh.paragraph.Paragraph object at 0x7f210de77110>]sideways=right
contents_left_page (
BodyPageTemplate): base:contents_pageOverrides these defaults:
header_text='{DOCUMENT_TITLE}' ', ' '{DOCUMENT_SUBTITLE}'footer_text='{PAGE_NUMBER}' '\t' '\t' '{@chapter}' ' ' '{SECTION_NUMBER(1)}' '. ' '{SECTION_TITLE(1)}'sideways=left
back_matter_page (
BodyPageTemplate): base:pageOverrides these defaults:
columns=2
back_matter_right_page (
BodyPageTemplate): base:back_matter_pageOverrides these defaults:
header_text='\t' '\t' '{DOCUMENT_TITLE}' ', ' '{DOCUMENT_SUBTITLE}'footer_text='{SECTION_TITLE(1)}' '\t' '\t' '{PAGE_NUMBER}'chapter_header_text=Nonechapter_footer_text='\t' '\t' '{PAGE_NUMBER}'chapter_title_height=2.5inchapter_title_flowables=[<rinoh.paragraph.Paragraph object at 0x7f210e6efb60>]sideways=right
back_matter_left_page (
BodyPageTemplate): base:back_matter_pageOverrides these defaults:
header_text='{DOCUMENT_TITLE}' ', ' '{DOCUMENT_SUBTITLE}'footer_text='{PAGE_NUMBER}' '\t' '\t' '{SECTION_TITLE(1)}'sideways=left
- Configuration¶
alias of
BookConfiguration
- ConfigurationFile¶
alias of
BookConfigurationFile