[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] setting font to terms of variablelist
great , it works perfectly ! thank you very much :) shame on me, I could have think of the .css for the html output... Regards, Marie. M.Canales.es a écrit : El Martes, 17 de Julio de 2007 10:19, Marie Sauvage - EBM WebSourcing escribió:Hi ! I would like the terms of the variablelists to look like varname. As I have many variablelists, it's heavy to add the varname markup at each variable, so I wonder if it is possible to set the font to those elements in my custom xsl stylesheet ? I would like to do it in the html output and the pdf output, which I generate via fop 0.93. I'm using DocBook stylesheets 1.72 ; I've tried to look in lists.xml but don't find if and where I could do it...Try this. For FO: <xsl:template match="varlistentry/term"> <fo:inline xsl:use-attribute-sets="monospace.properties"> <xsl:call-template name="simple.xlink"> <xsl:with-param name="content"> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </fo:inline> <xsl:choose> <xsl:when test="not(following-sibling::term)"/> <xsl:otherwise> <fo:inline><xsl:value-of select="$variablelist.term.separator"/></fo:inline> <xsl:if test="not($variablelist.term.break.after = '0')"> <fo:block/> </xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> For HTML you can customize the tagging like this: <xsl:template match="varlistentry/term"> <code class="term"> <xsl:call-template name="anchor"/> <xsl:call-template name="simple.xlink"> <xsl:with-param name="content"> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> <xsl:choose> <xsl:when test="position() = last()"/> <xsl:otherwise> <xsl:value-of select="$variablelist.term.separator"/> <xsl:if test="not($variablelist.term.break.after = '0')"> <br/> </xsl:if> </xsl:otherwise> </xsl:choose> </code> </xsl:template> or, if using a CSS file to style the HTMLs, just add this snip to it: span.term { font-family: monospace; } |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]