This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: programlisting in title's
- From: Jeff Beal <jeff dot beal at ansys dot com>
- To: 'Michael Wiedmann' <mw at miwie dot in-berlin dot de>,DocBook-Apps ML <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 05 Aug 2002 09:33:22 -0400
- Subject: RE: DOCBOOK-APPS: programlisting in title's
You can add special handling into your CSS file for programlistings
contained in titles as follows:
h5.title .programlisting {
background-color: . . .
}
"h5.title .programlisting" would read
"h5[@class='title']//*[@class='programlisting']" if you were to use an XPath
match. "h5.title > .programlisting" would be the same as
"h5[@class='title']/*[@class='programlisting']".
Jeff
-----Original Message-----
From: Michael Wiedmann [mailto:mw@miwie.in-berlin.de]
Sent: Friday, August 02, 2002 3:14 PM
To: DocBook-Apps ML
Subject: DOCBOOK-APPS: programlisting in title's
Using:
DocBook XML 4.1.2
DocBook XSL stylesheets 1.53.0
xsltproc (libxml 20423, libxslt 10019, libexslt 710)
My source document contains lot's of <programlisting>s, which get
a special background colour for HTML output using a CSS file.
<title>s get another background colour using appropriate entries in the
CSS file, this works great too - in general.
Now I have some <title>s which I'd prefer to markup with
<programlisting>, because they are kind of one- or multi-line source code.
In such cases I get HTML output like:
<div><h5 class="title">5.1.1.1. <pre class="programlisting">
...
</pre></h5></div>
This conflicts somehow with the two background colours I have in my
CSS file (for 'h5.title' and '.programlisting') and the output is
not readable.
- is there a better way to markup my source document?
- is there a better way to solve this in my CSS file?
TIA
Michael
--
mw@miwie.in-berlin.de http://www.miwie.org
mw@miwie.org