Page numbers not resetting for Chapter start

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Page numbers not resetting for Chapter start

Post by navoff »

I created a project that has two chapters, a cover page and legal page (the cover and legal pages are two sides of the same sheet of paper). I opened up the properties of each chapter and in the Printed Output tab selected "Start a new chapter document" and for the Page number selected the "Reset to:" and entered "1". I generated my output and the numbering worked as expected. Chapter 1 started with 1-1, Chapter 2 started with 2-1. Happy me.

Then I added a TOC to my printed output by creating a Topic and adding a TOCproxy to it. I placed the new Topic in the TOC above my first chapter and rebuilt my target. The TOC appears but now my page numbers don't reset when a new chapter starts. Page 1 is now the first page of the TOC and the rest of the document continues in sequence. It no longer resets for each chapter (though the Chapter numbers are fine).

So, then I tried going into the stylesheet and changing the default h1 setting since all my h1's will be the start of a new chapter. Under PrinterPageNumbers, I changed the mc-page-number-start-value to 1 and rebuilt my target. Again, the output ignores the resetting of page numbers for the start of each chapter.

I can't for the life of me figure out why it's behaving the way it is. Is there something I'm not getting or is there a bug in the software?
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page numbers not resetting for Chapter start

Post by LTinker68 »

Did you set the chapter 1 page to start with a decimal or is it set to "default"?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Re: Page numbers not resetting for Chapter start

Post by navoff »

After much experimenting I figured out what the problem was. It was in the Page layout. I was experimenting with using the heading examples shown in the Flare Printed Output Guide. I had added a first page layout that was different from an ordinary right page layout. The example I was following was the one described under Heading 1 Example on page 148.

It describes using a second body frame that is used for first level headings that span the entire page. When I set that up in my project and assigned the first topic (which in the TOC was the book level element and which only contained the 1st level heading and a mini TOC) to the First Page page type, then, not only did I not get the numbering to restart at the beginning of a chapter but, I also noticed that the first topic got repeated. For example, in the bookmark pane of Acrobat, you would see:
  • Chapter 1
    • Sub heading 1-1
    • Sub heading 1-2
    • Sub heading 1-3
  • Chapter 1
  • Chapter 2
    • Subheading 2-1
    • Subheading 2-2
    • Subheading 2-3
Even though the Chapter 1 was listed twice in the bookmark panel, it only generates once in the actual text. Once I changed the TOC properties so that the Chapter 1 and Chapter 2 files did not use the First Page page type, but let it go to the default of "Normal" then not only did my numbering restart as expected but I got rid of the duplicate Chapter 1 listing in the Acrobat bookmark panel.

Either I'm misunderstanding how to implement a First Page page type or there's a bug in the software.
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page numbers not resetting for Chapter start

Post by LTinker68 »

If you're using a layout with a first page, then you specify first page for the (generally) book element. That's the only one you set in the book. All the topics in the book will then pick up the appropriate page type based on their order in the book and the page types you have specified in the page layout.

So using your example, you right-click on the book (and therefore its associated topic) that will be chapter 1, set it to start a new chapter, select the page layout, then set the page type to First. In the topics beneath that book, you do nothing -- most of their options should be grayed out because they pull their layouts from the page layout you specified. You then right-click on the book (and therefore its associated topic) that will be chapter 2, set it to start a new chapter, select the page layout (which will probably be the same), then set the page type to First. Again, in the topics beneath that book you do nothing.

So the first page of every chapter will use the First page design and all the rest of the pages in those chapters will use the left/right or normal pages in the layout, depending on what you have set up.

Does that help?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Re: Page numbers not resetting for Chapter start

Post by navoff »

LTinker68 wrote:If you're using a layout with a first page, then you specify first page for the (generally) book element. That's the only one you set in the book. All the topics in the book will then pick up the appropriate page type based on their order in the book and the page types you have specified in the page layout.

So using your example, you right-click on the book (and therefore its associated topic) that will be chapter 1, set it to start a new chapter, select the page layout, then set the page type to First. In the topics beneath that book, you do nothing -- most of their options should be grayed out because they pull their layouts from the page layout you specified. You then right-click on the book (and therefore its associated topic) that will be chapter 2, set it to start a new chapter, select the page layout (which will probably be the same), then set the page type to First. Again, in the topics beneath that book you do nothing.

