lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to automatically left-align rehearsal marks at the beginning of


From: Pierre Perol-Schneider
Subject: Re: how to automatically left-align rehearsal marks at the beginning of a line
Date: Wed, 15 Oct 2014 15:58:09 +0200

Hi Russ, Hi Robert,

2014-10-15 8:44 GMT+02:00 Robert Schmaus <address@hidden>:

Maybe I misunderstood you there, but rehearsal marks should be put at the place where they are supposed to appear. 
 
Putting \break before or after a rehearsal mark won't affect anything.
 
 
On 15 Oct 2014, at 06:11, user3871075 <address@hidden> wrote:

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.
 
I don't see how one could automate rehearsal marks both at end and at begin of a line.
So you have to make a choice.
How about :

\version "2.18.2"

#(define (my-callback grob)
   (ly:grob-set-property! grob 'break-visibility #(#f #f #t))
   (ly:grob-set-property! grob 'self-alignment-X '-1))
 
\layout {
  \context {
    \Score
    \override RehearsalMark.break-visibility = #my-callback
  }
}

\relative c'' {
  c1
  \tweak break-visibility #end-of-line-visible
  \tweak self-alignment-X #RIGHT
  \mark \markup "this should be right aligned" |
  \break
  c1
  \mark \markup "this should be left aligned" |
  \break
  c1
}


HTH,
Pierre

reply via email to

[Prev in Thread] Current Thread [Next in Thread]