Re: [xep-support] text around an image

From: G. Ken Holman <>
Date: Fri Aug 03 2007 - 04:16:10 PDT

At 2007-08-03 09:15 +0200, Mati Hadi wrote:
>I have an image, and I want to have text to flow
>around it like this pattern:
> text1 image___
> text1 | |
> text2 | |
> text2 |_______|
>text2 text2 text2....
>my code is:
><fo:float float="left">
> <fo:block>text1 text1
> <fo:external-graphic src="url(blomma.jpg)"/>
>text2 text2 text2 text2.....
> </fo:block>
>but it seems that it doesn't work as I expected.

You are looking at it backwards. You should be floating the image so
that the text flow wraps around the floated image.

>Can somebody help me please?
>Does xep support float and floats attributes?

Indeed it does. Consider the example below. The float is marked to
go at the end of the line (using start/end is better than using
left/right for internationalized stylesheets), the text is then just
part of the regular flow and flows around the floated image.

I hope this helps!

. . . . . . . . . . Ken

<?xml version="1.0" encoding="US-ASCII"?><!>
<root xmlns=""
       font-family="Times" font-size="20pt">

     <simple-page-master master-name="frame"
                         page-height="297mm" page-width="210mm"
                         margin-top="15mm" margin-bottom="15mm"
                         margin-left="15mm" margin-right="15mm">
       <region-body region-name="frame-body"/>

   <page-sequence master-reference="frame">
     <flow flow-name="frame-body">
       <float float="end">
           <external-graphic alignment-baseline="after-edge"
                             width="5cm" content-width="5cm"
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi est
eros, auctor quis, rutrum a, bibendum vitae, enim. Suspendisse dolor
elit, dapibus non, tincidunt quis, sodales vitae, magna. Maecenas
odio ipsum, bibendum id, feugiat luctus, aliquet sed, mauris.
Suspendisse ut sem suscipit lectus volutpat nonummy. Nam at ipsum ut
est luctus scelerisque. Duis id nulla eu pede interdum elementum.
Suspendisse lacinia, ante ut lobortis rhoncus, dolor purus tempor
pede, ut accumsan risus ante eu tellus. Mauris in nisl a ligula
fringilla pretium. Nunc et lacus in orci fringilla sodales. Aenean
feugiat justo. In hac habitasse platea dictumst. Nam ac urna sit amet
augue facilisis sodales. Integer lacinia vulputate wisi. Nullam
posuere magna eu ante. Integer in nisl. Sed enim tellus, nonummy
vitae, scelerisque a, viverra id, tortor.

Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman       
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Jul'07
Legal business disclaimers:
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Fri Aug 3 04:46:00 2007

This archive was generated by hypermail 2.1.8 : Fri Aug 03 2007 - 04:46:05 PDT