Restricting Numbering to the first 2 levels of headings
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 5
- Joined: Thu Jul 28, 2022 9:03 am
Restricting Numbering to the first 2 levels of headings
Post by digital_nomad »
Is there any way to set the numbering to appear only for level 1 and level 2 headings and not for other headings? What changes in css will be needed for this?
I need this for PDF transformation. Currently, the numbering is set to deep, which adds numbers for all topics in the map.
I need this for PDF transformation. Currently, the numbering is set to deep, which adds numbers for all topics in the map.
-
- Posts: 566
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Restricting Numbering to the first 2 levels of headings
Post by julien_lacour »
Hello,
I assume you are using DITA Map PDF - based on HTML5 & CSS transformation scenario, then you can use the following rules:
As a side note, you can debug the CSS in your favorite browser to see all the rules applied on a given HTML element and create additional rules to modify these elements style.
Regards,
Julien
I assume you are using DITA Map PDF - based on HTML5 & CSS transformation scenario, then you can use the following rules:
Code: Select all
/* Table of Contents */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "map/topicref"][is-chapter]:not([is-part]) > *[class ~= "map/topicref"] > *[class ~= "map/topicref"] > *[class ~= "map/topicmeta"]:before {
content: none;
}
/* Content */
*[class ~= "map/map"][numbering ^= 'deep'] *[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/topic"] *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before {
content: none;
}
Regards,
Julien
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service