lilypond-user
[Top][All Lists]
Advanced

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

Re: Aligning 'to Coda' rehearsal marks


From: Jim Long
Subject: Re: Aligning 'to Coda' rehearsal marks
Date: Wed, 13 Mar 2013 12:49:26 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Mar 13, 2013 at 03:43:04AM -0700, Eluze wrote:
> 
> maybe it's a hack but it will do for many cases: 
> 
> - add the text after the glyph as well, but hide it, 
> - correct the horizontal space before and after the glyph
> - make sure the horizontal self alignment of the rehearsal mark is center
> 
> it should be possible to write a small scheme function to avoid having to
> type the same text twice or to calculate the length of the text in another
> way.
> 
>   \once \override Score.RehearsalMark #'self-alignment-X = #center % default
>   \mark \markup {
>     "to coda"
>     \hspace #1
>     \raise #1 \musicglyph #"scripts.coda"
>     \hspace #-.5
>     \with-color #white
>     "to coda"
>   }
> 
> Eluze

Hmm, an interesting approach.  Might this create artificial
"invisible" collisions between the white text and other markup
that might closely follow the glyph?  I'll fiddle with it a bit,
just the same.  Early tests indicate that the amount of negative
hspace required in the second position is surprisingly large.
#-16.25 seems to be the best approximation so far.  Also, the
negative hspace does not actually move the hidden text, but at a
high enough value, it does begin to affect the centering of the
overall markup.  I will experiment with whether this value holds
up with different staff sizes.

Thank you!  I will gladly receive any subsequent refinements or
alternate approaches that might spring to mind.

Jim

Attachment: coda2.ly
Description: Text Data

Attachment: coda2.png
Description: PNG image


reply via email to

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