Re: [xep-support] Line alignment within line area

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Thu Jan 14 2010 - 09:11:52 PST

At 2010-01-14 15:07 +0100, Vasily Melenchuk wrote:
>I have documents where line spacing is adjusted very frequently. And
>there is a problem with _vertical_ text alignment inside line area.
>In most programs and formats I've used by default text is located in
>the beginning of line area. In case of XLS-FO text is located in the
>middle of line area:
>
><fo:block font="14pt Arial" background-color="blue"
>line-height="500%">This line should be driven to top of paragraph.</fo:block>

Don't use line-height ... use padding-after= since you want to keep
the blue background behind the text. You would use space-after= if
you wanted to use the parent area's background colour.

>Here text is aligned in the vertical center of blue area (line &
>paragraph bounding rectangle), but I need to move it to top like MS
>Word, Open Office and other text editors do. Is it possible?

Another approach would be to create a block-container with your
background colour and then just flow the text into the top of the
block container.

You are conflating line areas with block areas, trying to do in a
line area what I think you are witnessing in page areas in other products.

<fo:block> creates a bunch of lines, which is why these properties
are all going into your line areas.

<fo:block-container> creates a rectangle into which you flow
<fo:block> constructs, so I suspect you just need to decorate a
container with what you need.

I hope this helps.

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

--
UBL and Code List training:      Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training:   San Carlos, California 2010-04-26/30
Vote for your XML training:   http://www.CraneSoftwrights.com/f/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
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@CraneSoftwrights.com
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@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
Received on Thu Jan 14 09:45:50 2010

This archive was generated by hypermail 2.1.8 : Thu Jan 14 2010 - 09:45:51 PST