Re: [xep-support] Center tables horizontally

From: rondeelvantrigt (rondeelvantrigt@matterhorn.demon.nl)
Date: Fri Feb 21 2003 - 11:19:58 PST

  • Next message: rondeelvantrigt: "[xep-support] Footnote reference spacing"

    Thanks! The adding of "pt" works (makes more sense, indeed, to add a
    value..),
     except for the "proportional-column-width", where the same code does not
    work any more.

    XML:
    <colspec colname="col1" colwidth="72*"/>
    <colspec colname="col2" colwidth="134*"/>

    XSL:
      <xsl:if test="contains($colwidth, '*')">
        <xsl:text>proportional-column-width(</xsl:text>
        <xsl:value-of select="substring-before($colwidth, '*')"/>
        <xsl:text>)</xsl:text>
      </xsl:if>

    Resultant FO:
    <fo:table table-omit-header-at-break="false"
    table-omit-footer-at-break="false" empty-cells="show"
    keep-with-previous="always" keep-together.within-page="always"
    padding-top="3pt" border-bottom-width="0.4pt" border-bottom-style="solid"
    padding-bottom="3pt" text-align="center" space-after="24pt" width="NaNpt"
    start-indent="(323pt - NaNpt)div 2" table-layout="fixed">
    <fo:table-column column-number="1"
    column-width="proportional-column-width(72)"/>
    <fo:table-column column-number="2"
    column-width="proportional-column-width(134)"/>

    I guess I need to create another variable to specify the sum of proportional
    column widths?

    ----- Original Message -----
    From: Nikolai Grigoriev <grig@renderx.com>
    To: <xep-support@renderx.com>
    Sent: Friday, February 21, 2003 8:34 AM
    Subject: Re: [xep-support] Center tables horizontally

    > Hi Els,
    >
    > > However, with the 3.2 version, I get the following warning:
    > > "{?Bad attribute start-indent: Attribute type mismatch:
    > > start-indent cannot have value '161.5' of type Real number}"
    >
    > It says that a length must bear a unit specifier. Do you mean
    > 161.5 pt? 161.5 px? 161.5 mm?
    >
    > > What has changed between the XEP versions?
    >
    > Expression syntax checks have become more strict. In XEP 3.2,
    > the only length value that does not require unit specifier is 0.
    > All other lengths should be expressed in pt, pc, in, mm, cm, or px.
    >
    > > or rather: what can I do to get the divide functionality
    > > to center tables horizontally?
    >
    > Your code is OK; but you should care to get the correct dimensionality.
    > Something like this:
    >
    > <xsl:attribute name="start-indent">
    > (323pt - <xsl:value-of select="$totalcolwidth"/>pt) div 2
    > </xsl:attribute>
    >
    > Regards,
    > Nikolai Grigoriev
    > RenderX
    > -------------------
    > (*) 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/tos.html

    -------------------
    (*) 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/tos.html



    This archive was generated by hypermail 2.1.5 : Fri Feb 21 2003 - 11:17:19 PST