On 24 July 2011 21:10, Xavier Scheuer <x.sche...@gmail.com> wrote: > I'm running into issue #1150 (RehearsalMark placement at start of line) > again and again. > http://code.google.com/p/lilypond/issues/detail?id=1150 > > Neil's workaround (see comment 2 & 5) is nice but: > > 1. It does not shift enough. I'd like these "begin of line" rehearsal > marks to be printed *after the key signature* (this is also somewhat > consistent with most used practice, although there is no standard as > pointed by Reinhold). > > 2. This also shift rehearsal marks that are printed above "begin repeat" > bars, which are correctly placed normally (i.e. no need to shift in this > case). > See example below. > > Would someone have a good "advanced workaround" in this case?
This seems to be an improvement on the basic shift-right-at-line-begin function: \layout { \context { \Score \override RehearsalMark #'after-line-breaking = #(lambda (grob) (let* ((parent (ly:grob-parent grob X)) (elts (ly:grob-array->list (ly:grob-object parent 'elements))) (symbols (filter identity (map (lambda (elt) (ly:grob-property elt 'break-align-symbol #f)) elts)))) (and (= (ly:item-break-dir grob) RIGHT) (not (memq 'staff-bar symbols)) (ly:grob-translate-axis! grob (interval-length (ly:grob-extent parent parent X)) X)) (ly:side-position-interface::move-to-extremal-staff grob))) } } Cheers, Neil _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user