About Arbortext Styler > Creating Headers and Footers > Adding Page Numbers to Headers and Footers
  
Adding Page Numbers to Headers and Footers
You can add page numbers to page regions representing headers or footers. Page numbers can appear either alone or within a string, for example x of y pages (where x is the current page number and y is the total number of pages in the document).
Arbortext Styler can generate compound page numbers (for example, 1-1 as the page number for the first page in the first chapter in your document, 1–2 for the second page in the first chapter, etc.), using a division number and a page number. This is done by changing the format of the page numbering accordingly. Once set, the compound format will be used wherever page numbers are referenced, e.g. in tables of contents, indexes, and cross-references as well as headers and footers. You can then insert these compound numbers in headers and footers as usual. To use a division number as part of the compound page number the division must start a page set, and restart the page numbering.
Example: Adding Page Numbers to a Header
The example given below adds the page number to a header region. The page number will display in the header of pages formatted by the relevant page set.
1. In the Generated Contents list The Generated Contents list icon - a text box containing lines of text, create a new Generated Content object and name it numbered-header.
Refer to Adding Content to a Header or Footer for an example of how to create content for a header or footer.
2. Highlight numbered-header then the Edit button to open the Generated Text Editor. Place your cursor in the right hand cell of the header table, then choose Insert > Page Number. Arbortext Styler will add the object FormattedPageNumber into the cell.
3. Add any text you would like to appear with the page number.
4. Choose File > Apply and Close to save the change and exit the Generated Text Editor. You will see that the read only field in the properties area of the Generated Contents list describes the generated text settings you have made for your Generated Content object.
You have now configured the content for your Generated Content object.
5. Assign the Generated Content object numbered-header to the page region representing your header.
6. If you have not already done so, assign the page region representing your header to the page type representing the layout of the pages that should display your header.
7. Assign the page type to the relevant page set, if you have not already done so.
8. Preview your document via the Preview > Print menu option to review these changes.
In the Print Preview window, note that the page number displays in the top right-hand corner of every page formatted by the page set.
9. To ensure numbering restarts at 1 in every occurrence of a division, for example a chapter, go to the Elements list and access the Breaks category for the division element formatted by the page set.
10. In the Page set field, choose the Initial option in the Page number list.
11. Preview your document via the Preview > Print menu option to review these changes.
In the Print Preview window, note that the number 1 now displays in the top right-hand corner of the first page of the selected division, followed by consecutive page numbers until the next occurrence of the division is reached.