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 markup question -- sourcecode


On Thu, Feb 07, 2002 at 01:55:03PM -0800, Ben Schepens wrote:
> Is it possible to properly mark up source code in a docbook file so that
> meinproc will produce html with the source code in a 'greybar' or colored
> background?
> 
> I have included 2 examples of HTML files that have the look I would like to
> get?

This is most easily done with a CSS stylesheet associated
with your HTML output. You can do that with the
'html.stylesheet' parameter. If you look in the generated
HTML output, you'll see each element is output in a <div
class="elementname">, which makes writing css stylesheets
that style specific elements easy.  If you put your source
code in <programlisting> elements, and create a CSS
stylesheet that styles div.programlisting, then you can get
what you want.


Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
Caldera International, Inc.                 fax:   (831) 429-1887
                                            email: bobs@caldera.com


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