Improve handling of nested overrides using list syntax.
[lilypond/mpolesky.git] / lily / page-breaking-scheme.cc
blob2bbf81c7b38f01e0692bdc34099194d8db8cea1a
1 /*
2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2006--2010 Joe Neeman <joeneeman@gmail.com>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #include "paper-book.hh"
21 #include "page-turn-page-breaking.hh"
22 #include "optimal-page-breaking.hh"
23 #include "minimal-page-breaking.hh"
25 LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking",
26 1, 0, 0, (SCM pb),
27 "Optimally break (pages and lines) the @code{Paper_book} object"
28 " @var{pb} such that page turns only happen in specified places,"
29 " returning its pages.")
31 Page_turn_page_breaking b (unsmob_paper_book (pb));
32 return b.solve ();
35 LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking",
36 1, 0, 0, (SCM pb),
37 "Optimally break (pages and lines) the @code{Paper_book} object"
38 " @var{pb} to minimize badness in bother vertical and horizontal"
39 " spacing.")
41 Optimal_page_breaking b (unsmob_paper_book (pb));
42 return b.solve ();
45 LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking",
46 1, 0, 0, (SCM pb),
47 "Break (pages and lines) the @code{Paper_book} object @var{pb}"
48 " without looking for optimal spacing: stack as many lines on"
49 " a page before moving to the next one.")
51 Minimal_page_breaking b (unsmob_paper_book (pb));
52 return b.solve ();