Menu

Need training at your office? Request a quote for custom training.

Home / Adobe FrameMaker / Adobe FrameMaker: The Page Count Variable for Books—Part II of II

Adobe FrameMaker: The Page Count Variable for Books—Part II of II

by Barb Binder

In a previous post (Adobe FrameMaker: The Page Count Variable for Chapters—Part I of II), we learned how to track and reference the page count of a single chapter. But what about trying to keep track of the last page of a multi-chapter book? That question was posed recently by one of my Advanced FrameMaker students. Turns out it can be done, it just takes a little creativity and more than a little patience. (If you need it, though, it’s well worth the effort.)

Here’s the big picture: you are going to insert a frame on the first page of the last chapter of your book, add the page count variable into the frame, and hide the evidence. You’ll finish up by adding a cross-reference to that variable in the running heads of all the master pages of your book.

Note: Before you start, make sure you have your page numbers displaying properly in your running heads, and that you have set your Page Number properties set to Continue Numbering from Previous Page in Book.

To add the final page count of the book to your running heads:

  1. Open the last chapter in the book list and add a frame in the margin:
    • Choose View > Toolbars > Graphics Toolbar.
    • Select the Place a Text Frame tool.
    • Draw a small text frame in one of the margins and pick OK when presented with this dialog box:
      Adobe FrameMaker: Create a New Text Frame
  2. Add the Page Count variable to your frame:
    • Click inside the new frame. The frame should be empty, except for your blinking insertion point (and the End of Flow marker, if showing).
      Adobe FrameMaker: The text frame that will hold the Page Count variable
    • Choose Special > Variable to open the Variables pod. Add the Page Count variable (double click to insert, or click once on the name, and click the Insert button on the Variables pod toolbar).  The last page number of that chapter will appear at the cursor position.
  3. Hide the variable from your readers:
    • Create a paragraph format for the variable and store it in the Paragraph Catalog. I called mine PageCount.
      Adobe FrameMaker: Create a paragraph format for the variable.
    • You don’t want anyone (besides FrameMaker) to see the variable in the margin, so set the paragraph’s color to White, and click on Update all. The frame will still be visible, but the text disappears.
  4. The next step is to add a cross-reference to this now-hidden text.
    • View > Master Pages
    • Locate your Page Number variable (it’s the #) and click an insertion point to the right of it. Tap the spacebar, type the word “of” and tap the spacebar again.
    • Choose Special > Cross-Reference.
    • In the Cross-Reference panel, set the Document to Current, the Source Type to Paragraphs, your Paragraph tag to PageCount, and click on the page number in the Paragraphs list. (Even though it is the only item in the list, you still need to click on it.)
      Adobe FrameMaker: Add a Cross Reference to the Page Count variable
    • Click the Edit Format button to set up a custom cross-reference format: give it a name (I again called mine PageCount), delete the current definition, and replace it with <$paratext>. Click on Add, Done, and then Insert to insert the variable into the running head.
      Adobe FrameMaker: Create a new cross reference format for the variable
  5. Wow—almost there! Finish up by putting the cross-reference in the running heads on each master page of that file. Save your work!
  6. To add the updated running head to all the other files, use File > Import > Formats to import the new cross-reference format, the page layout format and the new paragraph format to the other chapters in your book.
    Adobe FrameMaker: Import your formats from document to another

Fussy? Yes! But it works.

Leave a Comment

Your email address will not be published. Required fields are marked *

3 thoughts on “Adobe FrameMaker: The Page Count Variable for Books—Part II of II

  1. Hi,

    I found this page while looking for a solution to a similar problem. I’m hoping you can help.

    What I need to do is include the beginning AND ending page numbers for each section in a Table of Contents. I have no problem with the beginning page number (as that’s natural in a TOC) but can’t figure out how to get the $lastpagenum to show up.

    I expected this (on the TOC reference page) to work:

    <$paranum> <$paratext>    <$chapnum>-<$pagenum> — <$chapnum>-<$lastpagenum>
    But this is what shows up on the TOC:
    D. Project Description          D-1 — D-<$lastpagenum>

    Any ideas?

    Thanks.

    1. Hi Kathryn: That’s a tricky one. I think I would switch gears and set the TOC up as a chronological index, and use the <$startrange> and <$endrange> building blocks. Otherwise, you are looking at adding a cross-reference to a reference page. I can’t imagine it would remain after you update your book.

      ~Barb