]> git.donarmstrong.com Git - lilypond.git/commitdiff
Better break-align settings for marks
authorKeith OHara <k-ohara5a5a@oco.net>
Fri, 26 Apr 2013 04:16:57 +0000 (21:16 -0700)
committerKeith OHara <k-ohara5a5a@oco.net>
Fri, 26 Apr 2013 04:16:57 +0000 (21:16 -0700)
Issues 1150 712 and 1263

Documentation/notation/changing-defaults.itely
input/regression/key-clefs.ly
input/regression/metronome-marking-break-align.ly
scm/define-grobs.scm

index bad22d3e8407d362fbe25f97d28f6fcafe899a13..03727fedd686af6470fdcfaaf8ac4bd05f90a498 100644 (file)
@@ -3844,11 +3844,11 @@ objects other than bar lines.  These objects include @code{ambitus},
 @code{left-edge}, @code{key-cancellation}, @code{key-signature}, and
 @code{time-signature}.
 
-By default, rehearsal marks and bar numbers will be horizontally
-centered above the object:
+Each type of object has its own default reference point, to which
+rehearsal marks are aligned:
 
 @lilypond[verbatim,quote,relative=1]
-% The rehearsal mark will be centered above the Clef
+% The rehearsal mark will be aligned to right edge of the Clef
 \override Score.RehearsalMark.break-align-symbols = #'(clef)
 \key a \major
 \clef treble
@@ -3881,13 +3881,13 @@ line is invisible the object is aligned to the place where the bar
 line would be.
 
 @lilypond[verbatim,quote,relative=1]
-% The rehearsal mark will be centered above the Key Signature
+% The rehearsal mark will be aligned to the right edge of the Key Signature
 \override Score.RehearsalMark.break-align-symbols = #'(key-signature clef)
 \key a \major
 \clef treble
 \mark "↓"
 e1
-% The rehearsal mark will be centered above the Clef
+% The rehearsal mark will be aligned to the right edge of the Clef
 \set Staff.explicitKeySignatureVisibility = #all-invisible
 \override Score.RehearsalMark.break-align-symbols = #'(key-signature clef)
 \key a \major
@@ -3909,20 +3909,20 @@ can be changed, as shown in the following example.  In a score with
 multiple staves, this setting should be done for all the staves.
 
 @lilypond[verbatim,quote,relative=1]
-% The RehearsalMark will be centered above the Key Signature
+% The RehearsalMark will be aligned with the right edge of the Key Signature
 \override Score.RehearsalMark.break-align-symbols = #'(key-signature)
 \key a \major
 \clef treble
 \time 4/4
 \mark "↓"
 e1
-% The RehearsalMark will be aligned with the left edge of the Key Signature
-\once \override Score.KeySignature.break-align-anchor-alignment = #LEFT
+% The RehearsalMark will be centered above the Key Signature
+\once \override Score.KeySignature.break-align-anchor-alignment = #CENTER
 \mark "↓"
 \key a \major
 e1
-% The RehearsalMark will be aligned with the right edge of the Key Signature
-\once \override Score.KeySignature.break-align-anchor-alignment = #RIGHT
+% The RehearsalMark will be aligned with the left edge of the Key Signature
+\once \override Score.KeySignature.break-align-anchor-alignment = #LEFT
 \key a \major
 \mark "↓"
 e1
index ec18bc00be748f4a08a4f68ee8ed28e9d56000c0..cef2ac4b52dd73500c9aab8d55ec243667dc1bee 100644 (file)
@@ -25,11 +25,13 @@ and @code{flat-positions}." }
   \clef bass
   \key cis \major cis \key ces \major  ces
   \break R1
-  \tempo "B-sharp on top"
+  \override Score.RehearsalMark.self-alignment-X = #LEFT
+  \override Score.RehearsalMark.font-size = #0
+  \mark "B-sharp on top"
   \override Staff.KeySignature.sharp-positions = #'(6 0 1 2 3 4 5)
   \override Staff.KeyCancellation.sharp-positions = #'(6 0 1 2 3 4 5)
   \key cis \major R
-  \tempo "Flats throughout the staff"
+  \mark "Flats throughout the staff"
   \override Staff.KeySignature.flat-positions = #'((-5 . 5))
   \override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
   \key ces \major R
index 81e2599f03a007d6a339f2b696d329d8bb2308d7..90e99212b8c0c4f187b00505d701993f62114b4d 100644 (file)
@@ -2,13 +2,14 @@
 
 \header {
   texidoc = "@code{\\tempo} marks are aligned with the time signature
-or first musical element unless the first element is a multi-measure
-rest: in this case, the tempo mark is aligned with the bar line.
+or the position of the first note.
 
 By overriding @code{break-align-symbols} the default alignment can be
-changed, as shown by the final metronome mark in this snippet, aligned
-with a key signature.
-"  
+changed.  If no symbol in @code{break-align-symbols} is present, the
+property @code{non-break-align-symbols} determines the alignment.  If
+the alignment object is a multi-measure rest, the tempo mark is aligned
+with the preceding bar line.
+"
 }
 
 \layout {
@@ -23,7 +24,7 @@ with a key signature.
   c1 \break
   \tempo "T-break"
   c1
-  \tempo "T-rest"
+  \tempo "T-phantom"
   R1 \break
   \time 8/8
   \tempo "T-time"
@@ -31,5 +32,11 @@ with a key signature.
   \override Score.MetronomeMark.break-align-symbols = #'(key-signature)
   \key as \major
   \tempo "T-key"
+  c1 \break
+  \override Score.MetronomeMark.non-break-align-symbols =
+    #'(note-column-interface multi-measure-rest-interface)
+  \tempo "T-rest"
+  R1
+  \tempo "T-rest"
   R1
 }
index 31d431c7e11b52a0abe654c4639cb2c4d96abec5..81e4377ff43b9959f553a8a21c76fa86970930f1 100644 (file)
      . (
        (avoid-slur . inside)
        (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
+       (break-align-anchor-alignment . ,RIGHT)
        (break-align-symbol . clef)
        (break-visibility . ,begin-of-line-visible)
        (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-at-beginning-of-line)
      . (
        (avoid-slur . inside)
        (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
+       (break-align-anchor-alignment . ,RIGHT)
        (break-align-symbol . key-signature)
        (break-visibility . ,begin-of-line-visible)
        (glyph-name-alist . ,standard-alteration-glyph-name-alist)
                          (list ly:self-alignment-interface::x-aligned-on-self)))))
        (self-alignment-X . ,LEFT)
        (break-align-symbols . (time-signature))
-       (non-break-align-symbols . (multi-measure-rest-interface))
+       (non-break-align-symbols . (paper-column-interface))
        (Y-extent . ,grob::always-Y-extent-from-stencil)
        (meta . ((class . Item)
                 (interfaces . (break-alignable-interface
      . (
        (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
        (baseline-skip . 2)
-       (break-align-symbols . (staff-bar clef))
+       (break-align-symbols . (staff-bar key-signature clef))
        (break-visibility . ,end-of-line-invisible)
        (direction . ,UP)
        (extra-spacing-width . (+inf.0 . -inf.0))