For the TOC you should see how the counters toc-section1 and toc-chapter-and-sections are used in the p-numbering-deep.css file (similar to section1 and chapter-and-section counters that are used for titles in the main content). The default numbering CSS file is located in:
OXYGEN_INSTALL_DIR/DITAplugins/com.oxygenxml.pdf.css/css/print/p-numbering-deep.css
If you set an outputclass attribute on a topicref in the map, it is copied in the TOC section of the merged map and also on the element of the referred topic, in the main content. In this way you can mark both the topicref and the content of the chapter with special numbering. Let's assume we use 'zero-numbering' for a chapter topicref in the map. Then, you need to cancel incrementation for the first section from the marked chapter.
I would use the following selectors to solve both TOC and content numbering (they affect the headers and footers, bookmarks tree, because the counters are automatically used in all these places)
Code: Select all
*[class ~= "map/map"][numbering^='deep']
*[class ~= "map/topicref"][is-chapter]:not([is-part])[outputclass ~= 'zero-numbering']
> *[class ~= "map/topicmeta"] + *[class ~= "map/topicref"]{
counter-increment:none;
}
*[class ~= "map/map"][numbering^='deep']
*[class ~= "topic/topic"][is-chapter]:not([is-part])[outputclass ~= 'zero-numbering'] > *[class ~= "topic/topic"] {
counter-increment:none;
}
*[class ~= "map/map"][numbering^='deep']
*[class ~= "topic/topic"][is-chapter]:not([is-part])[outputclass ~= 'zero-numbering'] > *[class ~= "topic/topic"] + *[class ~= "topic/topic"] {
counter-increment:section1 chapter-and-sections;
}
Try this CSS on several map structures and let us know if it worked.
Many regards,
Dan