Page 1 of 1
How to reset chapter number for the first topic?
Posted: Thu Jan 23, 2020 9:24 am
by santhudev123
We want the first chapter number as "Chapter 4" in the project, as we are splitting the whole project of 8 chapters into three parts as requested by customer. How to reset the chapter number by using CSS, Below is the code that we are using.
Code: Select all
*
[class ~= "map/map"] {
counter-reset:chapter 4;
}
*[class ~= "map/map"] *[class ~= "topic/topic"][is-chapter]:not([is-part]) {
counter-increment: chapter;
counter-reset:section1;
}
Re: How to reset chapter number for the first topic?
Posted: Thu Jan 23, 2020 12:17 pm
by Costin
Hello,
If you are using shallow numbering, you should try:
Code: Select all
*[class ~= "map/map"] {
counter-reset: chapter 3
toc-chapter 3
figcount 0
tablecount 0
}
*[class ~= "topic/topic"][is-chapter]:not([is-part]):not([is-index]){
counter-increment:chapter toc-chapter;
counter-reset: section1;
}
The built-in CSS files that manage the numbering in the PDF output are located in Oxygen_install_dir\frameworks\dita\DITA-OT3.x\plugins\com.oxygenxml.pdf.css\css\print
Look for "p-numbering-" ones and use them as a starting point, performing your customization based starting from the CSS corresponding to the numbering type you are using (shallow/deep/etc.)
I hope this helps.
Regards,
Costin
Re: How to reset chapter number for the first topic?
Posted: Thu Jan 23, 2020 1:20 pm
by santhudev123
Hello Costin,
Thank you for the reply, it worked
Regards
Santhosh M