<!-- edited with XML Spy v4.0 U (http://www.xmlspy.com) by Andy Robinson (Reportlab Inc.) -->
<!DOCTYPE document SYSTEM "rml_1_0.dtd">
<document filename="test_011_keepwithnext.pdf">
	<template pageSize="(595, 842)" leftMargin="72" showBoundary="1">
	<pageTemplate id="main">
	<pageGraphics>
	<setFont name="Helvetica-Bold" size="18"/>
		    <drawString x="35" y="783">RML Example 15: keepwithnext </drawString>
			<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
			
    		<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
    		</pageGraphics>
    		
		<frame id="second" x1="35" y1="45" width="525" height="590"/>
	</pageTemplate>
	
	<pageTemplate id="main2">
	<pageGraphics>
	<setFont name="Helvetica-Bold" size="18"/>
		    <drawString x="35" y="783">RML Example 15: keepwithnext</drawString>
			<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
			
    		<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
    		</pageGraphics>
    		
		<frame id="second" x1="35" y1="45" width="525" height="685"/>
	</pageTemplate>

<pageTemplate id="twoparts">
	<pageGraphics>
		<setFont name="Helvetica-Bold" size="18"/>
		    <drawString x="35" y="783">RML Example 15: keepwithnext</drawString>
			<image file="logo_no_bar.png" preserveAspectRatio="1" x="488" y="749" width="72" height="72"/>
    		<image file="strapline.png" preserveAspectRatio="1" x="35" y="0" width="525" />
	</pageGraphics>
	<frame id="first" x1="35" y1="5.845in" width="525" height="4in"/>
	<frame id="second" x1="35" y1="1in" width="525" height="4in"/>
	</pageTemplate>
	</template>
	<stylesheet>
	
	
	<paraStyle name="heading"
	fontName="Helvetica-Bold"
	fontSize="24"
	leading="28"
	spaceBefore = "24"
	/>

	<paraStyle name="head_keep"
	fontName="Helvetica-Bold"
	fontSize="24"
	leading="28"
	spaceBefore = "24"
	keepWithNext="1"
	/>

	<paraStyle name="head_nokeep"
	fontName="Helvetica-Bold"
	fontSize="24"
	leading="28"
	spaceBefore = "24"
	keepWithNext="0"
	/>
	
	<paraStyle name="body"
	fontName="Helvetica"
	fontSize="12"
	leading="14"
	spaceBefore = "3"
	/>
	<paraStyle name="intro"  fontName="Helvetica" fontSize="12" leading="12" spaceAfter="12"/>
	</stylesheet>
	<story>
	<setNextTemplate name="main2"/>	
	<storyPlace x="35" y="660" width="525" height="73" origin="page">
<para style="intro">RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.</para>
<hr color="white" thickness="8pt"/>
<para style="intro">These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.</para>
<illustration height="3" width="525" align="center">
<fill color= "(0,0.99,0.97,0.0)" />
<rect x="0" y = "-12" width="525" height="3" round="1" fill="1" stroke = "Yes" />
</illustration>
</storyPlace>
		<para>There should be a table on this page</para>
		<blockTable colWidths="5cm">
			<blockTableStyle id="temp000" keepWithNext="1"/>
			<tr><td><para>These should have links.</para></td></tr>
		</blockTable>
		<blockTable colWidths="5cm,5cm">
			<blockTableStyle id="temp001">
				<blockAlignment value="left"/>
				<blockFont name="Helvetica-Oblique"/>
				<lineStyle kind="GRID" colorName="black"/>
				<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
				<blockBackground colorName="pink" start="0,0" stop="-1,0"/>
				<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
			</blockTableStyle>
			<tr><td>Name</td><td>Email</td></tr>
			<tr>
				<td>Robin</td>
				<td><plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable></td>
			</tr>
			<tr>
				<td><spacer length="4in"/><para>xxx</para></td><td></td>
			</tr>
		</blockTable>
		<nextFrame/>
		<para>There should be a table on the next page</para>
		<spacer length="5in"/>
		<blockTable colWidths="5cm">
			<blockTableStyle id="temp000" keepWithNext="1"/>
			<tr><td><para>These should have links.</para></td></tr>
		</blockTable>
		<blockTable colWidths="5cm,5cm">
			<blockTableStyle id="temp001">
				<blockAlignment value="left"/>
				<blockFont name="Helvetica-Oblique"/>
				<lineStyle kind="GRID" colorName="black"/>
				<lineStyle kind="OUTLINE" colorName="black" thickness="2"/>
				<blockBackground colorName="pink" start="0,0" stop="-1,0"/>
				<blockBackground colorName="yellow" start="0,0" stop="-1,0"/>
			</blockTableStyle>
			<tr><td>Name</td><td>Email</td></tr>
			<tr>
				<td>Robin</td>
				<td><plugInFlowable module="mymodule" function="linkURL">("mailto:robin@reportlab.com",)</plugInFlowable></td>
			</tr>
			<tr>
				<td><spacer length="4in"/><para>xxx</para></td><td></td>
			</tr>
		</blockTable>
			<setNextTemplate name="twoparts"/>
			<nextPage/>
<nextPage/>
<para style="heading">
	keepWithNext and paragraph splitting = #1.
</para>
<para style="body">
	This tests the ability to make headings 'stick to' the paragraphs after them.  The heading style
	used is supposed to be kept with the next paragraph, even if this involves flopping onto the
	next page.  We have sized this text so that there is enough space for the heading below to
	fit into the top frame.  However, its style has a <i>keepWithNext</i> attribute set to 1, so it
	should flop down into the bottom half.  Cross your fingers....
</para>

<para style="head_keep">This should be on the bottom half</para>
<para style="body">

			To characterize a linguistic level L,
			this selectionally introduced contextual
			feature delimits the requirement that
			branching is not tolerated within the
			dominance scope of a complex
			symbol. Notice, incidentally, that the
			notion of level of grammaticalness
			does not affect the structure of the
			levels of acceptability from fairly high
			(e.g. (99a)) to virtual gibberish (e.g.
			(98d)). Suppose, for instance, that a
			subset of English sentences interesting
			on quite independent grounds appears
			to correlate rather closely with an
			important distinction in language use.
			Presumably, this analysis of a
			formative as a pair of sets of features is
			not quite equivalent to the system of
			base rules exclusive of the lexicon. We
			have already seen that the appearance
			of parasitic gaps in domains relatively
			inaccessible to ordinary extraction
			does not readily tolerate the strong
			generative capacity of the theory.

</para>

<nextPage/>
<para style="heading">
	keepWithNext and paragraph splitting - #2.
</para>
<para style="body">
	This time the style has keepWithNext turned OFF. The paragraph below should
	be in the top half.
</para>

<para style="head_nokeep">This should be on the top half</para>
<para style="body">

			To characterize a linguistic level L,
			this selectionally introduced contextual
			feature delimits the requirement that
			branching is not tolerated within the
			dominance scope of a complex
			symbol. Notice, incidentally, that the
			notion of level of grammaticalness
			does not affect the structure of the
			levels of acceptability from fairly high
			(e.g. (99a)) to virtual gibberish (e.g.
			(98d)). Suppose, for instance, that a
			subset of English sentences interesting
			on quite independent grounds appears
			to correlate rather closely with an
			important distinction in language use.
			Presumably, this analysis of a
			formative as a pair of sets of features is
			not quite equivalent to the system of
			base rules exclusive of the lexicon. We
			have already seen that the appearance
			of parasitic gaps in domains relatively
			inaccessible to ordinary extraction
			does not readily tolerate the strong
			generative capacity of the theory.

</para>


<nextPage/>

			
			
	</story>
</document>
