+ prefs.c_str ()));
+ }
+}
+
+void
+Vaticana_ligature_engraver::add_mora_column (Paper_column *column)
+{
+ if (augmented_primitives_.size () == 0) // no dot for column
+ return;
+ if (!column) // empty ligature???
+ {
+ augmented_primitives_[0].grob ()->
+ programming_error ("no paper column to add dot");
+ return;
+ }
+ Item *dotcol = make_item ("DotColumn", SCM_EOL);
+ dotcol->set_parent (column, X_AXIS);
+ for (vsize i = 0; i < augmented_primitives_.size (); i++)
+ {
+ Item *primitive =
+ dynamic_cast<Item *> (augmented_primitives_[i].grob ());
+ Item *dot = make_item ("Dots", primitive->self_scm ());
+ dot->set_property ("dot-count", scm_from_int (1));
+ dot->set_parent (primitive, Y_AXIS);
+ primitive->set_object ("dot", dot->self_scm ());
+ Dot_column::add_head (dotcol, primitive);
+
+ // FIXME: why isn't the dot picked up by Paper_column_engraver?
+ Separation_item::add_item (column, dot);
+ }
+}
+
+/*
+ * This function prints a warning, if the given primitive has the same
+ * pitch as at least one of the primitives already stored in the
+ * augmented_primitives_ array.
+ *
+ * The rationale of this check is, that, if there are two dotted
+ * primitives with the same pitch, then collecting all dots in a dot
+ * column behind the ligature leads to a notational ambiguity of to
+ * which head the corresponding dot refers.
+ *
+ * Such a case should be treated as a badly specified ligature. The
+ * user should split the ligature to make the notation of dots
+ * unambiguous.
+ */
+void
+Vaticana_ligature_engraver::check_for_ambiguous_dot_pitch (Grob_info primitive)
+{
+ // TODO: Fix performance, which is currently O (n^2) (since this
+ // method is called O (n) times and takes O (n) steps in the for
+ // loop), but could be O (n) (by replacing the for loop by e.g. a
+ // bitmask based O (1) test); where n=<number of primitives in the
+ // ligature> (which is typically small (n<10), though).
+ Stream_event *new_cause = primitive.event_cause ();
+ int new_pitch = unsmob_pitch (new_cause->get_property ("pitch"))->steps ();
+ for (vsize i = 0; i < augmented_primitives_.size (); i++)
+ {
+ Stream_event *cause = augmented_primitives_[i].event_cause ();
+ int pitch = unsmob_pitch (cause->get_property ("pitch"))->steps ();
+ if (pitch == new_pitch)
+ {
+ primitive.grob ()->
+ warning ("Ambiguous use of dots in ligature: there are "
+ "multiple dotted notes with the same pitch. "
+ "The ligature should be split.");
+ return; // supress multiple identical warnings
+ }