On 02/18/2011 06:49 PM, Justin Z wrote: > Can somebody please point me to the file(s) that control > Part/Chapter/Section/... numbering for DocBook 5.0 xml docs in the wysiwyg? > > Background: > > I'm trying to use book "Parts" as well as chapters, sections, etc. But > the Chapter numbers are reset inside of each Part. I'd prefer to have > the chapter number pickup after the last number use in the previous Part. > > Part I > chapter 1 > section 1.1 > chapter 2 > Part II > chapter 3 > chapter 4 > > rather than > > Part I > chapter 1 > section 1.1 > chapter 2 > Part II > chapter 1 > chapter 2 > > For V4.5 I followed the advice in the following post -- it says to > modify collapsible.imp in addon/config/docbook/css/: > http://www.mail-archive.com/[email protected]/msg00147.html > (I had to use a slight variation of this to get numbering working > properly with V4.5)
If you got it to work in DocBook V4.5, then you'll get it to work for DocBook v5. You just need to keep in mind that: [1] All elements in DocBook v5 have a namespace -- http://docbook.org/ns/docbook -- while DocBook v4 elements have no namespace. [2] XPath 1 has no concept of default namespace. All in all, something like: --- @namespace "http://docbook.org/ns/docbook"; ... chapter > title:first-child:before { content: collapser() " Chapter " label(xpath, "1 + count(../preceding::chapter)") ": " ; } --- cannot work for DocBook v5. While something like: --- @namespace db5 "http://docbook.org/ns/docbook"; ... chapter > title:first-child:before { content: collapser() " Chapter " label(xpath, "1 + count(../preceding::db5:chapter)") ": " ; } --- should work fine. Note that this kind of change will force you to copy docbook/css/collapsible.imp as docbook5/css/collapsible5.imp, to modify the copy as described above and then to import it in docbook5.css: @import url(collapsible5.imp); > > However this trick causes docbook v5.0 to have "1" for all chapter > numbers (sections numbers are all 1.x.y.z... throughout since all the > Chapters are 1), and I haven't been able to tweak it to my need. (Note > that converting to PDF & Docx produces correctly numbered chapters, so > this seems to affect the wysiwyg only) > > Returning to the stock collapsible.imp results in the same numbering for > both V4.5 and V5.0 -- within each Part the first chapter is reset to 1. > > So, there doesn't seem to be a sister file in the docbook5 tree. And > although in dockbook[4.x]/ tree there are other .imp files, tweak them > doesn't help. > --- PS: This level of support is normally reserved to the customers of XMLmind XML Editor Professional Edition. See "Policy of the xmleditor-support public mailing list" in http://www.xmlmind.com/xmleditor/support.html Therefore, if you have more questions like the above one, please identify yourself as a customer (for example, by using a registered email address) OR if you work for a non-profit organization or an open source project, we'll be glad to offer you a free Professional Edition license. -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

