Re: [xep-support] Numbered paragraph with first line indent

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Tue Mar 10 2009 - 03:46:20 PST

At 2009-03-10 14:38 +1100, Justin Lipton wrote:
>I'm trying to work out the best way to produce the following style
>of numbered paragraphs:
>...
>We need the opening words of each paragraph, namely
>"Confidentiality." and "Permitted Use and Disclosure." to be
>indented at a fixed offset (similar to text-indent behavior).

I tell my students to use a leader to get fixed or horizontal space in a line:

    <fo:leader leader-length=".5in"/>

This has the benefit of looking like a bunch of spaces, without
acting like a bunch of spaces.

But that is a fixed space ... it isn't a space into which you can place text.

XSL-FO defines the <fo:inline-container> for defining a
specifically-sized container on a line into which you could place a
block of text, thus giving you a constant start position on the prose
of your paragraph ... but my recollection is that the current version
of RenderX doesn't support inline containers. That appears to still be true:

   http://www.renderx.com/reference.html#Formatting_Objects

... in which case I tell my students to use a side float.

>We've achieved this using fixed width floats for the number but find
>that the second line is always getting indented too.

Probably because of some kind of rounding or placement issues with
the height of the float on the first line that prevents the second
line from going to the start edge.

>Here's some example FO:

Thank you for sending the example, as that made it easy to test some
ideas, and sure enough, adding the following to the block prevents
the second line from going to the start edge:

    line-height="1"

As I suspected, the leading of the block inside of the float is big
enough to trigger the apparent indentation of the second line. By
removing the leading (using a line height scalar value), there is now
room for the second line to go to the edge.

>We've tried a few other ways without success - what's the best way
>to achieve this?

I hope these ideas help.

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

--
XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz
XQuery/XSLT/XSL-FO training in Los Angeles (New dates!) 2009-06-08
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
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@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 Tue Mar 10 04:09:43 2009

This archive was generated by hypermail 2.1.8 : Tue Mar 10 2009 - 04:09:49 PST