OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook] equation border and background color


Hi Mansour,
Your last try was close, and the missing title can be restored with a call 
to the template named formal.object.heading (which is in fo/formal.xsl).

<xsl:template match="equation">
    <xsl:variable name="placement">before</xsl:variable>
    <xsl:if test="$placement = 'before'">
      <xsl:call-template name="formal.object.heading">
        <xsl:with-param name="placement" select="$placement"/>
      </xsl:call-template>
    </xsl:if>
   <fo:block padding="5pt">
     <xsl:attribute name="border">0.5pt solid blue</xsl:attribute>
       <xsl:apply-templates />
    </fo:block>
    <xsl:if test="$placement != 'before'">
      <xsl:call-template name="formal.object.heading">
        <xsl:with-param name="placement" select="$placement"/>
      </xsl:call-template>
    </xsl:if>
</xsl:template>

If you want your title to appear after the equation, then change the 
'placement' variable to 'after'.

 Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Mansour" <mansour77@yahoo.com>
To: <docbook@lists.oasis-open.org>
Sent: Wednesday, January 09, 2008 11:53 AM
Subject: Re: [docbook] equation border and background color


> Is there answer to this question ??
>
>
> Mansour wrote:
>> I am trying to put a border around the equations with background color. I 
>> need to align the equation in the center. I don't want the title inside 
>> the borders. I have tried this :
>> http://sources.redhat.com/ml/docbook/2003-07/msg00198.html
>>
>> <xsl:attribute-set name="equation.properties" 
>> use-attribute-sets="formal.object.properties">
>>         <xsl:attribute name="border-color">#000000</xsl:attribute>
>>         <xsl:attribute name="border-style">solid</xsl:attribute>
>>         <xsl:attribute name="border-width">1px</xsl:attribute>
>>         <xsl:attribute name="padding">1em</xsl:attribute>
>>         <xsl:attribute name="background-color">#dddddd</xsl:attribute>
>> </xsl:attribute-set>
>>
>> This surrounded the whole thing, the equation and the title.
>> Then from this page http://www.dpawson.co.uk/docbook/styling/params.html 
>> I tried to use :
>>
>> <xsl:attribute-set name="shade.verbatim.properties">
>>   *border*-color="thin black ridge"
>>   background-color="silver"
>> </xsl:attribute-set>
>>
>> But nothing happened.
>> From this page http://www.sagehill.net/docbookxsl/AddNewTemplate.html I 
>> used :
>>        <xsl:template match="equation">
>>                <fo:block padding="5pt">
>>                        <xsl:attribute name="border">0.5pt solid 
>> blue</xsl:attribute>
>>                        <xsl:apply-templates />
>>                </fo:block>
>>        </xsl:template>
>>
>> The title disappeared!
>> I used <xsl:apply-imports />. again the whole thing is wrapped inside the 
>> border.
>> Is there a way to get this done and align the block in the middle of the 
>> page?
>>
>> Thank you.
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
>
>
> 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]