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, this results (corresponding properties) in a start-indent and end-indent of 50pt each. Now, because start|end-indent are inherited, region-body also starts with a start-indent and end-indent of 50pt which together with the parent's start-indent accumulates 100pt because each of the FOs are generating a reference area. If you'd do this on nested blocks you wouldn't see this behaviour because they don't establish a new reference area.
That's really one of the things I stumbled upon and which I believe after a lot of thinking to be the correct behaviour given by the spec. RenderX seem to have chosen to break inheritance in these cases because they create strange effects like you found out now. It took me some time to get used to it. So in your case you could specify a margin="0pt" on the region-body which triggers the first formula given in 5.3.2. If you don't specify margin the inherited value for start-indent is used. There are other instances like on tables where you have to start specifying start-indent="0pt" and end-indent="0pt" on table-body if you have a margin on fo:table. I'm 99.9% sure that the current behaviour is correct even if it produces strange results for the XSL-FO user. See my layout engine test cases where I have such auxiliary margin and start|end-indent properties in some places. On 15.02.2005 15:03:00 Luca Furini wrote: > I noticed a strange behaviour concerning margins that could be related to > the inheritance of start-indend and end-indent, which was discussed a few > weeks ago. > It seems that in some situations the margins are subtracted twice from the > available inline progression dimension. > > In the little fo file I'm attaching there are two simple-page-masters: > - in one of them, left and right margins are set inside simple-page-master > itself > - in the other, they are set inside region-body > > In both cases, the page width is 200 points, with left and right margin > set to 50 points; so, the line width should be 100 points. > > In the method PageSequenceLayoutManager.getViewportRectangle(), the > computed ipd is right when the margins are set in region-body, but it is 0 > if they are set in simple-page-master, because relDims.ipd is already 100 > and start- end-indent are 50. > > As this method has not been modified recently, the error (if this > behaviour is really wrong) must be elsewhere ... > > Regards, > Luca > > Jeremias Maerki