2014-10-15 6:11 GMT+02:00 user3871075 <user3871...@gmail.com>: > Hello, > > I occasionally have a rehearsal mark fall on the first measure of a line, > and I have to manually make it left-aligned so it will print. (I use small > margins.) However, then I have more manual work if the music layout changes > enough that the rehearsal mark is no longer on the first measure of the > line. I typically wait until the very end to do manual layout tweaks to > minimize issues like this, but it would be nice not to have to do them at > all. > > Here's a snippet which shows the problem in an extreme way: > > \relative c'' { > c1 \mark \markup "this should be left aligned" | \break c1 > } > > Is there a setting somewhere for this? > > Note: I don't want all rehearsal marks left-aligned - just the ones that > happen to fall at the beginning of a line. > > The same question could be asked about rehearsal marks that are at the end > of a line. Although the importance is much lower since AFAIK manual > tweaking is usually necessary to even get a rehearsal mark at the end of a > line. > > Thanks for your help! > > -Russ
Hi, how about: \version "2.19.13" \layout { \context { \Score \override RehearsalMark.self-alignment-X = #(lambda (grob) (let* ((break-dir (ly:item-break-dir grob))) (case break-dir ((-1) RIGHT) ;; end-of-line -> right alignedd ((1) LEFT) ;; begin-of-line -> left-aligned (else CENTER) ;; otherwise -> center-aligned ))) } } \relative c'' { c1 \tweak break-visibility #end-of-line-visible \mark "this should be right aligned" | \break c1 \mark "this should be center aligned" c1 \mark "this should be left aligned" | \break c1 } HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user