This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: FO-question : images & text wrapping


At 13:16 2000-07-24 +0200, Bovone Stefano wrote:
>You could use a fo:table or a list or a float object.
>Bye.
>
>-----Original Message-----
>From: Teemu Ropponen [mailto:troppone@tcm.hut.fi]
>Sent: luned́ 24 luglio 2000 13.02
>To: xsl-list@mulberrytech.com
>Subject: FO-question : images & text wrapping
>
>
>Hi,
>
>I have a fairly simple one, almost a FAQ, I assume, and I almost feel a
>deja vu effect...but nonetheless I was not able to find an answer...
>
>I have 3 fairly common scenarios for rendering a simple image and some
>text. I'd like to know how the right way to do this with fo's .
>
>1. 
><example>
>
>This is shown in the image below :
>|----------|
>| an image |
>------------
>As we can see...
>
></example>
>
>I suppose this could be done with something along the lines of
>
><fo:block>This is shown in the image below :
>  <fo:block>
>    <fo:external-graphic src=... />
>  </fo:block>
>  As we can see
></fo:block>
>
>Corrections?

This is pretty close to the example in 6.6.1.1.2 of the current draft.

>
>2.
><example>
>
>|---------|   Here is the image. I don't want to use a list but
>|  image  |   I'd like several lines of text to be nicely placed
>|---------|   next to the image
>
></example>

Look at the use of
  <fo:float float="start"> <fo:external-graphic .../> </fo:float>

If you want only the 3 lines of text beside the graphic (and top-aligned
with the graphic), you can use the "clear" property on the paragraph after
the 3 lines.

The other choice would be to use a table, place the graphic in the first
cell and the text in the second.

>
>3.
>
><example>   
>Let's see what happens in this case when the image is part of the    
>      |---------|   
>text. |  image  |   Well well, in this case the text, when reaching 
>      |---------|   
>the end of the line, wraps below the image and life goes on from here...
></example> 
>
>I guess this would be just 
>
><fo:block>Let's see what happens in this case when the image is part of
>the text <fo:external graphic.. .. /> Well well...
></fo:block>

Yes, external graphic is intrinsically an inline object and the max of the
height of the graphinc and any line-height on the text is the default
line-spacing.

>
>Am I correct? Just seems that pretty ugly looking layout will result, if
>the images are big. And how would I go about getting the second example?
>
>Thanks,
>Teemu Ropponen
>
>---------------------------------------------------------------------
>Teemu Ropponen					troppone@tcm.hut.fi
>student/research assistant
>Telecom. Software and Multimedia Lab.		http://www.tcm.hut.fi
>Helsinki University of Technology, Finland
>---------------------------------------------------------------------
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

---Steve Deach
   sdeach@adobe.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]