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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


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


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


Powered by eList eXpress LLC