/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2006--2009 Joe Neeman <joeneeman@gmail.com>
+ Copyright (C) 2006--2010 Joe Neeman <joeneeman@gmail.com>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
static bool
is_break (Grob *g)
{
- return scm_is_symbol (g->get_property ("page-turn-permission"));
+ bool turnable = scm_is_symbol (g->get_property ("page-turn-permission"));
+
+ if (turnable &&
+ (!scm_is_symbol (g->get_property ("page-break-permission"))
+ || !scm_is_symbol (g->get_property ("line-break-permission"))))
+ {
+ programming_error ("found a page-turnable place which was not breakable");
+ turnable = false;
+ }
+
+ return turnable;
}
Page_turn_page_breaking::Page_turn_page_breaking (Paper_book *pb)
if (start == 0 && auto_first)
{
if (min_p_count % 2)
- result = space_systems_on_n_or_one_more_pages (configuration, min_p_count, page_number);
+ result = space_systems_on_n_or_one_more_pages (configuration, min_p_count, page_number, 0);
else
result = space_systems_on_n_pages (configuration, min_p_count, page_number);
}
else if (page_number % 2 == min_p_count % 2)
result = space_systems_on_n_pages (configuration, min_p_count, page_number);
else
- result = space_systems_on_n_or_one_more_pages (configuration, min_p_count, page_number);
+ result = space_systems_on_n_or_one_more_pages (configuration, min_p_count, page_number, blank_page_penalty ());
Break_node ret;
ret.prev_ = start - 1;