W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2002

Re: Line break between image and text

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Thu, 08 Aug 2002 16:16:27 -0400
Message-Id: <5.1.0.14.0.20020808161102.02c43438@pop.storm.ca>
To: www-xsl-fo@w3.org

At 2002-08-08 16:45 +0200, Hugues Pichereau wrote:
>Does anybody know how to prevent an external-graphic and its following
>text from breaking to line ?

Use keep-with-next= on the graphic or keep-with-previous= on the text, or 
keep-together= on the pair.

The following illustrates this to me on Antenna House (your margins may 
vary, play with the length of the XX prefix to cause the first one to break 
the line between the graphic and the subsequent text:

   <block>XXXXX: This is a test with a graphic followed by text 
<external-graphic src="url('smflags.bmp')"/><inline>hello 
world</inline></block>
   <block>XXXXX: This is a test with a graphic followed by text 
<external-graphic src="url('smflags.bmp')" 
keep-with-next="always"/><inline>hello world</inline></block>
   <block>XXXXX: This is a test with a graphic followed by text 
<external-graphic src="url('smflags.bmp')"/><inline 
keep-with-previous="always">hello world</inline></block>
   <block>XXXXX: This is a test with a graphic followed by text <inline 
keep-together="always"><external-graphic src="url('smflags.bmp')"/>hello 
world</inline></block>

I hope this helps.

............... Ken



--
Upcoming hands-on in-depth 3-days XSLT/XPath and/or 2-days XSL-FO:
-                               North America:  Sep 30-Oct  4,2002
-                               Japan:          Oct  7-Oct 11,2002

G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0  +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                       Definitive XSLT and XPath
ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1                Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books (electronic, printed),
articles, training (instructor-live,Internet-live,web/CD,licensed)
Next public training:           2002-08-05,26,27,09-30,10-03,07,10
Received on Thursday, 8 August 2002 16:16:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT