Highlighted

How to create variables for "Page [page number] of [total pages in book]"

Participant ,
Jan 21, 2020

Copy link to clipboard

Copied

Hi, helpful people!

 

I'm hoping this is an easy question to answer. It seems simple enough, but I haven't been able to find anything in the available resources.

 

I have a book that consists of a dozen or so chapters of 10-12 pages each, giving me a book of approximately 140 pages.

 

The book applies for multiple different products, where I use conditional text for each product. So the total page count is unique for each product's version of the book.

 

The pages are numbering correctly throughout, but I want to have the page number in the footer read as "Page [page number] of [total pages in book]" -- for example, "Page 47 of 140." I know that the variable "$curpagenum" will give me the current page number, but is there a variable for "total pages in book"? If not, how would I create one? Would I need to make it a user variable that I update each time I create a new version of the book?

 

Thanks, and apologies if this has been addressed elsewhere.

TOPICS
Formatting and numbering

Views

223

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to create variables for "Page [page number] of [total pages in book]"

Participant ,
Jan 21, 2020

Copy link to clipboard

Copied

Hi, helpful people!

 

I'm hoping this is an easy question to answer. It seems simple enough, but I haven't been able to find anything in the available resources.

 

I have a book that consists of a dozen or so chapters of 10-12 pages each, giving me a book of approximately 140 pages.

 

The book applies for multiple different products, where I use conditional text for each product. So the total page count is unique for each product's version of the book.

 

The pages are numbering correctly throughout, but I want to have the page number in the footer read as "Page [page number] of [total pages in book]" -- for example, "Page 47 of 140." I know that the variable "$curpagenum" will give me the current page number, but is there a variable for "total pages in book"? If not, how would I create one? Would I need to make it a user variable that I update each time I create a new version of the book?

 

Thanks, and apologies if this has been addressed elsewhere.

TOPICS
Formatting and numbering

Views

224

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 21, 2020 1
Adobe Community Professional ,
Jan 21, 2020

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 21, 2020 2
Adobe Community Professional ,
Jan 21, 2020

Copy link to clipboard

Copied

Wow, Jeff. I haven't see that post in a while.

 

Ennar, note that it was written for an earlier version of FrameMaker—it still works, but remember that the old Special menu was renamed Insert. So, Insert > Variables and Insert > Cross-References. Any other questions, just ask.

 

~Barb

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 21, 2020 0
Adobe Community Professional ,
Jan 21, 2020

Copy link to clipboard

Copied

You know about <$curpagenum>. There is also a system variable <$lastpagenum>, but it appears to only reference the current file, and not the last page of the last file in a .book.

 

When I need to do this, I cross-reference to some object that is always on the last page of the last file, often a dedicated paragraph format named "EOD" (possibly invisible), and xref it by <$pagenum>.


The Master Page footer might then have:
Page <$curpagenum> of Xref
where Xref is to the EOD object, format <$pagenum>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 21, 2020 1
LinSims LATEST
Adobe Community Professional ,
Jan 22, 2020

Copy link to clipboard

Copied

A while back my coworker and I commissioned Rick Quatro to write a macro for us that would total the number of pages in a book based on the files selected and put the result in a variable that we then stuck in a footer to give us the x of y. He might be willing to sell that to you if you ask. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 22, 2020 0