lilypond-devel
[Top][All Lists]
Advanced

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

Re: Doc: NR 4.1.2: Reorganize vertical dimensions. (issue2316042)


From: markpolesky
Subject: Re: Doc: NR 4.1.2: Reorganize vertical dimensions. (issue2316042)
Date: Sun, 03 Oct 2010 02:49:31 +0000

On 2010/10/02 16:32:06, Carl wrote:
When laying out a page, LilyPond makes a stack of the
layout items (staves, lyrics lines, chordnames, etc.)
on the page, with a variable spacing item between each
pair of layout items.  When calculating the desired
location of each layout item, the code treats the page
as if the layout items were rigid blocks and the
spacing items were springs, and the whole assembly of
blocks and springs is made to fit in the space of the
page.  In order to make it fit, the springs will be
stretched or compressed.

The spacing variables affect the size and strength of
the springs, as well as the size of the rigid blocks.
'padding is added to the rigid block above.  'space
determines the size of the spring -- it's the space
that would be used if no squeezing or stretching would
be required to fit the systems together.
'stretchability determines the strengths of the
springs.  Higher values of 'stretchability make the
spring weaker; lower values of stretchability make the
spring stronger.  'minimum-space is the
shortest-possible length of the spring.  When the
space between the two layout items reaches
'minimum-space, the two layout items can be placed no
closer together.

I like this a lot.  But I think it's misleading to say
that 'padding is added to the "rigid block" above,
because this implies that 'space is measured from the
bottom of the 'padding block, whereas 'space should be
measured (IIUC) from what I called the "reference
point" of the upper item, and when the upper item is a
title or markup, that reference point is the lowest
point of the title/markup.  So at least in that case,
the upper Y-coordinates of 'padding and 'space would
be the same.  Is that right?

These 2 paragraphs still leave 'stretchability somewhat
abstract, but this other line from Carl so far is the
most promising explanation:

penalty = [(proposed actual space) - (space)]/stretchability

I think we're a lot closer to a suitable explanation.
We still need to go through and agree what the most
natural "reference points" are, and then make sure the
code agrees with that.

- Mark

http://codereview.appspot.com/2316042/



reply via email to

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