Page 1 of 1

Page counter reset woes (again) in deep mode

Posted: Thu Nov 23, 2023 6:56 pm
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.

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

Posted: Fri Nov 24, 2023 10:01 am
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

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

Posted: Fri Nov 24, 2023 10:27 am
by Vinny
I was looking for something simpler, but OK, I guess there’s nothing available. Thanks!