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: Carl . D . Sorensen
Subject: Re: Doc: NR 4.1.2: Reorganize vertical dimensions. (issue2316042)
Date: Sun, 03 Oct 2010 03:08:54 +0000

On 2010/10/03 02:49:30, Mark Polesky wrote:
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?

I don't think so.  I think 'padding is added as a rigid space interval,
hence my saying that it is added to the layout item above.

'space should begin below 'padding IIUC.


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


Trevor pointed out that the absolute value of 'stretchability doesn't
matter.  It's just that if one space has twice the 'stretchability of
another, it will be twice as far from the 'space value.  So it's ratios
of 'stretchability of the different spaces that makes a difference.

However, I think it is possible (although I haven't checked) that lower
values of stretchability will allow less stretching to try to fit a
page, because they should raise the penalty value for an equivalent
amount of stretching.

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.


Maybe.  It may be that the most natural reference points aren't easily
available.

I think we should document what we have, and make enhancement requests
for what we would *like* to have.  I don't think the exercise of "write
the documents for what we wish we had and then change the code to match"
is the best way to proceed.  But if Joe's ok with it, then my opinion is
irrelevant.

AFAICS, if spacing code is going to be fixed, it will be by Joe.

Thanks,

Carl


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



reply via email to

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