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

Hi Lisa,

I use the following customization (I originally lifted this from Dan York's
customization). It creates a grey background box for programlistings in
HTML docs. If this isn't what you need, I thought it might provide a
starting framework.

 <!-- Custom 'programlisting' template that will generate a gray
      background to the item. -->
 <xsl:template match="programlisting|screen|synopsis">
   <xsl:param name="suppress-numbers" select="'0'"/>
   <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
   <xsl:variable name="id"><xsl:call-template

   <xsl:if test="@id">
     <a href="{$id}"/>

     <xsl:when test="$suppress-numbers = '0'
                     and @linenumbering = 'numbered'
                     and $use.extensions != '0'
                     and $linenumbering.extension != '0'">
       <xsl:variable name="rtf">
       <table border="0" bgcolor="#E0E0E0" width="90%">
       <pre class="{name(.)}">
         <xsl:call-template name="number.rtf.lines">
           <xsl:with-param name="rtf" select="$rtf"/>
       <table border="0" bgcolor="#E0E0E0" width="90%">
       <pre class="{name(.)}">

Dennis Grace

Information Developer
IBM Linux Technology Center
(512) 838-3937  T/L 678-3937  cell: (512)-296-7830

There are only 10 kinds of people in the world: those who understand binary
and those who don't.

                      Lisa Carey                                                                                                       
                      <lisa.carey@havok        To:       docbook-apps@lists.oasis-open.org                                             
                      .com>                    cc:                                                                                     
                                               Subject:  DOCBOOK-APPS: creating "boxed" programlistings                                
                      09/11/2002 08:44                                                                                                 

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
way of doing it?



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

Powered by eList eXpress LLC