So the first page of every chapter will use the First page design and all the rest of the pages in those chapters will use the left/right or normal pages in the layout, depending on what you have set up.

Does that help?
That's exactly what I had done. My PDF output was organized like this:
  • coverpage.htm (no heading levels, just a paragraph with an image in it - the title page layout automatically adds the document title from a variable and the "Auto-end on left page" option was disabled)
  • legalpage.htm (the back side of the cover page with the "Auto-end on left page" option disabled)
  • bookTOC.htm (a topic with an h1 heading level and a TOC proxy)
  • chapter1.htm (a topic with an h1 heading level and a miniTOC proxy)
    • several topic files
  • chapter2.htm (a topic with an h1 heading level and a miniTOC proxy)
    • several topic files
If I include the bookTOC.htm file AND have the chapter topic files set to use a First Page page layout, then it messes up the pagination of the subsequent chapters (not resetting the page numbers with each chapter despite setting that on the Printed Output tab) and adds an extra bookmark to the chapter topic. So, either I remove the bookTOC.htm file from the project TOC file or I change the page type for the chapter1 and chapter2 files to "Normal".
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page numbers not resetting for Chapter start

Post by LTinker68 »

You didn't mention what page layouts you had associated with your topic files. It sounds like you just have one. Here's my setup:
  • printTItlePg.htm --> title page of manual; uses layoutTItlePg page layout, which has a title page and a normal page.
  • printCopyPg.htm --> copyright and other info; uses normal page of layoutTitlePg page layout.
  • warning.htm --> contains FCC and warnings; uses layoutWarnings page layout, which has a right page with columns and an empty page.
  • printTOC.htm --> table of contents; uses layoutContents page layout, which has first, right, left, and empty pages; TOC entry set to first page and starts numbering at 1 using roman numerals.
  • intro.htm --> manual introduction; uses layoutIntro page layout, which has first, right, left, and empty pages; TOC entry set to first page and starts numbering at 1 using decimal numbers.
  • Part One book (getStart_intro.htm) --> start of section, contains list of chapters in that section; uses layoutSection page layout which has just a first and empty page; TOC entry set to first page and set to continue page numbering.
  • Part One Chapter 1 book (getStart_chap1intro.htm) --> start of chapter, basically just a line or two intro before the first chapter topic; uses layoutChapter page layout which has first, right, left, and empty pages; TOC entry set to first page and set to continue page numbering. All topics beneath that book use the appropriate pages from the layoutChapter page layout.
The reason I have so many page layouts is because I have a blue color strip on right/left pages in the chapters, a slightly darker blue strip on pages in the section breaks (Part One, Part Two, etc.), a gray color strip for the introduction and TOC sections, no strips and columns for the warning page, and no color and single column for title and copyright pages.

So... You might need to create a different page layout for the TOC and preface pages so that you can switch page numbering or restart page numbering in the chapters.

I should point out a bug in Flare... Mini-TOCs don't work if you switch page layouts between the parent book and its children. For instance, in my example, I couldn't use a mini-TOC on the "Part One" topic because the "Part One Chapter 1" book was set to use a different page layout. So even though the chapter 1 book was a book inside the Part One book and should therefore have been able to generate a mini-TOC, it didn't work. I ended up using cross-references, so it's stylistically the same effect, but it requires manual setup instead of an automated one.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Re: Page numbers not resetting for Chapter start

Post by navoff »

