Differe page number style configuration

Having trouble installing Oxygen? Got a bug to report? Post it all here.
freewingwind23
Posts: 5
Joined: Mon Apr 01, 2024 11:05 am

Differe page number style configuration

Post by freewingwind23 »

Hi,
how to set a different page number style (such as i, ii, ...) for the chapters with a "outputclass='before-toc" attribute and reset the page number for the following normal chapters.

Also, the cover should not be included for page counting.

Look forward to your reply. Thanks.
julien_lacour
Posts: 665
Joined: Wed Oct 16, 2019 3:47 pm

Re: Differe page number style configuration

Post by julien_lacour »

Hello,

You can change the page definition for before-toc topics using the following rule:

Code: Select all

*[class ~= "topic/topic"][outputclass ~= "before-toc"] {
  page: matter-page;
}
In this example I used the predefined matter-page which uses lower-roman numbering.

To reset the page number for the first following "normal" chapter you can follow this topic from our user guide. Use the sub-topic corresponding to your numbering context (shallow, deep or deep-chapter-scope-no-page-reset).

If you don't want to number the cover page you can reset the page counter on the first before-toc topic like follows:

Code: Select all

*[class ~= "topic/topic"][outputclass ~= "before-toc"]:first-of-type {
  counter-reset: page;
}
Regards,
Julien
Post Reply