X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-breaking-scheme.cc;h=0c806493b499fcad2b60e558e7f7710e4f51c2ed;hb=c8ad65d84d9c5f939c787fe956ac1346f9294bd4;hp=796324cbc26d7a5114aa9df9bb20ab3b5114fd66;hpb=85c0e5ad855373f43a22fd3a204f963486bde354;p=lilypond.git diff --git a/lily/page-breaking-scheme.cc b/lily/page-breaking-scheme.cc index 796324cbc2..0c806493b4 100644 --- a/lily/page-breaking-scheme.cc +++ b/lily/page-breaking-scheme.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2012 Joe Neeman + Copyright (C) 2006--2015 Joe Neeman LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,6 +20,7 @@ #include "paper-book.hh" #include "page-turn-page-breaking.hh" #include "one-line-page-breaking.hh" +#include "one-line-auto-height-breaking.hh" #include "optimal-page-breaking.hh" #include "minimal-page-breaking.hh" @@ -29,7 +30,7 @@ LY_DEFINE (ly_page_turn_breaking, "ly:page-turn-breaking", " @var{pb} such that page turns only happen in specified places," " returning its pages.") { - Page_turn_page_breaking b (unsmob_paper_book (pb)); + Page_turn_page_breaking b (unsmob (pb)); return b.solve (); } @@ -39,7 +40,7 @@ LY_DEFINE (ly_optimal_breaking, "ly:optimal-breaking", " @var{pb} to minimize badness in bother vertical and horizontal" " spacing.") { - Optimal_page_breaking b (unsmob_paper_book (pb)); + Optimal_page_breaking b (unsmob (pb)); return b.solve (); } @@ -49,14 +50,27 @@ LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking", " without looking for optimal spacing: stack as many lines on" " a page before moving to the next one.") { - Minimal_page_breaking b (unsmob_paper_book (pb)); + Minimal_page_breaking b (unsmob (pb)); return b.solve (); } LY_DEFINE (ly_one_line_breaking, "ly:one-line-breaking", 1, 0, 0, (SCM pb), - "Put each score on a single line, and put each line on its own page.") + "Put each score on a single line, and put each line on its own" + " page. Modify the paper-width setting so that every page" + " is wider than the widest line.") { - One_line_page_breaking b (unsmob_paper_book (pb)); + One_line_page_breaking b (unsmob (pb)); + return b.solve (); +} + +LY_DEFINE (ly_one_line_auto_height_breaking, "ly:one-line-auto-height-breaking", + 1, 0, 0, (SCM pb), + "Put each score on a single line, and put each line on its own" + " page. Modify the paper-width setting so that every page" + " is wider than the widest line. Modify the paper-height" + " setting to fit the height of the tallest line.") +{ + One_line_auto_height_breaking b (unsmob (pb)); return b.solve (); }