}
- if (Paper_column::is_musical (col)
- || Paper_column::is_breakable (col))
+ if (Paper_column::is_musical (col))
return false;
/*
if (!l_neighbor || !r_neighbor)
return false;
- if (l == l_neighbor && r == r_neighbor)
- return false;
+ /* If a non-empty column (ie. not \bar "") is placed nicely in series with
+ its neighbor (ie. no funny polyphonic stuff), don't make it loose.
+ */
+ if (l == l_neighbor && r == r_neighbor && col->extent (col, X_AXIS).length () > 0)
+ return false;
/*
Only declare loose if the bounds make a little sense. This means
Grob *h = gelts[j];
if (h && h->get_property ("break-align-symbol") == ly_symbol2scm ("staff-bar"))
- return false;
+ {
+ extract_grob_set (h, "elements", helts);
+ for (vsize k = helts.size (); k--;)
+ if ("" != robust_scm2string (helts[k]->get_property ("glyph-name"), ""))
+ return false;
+ }
}
}
}
bool loose = (i > 0 && i + 1 < cols->size ())
&& is_loose_column (cols->at (i - 1), c, cols->at (i + 1), options);
+ /* Breakable columns never get pruned; even if they are loose,
+ their broken pieces are not. However, we mark them so that
+ the spacing can take their mid-line looseness into account. */
+ if (loose && Paper_column::is_breakable (c))
+ {
+ loose = false;
+ c->set_property ("maybe-loose", SCM_BOOL_T);
+ }
+
if (loose)
{
Grob *right_neighbor = unsmob_grob (c->get_object ("right-neighbor"));
if (Paper_column::is_musical (left_col))
{
if (!Paper_column::is_musical (right_col)
- && options->float_nonmusical_columns_
+ && (options->float_nonmusical_columns_ || to_boolean (right_col->get_property ("maybe-loose")))
&& after_right_col
&& Paper_column::is_musical (after_right_col))
{
(least-squares-dy ,number? "The ideal beam slope, without damping.")
+ (maybe-loose ,boolean? "Used to mark a breakable column that is
+loose if and only if it is in the middle of a line.")
(meta ,list? "Provide meta information. It is an alist with the
entries @code{name} and @code{interfaces}.")
(minimum-distances ,list? "A list of rods that have the format