Page counter reset woes (again) in deep mode

Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

Page counter reset woes (again) in deep mode

Post by Vinny »

Folks,
I have this rule in my CSS to reset the page counter at the first chapter (after ToC):

Code: Select all

/*  Reset page number after TOC */
article[is-chapter="true"]:nth-of-type(2) {
	  counter-reset: page 1;
}
This works like a charm when the args.css.param.numbering is set to 'shallow', but won’t if it is set to 'deep', which is the value I’m interested in. Any clue to override this behaviour?
Thanks a bunch!
V.
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Page counter reset woes (again) in deep mode

Post by julien_lacour »

Hello,

You will find all the information into the Reset Page Numbering in Deep Context topic from our user-guide:

Code: Select all

*[class ~= "map/map"][numbering ^= 'deep'] > *:not([class ~= "topic/topic"][is-chapter]) + *[class ~= "topic/topic"][is-chapter] {
  counter-reset: page 1 section1;
}
Regards,
Julien
Vinny
Posts: 16
Joined: Wed Jan 12, 2022 1:07 pm

Re: Page counter reset woes (again) in deep mode

Post by Vinny »

I was looking for something simpler, but OK, I guess there’s nothing available. Thanks!
Post Reply