lilypond-user
[Top][All Lists]
Advanced

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

Explicit line- and page-breaking


From: Trevor Bača
Subject: Explicit line- and page-breaking
Date: Tue, 13 Feb 2007 13:56:14 -0600

Hi,

Every so often someone writes in and asks why Lily ignores some \break
or \pageBreak commands. The answer is usually that Lily sees something
ugly in the line- or page-breaking that we're asking for, and so
disregards the request.

Lily aims at optimal spacing and layout and so this behavior makes sense.

However, if you are interested in strict horizontal or vertical
spacing, you may find the following pair of commands useful.

 \override NonMusicalPaperColumn #'line-break-permission = ##f
 \override NonMusicalPaperColumn #'page-break-permission = ##f

The settings may be used together or separately. Note, though, that
overriding line-break-permission effectly overrides
page-break-permission as well.

With these settings Lily will insert no breaks at all, so make sure to
specify \break and \pageBreak commands at the appropriate places in
your input.

Here's an example.

%%% BEGIN %%%

\version "2.11.18"

\paper {
  indent = #0
  ragged-right = ##t
  ragged-bottom = ##t
}

\score {
  \new Score \with {
     \override NonMusicalPaperColumn #'line-break-permission = ##f
     \override NonMusicalPaperColumn #'page-break-permission = ##f
  } {
     \new Staff {
        \repeat unfold 2 { c'8 c'8 c'8 c'8 } \break
        \repeat unfold 4 { c'8 c'8 c'8 c'8 } \break
        \repeat unfold 6 { c'8 c'8 c'8 c'8 } \break
        \repeat unfold 8 { c'8 c'8 c'8 c'8 } \pageBreak
        \repeat unfold 8 { c'8 c'8 c'8 c'8 } \break
        \repeat unfold 6 { c'8 c'8 c'8 c'8 } \break
        \repeat unfold 4 { c'8 c'8 c'8 c'8 } \break
        \repeat unfold 2 { c'8 c'8 c'8 c'8 }
     }
  }
}

%%% END %%%


--
Trevor Bača
address@hidden

reply via email to

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