You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by Apache Wiki <wi...@apache.org> on 2005/10/04 16:32:16 UTC
[Xmlgraphics-fop Wiki] Update of "SpaceResolution/Examples" by JeremiasMaerki
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.
The following page has been changed by JeremiasMaerki:
http://wiki.apache.org/xmlgraphics-fop/SpaceResolution/Examples
The comment on the change is:
Will this ever be right? Thanks Simon
------------------------------------------------------------------------------
</fo:block>
}}}
- Here we look at the case where a break happens between "before break" and "after break".
+ For both cases, break before the above sequence and between "before break" and "after break":
The 10pt space is suppressed due to rule 1. It is conditional and begins a reference area.
@@ -37, +37 @@
</fo:block>
}}}
- The break after "first line" must produce a 10pt space right after the break.
+ The break after "first line" does not produce a 10pt space because the space is conditional.
The break after "break before" does not produce a 10pt space because the space is conditional.
@@ -48, +48 @@
penalty w=0 p=0 for the break possibility after "first line"
- box w=0
- penalty w=0 p=INF
aux glue w=10pt for the space in case there is no break
box w=lh for "before break"
@@ -71, +69 @@
</fo:block>
}}}
+ The break after "first line" produces a 10pt space because the space is retained.
+
+ The break after "break before" produces a 10pt space because the space is retained.
+
'''Element list:'''
{{{
@@ -80, +82 @@
box w=0
penalty p=INF
- aux glue for space-before
+ 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"
+ aux glue w=-10pt for compensating the space glue below in the no-break condition
+
box w=0
penalty p=INF
- aux glue for space-before
+ aux glue w=10pt for space-before
box w=lh for "after break"
}}}
@@ -106, +110 @@
We have two S' which each contains one space specifier.
- S'[1]: The space-after on the first block is retained because the block's last generated area has is-last="true". The conditionality doesn't count here.
+ S'[1]: The space-after on the first block is suppressed under rule 1 in 4.3.1.
- S'[2]: The space-before on the second block is retained because the block's first generated area has is-first="true". The conditionality doesn't count here.
+ S'[2]: The space-before on the second block is suppressed under rule 1 in 4.3.1.
'''No break between the blocks:'''
@@ -121, +125 @@
{{{
box w=lh for first block
- box w=0
- penalty w=0 p=INF
- glue w=10pt y=0 z=0
-
penalty w=0 p=0 for the break possibility
- glue w=-10pt y=0 z=0 //difference between break and no-break
-
- box w=0
- penalty w=0 p=INF
glue w=10pt y=0 z=0
box w=lh for second block
@@ -143, +139 @@
<fo:block space-before="10pt">second block</fo:block>
}}}
- Same outcode as example 3.
+ '''Break between the blocks:'''
+
+ The first space specifier is retained. The second is conditional and is suppressed.
+
+ '''Element list:'''
+
+ {{{
+ 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
+ }}}
== Example 5 ==
@@ -152, +162 @@
<fo:block space-before="10pt" space-before.conditionality="retain">second block</fo:block>
}}}
- Same outcode as example 3.
+ '''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.
+
+ '''Element list:'''
+
+ (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
+ }}}
''Example 6 and 7 removed due to mistakes.''
@@ -167, +201 @@
</fo:block>
}}}
- We look at the break possibility between the first and the second line here. All spaces, paddings and borders are conditional. Since the block area for "second line" begins a reference-area here, according to 4.3.1, the widths for border and padding from the parent block both collapse to zero, so S' consists of both space-specifiers in this example. The first space-specifiers is conditional and is therefore suppressed under rule 1. The second is conditional bit the area has the is-last set to true so it has to be painted anyway.
+ We look at the break possibility between the first and the second line here. All spaces, paddings and borders are conditional. Since the block area for "second line" begins a reference-area here, according to 4.3.1, the widths for border and padding from the parent block both collapse to zero, so S' consists of both space-specifiers in this example. Both space-specifiers are conditional and are therefore suppressed under rule 1, as they have a stacking constraint when border and padding collapse to zero.
+
+ Only in the non-break condition will the second space-before be generated.
'''Element list:'''
@@ -176, +212 @@
penalty w=0 p=0 for the break possibility
- box w=0
- penalty w=0 p=INF
aux glue w=6pt y=0 z=0
box w=lh for second line
@@ -194, +228 @@
</fo:block>
}}}
- Again we look at the break possibilty between the first and second line as in the previous example. All spaces and paddings are conditional. Only the border is non-conditional (the only change to the previous example). In the break case, we begin a reference-area here, but the border interrupts the suppressing of space elements (there's no stacking constraint anymore). So only the first space-before is suppressed. After that the border is added. The following padding is suppressed, but not the space after that (is-first=true).
+ Again we look at the break possibilty between the first and second line as in the previous example. All spaces and paddings are conditional. Only the border is non-conditional (the only change to the previous example). In the break case, we begin a reference-area here, but the border interrupts the suppressing of space elements (there's no stacking constraint anymore). So only the first space-before is suppressed. After that the border is added. The following padding is suppressed, but not the space after that (it does not begin a reference area because of the retained outer border).
In the no-break case, there is simply a 6pt space-before before "second line".
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org