--- /dev/null
+\version "2.13.4"
+
+\header {
+ texidoc = "Having markup after a loose line doesn't confuse the page layout
+engine."
+}
+
+#(set-default-paper-size "a6")
+
+\book {
+ \score {
+ <<
+ \new Staff <<
+ \new Voice = "asdf" { c' d' e' f' }
+ >>
+ \new Lyrics \lyricsto "asdf" \lyricmode { a b c d }
+ >>
+ }
+ \markup "blah blah blah"
+}
+
*tail = scm_cons (scm_from_double (solution_[spring_idx]), SCM_EOL);
tail = SCM_CDRLOC (*tail);
+ // Lay out any non-spaceable lines between this line and
+ // the last one.
+ if (loose_lines.size ())
+ {
+ Interval loose_extent = loose_lines.back ()->extent (loose_lines.back (), Y_AXIS);
+ Interval prob_extent = unsmob_stencil (elements_[i].prob->get_property ("stencil"))->extent (Y_AXIS);
+ Real min_distance = -loose_extent[DOWN] + prob_extent[UP]; // TODO: include padding/minimum-distance
+
+ loose_line_min_distances.push_back (min_distance);
+ loose_lines.push_back (0);
+
+ distribute_loose_lines (loose_lines, loose_line_min_distances,
+ last_spaceable_line_translation, -solution_[spring_idx]);
+ loose_lines.clear ();
+ loose_line_min_distances.clear ();
+ }
+
last_spaceable_line = 0;
last_spaceable_line_translation = -solution_[spring_idx];
spring_idx++;