@@ -163,7 +163,7 @@ class BodyPageTemplate(BodyPageTemplateBase):
163163 chapter_title_flowables = Option (FlowablesList , None ,
164164 'Generator that yields the flowables to '
165165 'represent the chapter title' )
166- chapter_title_height = Option (Dimension , 150 * PT , 'The height of the '
166+ chapter_title_height = Option (Dimension , None , 'The height of the '
167167 'container holding the chapter title' )
168168
169169 def new_chapter_page (self , document_part , page_number , chain ):
@@ -278,9 +278,12 @@ def background_image(self):
278278
279279 def get_header_footer_contenttop (self ):
280280 height = self .get_option ('chapter_title_height' )
281- self .chapter_title = FlowablesContainer ('chapter title' ,
282- CHAPTER_TITLE , self .body ,
283- 0 , 0 , height = height )
281+ self .chapter_title = (
282+ FlowablesContainer ('chapter title' , CHAPTER_TITLE , self .body ,
283+ 0 , 0 , height = height ) if height is not None
284+ else DownExpandingContainer ('chapter title' , CHAPTER_TITLE ,
285+ self .body , 0 , 0 )
286+ )
284287 header = try_copy (self .get_option ('chapter_header_text' ))
285288 footer = try_copy (self .get_option ('chapter_footer_text' ))
286289 return header , footer , self .chapter_title .bottom
0 commit comments