lilypond-user
[Top][All Lists]
Advanced

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

Re: centering text on a measure


From: Trevor Daniels
Subject: Re: centering text on a measure
Date: Sat, 3 Sep 2011 19:37:59 +0100


David Nalesnik wrote Saturday, September 03, 2011 6:36 PM

I've adapted the snippet for centering text on hairpins
http://lsr.dsi.unimi.it/LSR/Snippet?id=233
to give an approximation of this. Basically, I've replaced the default TextSpanner stencil with a blank with the same extents to which I add a text. The argument allows you to position this text using an alignment value. The example shows a few alignments over one-measure groups on the first line, two-measure groups on the second. (Unfortunately, if I don't blank out the default stencil, the text appears on top of the extender line, and of course the distance between the individual dashes or dots isn't adapted to make for a nice fit. Insert bad memories of another notation
program here.)

You can kill the extender line by setting
'dash-period negative, if that helps.

Now, I suppose the text's position is dependent on the NoteColumn grobs to which the spanner is attached. Would it be possible to reset the attachment point to another grob? (I could use offsets as in the original function, but
that will once again bring in the 'extra-offset issue.)

Not sure I understand.  The spanner start and end
points are defined by the positions of \startTextSpanner
and \stopTextSpanner.  ??

I agree that this would be great feature for LilyPond. How would I go about
making a request?

Well, you could add a snippet to the LSR to
show how you've done it.  This might then
find its way into the documentation if others
like it.  Instructions are on the LSR site:
http://lsr.dsi.unimi.it/, see Contributing.

And you could send a request for an enhancement
to address@hidden, explaining why it would
be useful, and, if you have added a snippet to the
LSR, pointing to it.

Trevor





reply via email to

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