On Mon, Dec 12, 2005 at 10:00:24AM +0100, Jeremias Maerki wrote:
>Interesting. According to the spec the "height" attribute doesn't apply
>to the fo:block FO. Specifying should not have any effect. 

You are right and it seams that i was not very clear. 
My example was only from the thinking (wishing) that there may be
a xxx.minimum property that can be used for my needs (make shure
that there is at least a remaining <length> available on the
current page, otherwise begin a new page)


>Furthermore, height is a simple property (derived from CSS) and
>does not support subproperties like "minimum". If "minimum" (or
>a <length-range> for that matter) is to be used, you'd have to
>use the "block-progression-dimension" property (which doesn't
>apply to fo:block, either).

i had a look at hight, min-hight, block-progression-dimension but
had no luck. Both (the spec and fop) showed me that this will not
work, so i thought there is another property that i have not
discovered yet. 


>So, if DocBook does that, it's non-standard and will not have
>any effect on most FO implementations. fo:block-container is the
>next best FO that supports block-progression-dimension.

the mentioned link says that DocBook uses an empty block-container 
with a height of the needed space (xx inch) followed by a empty 
block with a negative space-before property (-xx inch).
>From the DocBook code:
<fo:block-container width="100%" height="{$height}">
  <fo:block><fo:leader leader-length="0pt"/></fo:block>
</fo:block-container>

after investigating a little i could say that the following
example (with a "need" of 2 inch) basically works with fop (not
extensively tested for unwantet side effects):


<fo:block-container height="2in">
  <fo:block>
    <fo:leader leader-length="0pt"/>
  </fo:block>
</fo:block-container>
<fo:block space-before="-2in"/>

<fo:block>Here the _real_ text ...</fo:block>

    

>I don't think there is any feature exactly like you want. The only thing
>I see you can do is have a keep-with-next on the section title and a
>keep-together on the first paragraph after a section title. 

i do, but with very short first paragraphs the result is not the best.


>Furthermore, settings widows and orphans right should also help.

thank you - it is also a help if i know i don't have to search (wait)
for xsl-properties and that i should use my time to better test
the DocBook solution (and maybe adapt here and there for my needs).



thanks a lot
gerhard



ps: if someone has contact with the DocBook team, the following
should not be necessary for fop 0.9alpha1 (and higher) in pi.xsl:

<xsl:template match="processing-instruction('dbfo-need')">
[...]
<xsl:when test="$fop.extensions != 0">
  <!-- Doesn't work in fop -->
</xsl:when>






>On 12.12.2005 00:26:28 gerhard oettl wrote:
>> 
>> Not fop-specific.
>> 
>> Is there a way in xsl to specify:
>> If there is less space than x inch free on the current page don't
>> begin a new aerea - make a page-break instead and continue on the
>> new page.
>> 
>> For latex-users: I am looking for something like the "needspace"
>> package.
>> 
>> The goal is to avoid the beginning of a section within the last x
>> inches of a page.
>> 
>> 
>> I discovered how docbook handle this at
>> <http://www.sagehill.net/docbookxsl/PageBreaking.html>
>> but i wonder if there isn't a better solution like
>> <fo:block height.minimum="5cm">xxx</fo:block>
>> 
>> 
>> Any tips are wellcome.
>
>
>
>Jeremias Maerki
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

-- 
 .''`.   gerhard oettl   on   Debian/Gnu Linux
: :'  :  
`. `'`   gpg key: 1024D/D59131AA 2002-06-18
  `-

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

Reply via email to