Book parts aim at splitting a book into several parts, in order to be
able to use eg. different page breaking functions, or to make the page
breaking problem less difficult and more likely to finish.
- Book and Paper_book instances respectively are nestable: children
book or paper_book are added to the bookparts_ slot;
- the paper_ slot of a child Book (or Book_paper) is created empty,
and has its parent set to the paper object of the parent Book (or
Paper_book), so that default paper properties are got from the
higher level paper object, and child objects only store part-wide
overrides. This way, we ensure that fonts are loaded in the higher
level paper object, so that the output framework can get all the
loaded fonts from the top level book;
- a Paper_book::top_paper() method is added to access the higher level
paper object, to access properties that are book-wide, for instance
the table used to store labels and page numbers;
- in the parser, \bookpart blocks are introduced, which can be used at
toplevel, or inside a \book block. It can contain the same things as
\book blocks (except \bookpart blocks, though that would be
possible). The associated handlers are added.
- in header and footer markups, the following predicates can be used
to determine if a page is the first or the last one in a book part:
part-first-page, part-last-page.