@code{\textLengthOff}. Alternatively, @code{\once} may be used
with @code{\textLengthOn} if the effect is to be limited to just a
single musical moment.
+The corresponding spacing behavior for rehearsal marks and tempo
+indications is independently controlled with the commands
+@code{\markLengthOn} and @code{\markLengthOff}.
@cindex markup text, allowing collisions
d4 g e c
@end lilypond
+@funindex \markLengthOn
+@funindex markLengthOn
+@funindex \markLengthOff
+@funindex markLengthOff
+
+In a part for an instrument with long periods of rests,
+tempo indications sometimes follow each other closely.
+The command @code{\markLengthOn} provides extra horizontal space
+to prevent tempo indications from overlapping, and @code{\markLengthOff}
+restores the default behavior of ignoring tempo marks
+for horizontal spacing.
+
+@lilypond[quote,relative=0]
+\compressFullBarRests
+\markLengthOn
+\tempo "Molto vivace"
+R1*12
+\tempo "Meno mosso"
+R1*16
+@end lilypond
@snippets
c c
@end lilypond
+@funindex \markLengthOn
+@funindex markLengthOn
+@funindex \markLengthOff
+@funindex markLengthOff
+
+@predefined
+@code{\markLengthOn},
+@code{\markLengthOff}.
+@endpredefined
@snippets
\version "2.16.0"
\relative c'' {
- \tempo \breve = 100 c1 c1 \tempo 8.. = 50 c1
+ \tempo \breve = 100 c1 c1
+ \markLengthOn
+ \tempo "Allegro" 8.. = 50 c1 \tempo "Adagio" c2 c'
}
\override TextScript.extra-spacing-height = #'(0 . 0)
}
+markLengthOn = {
+ \override Score.MetronomeMark.extra-spacing-width = #'(0 . 1.0)
+ \override Score.RehearsalMark.extra-spacing-width = #'(-0.5 . 0.5)
+ % Raise as much as four staff-spaces before pushing notecolumns right
+ \override Score.MetronomeMark.extra-spacing-height = #'(4 . 4)
+ \override Score.RehearsalMark.extra-spacing-height = #'(4 . 4)
+}
+
+markLengthOff = {
+ \override Score.MetronomeMark.extra-spacing-width = #'(+inf.0 . -inf.0)
+ \override Score.RehearsalMark.extra-spacing-width = #'(+inf.0 . -inf.0)
+ \revert Score.MetronomeMark.extra-spacing-height
+ \revert Score.RehearsalMark.extra-spacing-height
+}
%% text spanners
(break-visibility . ,end-of-line-invisible)
(direction . ,UP)
(extra-spacing-width . (+inf.0 . -inf.0))
- (outside-staff-horizontal-padding . 0.12)
+ (outside-staff-horizontal-padding . 0.2)
(outside-staff-priority . 1000)
(padding . 0.8)
(side-axis . ,Y)
- (skyline-horizontal-padding . 0.2)
(stencil . ,ly:text-interface::print)
(vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
(Y-offset . ,side-position-interface::y-aligned-side)