Next: , Up: Breaks


11.4.1 Line breaking

Line breaks are normally computed automatically. They are chosen so that lines look neither cramped nor loose, and that consecutive lines have similar density.

Occasionally you might want to override the automatic breaks; you can do this by specifying \break. This will force a line break at this point. Line breaks can only occur at places where there are bar lines. If you want to have a line break where there is no bar line, you can force an invisible bar line by entering \bar "". Similarly, \noBreak forbids a line break at a point.

For line breaks at regular intervals use \break separated by skips and repeated with \repeat:

<< \repeat unfold 7 {
         s1 \noBreak s1 \noBreak
         s1 \noBreak s1 \break }
   the real music
>>

This makes the following 28 measures (assuming 4/4 time) be broken every 4 measures, and only there.

Predefined commands

\break, and \noBreak.

See also

Internals: LineBreakEvent.

A linebreaking configuration can be saved as a .ly file automatically. This allows vertical alignments to be stretched to fit pages in a second formatting run. This is fairly new and complicated. More details are available in spacing/

Bugs

Line breaks can only occur if there is a ‘proper’ bar line. A note which is hanging over a bar line is not proper, such as

     
     c4 c2 c2 \break   % this does nothing
     c2 c4 |           % a break here would work
     c4 c2 c4 ~ \break % as does this break
     c4 c2 c4

[image of music]

This can be avoided by removing the Forbid_line_break_engraver and adding the line breaks in another voice:

     
     \new Staff <<
       \new Voice \with {
         \remove Forbid_line_break_engraver
       } {
         c'4 c'2 c'2 c'2 c'4
       }
       \new Voice {
         s1 \break s1
       }
     >>

[image of music]



Next: , Up: Breaks

Cette page documente LilyPond-2.11.28 (branche de développement).

Rapporter toute anomalie en français à lilypond-user-fr@gnu.org ou en anglais à http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs

Your suggestions for the documentation are welcome.