PDF Page Numbers Restart at One in Each Chapter
Posted: Thu Jul 28, 2022 1:19 pm
Hello,
Sorry for another question!
My page numbers are starting over at 1 in each chapter. I am trying to figure out where in the css this is controlled. I am thinking it may be caused by this additional css I added that I got via a forum on Stackoverflow, where I was trying to start each level 2 heading on a new page, but yet keep the first level 2 heading together with the 1st level (chapter heading) as shown below:
1st instance:
2nd instance:
Here is something very weird though...I do not get the page breaking in the first chapter...only in Chapter 2 and subsequent:
Here is the css that was provided to get the page breaking at the level 2 heading for all but the first instance (I put it in a custom.css file):
Any ideas on how to keep my page numbers from restarting at 1 in each chapter?
Thanks!
Pat
Sorry for another question!
My page numbers are starting over at 1 in each chapter. I am trying to figure out where in the css this is controlled. I am thinking it may be caused by this additional css I added that I got via a forum on Stackoverflow, where I was trying to start each level 2 heading on a new page, but yet keep the first level 2 heading together with the 1st level (chapter heading) as shown below:
1st instance:
2nd instance:
Here is something very weird though...I do not get the page breaking in the first chapter...only in Chapter 2 and subsequent:
Here is the css that was provided to get the page breaking at the level 2 heading for all but the first instance (I put it in a custom.css file):
Code: Select all
/* BREAK MAIN TOPICS TO NEW PAGE */
article h2 {
page-break-before: always;
}
article:first-of-type h2 {
page-break-before: avoid;
}
Thanks!
Pat