lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: exercises book


From: Carlo Vanoni
Subject: Re: exercises book
Date: Thu, 5 Mar 2015 06:31:54 +0000 (UTC)

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 <address@hidden> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]