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


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: DSSSL customization


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


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