Page numbers

In print output in the Classic theme, the YAML header’s style setting determines how the pages are numbered:

So if you use frontmatter on a book-part (e.g. for a preface, foreword or acknowledgements section), by default it will have roman-numeral page numbers. And when the first chapter starts, that chapter will have decimal page numbers.

However, the page numbering will increment consecutively from roman to decimal, unless you tell PrinceXML to start from 1 at the first chapter. That is, ‘ix, x, 11, 12’. To reset the numbering to 1 at the start of the relevant chapter, you have two options:

  1. Add the page class .page-1 to the first element (e.g. the first heading) of the first chapter. In markdown, you do that with the tag {} in the line immediately after the heading. This only works if that element is not set to float in the CSS. (That is, the element must appear in the normal flow of text.)
  2. Add page-1 to the style YAML setting, in addition to specifying chapter, not overriding it. That is, the first chapter in your book should have the YAML style set as: style: chapter page-1.