This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
customizing chapter labels
- From: Baurjan Ismagulov <ibr at gantek dot com>
- To: docbook-apps at lists dot oasis-open dot org
- Date: Fri, 16 Nov 2001 21:43:56 +0200
- Subject: DOCBOOK-APPS: customizing chapter labels
- List-id: <docbook-apps.lists.oasis-open.org>
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.
----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>