[Top][All Lists]

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

Re: Close or document the stretchability=0 backdoor?

From: Joe Neeman
Subject: Re: Close or document the stretchability=0 backdoor?
Date: Tue, 31 May 2011 11:14:45 +0300

On Fri, May 27, 2011 at 10:44 PM, Keith OHara <address@hidden> wrote:
One of the special-cases in the LilyPond code is confusing me.
( This special-case code is in Page_layout_Problem::get_fixed_spacing(). )

If the flexible-vertical-spacing variable 'stretchability is defined, but has
value 0.0, such as:
           *-*-spacing = #'((basic-distance . 16)
                            (stretchability . 0)
                            (padding . -100)
                            (minimum-distance . 0))
a) the staves will not stretch to fill extra space
  (documented and sensible)
b) the staves will not compress, making basic-distance serve as minimum-distance
  (not documented, and I don't know if this it is done consistently)
c) some people expect padding to be ignored, per Carl's comment on issue 1654
  (not documented and I can't find it in the code history)

It seems to me that one could achieve (b) by setting minimum-distance equal to
basic-distance.  It is less cumbersome, however, to say
 \override VerticalAxisGroup #'staff-staff-spacing #'stretchability = #0.0
than to look up whatever basic-distance happens to be.

This backdoor really confuses me, however, in cases like the definition of
Lyrics in
 \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
    #'((basic-distance . 0)
       (minimum-distance . 2.8)
       (padding . 0.2)
       (stretchability . 0))
Why is basic-distance smaller than minimum-distance?
What distance should I expect in tight spacing (and a single-line parent staff
like a drum staff) ?

What is stretchability = 0 supposed to do ?

I don't think it was originally "supposed" to do anything, but it turned out to be a useful way to force a fixed spacing. With this application in mind, I think (b) and (c) are both appropriate, and that the distance should be the maximum of basic-distance and minimum-distance. So in the definition above, basic-distance could be anything less than 2.8 and the effect would be the same.

I'm not 100% attached to this, though, so if you want to change something specific then don't be shy...


reply via email to

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