docbook-apps

Modifying line-height for table title

  • 1.  Modifying line-height for table title

    Posted 09-29-2011 12:55
      |   view attached
    I have set a parameter for line-height
    (“graphiclineheight”=
    1) that works for all text within formal objects - figure, example and the
    body
    of tables (i.e. text within table.table). This parameter though doesn’t
    modify
    the line-height for d:table/d:title. I looked at the FO output and it seems
    that d:table/d:title is picking up the line-height for body text, which is
    1.2.
    I have experimented with adding a specific smaller line-height (0.8) within
    table.properties then the ‘graphiclineheight’ one within
    table.table.properties,
    but this only modifies the line height of footnotes which I know is modified

    by
    attributes within table.properties – but the table title inexplicably
    remains
    unchanged.


    I’ve tried to find some relevant fo:block code
    within
    tables.xsl and formal.xsl, but I can’t see what else to modify.


    Here are my customisations that incorporate
    line-height for
    tables:


    In “tables.xsl”:

    <xsl:paramname="tabletitlelineheight">0.8


    <xsl:attribute-setname="table.properties"><xsl:attributename="keep-together.within-column">auto<xsl:attributename="background-color"><xsl:attributename="hyphenate">false<xsl:attributename="text-align">justify<xsl:attributename="margin-left">0pt<xsl:attributename="margin-right">0pt<xsl:attributename="margin-top">0pt<xsl:attributename="margin-bottom">10pt<xsl:attributename="padding-left">0pt<xsl:attributename="padding-right">0pt<xsl:attributename="padding-top">0pt<xsl:attributename="padding-bottom">0pt<xsl:attributename="line-height"><xsl:value-ofselect="$tabletitlelineheight"></xsl:value-ofselect="$tabletitlelineheight">


    <xsl:attribute-setname="table.table.properties"><xsl:attributename="line-height"><xsl:value-ofselect="$graphiclineheight"></xsl:value-ofselect="$graphiclineheight"><xsl:attributename="background-color">#e0e0e0<xsl:attributename="font-size"><xsl:choose>
    <xsl:whentest="ancestor-or-self::d:informaltable"><xsl:value-ofselect="$body.font.master></xsl:value-ofselect="$body.font.master>
    * 1"/><xsl:text>pt</xsl:text>

    <xsl:otherwise><xsl:value-ofselect="$body.font.master *=""></xsl:value-ofselect="$body.font.master>
    0.8"/><xsl:text>pt</xsl:text>
    </xsl:otherwise></xsl:whentest="ancestor-or-self::d:informaltable"></xsl:choose><xsl:attributename="text-align">left<xsl:attributename="border-after-width.conditionality">retain<xsl:attributename="border-before-width.conditionality">retain<xsl:attributename="hyphenate">false<xsl:attributename="border-collapse">collapse



    And in “graphics.xsl”:

    <xsl:paramname="graphiclineheight"><xsl:choose><xsl:when></xsl:when>
    test
    ="$graphicfontstyle='sans-serif'"><xsl:value-ofselect="$line-height *=""></xsl:value-ofselect="$line-height>
    1"/><xsl:otherwise>
    <xsl:value-ofselect="$line-height"></xsl:value-ofselect="$line-height"></xsl:otherwise></xsl:choose>

    See attached for sample FO output.
    Thanks,

    Dave Gardiner

    </xsl:paramname="graphiclineheight"></xsl:attributename="border-collapse"></xsl:attributename="hyphenate"></xsl:attributename="border-before-width.conditionality"></xsl:attributename="border-after-width.conditionality"></xsl:attributename="text-align"></xsl:attributename="font-size"></xsl:attributename="background-color"></xsl:attributename="line-height"></xsl:attribute-setname="table.table.properties"></xsl:attributename="line-height"></xsl:attributename="padding-bottom"></xsl:attributename="padding-top"></xsl:attributename="padding-right"></xsl:attributename="padding-left"></xsl:attributename="margin-bottom"></xsl:attributename="margin-top"></xsl:attributename="margin-right"></xsl:attributename="margin-left"></xsl:attributename="text-align"></xsl:attributename="hyphenate"></xsl:attributename="background-color"></xsl:attributename="keep-together.within-column"></xsl:attribute-setname="table.properties"></xsl:paramname="tabletitlelineheight">

    Attachment(s)

    doc
    Table title line height.doc   476 KB 1 version