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