You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Manuel Mall <mm...@arcus.com.au> on 2007/07/18 17:44:55 UTC

Re: Lines breaking on '/' and '-'

On Wednesday 18 July 2007 23:15, Manuel Mall wrote:
> On Wednesday 18 July 2007 19:01, Andreas L Delmelle wrote:
> > On Jul 18, 2007, at 10:15, Vincent Hennebert wrote:
> > > J.Pietschmann a écrit :
> > >> Brad Smith wrote:
<snip/>

> Turned out adding basic support for
> keep-together.within-line="always" was fairly simple. So I will
> commit a patch shortly.
>
Moving this thread to fop-dev.

This proposed patch seems to cause a side-effect I would like a 
clarification on. The following fo snippet

<fo:block keep-together="always">some long text</fo:block>

used to have the effect of keeping "some long text" on a single page.

After my patch it would also keep "some long text" on a single line!

keep-together is an inherited property and it seems
	keep-together="always" 
is just a shorthand for
	keep-together.within-page="always"
	keep-together.within-line="always"
	keep-together.within-column="always"

This could mean existing fos which render fine now will render 
diffrently after support for keep-together.within-line="always" has 
been added.

I guess that is acceptable but rather wanted to check before.

Manuel
>
> <snip/>
>
> > Cheers
> >
> > Andreas
>

Re: Lines breaking on '/' and '-'

Posted by Chris Bowditch <bo...@hotmail.com>.
Jeremias Maerki wrote:
> On 18.07.2007 18:00:57 Andreas L Delmelle wrote:
> 
>>On Jul 18, 2007, at 17:44, Manuel Mall wrote:
>>
>>Hi Manuel
>>
>>
>>><snip />
>>>This proposed patch seems to cause a side-effect I would like a
>>>clarification on. The following fo snippet
>>>
>>><fo:block keep-together="always">some long text</fo:block>
>>>
>>>used to have the effect of keeping "some long text" on a single page.
>>>
>>>After my patch it would also keep "some long text" on a single line!
>>>
>>>keep-together is an inherited property and it seems
>>>	keep-together="always"
>>>is just a shorthand for
>>>	keep-together.within-page="always"
>>>	keep-together.within-line="always"
>>>	keep-together.within-column="always"
>>
>>That is how I would interpret it.

Me too. It is also how other popular commercial renderers work, so I'm 
+1000 for this change!

I'm impressed that you have implemented keep-together.within-line so 
easily. Thanks Manuel!

Chris



Re: Lines breaking on '/' and '-'

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 18.07.2007 18:00:57 Andreas L Delmelle wrote:
> On Jul 18, 2007, at 17:44, Manuel Mall wrote:
> 
> Hi Manuel
> 
> > <snip />
> > This proposed patch seems to cause a side-effect I would like a
> > clarification on. The following fo snippet
> >
> > <fo:block keep-together="always">some long text</fo:block>
> >
> > used to have the effect of keeping "some long text" on a single page.
> >
> > After my patch it would also keep "some long text" on a single line!
> >
> > keep-together is an inherited property and it seems
> > 	keep-together="always"
> > is just a shorthand for
> > 	keep-together.within-page="always"
> > 	keep-together.within-line="always"
> > 	keep-together.within-column="always"
> 
> That is how I would interpret it.

Me, too. Actually, this is found literally in XSL 1.1, ch. 5.11.

<snip/>

Cool stuff, Manuel, especially if you get this running with so little
effort! We just have to do something about those integer values one day...


Jeremias Maerki


Re: Lines breaking on '/' and '-'

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jul 18, 2007, at 17:44, Manuel Mall wrote:

Hi Manuel

> <snip />
> This proposed patch seems to cause a side-effect I would like a
> clarification on. The following fo snippet
>
> <fo:block keep-together="always">some long text</fo:block>
>
> used to have the effect of keeping "some long text" on a single page.
>
> After my patch it would also keep "some long text" on a single line!
>
> keep-together is an inherited property and it seems
> 	keep-together="always"
> is just a shorthand for
> 	keep-together.within-page="always"
> 	keep-together.within-line="always"
> 	keep-together.within-column="always"

That is how I would interpret it. If there is no constraint to keep  
the content together on a line, then the author needs to explicitly  
specify only the applicable components.

If you alter the original snippet to:

<fo:block keep-together.within-page="always">some long text</fo:block>

Then the other two components would default to "auto". The only minor  
inconvenience being that to prohibit page- and column-breaks but not  
line-breaks, the user has to specify two components separately to  
have the third revert to the initial value.

> This could mean existing fos which render fine now will render
> diffrently after support for keep-together.within-line="always" has
> been added.
> I guess that is acceptable but rather wanted to check before.

The effects could (and should IMO) indeed be different in the case  
you describe.



Cheers

Andreas