I have three page layout files, one for frontmatter, one for the TOC (or any non-chapter item that I don't want page numbers for) and one for everything else:
  • Frontmatter (the file defines layouts for a title, right, left, and empty page; no page numbering on title page but does include page numbering for all other pages; includes doc number, issue date, and issue number in footer and doc title in header; eventually I want to also add a list of tables and list of figures, both with page numbering, after the TOC but before the main part of the document) - is used by the following:
    • coverpage.htm (uses the Title Page layout)
  • TOC (the file defines layouts for right, left and empty pages; no page numbers included in any of the layouts; includes doc number, issue date, and issue number in footer and doc title in header) - is used by the following:
    • legalpage.htm (uses the Left Page layout)
    • bookTOC.htm (uses the Normal page layout)
  • MainBody (the file defines first, right, left and empty pages; includes doc number, issue date, and issue number in footer as well as doc title, level 1 and level 2 headings in header) - is used by the following:
    • chapter.htm files (uses the Normal page layout)
    • topic files (no page layout selected as these files are not set as "chapter breaks")
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page numbers not resetting for Chapter start

Post by LTinker68 »

navoff wrote:MainBody (the file defines first, right, left and empty pages; includes doc number, issue date, and issue number in footer as well as doc title, level 1 and level 2 headings in header) - is used by the following:
  • chapter.htm files (uses the Normal page layout)
  • topic files (no page layout selected as these files are not set as "chapter breaks")
Why have a first page in the layout if you're just going to specify Normal for the chapter*.htm files? I wonder if you have a first page in a layout if it requires that it actually be specified when you start a new chapter? Wait a minute... You didn't mention Normal as one of the page types for the MainBody. Do you have a Normal page in that layout or not? If not, then maybe that's the problem -- try setting the chapter1.htm and chapter2.htm files to use the First page, not the Normal page.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
navoff
Sr. Propeller Head
Posts: 201
Joined: Mon Oct 06, 2008 7:26 am
Contact:

Re: Page numbers not resetting for Chapter start

Post by navoff »

LTinker68 wrote:
navoff wrote:MainBody (the file defines first, right, left and empty pages; includes doc number, issue date, and issue number in footer as well as doc title, level 1 and level 2 headings in header) - is used by the following:
  • chapter.htm files (uses the Normal page layout)
  • topic files (no page layout selected as these files are not set as "chapter breaks")
Why have a first page in the layout if you're just going to specify Normal for the chapter*.htm files? I wonder if you have a first page in a layout if it requires that it actually be specified when you start a new chapter? Wait a minute... You didn't mention Normal as one of the page types for the MainBody. Do you have a Normal page in that layout or not? If not, then maybe that's the problem -- try setting the chapter1.htm and chapter2.htm files to use the First page, not the Normal page.
I defined a First Page initially because I intended to use it. I had my page layout for the First Page set to have two body frames as described in the Flare Printed Output Guide under Heading 1 Example on page 148. I selected "First Page" in the Printed Output tab for the properties of the chapter.htm files. However, when I built the PDF target, the page numbers for the chapters refused to restart so I ended up with a cover page, a legal page, a TOC and then it would start the page numbers on the first chapter as 1-5, 1-6, 1-7, etc. The page numbers would continue to increment like that until you got to chapter 2, then it would change to 2-19 (picking up the paging from where it left off in chapter 1). Also, there was an extra bookmark in the Acrobat Bookmark pane for the first chapter (occurring after the last topic of the first chapter: i.e. chapter 1, topic, topic, topic..., chapter 1, chapter 2, topic, topic, topic).

If you don't select a page type when you set the properties for a topic, it defaults to "Normal" meaning it will apply right page layout to a right hand page, a left hand layout to a left hand page and an empty page layout to an empty page (provided one is defined in the page layout file). BTW, if you create an actual Normal Page type in your page layout, Flare won't apply it to a topic that is defaulted to "Normal". The reason is that it doesn't automatically include the PageType="normal" setting in your .fltoc file. It only includes it after the page type has been set to something else and then set back again (something I recently discovered).

The only way I can get the page numbers to properly increment (and to get rid of the extra bookmark) is to not use the First Page page type. As long as that's not set, everyone plays nice. I switched to using the example in the Flare Printed Output Guide for Heading Level 3, changing my stylesheet so that all my heading levels had a negative indent value and using only a single body frame that was narrower than the full printable page. I defined the right and left slightly differently so I can have my page numbers on the outside corner.
JRP
"How many slime-trailing, sleepless, slimy, slobbering things do you know that will run and hide from your Eveready?"
--Maureen Birnbaum, Barbarian Swordsperson
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Page numbers not resetting for Chapter start

Post by LTinker68 »

Are you generating Word output or PDF output (can't remember if you mentioned previously)? If it's Word output, then did you select the option in the target to disable masterpages for Word output?
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Post Reply