On 30.09.2005 08:50:22 Simon Pepping wrote: > Hi, > > I have a problem with a number of examples on the Wike space > resolution examples page. I wonder if I have a major misunderstanding.
And I wonder if I ever switched on my brain while writing those examples. I made a number of mistakes like applying the is-first/is-last rule defined only for border and padding to spaces, too. I clarified this on the Wiki. > In general, I have a different idea about the retain > condition. Retained spaces do not appear between areas returned by the > FO; all spaces appear before or after all areas returned by the > FO. This is different from retained padding and borders. That's the part where I think you are wrong. 4.2.3 and 7.10.5 make it clear IMO that space-before|-after are applied to every area generated by an FO. The following sentence is the key: "Specifies the value of the space-specifier for the space before the areas generated by this formatting object." (Notice the "areas"!) > * Example 0 > > IMHO it should be: Here we look at the case where a break > happens before "before break". Doesn't matter IMO. It's the same outcome in both cases. > * Example 1 > > IMHO it should be: The break after "first line" does not > produce a 10pt space because the space is conditional. > > and my element list is (case 'All spaces are conditional'): > > box w=lh for "first line" > > penalty w=0 p=0 for the break possibility after "first line" > > glue w=10pt for the space in case there is no break > > box w=lh for "before break" > > penalty w=0 p=0 for the break possibility after "before break" > > box w=lh for "after break" Agreed. > * Example 2 > > My element list is (case 'Only the first space is conditional'): > > box w=lh for first block > > penalty w=0 p=0 for the break possibility > > box w=0 > penalty p=INF > aux glue w=10pt for space-before > > box w=lh for "before break" > > penalty w=0 p=0 for the break possibility after "before break" > > box w=lh for "after break" Here we obviously disagree, but I had to fix the element list. It was wrong. > * Example 3 > > Break between the blocks: > > Both space specifiers are conditional, and are suppressed due to rule > 1 in 4.3.1. > > My element list is (case 'All spaces are conditional'): > > box w=lh for first block > > penalty w=0 p=0 for the break possibility > > glue w=10pt y=0 z=0 > > box w=lh for second block Agreed. > * Example 4 > > Break between the blocks: > > The first space specifier is retained, the second is conditional, and > is suppressed. > > My element list is (case 'Only the second space is conditional'): > > box w=lh for first block > > glue w=10pt y=0 z=0 > > penalty w=0 p=0 for the break possibility > > box w=lh for second block Agreed. > * Example 5 > > Break between the blocks: > > Both space specifiers are retained. > > That means that with a break we have more space than without a break, > and we need a negative glue (glue #2) to compensate this. > > My element list is (the full case glue #1 - penalty - glue #2 - box - > PENALTY - glue #3): > > box w=lh for first block > > glue w=10pt y=0 z=0 > > penalty w=0 p=0 for the break possibility > > glue w=-10pt y=0 z=0 > > box w=0 > penalty w=0 p=INF > glue w=10pt y=0 z=0 > > box w=lh for second block Agreed. > * Example 8 > > The space-before of the block with "second line" is conditional, and > therefore is suppressed. > > My element list is (case 'All spaces are conditional'): > > box w=lh for first line > > aux glue w=6pt y=0 z=0 > > box w=lh for second line Agreed. In example 9 the reasoning was wrong. Thanks a lot, Simon, for going through all this! Jeremias Maerki
