[xep-support] Simple question about vertical alignment of text in block-container

G. Ken Holman gkholman at CraneSoftwrights.com
Fri Feb 27 12:50:51 PST 2009


At 2009-02-27 10:12 -0800, Steve Anderson wrote:
>I've got a block container
>
><fo:block-container absolute-position="fixed" z-index="-8" position="absolute"
>                              top="60pt" width="100%" left="2.25in"
>bottom="140pt" right="0.5in">
>   <fo:block font-family="Sans" margin-top="0pc" margin-bottom="1.4pc"
>font-size="22pt"
>                                  font-weight="bold"
>padding-top="1.4pc" text-align="left"
>                                 keep-with-next.within-column="always">
>     <fo:inline>
>       <fo:inline font-size="85%">
>         <fo:inline font-size="115%">S</fo:inline>HORT TITLE
>       </fo:inline>
>     </fo:inline>
>   </fo:block>
></fo:block-container>
>
>I'd like the last line of the text in the inner fo:inline (SHORT
>TITLE)  to be displayed at the bottom of the surrounding block,

fo:inline constraints can only be expressed on a line level.  If you 
want content at the bottom of the block-container, then use 
display-align="after" on the block container.

>like so
>
>------------------------------
>|                                    |
>| SHORT TITLE             |
>------------------------------
>
>This is so, if I have a long title, it will still fit in the box,

I'm not sure quite what you are saying there by "still fit in the 
box".  If you wish the size of the block container to grow when the 
title is to big for the box, then instead of setting the four offsets, use:

   block-progression-dimension.minimum="5cm"

... which will start the block container off at 5cm in height and 
then grow if there is more content than will fit.

>like soe
>
>------------------------------
>| A long title that wraps   |
>| to the last line              |
>------------------------------

But that's the same height box as you have in your example above, so 
I'm unsure what you are asking.

If you mean that you want the titles to grow up from the bottom of 
the block container, then the suggestion above of 
display-align="after" on your block container should do the trick.

I hope this helps.

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

--
XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list