lilypond-user
[Top][All Lists]
Advanced

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

Re: [Spam] Re: Spanner right-hand text may disappear when padded


From: Rutger Hofman
Subject: Re: [Spam] Re: Spanner right-hand text may disappear when padded
Date: Wed, 12 Oct 2016 21:00:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

On 10/12/2016 03:53 PM, David Nalesnik wrote:
On Wed, Oct 12, 2016 at 8:48 AM, David Nalesnik
<address@hidden> wrote:
Harm,

On Wed, Oct 12, 2016 at 8:13 AM, Thomas Morley <address@hidden> wrote:


in this thread
http://lilypond.1069038.n5.nabble.com/Alternate-scheme-text-spanner-ignores-spacers-td195195.html
you researched the cause for problems while attaching TextSpanner to
spacers using custom-scheme-engravers.

May it be possible the problem is present in the original .cc-coded as well?

At least I don't see any problem with attached TextSpanners as soon as
I change a spacer to a real note-event in Rutger's code:


It appears to be related to the X-position of the right-bound text:
if it's too far to the left, it won't be printed.

Change the right-padding override in your example to 10, and the text
will also disappear.

By the way, I read in Rutger's original snippet:

 % Need padding to keep at the same vertical position:

This appears to be a misunderstanding of what
bound-details.right.padding is.  It controls the X-position of the
spanner endpoint.  It's not a measure of the distance from the staff,
for which you'd need TextSpanner.padding, or
TextSpanner.staff-padding.


That being said, the following adjusted definition of spanners should do it:

spanners = {
    s2*7 |
    s4
        \override TextSpanner.bound-details.left.text = "(poco accel."
        \override TextSpanner.bound-details.right.text = "poco rit.)"
        % moves endpoint LEFT
         \override TextSpanner.bound-details.right.padding = 4
        % Need padding to keep at the same vertical position:
        \override TextSpanner.padding = #2
        <>\startTextSpan s4 |
    s2 |
    s4. <>\stopTextSpan s8 |
    s4 <>^\markup{a tempo} s4 |
}

%%

David


For me (2.19.39) this doesn't force the TextSpanner to vertically align with the markup, not even if I also set TextScript.padding = #2. The problem is shown even more clearly if the markup is moved to the start of bar 10 (not halfway). The right padding is the only way I found to create enough space to the right of the right-hand text so it doesn't move under the markup.

Needless to say, this is from a long and complicated score, and I am looking for a solution that works for all my 40+ spanners, which are all used in 14 parts....

Rutger




reply via email to

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