Hi!

Some days ago we talked about the problem of wrong computation of
table-widths if a break between two pages occurs and the region-bodies (or
column-widths) of these to pages differ in width.

I use something like the following to keep the headline and first paragraph
of an article together. Actually, it is a bit more complicated because not
only "p"s may occur first, but that shouldn't make a difference.


 <xsl:template match="article">
        <!-- Headline and first paragraph -->
        <fo:block font-size="11pt" space-after="0.6cm" >
                <fo:table table-layout="fixed"  width="100%">
                        <fo:table-column
column-width="proportional-column-width(1)"/>
                        <fo:table-body>                         
                                <fo:table-row keep-with-next="always"
keep-together="always">
                                        <xsl:apply-templates
select="headline" mode="content"/>
                                </fo:table-row>
                                <fo:table-row keep-together="always">
                                        <fo:table-cell><xsl:apply-templates
select="p[1]"/></fo:table-cell>
                                </fo:table-row>
                        </fo:table-body>
                </fo:table>
                <xsl:apply-templates select="p[position() &gt; 1]"/>

        </fo:block>
</xsl:template>


The evil part is that one (shortened):

 <fo:simple-page-master master-name="first" page-height="29.7cm"
page-width="21cm"
              margin-top="0cm"  margin-bottom="2.2cm"  margin-left="2.5cm"
margin-right="2.5cm">
           <fo:region-body margin-top="7cm" margin-bottom="0cm"
margin-left="7cm"/> 
       <fo:region-before precedence="true" region-name="first-before"
extent="7.5cm"/>           
       <fo:region-start region-name="first-start" extent="5.6cm"/> 
 </fo:simple-page-master>

The other fo:simple-page master objects don't have this region-start and
therefore don't have such a big left margin on their region-body. (There is
a box containing the the contents on on the left of the first page).

So what happens is that if there really has to be a page-break from page 1
to page2 when a new article starts, the headline-p1-table will have the
width of the first page's region-body. 
After that headline-p1-table everything is fine.

Hmm, my customer was so sold on that content-box on the left side ;-), in
the end I will have to remove it...


Greetings and many thanks!

sonja





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to