Next in thread → Next in month →

RE: [docbook-apps] A template for <programlisting>

From
Jeff Powanda <>
Date
2007-09-14T16:23:15+00:00
ID
Thread
RE: [docbook-apps] A template for <programlisting>
You can set the background-color attribute
for <programlisting/>. The background color will extend as wide as the
block containing it:

 

<!-- Used in programlisting -->

      <xsl:param name="monospace.font.family" select="'monospace'"/>

      <xsl:attribute-set name="monospace.properties">

        <xsl:attribute name="font-family">

          <xsl:value-of select="$monospace.font.family"/>

        </xsl:attribute>

        <xsl:attribute name="font-size">

            <xsl:choose>

                <xsl:when test="self::programlisting">8.5pt</xsl:when>

                <xsl:otherwise>9.5pt</xsl:otherwise>

              </xsl:choose>

        </xsl:attribute>

        <xsl:attribute
name="background-color">        

              <xsl:choose>

                <xsl:when
test="self::programlisting">AliceBlue</xsl:when>

                <xsl:otherwise>White</xsl:otherwise>

              </xsl:choose>           

        </xsl:attribute>                  

        <xsl:attribute name="line-height">normal</xsl:attribute>

      </xsl:attribute-set>    

 

Regards,

Jeff Powanda

From: Pedro Pastor
[mailto:] 

Sent: Friday, September 14, 2007
9:13 AM

To:


Cc: 'Pedro Pastor'

Subject: [docbook-apps] A template
for <programlisting>

 

Some weeks ago I think I saw a message showing a
customization template for <programlisting/> that provides a kind of
rectangular coloured block as a background for this element. I’ve been browsing
the archives but I couldn’t find it. 

 

If this is not a produce of my imagination: Could
anybody provide me that information? Or, maybe, if there is somebody not
bothering sharing this code (just for HTML would be OK).

 

Regards,

 

Pedro

 

No virus found in this outgoing message.

Checked by AVG Free Edition.

Version: 7.5.487 / Virus Database: 269.13.18/1007 - Release Date: 13/09/2007 21:48
Next in thread → Next in month →