This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: creating "boxed" programlistings
- From: Jeff Beal <jeff dot beal at ansys dot com>
- To: 'Lisa Carey' <lisa dot carey at havok dot com>, docbook-apps at lists dot oasis-open dot org
- Date: Wed, 11 Sep 2002 11:26:33 -0400
- Subject: RE: DOCBOOK-APPS: creating "boxed" programlistings
You can use the monospace.verbatim.properties attribute-set to add
additional FO attributes on your programlistings. (It will also affect
<screen>, <literallayout>, and other "preformatted" block-level elements)
This example will create a heavy blue border around the programlistings:
<xsl:attribute-set name="monospace.verbatim.properties"
use-attribute-sets="verbatim.properties">
<xsl:attribute name="font-family">
<xsl:value-of select="$monospace.font.family"/>
</xsl:attribute>
<xsl:attribute name="font-size">
<xsl:value-of select="$body.font.master * 0.9"/>
<xsl:text>pt</xsl:text>
</xsl:attribute>
<xsl:attribute name="border-color">#0000FF</xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="border-width">heavy</xsl:attribute>
</xsl:attribute-set>
You can also add background color (<xsl:attribute
name="background-color">#F0F0F0</xsl:attribute>) or any other attribute you
want.
Jeff
-----Original Message-----
From: Lisa Carey [mailto:lisa.carey@havok.com]
Sent: Wednesday, September 11, 2002 9:45 AM
To: docbook-apps@lists.oasis-open.org
Subject: DOCBOOK-APPS: creating "boxed" programlistings
Hi folks,
I'm currently using the docbook 1.50 stylesheets (had problems with later
versions, which I hope will be fixed in 1.54.1 - downloading it now!) and
the latest version of FOP. I'm hoping to get the code samples in my
programlistings to each display in a text box, and thought that I could
probably get the effect I want by putting them each in a single-cell table.
Has anyone else tried this successfully, and is there a more straightforward
way of doing it?
cheers,
Lisa