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: Eluze
Subject: Re: Aligning 'to Coda' rehearsal marks
Date: Wed, 13 Mar 2013 03:43:04 -0700 (PDT)

Jim Long wrote
> How can I create a coda mark which:
> 
> 1) aligns the X-center line of the coda glyph with the X-center of
> the barline;
> 
> 2) places the arbitrary "to Coda" alongside the glyph, while leaving
> the glyph itself centered over the barline; and
> 
> An elegant solution to this would be very welcome.  Thank you for
> your time.

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



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Aligning-to-Coda-rehearsal-marks-tp142601p142626.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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