On Wed, Mar 04, 2015 at 11:00:32PM +0000, Carlo Vanoni wrote:
> Now, I'll like to have each exercise on a single line, or by the way control
> when to break. I'm able to avoid automatic break by adding \noBreak here and
> there, but in seems not like the best way to do it. Any better way to force,
> i.e., to break only after 5 bars for exercise1, 4 bars for exercise2, ...?
>
> Also, if an exercise won't be automatically breaked, it won't fill the page
> width. How to let every exercise to fill the page width? Tried ragged-last,
> ragged-last-bottom on \paper definition, but it didn't work.
Here is a function I received from this list that I think could
be of benefit to you:
noBreak =
#(define-music-function (parser location music) (ly:music?)
#{ \temporary\override
Score.NonMusicalPaperColumn.line-break-permission = ##f
#music
\revert Score.NonMusicalPaperColumn.line-break-permission
#})
Its usage is:
\noBreak { \music }
around segments of \music where you wish to forbid line breaking.
Regarding the second point, you want ragged-right = ##f, as the
attached example shows.
HTH,
Jim
\version "2.18.2"
noBreak =
#(define-music-function (parser location music) (ly:music?)
#{ \temporary\override
Score.NonMusicalPaperColumn.line-break-permission = ##f
#music
\revert Score.NonMusicalPaperColumn.line-break-permission
#})
% example:
\paper {
ragged-right = ##f
}
musicOne = { R1*4 R1*4 }
musicTwo = { R1*4 R1*4 }
musicThree = { R1*4 R1*4 }
musicFour = { R1*4 R1*4 }
\score {
\musicOne
}
\score {
{ \musicTwo \musicThree }
}
\score {
\noBreak { \musicTwo \musicThree }
}
\score {
\musicFour
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user