--- /dev/null
+\version "2.11.29"
+
+\header {
+ texidoc = "When space-to-barline is false, we measure the space between the note and the
+start of the clef. When space-to-barline is true, we measure the space between the note and
+the start of the barline."
+}
+
+\paper {ragged-right = ##t}
+
+{
+ \override Score.SpacingSpanner #'common-shortest-duration = #(ly:make-moment 1 16)
+ c'2 \clef bass c'2 \clef treble
+ \override NoteSpacing #'space-to-barline = ##f
+ c'2 \clef bass c'2 \clef treble
+
+ % the following two measures should be spaced identically
+ \override NoteSpacing #'space-to-barline = ##t
+ c'2 c'2
+ \override NoteSpacing #'space-to-barline = ##f
+ c'2 c'2
+ c'1
+}
\ No newline at end of file
/* If we have a NonMusical column on the right, we measure the ideal distance
to the bar-line (if present), not the start of the column. */
- if (!Paper_column::is_musical (right_col) && !skys[RIGHT].is_empty ())
+ if (!Paper_column::is_musical (right_col)
+ && !skys[RIGHT].is_empty ()
+ && to_boolean (me->get_property ("space-to-barline")))
{
Grob *bar = Pointer_group_interface::find_grob (right_col,
ly_symbol2scm ("elements"),
"right-items "
"same-direction-correction "
"stem-spacing-correction "
+ "space-to-barline "
);
of spacing tuples: @code{(@var{break-align-symbol} @var{type}
. @var{distance})}, where @var{type} can be the symbols
@code{minimum-space} or @code{extra-space}.")
+ (space-to-barline ,boolean? "If set, the distance between a note
+and the following non-musical column will be measured to the barline
+instead of to the beginning of the non-musical column. If there is a
+clef change followed by a barline, for example, this means that we will
+try to space the non-musical column as though the clef is not there.")
(spacing-increment ,number? "Add this much space for a doubled
duration. Typically, the width of a note head. See also
@internalsref{spacing-spanner-interface}.")
. (
(stem-spacing-correction . 0.5)
(same-direction-correction . 0.25)
+ (space-to-barline . #t)
;; Changed this from 0.75.
;; If you ever change this back, please document! --hwn
(knee-spacing-correction . 1.0)