1 Jun 2009 13:17
Re: Adding chapter numbers to section numbers
Philippe Nobili <philippe.nobili <at> cggveritas.com>
2009-06-01 11:17:03 GMT
2009-06-01 11:17:03 GMT
Hussein Shafie wrote:
Mary Anne Rosato wrote:We are creating some large, multi-chapter technical documentation, and the client requested that chapter numbers be added to the section numbers to alleviate confusion about what chapter people are in. How is this done?My answer assume that you are talking about DocBook documents. --> If you want to change what the authors see on screen, you need to customize the DocBook CSS style sheets.
Mary Anne,
We did the following changes in the CSS file used by the styled view. It adds parent numbers (chapters or appendices) to child section number and allow authors to have a better understanding of their document structure.
We hope this helps,
Best.
/*
Change the way parts, chapters and sections are numbered. Differenciate
article, where there are no chapters, and books
*/
/*
For chapters, number the sections using the parent chapter
number. (1.1, 1.2,...)
*/
chapter sect1 > title:first-child:before ,
chapter section > title:first-child:before {
content: collapser() " " simple-counter(nn-) " ";
}
chapter sect1 sect2 > title:first-child:before ,
chapter section section > title:first-child:before {
content: collapser() " " simple-counter(nnn-) " ";
}
/*
For appendices, do the same thing, but use two different
counters, as appendices are numbered using upper-latin
*/
appendix sect1 > title:first-child:before ,
appendix section > title:first-child:before {
content: collapser() " " simple-counter(n--,upper-latin) "." simple-counter(
-n-) " ";
}
appendix sect1 sect2 > title:first-child:before ,
appendix section section > title:first-child:before {
content: collapser() " " simple-counter(n---,upper-latin) "." simple-counter
(-nn-) " ";
}
-- XMLmind XML Editor Support List xmleditor-support <at> xmlmind.com http://www.xmlmind.com/mailman/listinfo/xmleditor-support
RSS Feed