Include the total page count of a book in a header or footer

You may want a header or footer to show the total number of pages of a book—for example, 4 of 200 on page 4 of a 200-page book.

When you insert the page count in a file’s header or footer with the Page Count variable, the header or footer shows the number of pages in that file, not in the entire book. To show the number of pages in a book, you can use a cross-reference to a special paragraph you create.

  1. Set up the files in the book for continuous page numbering.

  2. Display the master page for the last page of the last file in the book, and place the insertion point in an otherwise empty paragraph of the header or footer.

  3. Insert the Page Count variable by choosing Insert > Headers & Footers > Insert Page Count.

    Figure 1. Page Count variable in a separate paragraph
    Inserting the Page Count variable

  4. Create a paragraph style for the paragraph with the page count and store it in the Paragraph Catalog. Having a unique format for this paragraph makes it easier to cross-reference it later.

  5. If you don’t want the page count to appear where you put it, either resize the text frame, so the page count is hidden or set the paragraph’s color to white.

  6. In the other files in the book, insert cross-references to the paragraph with the page count on the master pages in the header or footer. The cross-reference format should use the <$paratext> building block.