OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK-APPS: customizing chapter labels


Hello,

I write a <book> with <chapter>s and <appendix>es. In the printout,
chapter labels should not have the word "Chapter", but appendices'
labels should. E.g., Nth <chapter> should look as "N. Blah blah" (by
default, it is "Chapter N. Blah blah"), and Kth <appendix> should look
as "Appendix K. Blah blah".

To achieve that, I copied a block starting with "(define
($component-title$)" from print/dbcompon.dsl to my customization layer,
and replaced

        (if (string=? (element-label) "")
            (empty-sosofo)
            (literal (gentext-element-name-space (current-node))
                     (element-label)
                     (gentext-label-title-sep (gi))))

with

        (if (string=? (element-label) "")
            (empty-sosofo)
            (make sequence
              (if (equal? (gi) (normalize "appendix"))
                  (literal (gentext-element-name-space (current-node)))
                  (empty-sosofo))
              (literal (element-label)
                       (gentext-label-title-sep (gi)))))

This works, but I'm wondering whether this can be achieved with minimal
changes, without having to define the entire block (to avoid updating if that
part of the stylesheet changes). Any ideas?

DocBook 4.1, DSSSL 1.64, OpenJade 1.3.

Thanks in advance,
Baurjan.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC