Bob, Thanks - I added use-attribute sets to table.properties and that worked: <xsl:attribute-set name="table.properties" use-attribute-sets="formal.title.properties">
Dave Gardiner -----Original Message----- From: "Bob Stayton" <b...@sagehill.net> To: "redlettucemail" <redlettucem...@mailscan.acenet.net.au>, <docbook-apps@lists.oasis-open.org> Date: Sat, 1 Oct 2011 11:34:53 -0700 Subject: Re: [docbook-apps] Modifying line-height for table title Hi Dave, In order to make the titles of figures, tables, examples consistent in format, there is a separate attribute-set for them named 'formal.title.properties'. See this reference for details: http://www.sagehill.net/docbookxsl/PrintTableStyles.html#TableTitle [http://www.sagehill.net/docbookxsl/PrintTableStyles.html#TableTitle] jThat att-set does not actually set the line-height property, so I think the title is inheriting it from the root.properties attribute set, which sets its value to 'normal'. Most FO processors interpret 'normal' as 1.2em. Bob Stayton Sagehill Enterprises b...@sagehill.net [mailto:b...@sagehill.net] ----- Original Message ----- From: redlettucemail [mailto:redlettucem...@mailscan.acenet.net.au] To: docbook-apps@lists.oasis-open.org [mailto:docbook-apps@lists.oasis-open.org] Sent: Thursday, September 29, 2011 5:54 AM Subject: [docbook-apps] Modifying line-height for table title 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:param> <xsl:attribute-setname="table.properties"><xsl:attributename="keep-together.within-column">auto</xsl:attribute><!-- allows tables tobreak ('auto') or not break ('always') across pages --><xsl:attributename="background-color"></xsl:attribute><!-- specify web colour (e.g. #e0e0e0) *****works 28/9/11 --><xsl:attributename="hyphenate">false</xsl:attribute><!--hyphenation of text;default: false (do not hyphenate). OPTIONS: false, true--><xsl:attributename="text-align">justify</xsl:attribute><!--alignment of tabletitle. OPTIONS: left, justify *****works 28/9/11--><xsl:attributename="margin-left">0pt</xsl:attribute><!--indent from leftmargin*****works 28/9/11--><xsl:attributename="margin-right">0pt</xsl:attribute><!--indent from rightmargin*****works 28/9/11--><xsl:attributename="margin-top">0pt</xsl:attribute><!--top margin*****--><xsl:attributename="margin-bottom">10pt</xsl:attribute><!--add leadingafter a table (including after footnotes), to adjust text onpage*****works 28/9/11--><!--padding inside table region*****works 20/9/11--><xsl:attributename="padding-left">0pt</xsl:attribute><xsl:attributename="padding-right">0pt</xsl:attribute><xsl:attributename="padding-top">0pt</xsl:attribute><xsl:attributename="padding-bottom">0pt</xsl:attribute><xsl:attributename="line-height"><xsl:value-ofselect="$tabletitlelineheight"/></xsl:attribute></xsl:attribute-set> <xsl:attribute-setname="table.table.properties"><xsl:attributename="line-height"><xsl:value-ofselect="$graphiclineheight"/></xsl:attribute><xsl:attributename="background-color">#e0e0e0</xsl:attribute><!-- specify web colour(e.g. #e0e0e0) *****--><xsl:attributename="font-size"><xsl:choose><xsl:whentest="ancestor-or-self::d:informaltable"><xsl:value-ofselect="$body.font.master * 1"/><xsl:text>pt</xsl:text><!-- informal tables have same font size as body text --></xsl:when><xsl:otherwise><xsl:value-ofselect="$body.font.master * 0.8"/><xsl:text>pt</xsl:text><!-- small font for allformal tables --></xsl:otherwise></xsl:choose></xsl:attribute><xsl:attributename="text-align">left</xsl:attribute><xsl:attributename="border-after-width.conditionality">retain</xsl:attribute><!-- displaysbottom border for a table that breaks across to the next page; options: discard [default], retain --><xsl:attributename="border-before-width.conditionality">retain</xsl:attribute><!-- displaystop border for a table that breaks across from the previous page; options: discard [default], retain --><xsl:attributename="hyphenate">false</xsl:attribute><!-- hyphenation intables; 'true' means turn on hyphenation --><xsl:attributename="border-collapse">collapse</xsl:attribute><!-- merge borderstogether for adjacent cells --></xsl:attribute-set> And in “graphics.xsl”: <xsl:paramname="graphiclineheight"><xsl:choose><xsl:when test ="$graphicfontstyle='sans-serif'"><xsl:value-ofselect="$line-height * 1"/></xsl:when><xsl:otherwise><xsl:value-ofselect="$line-height"/></xsl:otherwise></xsl:choose></xsl:param>See attached for sample FO output. Thanks,Dave Gardiner --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org