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]

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.

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


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