This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: DSSSL customization
- From: Murray Stokely <murray at stokely dot org>
- To: Tim =?unknown-8bit?Q?Terleg=E5rd?= <tim at se dot linux dot org>
- Cc: docbook-apps at lists dot oasis-open dot org, timte878 at student dot liu dot se
- Date: Sun, 20 Jan 2002 06:56:38 -0800
- Subject: Re: DOCBOOK-APPS: DSSSL customization
- References: <200201201444.g0KEi6b27730@d1o982.telia.com>
On Sun, Jan 20, 2002 at 03:42:24PM +0100, Tim Terlegrd wrote:
> Hi, I've managed to make some customization of my document, like changing
> body and subtitle font and changing the depth of headlines shown in the Toc
> as well as numbering all sections. I did all this by myself ;-)
> But there are a few more settings I wanna do that I can't manage.
>
> 1. A headline says "1.1. Introduction" - can I remove the last dot from
> "1.1." ? I don't think it should be there...
Sure. If you grep through the DocBook modular stylesheets, you'll see
that en-label-title-sep is the function you are looking for. You can
override this in your local stylesheet like this :
(define (local-en-label-title-sep)
(list
(list (normalize "warning") ": ")
(list (normalize "caution") ": ")
(list (normalize "chapter") " ")
(list (normalize "sect1") " ")
(list (normalize "sect2") " ")
(list (normalize "sect3") " ")
(list (normalize "sect4") " ")
(list (normalize "sect5") " ")
))
I agree that this looks wrong with a period after the number, so we've
added this customization to the FreeBSD Doc Project CVS tree.
> 2. How can I choose not to have numbers on <sect4> headlines?
We also chose to do this. I couldn't see a real straight forward
way to customize this in the stylesheets, so I just added a variable
to define how many levels should have numbers, and then I rewrote the
($section-title$) function to only print the numbers for section
levels lower than this value :
(define max-section-level-labels
(if minimal-section-labels 3 10))
The ($section-title$) function is pretty long, so I'll point you to
CVSweb for the full text of the stylesheet :
http://www.freebsd.org/cgi/cvsweb.cgi/doc/en_US.ISO8859-1/share/sgml/freebsd.dsl?rev=1.14&content-type=text/x-cvsweb-markup
> 3. The subtitle, how can I make it non-bold and change the font size? How can
> I make a linebreak in it?
Override that element in your local stylesheet, and add the
necessary formatting changes. Look through Norm's modular DocBook
stylesheets for examples.
- Murray