Thanks for your answers Simon and Jim.
I used your function for no breaks Jim, and it's really handy. I've just
renamed it to noAutoBreak to avoid using a lilypond command name (\noBreak is
already defined). To be honest, I was quite surprised to see that I can use the
same name... Is it because this is a function, while the other one is... uhm...
a "command"?
About ragged-right, I wasn't able to let it work because I was putting it in
the wrong place, that is inside a \layout{ \context{} }. Putting it in \layout
or page does the trick.
Thanks a lot!
Il Giovedì 5 Marzo 2015 6:18, Jim Long <[email protected]> ha scritto:
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
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user