This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] [xsl stylesheets] reducing font size in formalparas?


On Mon, Nov 24, 2003 at 09:27:48PM +0100, Charles Plessy wrote:
> Hello,
> 
> I am using DocBook XML/XSL to write my biology thesis, and I use
> formalparas in caprtions for the figure legends. To make them clearly
> distiguishable from the text, I have set their font to sans-serif,
> however it looks bigger than the original one.
> 
> I failed to modify my customisation layer to reduce the size. Could
> any of you give me a hint?
> 
> 
> <xsl:param name="toto">
>   <xsl:value-of select="$body.font.master * 0.8"/>
>   <xsl:text>pt</xsl:text>
> </xsl:param>
> 
> <!-- toto is the french foo -->
> 
> <xsl:template match="formalpara/para">
>   <fo:block font-family="sans-serif" font-size="$toto">
>     <xsl:apply-templates/>
>   </fo:block>
> </xsl:template>
> 
> <!-- changes the font family but not its size :(( -->

If you peek in your FO output, you will see that you are
getting the literal fontsize="$toto". That is because you
need to use the fontsize="{$toto}" syntax, which is called
an "attribute value template", to evaluate a variable
inside a literal result element.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]