Re: [xep-support] text in a box

From: G. Ken Holman (
Date: Mon Apr 12 2004 - 11:08:36 PDT

  • Next message: Chris Cosentino: "[xep-support] XEP and Section 508 Usability"

    At 2004-04-12 10:31 -0700, Bob Stayton wrote:
    >I'm trying to do something I thought would be easy, but I can't seem to find
    >a way that works. I'm trying to present a set of fixed lines of text inside
    >a box. The linefeeds are preserved, and the box should just fit around the
    >|First line |
    >|Another line that is longer|
    >|Third line |
    >[this won't display properly in a proportional font. You should see the
    >right side of the box just containing the longest line of text]
    >When I add a border to the container block, the box extends all the way
    >across the page.

    Yes, because the unspecified width is the width of the parent.

    >I only want it to extend just past the longest line of
    >text. I can't set a width on the container block because I don't know what
    >the width will be since it is determined by the text.

    Very little in XSL-FO responds to the width of the text.

    >I tried a table, but ran into similar problems of the table always extending
    >the width of the page unless I specify explicit column widths, which I

    Using table-layout="auto" (which is the XSL-FO 1.0 default) would probably
    work for you, but I do not know where in the XEP priority list you will
    find the addition of support for this property. This is how I would do it
    if the feature were available to me.

    I then thought of using a side-float with a block that is bordered, and
    that works for me in XEP. Sample FO is below.

    I hope this helps.

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

       <block clear="start">
         What follows is a tightly bordered box of monospaced text.
       <float float="start">
         <block border="solid"
                white-space-collapse="false">First line
    Another line that is longer
    Third line
       <block clear="start">
         What follows is a tightly bordered box of monospaced text using a table.
       <table table-layout="auto">
             <block border="solid"
                    white-space-collapse="false">First line
    Another line that is longer
    Third line

    Public courses: Spring 2004 world tour of hands-on XSL instruction
    Each week:   Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
    Hong Kong May 17-21; Bremen Germany May 24-28; Helsinki June 14-18
    World-wide on-site corporate, govt. & user group XML/XSL training.
    G. Ken Holman       
    Crane Softwrights Ltd.
    Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
    Male Breast Cancer Awareness
    (*) To unsubscribe, send a message with words 'unsubscribe xep-support'
    in the body of the message to from the address
    you are subscribed from.
    (*) By using the Service, you expressly agree to these Terms of Service

    This archive was generated by hypermail 2.1.5 : Mon Apr 12 2004 - 11:18:46 PDT