lilypond-user
[Top][All Lists]
Advanced

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

Re: Automatically inserting bar lines when a line is broken on an empty


From: Mark Knoop
Subject: Re: Automatically inserting bar lines when a line is broken on an empty bar line
Date: Fri, 22 May 2015 11:09:42 +0100

At 11:44 on 22 May 2015, Matie Holtzhausen wrote:
>Hi,
>
>How can I print a bar line if the line-breaker decides to break at an
>empty bar line:
>
>For example:
>
>\paper {
>paper-width = 60\mm
>}
>
>\relative c' {c8 c c c \bar "" c c c c | c c c c}
>
>This causes the line-breaker to break at \bar “”.
>If the paper setting is removed, it does not break the line at all.
>
>How can I adapt my music, so that if the paper setting causes the
>first measure to be broken at \bar “”, a bar line would be printed (at
>the end of the line).  If the paper setting is removed, I do not a bar
>line.
>
>I would like to have the flexibility of changing layout variables,
>without having to put manual bar lines at line breaks (impractical for
>a large book), and I do not want lines to end without bar lines.
>
>Any suggestions would be appreciated.

See _Notation Reference 1.2.5 Bar lines_ for the \defineBarLine command.
You should define and use a barline that is false except for the end of
line.

\defineBarLine "" #'("|" #f #f)
\repeat unfold 50 { c'1 \bar "" }

-- 
Mark Knoop



reply via email to

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