-LY_DEFINE (ly_ragged_page_breaks, "ly:ragged-page-breaks",
- 5, 0, 0, (SCM lines, SCM book, SCM text, SCM first, SCM last),
- "Return a vector with line numbers of page breaks.")
-{
- SCM_ASSERT_TYPE (scm_pair_p (lines), lines, SCM_ARG1, __FUNCTION__, "list");
- SCM_ASSERT_TYPE (ly_c_number_p (book), book, SCM_ARG2, __FUNCTION__, "real");
- SCM_ASSERT_TYPE (ly_c_number_p (text), text, SCM_ARG2, __FUNCTION__, "real");
- SCM_ASSERT_TYPE (ly_c_number_p (first), first, SCM_ARG2, __FUNCTION__, "real");
- SCM_ASSERT_TYPE (ly_c_number_p (last), last, SCM_ARG2, __FUNCTION__, "real");
-
- return c_ragged_page_breaks (lines,
- ly_scm2double (book), ly_scm2double (text),
- ly_scm2double (first), ly_scm2double (last));
-}
+ int i = 0;
+ Paper_system *last = 0;
+ for (SCM s = systems_; s != SCM_EOL; s = scm_cdr (s))
+ {
+ Paper_system *ps = unsmob_paper_system (scm_car (s));
+ ps->number_ = ++i;
+
+ if (last
+ && last->is_title ()
+ && !ps->break_before_penalty_)
+ ps->break_before_penalty_ = 10000;
+ last = ps;
+ }