[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] background colour and font of the table.
Hi Anmol,
Regarding Problem 1, I think you need to use d:tgroup and d:row in the calculation of the rownum variable.
And #EEEEEE is gray.
Regarding Problem 2, I think you need to set the text-align property to start in the table.table.properties attribute set.
Best regards,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton@xmlpress.net
On Feb 11, 2014, at 11:19 AM, anmol gupta wrote:
> Hi,
>
> Problem 1:
> I wanted alternate rows of my table to be differently colored.
> So, i added a template to my customization layer i found at
> http://www.sagehill.net/docbookxsl/TableTemplateCust.html#TableContinuedLabel
> <xsl:template name="table.row.properties">
>
> <xsl:variable name="tabstyle">
> <xsl:call-template name="tabstyle"/>
> </xsl:variable>
>
> <xsl:variable name="bgcolor">
> <xsl:call-template name="dbfo-attribute">
> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
> <xsl:with-param name="attribute" select="'bgcolor'"/>
> </xsl:call-template>
> </xsl:variable>
>
> <xsl:variable name="rownum">
> <xsl:number from="tgroup" count="row"/>
> </xsl:variable>
>
> <xsl:choose>
> <xsl:when test="$bgcolor != ''">
> <xsl:attribute name="background-color">
> <xsl:value-of select="$bgcolor"/>
> </xsl:attribute>
> </xsl:when>
> <xsl:when test="$tabstyle = 'striped'">
> <xsl:if test="$rownum mod 2 = 0">
> <xsl:attribute name="background-color">#EEEEEE</xsl:attribute>
> </xsl:if>
> </xsl:when>
> </xsl:choose>
> </xsl:template>
>
> After this i set the tabstyle attribute of the table to "striped".
> But nothing happened. What am i doing wrong? Also What colour does #EEEEEE represent?
> Problem 2:
> In the table suppose in cell there is a lot of text with long words, then alignment of text gets disturbed. I can see lot of spaces between two small words to accommodate the big word from next line like
> | abd ads sbd |
> | AnmolGupta ads as |
> It should have been like
> | abd ads sbd |
> | AnmolGupta ads as |
>
> How can i do this?
>
> Thanks and Regards,
> ..Anmol
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]