--- Jeremias Maerki <[EMAIL PROTECTED]> wrote:

> Hi Luca,
> the reason for the effect you're seeing is the
> inheritance of
> start-indent and end-indent. In your exapmle, if you
> specify a
> margin-left and margin-right on the
> simple-page-master, 

(margin-left and margin-right of 50pt each on

> this results
> (corresponding properties) in a start-indent and
> end-indent of 50pt each.

via the second set of formulas, because margins are
explicitly specified and fo:s-p-m does not generate
any area and hence does not generate a reference area
(although it is used by fo:page-sequence to do so): I
agree here.

> Now, because start|end-indent are inherited,
> region-body also starts
> with a start-indent and end-indent of 50pt which

I agree, but these properties are not explicitly
specified on fo:region-body, so the first two sets of
formulae are not relevant here.  Nor would they be
anyway because I don't believe fo:region-bodies
generate reference areas.

> together with the
> parent's start-indent accumulates 100pt because each
> of the FOs are
> generating a reference area. 

I don't think so here--I don't believe either fo:s-p-m
or fo:region-body generate reference areas--indeed, I
don't think anything located outside of
fo:page-sequence does.  The spec says they are *used*
to create a reference area, but they don't generate
one themselves.  So maybe your calculations here may
need changing--because different formulae in 5.3.2
would hence be activated.

Section 6.1 [1] says "There are three kinds of
formatting objects: (1) those that generate areas, (2)
those that return areas, but do not generate them, and
(3) those that are used in the generation of areas."

fo:s-p-m and fo:region-body are type (3), not type

fo:s-p-m text:  The fo:simple-page-master formatting
object generates no area directly. It is used in the
generation of pages by an fo:page-sequence. type (3)

fo:r-b text:  The fo:region-body formatting object is
used to generate one region-viewport-area and one
region-reference-area whenever an
fo:simple-page-master that has an fo:region-body as a
child is used to generate a page.  (i.e., type 3)


> So in your case you could specify
> a margin="0pt" on
> the region-body which triggers the first formula
> given in 5.3.2. 

Again, I don't think so because fo:region-body never
generates a reference-area.  Hence, with no explicit
specification of margin properites, the third set of
formulas then activates:

margin-corresponding = start-indent -
inherited_value_of(start-indent) -
padding-corresponding - border-corresponding-width

with the additional rule that:  "If the "start-indent"
or "end-indent" properties are not specified their
inherited value is used in these formulae."

Since start-indent and end-indent were not specified,
then we have:

margin-corresponding =
inherited_value_of(start-indent) -
inherited_value_of(start-indent) -
padding-corresponding - border-corresponding-width,

or zero for the margin properties on fo:region-body. 
(i.e., we just rely on the 50pt. on

So Luca is correct that both fo:simple-page-masters
should generate the same overall margins of 50 pt.
each, no?


Reply via email to