You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Stephen Clarke <an...@longusername.worldonline.co.uk> on 2002/02/12 20:08:08 UTC

How to use keep-together?

Hi,
Sorry to bother you all again. This should be the last question for a while.
I've been trying to get keep-together="always" to work. I've tried it on
blocks, inlines and on blocks surrounding blocks. Nothing seems to make any
difference, yet the FOP parser doesn't complain about the code. Again, I
just want to know whether it's me or FOP. This would be a very nice feature
to have implimented in FOP. It *does* seem to be in the pdf documentation
that came with FOP.

Just for completeness, here's some code I'm trying.

   <block keep-together="always" space-after="0.5em">This is a test with
keep-together
   <inline keep-together="always">
Indignor quicquam reprehendi, non quia crasse compositum illepedeve putetur,
sed quia nuper, nec veniam antiquis, sed honorem et praemia posci. Recte
necne crocum floresque perambulet Attae fabula si dubitem, clament periisse
pudorem cuncti paene patres, ea cum reprehendere coner, quae gravis Aesopus,
quae doctus Roscius egit; vel quia nil rectum, nisi quod placuit sibi,
ducunt, vel quia turpe putant parere minoribus, et quae imberbes senes.
   </inline>
   </block>

It just carries on splitting regardless.
( 
Any ideas?
--
Best,
Stephen



Re: How to use keep-together?

Posted by Paul Campbell <pa...@cmm.uklinux.net>.
On Thu, Feb 14, 2002 at 12:00:38AM -0000, Stephen Clarke gave off as follows:
> ----- Original Message -----
> From: "Jeremias Maerki" <je...@outline.ch>
> 
> 
> >The problem is rather that keep-together does not work yet on fo:block.
> >There is some support for keep-together on tables. So try to pack your
> >stuff into a table.
> 
> >FOP is being redesigned to make it possible to implement keep-together.
> >But that will take a while.

I got this after I sent my query of similar, and I was almost happy.  Only 
I've gone and based my document structure on nested lists.   You can't mix
lists and tables obviously.  I need breaks mid list, but NOT mid list item or
paragraph.

I suppose I'll have to wait for the keeps to be implemmented. 8¬(

Paul

Re: How to use keep-together?

Posted by Stephen Clarke <an...@longusername.worldonline.co.uk>.
----- Original Message -----
From: "Jeremias Maerki" <je...@outline.ch>


>The problem is rather that keep-together does not work yet on fo:block.
>There is some support for keep-together on tables. So try to pack your
>stuff into a table.

>FOP is being redesigned to make it possible to implement keep-together.
>But that will take a while.

Hi Magnus and Jeremias,

Many thanks to both for your replies. I may get around to giving
.within-lines a shot, but, being the nascent cynic that I am, I fear
Jeremias may be correct. {:\ Intuitively , it seems like 'keep together'
would be tricky to impliment. Here's hoping for a glorious future. {:D

You'll be pleased to hear, I'm also starting to discover the documentation,
so I hope I can leave you alone now. But when you're new, it's great to have
a leg up to help you get started. Many thanks. {:D
--
Best,
Stephen


Re: How to use keep-together?

Posted by Jeremias Maerki <je...@outline.ch>.
The problem is rather that keep-together does not work yet on fo:block.
There is some support for keep-together on tables. So try to pack your
stuff into a table.

FOP is being redesigned to make it possible to implement keep-together.
But that will take a while.

Cheers,
Jeremias Märki

mailto:jeremias.maerki@outline.ch

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 41 317 20 20 - Fax +41 41 317 20 29
Internet http://www.outline.ch


Re: How to use keep-together?

Posted by Magnus Sjöberg <ma...@secode.com>.
You probably need to adress the different components of the
keep-together attribute.
Try setting keep-together.within-line="always" as in:

<fo:block keep-together.within-line="always">

(If it is line keeping you're looking for)
The components are further described in the xsl spec 7.19
Keep and Breaks properties

Good luck!

///Magnus

Stephen Clarke wrote:
> 
> Hi,
> Sorry to bother you all again. This should be the last question for a while.
> I've been trying to get keep-together="always" to work. I've tried it on
> blocks, inlines and on blocks surrounding blocks. Nothing seems to make any
> difference, yet the FOP parser doesn't complain about the code. Again, I
> just want to know whether it's me or FOP. This would be a very nice feature
> to have implimented in FOP. It *does* seem to be in the pdf documentation
> that came with FOP.
> 
> Just for completeness, here's some code I'm trying.
> 
>    <block keep-together="always" space-after="0.5em">This is a test with
> keep-together
>    <inline keep-together="always">
> Indignor quicquam reprehendi, non quia crasse compositum illepedeve putetur,
> sed quia nuper, nec veniam antiquis, sed honorem et praemia posci. Recte
> necne crocum floresque perambulet Attae fabula si dubitem, clament periisse
> pudorem cuncti paene patres, ea cum reprehendere coner, quae gravis Aesopus,
> quae doctus Roscius egit; vel quia nil rectum, nisi quod placuit sibi,
> ducunt, vel quia turpe putant parere minoribus, et quae imberbes senes.
>    </inline>
>    </block>
> 
> It just carries on splitting regardless.
> (
> Any ideas?
> --
> Best,
> Stephen

-- 

Secode - Total Internet Security
Magnus Sjöberg
Research And Development

email: magnus.sjoberg@secode.com
cell: +46 709 150 710
POTS: +46 8 564 875 05
http://www.secode.com

Internet is to be a safe area for business, transactions and
information exchange