Hi Nicolas, For reducing blank pages, the short answer is that you should try increasing blank-page-force (or blank-last-page-force or blank-after-score-page-force). Perhaps it's better to name these xxx-penalty so their purpose is more clear. Some more detailed responses follow...
On Sun, 2008-12-14 at 13:08 +0100, Nicolas Sceaux wrote: > Joe, > > I'm trying to produce separate parts for an opera, using the combination > of page-turn-breaking and bookparts. I hadn't really thought about this interaction before; now that I do, it seems that there are some corner cases: if auto-first-page-number is set, the page-turn-breaker is allowed to increase first-page-number by 1 if it wants to. If this happens in the second bookpart, for example, then paper-book should insert a blank page between the first and second bookparts. Anyway, that's tangential to this issue. > This gives good results, however, > the page-turn page breaking algorithm adds blank pages at some places, > for instance, just before the last page of a bookpart, which gives an > awkward result: > _4_ _5_ _6_ _7_ _8_ > |===||===| |===|| | |===| (then the beginning of the next part on > |===||===| |===|| | |===| the following odd page) > |===||===| |===|| | |===| > --- --- --- --- --- This is awkward not just because of bookparts, right? If these four pages were the whole book, you would also want to avoid the blank page. Can you check that the blank page is there if this is the whole book (it should be, because the page breaker shouldn't see anything different)? > whereas the following would be more pleasing: > _4_ _5_ _6_ _7_ > |===||===| |===||===| (then the beginning of the next part on the > |===||===| |===||===| following even page, or possibly on the next > |===||===| |===||===| odd page after leaving a blank page) > --- --- --- --- > > (pages 1 to 3 are in another bookpart, containing title page and > contents) > > When patching the code as follows, the blank page is not added: > Do you really need both chunks? I would expect the second chunk to be enough since it disables all inserting of blank pages. > diff --git a/lily/page-turn-page-breaking.cc b/lily/page-turn-page- > breaking.cc > index e239cc2..665385b 100644 > --- a/lily/page-turn-page-breaking.cc > +++ b/lily/page-turn-page-breaking.cc > @@ -125,12 +125,7 @@ Page_turn_page_breaking::calc_subproblem (vsize > ending_breakpoint) > int p_num = robust_scm2int (book_->paper_->c_variable ("first- > page-number"), 1); > if (start > 0) > { > - /* except possibly for the first page, enforce the fact that > first_page_number_ > - should always be even (left hand page). > - TODO: are there different conventions in right-to-left languages? > - */ > p_num = state_[start-1].first_page_number_ + > state_[start-1].page_count_; > - p_num += p_num % 2; > } > > Line_division min_division; > @@ -252,10 +247,6 @@ Page_turn_page_breaking::make_pages > (vector<Break_node> const &soln, SCM systems > { > for (vsize j = 0; j < soln[i].page_count_; j++) > lines_per_page.push_back (soln[i].system_count_[j]); > - > - if (i + 1 < soln.size () && (soln[i].first_page_number_ + > soln[i].page_count_) % 2) > - /* add a blank page */ > - lines_per_page.push_back (0); > } > > /* this should only actually modify first-page-number if > > But I imagine that this deleted code serves a good purpose. > Would it be reasonnable to add an option for not adding blank pages, > for instance a paper variable 'page-turn-breaking-no-blank-pages, to > avoid blank pages being added when the user does not want them? > > Nicolas > _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel