--- /dev/null
+\version "2.13.51"
+
+\header {
+ texidoc = "Page labels on loose columns are not ignored: this includes both mid-line
+unbreakable columns which only contain labels and columns with empty bar lines (and no other
+break-aligned grobs)."
+}
+
+\markuplines \table-of-contents
+
+\relative c' {
+ c2 \tocItem "Mid-line" c^"mid"
+ c1
+ \bar ""
+ \tocItem "Empty bar line"
+ c1^"empty"
+}
Interval begin_of_line_pure_height (vsize start, vsize end);
Interval rest_of_line_pure_height (vsize start, vsize end);
Interval pure_refpoint_extent (vsize start, vsize end);
+ void collect_labels (Grob const *, SCM *);
protected:
virtual void derived_mark () const;
loose = false;
c->set_property ("maybe-loose", SCM_BOOL_T);
}
+ /*
+ Unbreakable columns which only contain page-labels also
+ never get pruned, otherwise the labels are lost before they can
+ be collected by the System: so we mark these columns too.
+ */
+ if (!loose && !Paper_column::is_breakable (c)
+ && scm_is_pair (c->get_property ("labels")))
+ {
+ extract_grob_set (c, "elements", elts);
+ if (elts.empty ())
+ c->set_property ("maybe-loose", SCM_BOOL_T);
+ }
if (loose)
{
c[j]->translate_axis (breaking[i].config_[j], X_AXIS);
dynamic_cast<Paper_column *> (c[j])->set_system (system);
/* collect the column labels */
- SCM col_labels = c[j]->get_property ("labels");
- if (scm_is_pair (col_labels))
- system_labels = scm_append (scm_list_2 (col_labels, system_labels));
+ collect_labels (c[j], &system_labels);
}
+ /*
+ Collect labels from any loose columns too: theses will be set on
+ an empty bar line or a column which is otherwise unused mid-line
+ */
+ vector<Grob *> loose (breaking[i].loose_cols_);
+ for (vsize j = 0; j < loose.size (); j++)
+ collect_labels (loose[j], &system_labels);
+
system->set_property ("labels", system_labels);
set_loose_columns (system, &breaking[i]);
}
}
+void
+System::collect_labels (Grob const *col, SCM *labels)
+{
+ SCM col_labels = col->get_property ("labels");
+ if (scm_is_pair (col_labels))
+ *labels = scm_append (scm_list_2 (col_labels, *labels));
+}
+
void
System::add_column (Paper_column *p)
{