--- /dev/null
+\version "2.19.16"
+
+\header {
+ texidoc = "The property @code{minimum-length-after-break} can be
+used to stretch broken spanners starting after a line break. The
+following example shows usage for a variety of spanners.
+"
+}
+
+\layout {
+ ragged-right = ##t
+}
+
+{
+ \once \override Tie.minimum-length-after-break = 20
+ a1~
+ \break
+ a1
+
+ \once \override Slur.minimum-length-after-break = 20
+ a1(
+ \break
+ d'1)
+
+ \once \override TextSpanner.springs-and-rods = #ly:spanner::set-spacing-rods
+ \once \override TextSpanner.minimum-length-after-break = 20
+ a1\startTextSpan
+ \break
+ a1\stopTextSpan
+
+ \once \override Hairpin.after-line-breaking = ##t
+ \once \override Hairpin.to-barline = ##f
+ \once \override Hairpin.minimum-length-after-break = 20
+ a1\<
+ \break
+ a1\!
+
+ \once \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
+ \once \override Glissando.breakable = ##t
+ \once \override Glissando.after-line-breaking = ##t
+ \once \override Glissando.minimum-length-after-break = 20
+ a1\glissando
+ \break
+ d'1
+}
--- /dev/null
+\version "2.19.16"
+
+\header {
+ texidoc = "The following shows the interaction between the
+properties @code{minimum-length} and
+@code{minimum-length-after-break}. When @code{minimum-length}
+is used alone, both segments of the tie are affected. The
+properties @code{minimum-length-after-break} only affects
+the sibling starting a line. Both properties may be used
+together to create independent changes of both siblings. This
+example shows that both properties have an identical effect on
+the sibling after the break.
+"
+}
+
+\layout {
+ ragged-right = ##t
+}
+
+music = {
+ <gis' cis'' dis'' gis''>1~
+ \break
+ q1
+}
+
+{
+ % default
+ \music
+
+ \once \override Tie.minimum-length = 11
+ \music
+
+ \once \override Tie.minimum-length-after-break = 11
+ \music
+
+ \once \override Tie.minimum-length = 8
+ \once \override Tie.minimum-length-after-break = 11
+ \music
+}
{
Grob *me = Grob::unsmob (smob);
SCM num_length = me->get_property ("minimum-length");
- if (scm_is_number (num_length))
+ SCM broken_length = me->get_property ("minimum-length-after-break");
+ if (scm_is_number (num_length)
+ || scm_is_number (broken_length))
{
- Rod r;
Spanner *sp = dynamic_cast<Spanner *> (me);
System *root = get_root_system (me);
Drul_array<Item *> bounds (sp->get_bound (LEFT),
r.item_drul_[LEFT] = cols.back ()->find_prebroken_piece (RIGHT);
r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
+ if (scm_is_number (broken_length))
+ /*
+ r.distance_ may have been modified by add_to_cols ()
+ above. For treatment of minimum-distance-after-break
+ consistent with minimum-distance (which will use the
+ changed value), we cannot directly reset r.distance_ to
+ broken_length.
+ */
+ r.distance_ += robust_scm2double (broken_length, 0) -
+ robust_scm2double (num_length, 0);
r.add_to_cols ();
}
+ Rod r;
+ /*
+ As r is a fresh rod, we can set distance_ with no complication.
+ */
r.distance_ = robust_scm2double (num_length, 0);
r.item_drul_[LEFT] = sp->get_bound (LEFT);
r.item_drul_[RIGHT] = sp->get_bound (RIGHT);
/* properties */
"normalized-endpoints "
"minimum-length "
+ "minimum-length-after-break "
"spanner-broken "
"spanner-id "
"to-barline "
appropriate callback for the @code{springs-and-rods} property. If
added to a @code{Tie}, this sets the minimum distance between
noteheads.")
+ (minimum-length-after-break ,ly:dimension? "If set, try to make
+a broken spanner starting a line this long. This requires an
+appropriate callback for the @code{springs-and-rods} property. If
+added to a @code{Tie}, this sets the minimum distance to the
+notehead.")
(minimum-length-fraction ,number? "Minimum length of ledger line
as fraction of note head size.")
(minimum-space ,ly:dimension? "Minimum distance that the victim