Want chapter numbering to continue through bibliolist and glossary

toolie
Posts: 14
Joined: Thu Jan 29, 2015 2:40 am

Want chapter numbering to continue through bibliolist and glossary

Post by toolie » Tue Jul 07, 2020 2:22 am

I was trying to get page numbering to continue from chapters into the backmatter, and cannot figure out how to do that. I'm using the HTML/CSS/PDF transformation, and it's just simpler to have continuous numbering in this 32-page PDF.

This was my attempt, but clearly it's not working.

Code: Select all

@page bilio-page {
    @bottom-center {
        content: counter(page, decimal)
    }
}
*[class ~= "map/topicref"][topicrefclass ~= "bookmap/bibliolist"] {
	page: bilio-page;
}

@page glossary-page {
    @bottom-center {
        content: counter(page, decimal)
    }
}
*[class ~= "map/topicref"][topicrefclass ~= "bookmap/glossarylist"] {
	page: glossary-page;
}
Can you correct this so the page numbering for Chapters continues through the Backmatter?

Thanks!
Toolie Garner

julien_lacour
Posts: 138
Joined: Wed Oct 16, 2019 3:47 pm

Re: Want chapter numbering to continue through bibliolist and glossary

Post by julien_lacour » Tue Jul 07, 2020 1:13 pm

Hello,

Indeed there is a reset on the page counter at the beginning of the backmatter.
You can change this behavior by following this How To.

Regards,
Julien

toolie
Posts: 14
Joined: Thu Jan 29, 2015 2:40 am

Re: Want chapter numbering to continue through bibliolist and glossary

Post by toolie » Thu Jul 16, 2020 2:34 am

Thank you Julien for your prompt response. I am using a Bookmap rather than a DITAMap. I don't actually have an index; as you can see I start with a Bibliolist and then have a Glossary in my backmatter.

I checked the merged HTML and I don't have the tag index/groups at all. Here's what the first lines look like:

Code: Select all

<div class="- map/topicref bookmap/backmatter topicref backmatter">
                  <div class="- map/topicref bookmap/booklists topicref booklists">
                        <div href="#unique_8" type="topic" class="- map/topicref bookmap/bibliolist topicref bibliolist">
Can you advise how to get continuous numbering through those last to sections (bibliography and glossary)?

Thanks!
Toolie Garner

julien_lacour
Posts: 138
Joined: Wed Oct 16, 2019 3:47 pm

Re: Want chapter numbering to continue through bibliolist and glossary

Post by julien_lacour » Thu Jul 16, 2020 11:49 am

Hello,

I tried on my side with Oxygen Editor 22.1 and I did not reproduce the problem, the default transformation does not reset the page counter inside my PDF.
Please check inside your CSS customization there is no additional "counter-reset: page" on another element which also matches the bibliolist.

Regards,
Julien

toolie
Posts: 14
Joined: Thu Jan 29, 2015 2:40 am

Re: Want chapter numbering to continue through bibliolist and glossary

Post by toolie » Sun Jul 19, 2020 1:55 am

This piece of code is in my CSS file. I had found it elsewhere on the Internet, and that did force the numbering from the start of the PDF. But the number stops at the backmatter.

Code: Select all

/* Continuous numbering */
*[class ~= "map/map"] > *[class ~= "toc/toc"] + *[class ~= "topic/topic"],
*[class ~= "index/groups"] {
    counter-reset: none;
}
Remember, I'm using a bookmap. Again, I don't have any tags in my HTML output that correspond to "index/groups". Also, that code doesn't help the numbering continue into my backmatter. I can send you the entire CSS file for your inspection if you like.
Toolie Garner

julien_lacour
Posts: 138
Joined: Wed Oct 16, 2019 3:47 pm

Re: Want chapter numbering to continue through bibliolist and glossary

Post by julien_lacour » Mon Jul 20, 2020 4:02 pm

Hello,

Could you please send us the CSS customization and the bookmap (at least the ditamap file with the bibliolist and the glossarylist) at support@oxygenxml.com
Could you also indicate which version of Oxygen you are currently using?

