[ << Changing defaults ] | [Top][Contents][Index] | [ Notation manual tables >> ] |
[ < Painting objects white ] | [ Up : Visibility of objects ] | [ Special considerations > ] |
Using break-visibility
Most layout objects are printed only once, but some like
bar lines, clefs, time signatures and key signatures, may need
to be printed twice when a line break occurs – once at the end
of the line and again at the start of the next line. Such
objects are called breakable, and have a property, the
break-visibility
property to control their visibility
at the three positions in which they may appear – at the
start of a line, within a line if they are changed, and at the
end of a line if a change takes place there.
For example, the time signature by default will be printed at the start of the first line, but nowhere else unless it changes, when it will be printed at the point at which the change occurs. If this change occurs at the end of a line the new time signature will be printed at the start of the next line and a cautionary time signature will be printed at the end of the previous line as well.
This behavior is controlled by the break-visibility
property, which is explained in
Visibility and color of objects. This property takes
a vector of three Booleans which, in order, determine whether the
object is printed at the end of, within the body of, or at the
beginning of a line. Or to be more precise, before a line break,
where there is no line break, or after a line break.
Alternatively, these eight combinations may be specified by predefined functions, defined in scm/output-lib.scm, where the last three columns indicate whether the layout objects will be visible in the positions shown at the head of the columns:
Function Vector Before At no After form form break break break all-visible
#(#t #t #t)
yes yes yes begin-of-line-visible
#(#f #f #t)
no no yes center-visible
#(#f #t #f)
no yes no end-of-line-visible
#(#t #f #f)
yes no no begin-of-line-invisible
#(#t #t #f)
yes yes no center-invisible
#(#t #f #t)
yes no yes end-of-line-invisible
#(#f #t #t)
no yes yes all-invisible
#(#f #f #f)
no no no
The default settings of break-visibility
depend on the
layout object. The following table shows all the layout objects
of interest which are affected by break-visibility
and the
default setting of this property:
Layout object Usual context Default setting BarLine
Score
calculated BarNumber
Score
begin-of-line-visible
BreathingSign
Voice
begin-of-line-invisible
Clef
Staff
begin-of-line-visible
Custos
Staff
end-of-line-visible
Divisio
Staff
begin-of-line-invisible
DoublePercentRepeat
Voice
begin-of-line-invisible
KeyCancellation
Staff
begin-of-line-invisible
KeySignature
Staff
begin-of-line-visible
ClefModifier
Staff
begin-of-line-visible
RehearsalMark
Score
end-of-line-invisible
TimeSignature
Staff
all-visible
The example below shows the use of the vector form to control the visibility of bar lines:
\relative { f'4 g a b f4 g a b % Remove bar line at the end of the current line \once \override Score.BarLine.break-visibility = ##(#f #t #t) \break f4 g a b f4 g a b }
Although all three components of the vector used to override
break-visibility
must be present, not all of them are
effective with every layout object, and some combinations may
even give errors. The following limitations apply:
- Bar lines cannot be printed at the start of line.
- A bar number cannot be printed at the start of the first
line unless it is set to be different from
1
. - Clef – see the next section.
- Double percent repeats are either all printed or
all suppressed. Use
begin-of-line-invisible
to print them andall-invisible
to suppress them. - Key signature – see the next section.
- ClefModifier – see the next section.
[ << Changing defaults ] | [Top][Contents][Index] | [ Notation manual tables >> ] |
[ < Painting objects white ] | [ Up : Visibility of objects ] | [ Special considerations > ] |