This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: DocBook markup question -- sourcecode
- From: Bob Stayton <bobs at caldera dot com>
- To: Ben Schepens <schepens at mindspring dot com>, docbook at lists dot oasis-open dot org
- Date: Thu, 07 Feb 2002 11:24:35 -0800
- Subject: Re: DOCBOOK: DocBook markup question -- sourcecode
- References: <001501c1b022$1c3952e0$0201a8c0@hephaestus>
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