]> git.donarmstrong.com Git - lilypond.git/commit
Book parts: \bookpart implementation
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 16 Nov 2008 22:32:33 +0000 (23:32 +0100)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 16 Nov 2008 22:32:33 +0000 (23:32 +0100)
commite9b10d6b0e1549a3d3d9ca81c63e1b2d9b431910
tree26f76c36d060d4d9f7d1ad15ded12ad8d97d78a7
parent3dbfeb181750a0b64117ead1310a4da7828621fb
parentc45e558168db739e8971f1b50c940069ed5e1ed9
Book parts: \bookpart implementation

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.