[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL-FO: Section titles with icon: positoining

Subject: Re: XSL-FO: Section titles with icon: positoining
From: "Tony Graham" <tgraham@xxxxxxxxxx>
Date: Wed, 19 Dec 2012 17:52:03 -0000 (GMT)
Re:  XSL-FO: Section titles with icon: positoining
On Wed, December 19, 2012 5:26 pm, Florent Georges wrote:
>   In XSL-FO, I have section titles represented as blocks, with
> underline using border-bottom, and a small icon at the beginning,
> using external-graphic (pointing to a PNG):
>
>     <fo:block font-size="14pt" border-bottom="solid 2pt">
>        <fo:external-graphic src="icon.png"/>
>        <fo:inline padding-left="5px">Lorem ipsum dolor...</fo:inline>
>     </fo:block>
>
>   The problem is, the picture is in the block, and underlined as well,
> at the same height as the text, while I'd like it to be "before the
> title", centered vertically on the couple text+underline.  Like in
> http://fgeorges.org/tmp/xsl-fo-icon-positioning.png.  For the vertical
> alignment, I can adjust it manually with a static value if it is not
> possible to vertically center it automatically.

1. You could put the border on the fo:inline (and extend the fo:inline to
the end of the line with a fo:leader inside it)

2. You could float the fo:external-graphic to the side with fo:float

3. You could use fo:list-block or fo:table and then use the
"relative-align" property and, probably, some playing with dominant
baselines to align the image and text as you want

Regards,


Tony Graham                                   tgraham@xxxxxxxxxx
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL-FO and XSLT consulting, training and programming

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.