Han-Wen, Joe,
Here is a patch which implements top-level page breaking directives, for
instance:
%% these two markups must be on the same page
\markup { ... }
\forbidPageBreak
\markup { ... }
%% the markup and the score must be on the same new page
%% that is, same as \header { breakbefore=##t } in the score block
\forcePageBreak
\markup { ... }
\forbidPageBreak
\score { ... }
Sketch:
- \forbidPageBreak and \forcePageBreak are music expressions with
special properties, and are turned into Page_markers by
collect-music-for-book;
- then, the Page_markers are added to the Book scores_ (together with
the scores and markups);
- finally, when the Paper_book meet such an element when traversing the
Book scores_, it sets the previous element page break and page turn
permissions, according the Paper_marker settings.
I'd be grateful if you could review this patch.
(I'm working on regression tests and documentation).
nicolas