Regards,
Julien

toolie
Posts: 14
Joined: Thu Jan 29, 2015 2:40 am

Re: Want chapter numbering to continue through bibliolist and glossary

Post by toolie » Fri Sep 04, 2020 1:45 am

My apologies for the delay Julien, I've just emailed you the bookmap, .OPT file and the CSS file for your perusal.

Thanks so much!
Toolie Garner

Dan
Posts: 466
Joined: Mon Feb 03, 2003 10:56 am

Re: Want chapter numbering to continue through bibliolist and glossary

Post by Dan » Sun Sep 06, 2020 9:39 am

Depending on the args.css numbering parameter, one of the CSSs is used:

OXYGEN_INSTALL_DIR/DITA-OT3X/plugins/com.oxygenxml.pdf.css/css/print/p-numbering-shallow.css
OXYGEN_INSTALL_DIR/DITA-OT3X/plugins/com.oxygenxml.pdf.css/css/print/p-numbering-deep.css

Unfortunately, there are lots of CSS selectors that need to be changed, and there are multiple map configurations that should be taken into account (for example what happens if you have an appendix before a backmatter?) Overriding them from your customization CSS Is not practical for the moment.

One option for you would be to download an Oxygen Publishing Engine (see the products section on the website), to install it and configure it in oXygen as an external DITA-OT. Then you can make changes in the built-in CSSs.

Here are some details, in case you are using deep numbering:

These are the selectors that inhibit the presentation of the counters in frontmatter and bakmatter:

Code: Select all

/* 
	Topics from Front Matter and Back Matter and
	all other topics that follow a part 
	should not define string sets, counters, etc.. 
*/
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/frontmatter"] > *[class ~= "topic/title"]:before,
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/frontmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before,
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/backmatter"] > *[class ~= "topic/title"]:before,
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/backmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before,
*[class ~= "map/map"][numbering^='deep'] *[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]):not([topicrefclass ~= "bookmap/appendix"]) > *[class ~= "topic/title"]:before,
*[class ~= "map/map"][numbering^='deep'] *[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) *[class ~= "topic/topic"] > *[class ~= "topic/title"]:before{
		content:none !important;
}
These are clearing the strings for headers and footers:

Code: Select all

/* 
	Topics from Front Matter and Back Matter and
	all other topics that follow a part 
	should not define string sets, counters, etc.. 
*/
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/frontmatter"] > *[class ~= "topic/title"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/frontmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/backmatter"] > *[class ~= "topic/title"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/backmatter"] *[class ~= "topic/topic"] > *[class ~= "topic/title"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) > *[class ~= "topic/title"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]) *[class ~= "topic/topic"] > *[class ~= "topic/title"]{
   string-set: parttitle "", chaptertitle "", sectiontitle "";
}
These are resetting the counters:

Code: Select all

/* 
	Front Matter and Back Matter and
	all other topics that follow a part 
	should not define string sets, counters, etc.. 
*/

*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/frontmatter"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/frontmatter"] *[class ~= "topic/topic"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/backmatter"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "bookmap/backmatter"] *[class ~= "topic/topic"],
*[class ~= "map/map"][numbering^='deep'] *[class ~= "topic/topic"][is-part] ~ *[class ~= "topic/topic"]:not([is-part]):not([topicrefclass ~= "bookmap/appendix"]) {
   counter-increment:none !important;
   counter-reset: part chapter chapter-and-sections section1 section2 section3 section4 !important;
}
And these are for the TOC:

Code: Select all

/* All other topicrefs that follow a part should not have a number (i.e appendices)  */
*[class ~= "map/map"][numbering^='deep'] *[class ~= "map/topicref"][is-part] ~ *[class ~= "map/topicref"]:not([is-part]) > *[class ~= "map/topicmeta"]:before{
   content: none !important;
   counter-increment:none;
}
Probaby you would need to increment the counter on the index section:

Code: Select all

*[class~='index/groups']{
 counter-increment:chapter;
}
Many regards,
Dan

Post Reply