[xep-support] Re: keep-together and keep-with-next

Kevin Brown kevin at renderx.com
Fri Oct 9 12:04:52 PDT 2015


The concept of keep-together.within-column makes no sense if you have a single block that occupies more than one column or one page. You are designing things wrong and need to rethink your requirement.


Sent via the Samsung Galaxy Note® 3, an AT&T 4G LTE smartphone

<div>-------- Original message --------</div><div>From: "Akula, Nithin" <akula.nithin at optum.com> </div><div>Date:10/09/2015  8:41 PM  (GMT+01:00) </div><div>To: kevin at renderx.com </div><div>Cc: RenderX Community Support List <xep-support at renderx.com> </div><div>Subject: RE: [xep-support] Re: keep-together and keep-with-next </div><div>
</div>Thank You for providing an example.
I will try to explain the problem in detail. I am trying the below scenario
 
<xsl:template match=”xxxx”>
     <fo:block keep-together.within-column=”always”>
           Stuff …
            <fo:inline></fo:inline>
              Stuff….
     </fo:block>
</xsl:template>
 
The content in fo:block itself is in a loop and is dynamic I have only one fo:block in hand at a time, the first requirement is to keep this content within a fo:block with in a column. The content in a single block occasionally occupies 1-2 pages, in such cases sometimes the next fo:block just comes after the previous one and sometimes it comes in next column with gaps in the previous column and sometimes in next page all together.
 
I am trying to use keep-with-next with the same fo:block to achieve this requirement.
 
Thanks,
| Akula Nithin | Software Engineer | OGS | Office 40 30852249 | Cell 9963716952|
 
From: Xep-support [mailto:xep-support-bounces at renderx.com] On Behalf Of Kevin Brown
Sent: Tuesday, October 06, 2015 9:12 PM
To: 'RenderX Community Support List'
Subject: [xep-support] Re: keep-together and keep-with-next
 
It is unclear without posting a sample, but the easiest solution to what you describe is:
 
<fo:block-container keep-together.within-column=”always”>
     <fo:block>Stuff …</fo:block>
     <fo:block>More stuff that is optionally the second block to stick together</fo:block>
</fo:block-container>
 
For instance try this and you will see that para1 and para2 are never split apart at any column.
 
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
            <fo:layout-master-set>
                        <fo:simple-page-master page-width="700pt" page-height="780pt" master-name="first">
                                    <fo:region-body margin="1in" column-count="2"/>
                                    <fo:region-before extent="1in"/>
                        </fo:simple-page-master>
            </fo:layout-master-set>
            <fo:page-sequence master-reference="first">
                        <fo:static-content flow-name="xsl-region-before">
                                    <fo:block-container height="1in">
                                                <fo:block><fo:leader/></fo:block>
                                    </fo:block-container>
                        </fo:static-content>
                        <fo:flow flow-name="xsl-region-body">
                                   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.renderx.com/pipermail/xep-support/attachments/20151009/6207d495/attachment.html>


More information about the Xep-support mailing list