Page numbering in bookmap PDF transformation

Post here questions and problems related to editing and publishing DITA content.
AudreyChr
Posts: 6
Joined: Fri Feb 18, 2022 5:28 pm

Page numbering in bookmap PDF transformation

Post by AudreyChr »

I usually use a DITA map and have no problem with page numbering.

I attempted to create a bookmap so I could add front and back matter but I've run into trouble with the page numbering which is stubbornly in roman-lower format. The exception is one topic (included in the front matter) which has decimal numbering.

How do I change this?
julien_lacour
Posts: 681
Joined: Wed Oct 16, 2019 3:47 pm

Re: Page numbering in bookmap PDF transformation

Post by julien_lacour »

Hello,

In order to see how the CSS is applied on your DITA files, you can try to debug your CSS.

The roman numbering came from the default stylesheet located in [DITA-OT_DIR]plugins/com.oxygenxml.pdf.css/css/print/p-pages-and-headers.css.

You can simply override it by using the following rules in a separate CSS stylesheet:

Code: Select all

@page table-of-contents:left {
  @top-left {
    content: string(toc-header) " | " counter(page);
  }
}
@page table-of-contents:right {
  @top-right {
    content: string(toc-header) " | " counter(page);
  }
}

@page matter-page:left {
  @top-left {
    content: counter(page);
  }
}

@page matter-page:right {
  @top-right {
    content: counter(page);
  }
}
If you have problems using a custom CSS stylesheet, you can follow the instructions from this topic.

Regards,
Julien
Post Reply