Skip to main content
Participant
July 14, 2021
Question

Using a heading to restart page numbering

  • July 14, 2021
  • 4 replies
  • 1456 views

Working on a document for a client that they want the pages to be numbered based on the heading.  When a new heading starts 

Basically:

Section Title 1 - 1

Section Title 1 - 2

Section Title 1 - 3

Section Title 2 - 1

Section Title 2 - 2

Section Title 2 - 3...

 

I work off of a template and it is currently set up that the writer has to manually type in the section title and page number.  With page shifting and the vast number of documents that this will be applied to, is there a way to put this numbering on the master page and automate everything?  I can set up a variable for the section title easially, but having the numbering reset every time I create a new section title is where I am stuck.

 

TIA

This topic has been closed for replies.

4 replies

Barb Binder
Community Expert
Community Expert
July 15, 2021

Are you asking me that @LinSims? I was looking for an option to number the pages consecutively, based on the heading auto-numbers.

 

If the sections are separate files, no groups are needed. Just <$chapnum> for the sections and <#curpagenum> for the page numbers. 

 

At this point, I really don't know what the OP needs so I guess we need to wait for clarification from them.  

 

~Barb 

~Barb at Rocky Mountain Training
Participant
July 23, 2021

I need the page numbers to reset like the example you've provided, but why I am asking this question is to see if it is possible to do it in a single frame file.  The content I am producing is seperate documents at about 10 pages max, so making sepeate chapters is more work than it is worth; but there are hundreds of them, so I'm trying to avoid having to type each page name/number manually.

LinSims
Community Expert
Community Expert
July 23, 2021

As Barb said, it is not possible to reset the auto-page numbering in the middle of a file, especially if you are using FM's system variables so that the page number could increment.

 

You might be able to script something that will find the nearest section heading, pull the text into the footer, and manually enter the appropriate page # (either 1 or +1), as in, IF this tag is on the same page, set page # = 1; if tag is on previous page, set page # =2 and so on. I'm not a scripter, though, so I don't know if it's doable. There are quite a few scripters who hang out here, though, so if you started a thread asking for help with or someone you'd pay to write a script, I expect you'll find people. 

 

You could maybe set up multiple master pages, one for each page number as 1, 2, 3 ... (however many pages you typically have) and apply the appropriate master pages as you go? Or maybe a script that triggers the appropriate master page. 

Barb Binder
Community Expert
Community Expert
July 14, 2021

Is this what you need? Thinking through @Bob_Niland's comment, maybe this works? I'll explain if it will work for you, but the heads have to change on each page because I'm calling the heading numbers in the footer. And to clarify—we can't use actual page numbers because you can't restart page numbers in the middle of a FrameMaker file. So as Bob pointed out, this would not number like this in a PDF. It would be consecutive numbers 1–8 in a PDF.

 

~Barb 

 

 

~Barb at Rocky Mountain Training
LinSims
Community Expert
Community Expert
July 15, 2021

Are we back to maybe using Groups again? Although I suppose it wouldn't matter in this case since you're not trying to carry the chapter/section/volume number through all the files in the group.

Barb Binder
Community Expert
Community Expert
July 14, 2021

@Jordan Skok:

 

FrameMaker doesn't let you reset the page numbering in the middle of a file. If you want the page number to reset to 1, each section will need to be its own document. 

 

~Barb

~Barb at Rocky Mountain Training
Bob_Niland
Community Expert
Community Expert
July 14, 2021

BB: If you want the page number to reset to 1, each section will need to be its own document.

Or what appear to be visible page numbers in the document, implemented on the Master Page(s), need to be user-controlled autonumbered objects, and not just <$curpagenum>. For print-only, or where the PDF page number doesn't matter, this can work.

LinSims
Community Expert
Community Expert
July 14, 2021

You need to set up autonumbering in the paragraph tag. @Barb Binder has an excellent how-to guide here. It's a little out of date, but numbering hasn't changed since then.

 

She also describes how to automate restarting lists, something you'll want for the subsection numbering each time a new one starts.

 

And if you search in this forum, there are a number of posts describing how to set up autonumbering. 

LinSims
Community Expert
Community Expert
July 14, 2021

OK, rereading I see you're not talking about the actual heading tags but the page numbers. If you want the section number to be part of the page number, you still need to add autonumbering to your heading paragraph tags for this to work, so do that first. 

 

On your master page, you have to use one of the Running Header/Footer variables. The format should be (I think):

<$paranum[paragraph tag name]> - <$curpagenum>

 

If you want to use the actual section title as the first part, change your Running Header/Footer to:

<$paratext[paragraph tag name]> - <$curpagenum>

Participant
July 14, 2021

Somewhat.  I have a <$paratext[paragraph tag name]> variable set up, but I need the <$curpagenum> to reset to 1 when I use the paragraph tag again.  I've been trying to set it up like autonumbering, but setting it up as an autonumbered paragraph doesn't allow it to be centered (I think?).