2014-10-15 18:33 GMT+02:00 Thomas Morley <[email protected]>:

>
> 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
> }
>

Well done Harm, very elegant !
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to