This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook] Customization pdf and programlisting


The attribute set shade.verbatim.properties can be
customized to apply the properties you need.  You shouldn't
need to customize the template code to change the color.

Try this in your fo customization layer:

<xsl:attribute-set name="shade.verbatim.properties">
   border-color="thin black ridge"
   background-color="silver"
</xsl:attribute-set>


Attribute sets are merged, so these values should override
the default background color and add the border color.

See this reference for more information on customizing
attribute sets:

http://www.sagehill.net/xml/docbookxsl/CustomMethods.html#AttributeSets


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com


On Mon, May 05, 2003 at 09:45:51AM +0200, thierry templier wrote:
> Hi,
> 
> I want to customize the programlisting with a
> background color.
> 
> I put my modifications in the xsl file verbatim.xsl
> and in the template:
> <xsl:template match="programlisting|screen|synopsis">
> 
> These are my modifications:
> 
>   <fo:block wrap-option='no-wrap'
>             white-space-collapse='false'
>             linefeed-treatment="preserve"
>            
> xsl:use-attribute-sets="monospace.verbatim.properties"
>             break-after="page"
>             border-color="thin black ridge"
>             background-color="silver">
>     <xsl:choose>
>       <xsl:when test="$shade.verbatim != 0">
>         <fo:block space-before="0pt" space-after="0pt"
>                   border-color="thin black ridge"
>                   background-color="silver"
>                  
> xsl:use-attribute-sets="shade.verbatim.style">
>           <xsl:copy-of select="$content"/>
>         </fo:block>
> 
> But when the pdf makes a new page in a program
> listing, it doesn't go to the next page.
> 
> Is anybody know how to solve this problem?
> Thanks for your help.
> Thierry
>       </xsl:when>
>       <xsl:otherwise>
>         <xsl:copy-of select="$content"/>
>       </xsl:otherwise>
>     </xsl:choose>
>   </fo:block>
> 
> 
> 
> ___________________________________________________________
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-help@lists.oasis-open.org
> 
> 

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]