Skip to main content
1-Visitor
December 9, 2014
Question

blank page and chapter page counter

  • December 9, 2014
  • 14 replies
  • 4502 views

I have a doc made up of chapters that require individual LOEPs and Total Page count on the first page of each chapter. For some reason, these are only working correctly when the chapter has only recto and verso pages. If a chapter has any blank page in it, the total page count does not increment correctly and the blank pages don't show up in the leop. EXCEPT for the last chapter in the doc which works correctly. That's got to be a clue to what I'm doing wrong!but I just can't find the error.


I've got two page total counters:


<counter initial="0" enumid="totalpagect">
<counter initial="0" enumid="chpagect">


The totalpagect for the doc is always correct and the frontmatter leop is working fine. I have these page counters incrementing in all the pages in the body pageset including the blank page.


I am using a TIV in each page to capture the loep information for each chapter:


<savetext textid="chlep.tiv" conrule="&lt;newline">,folio[BO],dotfill,1pi,</newline>" placemnt="after" append="1">


The TIV is defined with a chapter scope: <stringdecl textid="chlep.tiv" status="1" scope="chapter">


If I change the scope for the chpagect string to doc instead of chapter, I can pull everything into a full document loep just fine including all the blanks.


The body pageset uses a recto, verso, rectobb, and blank. The page numbering on all pages is working fine. If we had to, we could manually tag the loep stuff for each chapter, but I really need to get the chapter page count working!


Thanks in advance for any help!


KM

    14 replies

    1-Visitor
    December 9, 2014
    Hi Kim,
    Figure 87 in the attached PDF has code for sheet counting, which is similar. Hope this helps.
    Good luck!Suzanne Napoleonwww.FOSIexpert.com"WYSIWYG is last-century technology!"
    1-Visitor
    December 9, 2014
    Attachment included this time.
    kmccain1-VisitorAuthor
    1-Visitor
    February 25, 2015

    Suzanne,


    I've been wrestling with this page counter issue still but I still can't get a true page count for any chapter that ends with a blank page. It counts up to but never includes the blank page. Any chapter that has only plain recto and verso pages and ends on a verso page counts up fine. The odd thing is that the blanks are being counted OK in the totalpage counter for the book, just not with the chapter counter that is scoped to chapter. I'm wondering if it's because of the rectobb/blank page combination. Would FOSI ignore increments on a blank page if it is truly blank?


    The counter resets correctly and the page numbers in the footers are all correct. The blank page is created when composed but the page total for the chapter is always one less than it should be if the chapter ends with a blank.


    Any other suggestions? Thanks, KM

    1-Visitor
    February 25, 2015
    Hi Kim,
    I don't recall encountering this problem before. I'll have to do a little testing.
    Suzanne
    1-Visitor
    February 25, 2015
    Kim,
    If a savetext placemnt=after on chapter is saving the last page of each chapter, that will not include a blank verso page after the chapter because the chapter doesn't end on the blank page, it ends on the previous page. Think along those lines while I check my archives.
    Good luck!Suzanne
    1-Visitor
    February 25, 2015
    If your blank page doesn’t have a page number in the footer (I know, this gets into the semantics of what can/should be on a ‘blank page’), try the following:

    Output the page number in the blank page footer and see if this gives you the correct chapter page count. If it does and you want a real blank ‘blank page’, set the footer font colour to white to make the page number invisible (assuming you’re printing on white paper stock). Alternatively, you could set the font size to 0.01 points to make the number disappear.

    David

    David S. Taylor

    Project Manager, Structured Information
    Production and Marketing | Building Regulations | NRC Construction
    Building M-23A, Room 114 | 1200 Montreal Road | Ottawa, ON | K1A 0R6
    Telephone: 613-990-2731 | Fax: 613-952-4040
    David.S.Taylor@nrc-cnrc.gc.ca<">mailto:David.S.Taylor@nrc-cnrc.gc.ca>


    1-Visitor
    February 25, 2015
    I think you need something along these lines: Create a nextpageblank counter that is incremented and saved the same as the regular page counter. In the verso page model, save the regular page counter as the last page number, and in the rectobb page model, save nextpageblank as the last page number. If the chapter ends on a verso page, you will get its number. If it ends on a recto page, you will get the number of the next page, which is blank.
    Hope this helps!
    Good luck!Suzanne #yiv9554249896 -- filtered {font-family:Helvetica;panose-1:2 11 6 4 2 2 2 3 2 4;}#yiv9554249896 filtered {panose-1:2 4 5 3 5 4 6 3 2 4;}#yiv9554249896 filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv9554249896 filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv9554249896 filtered {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv9554249896 filtered {panose-1:2 11 6 9 4 5 4 2 2 4;}#yiv9554249896 p.yiv9554249896MsoNormal, #yiv9554249896 li.yiv9554249896MsoNormal, #yiv9554249896 div.yiv9554249896MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;}#yiv9554249896 a:link, #yiv9554249896 span.yiv9554249896MsoHyperlink {color:blue;text-decoration:underline;}#yiv9554249896 a:visited, #yiv9554249896 span.yiv9554249896MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv9554249896 p.yiv9554249896MsoAcetate, #yiv9554249896 li.yiv9554249896MsoAcetate, #yiv9554249896 div.yiv9554249896MsoAcetate {margin:0in;margin-bottom:.0001pt;font-size:8.0pt;}#yiv9554249896 span.yiv9554249896EmailStyle17 {color:#1F497D;}#yiv9554249896 span.yiv9554249896BalloonTextChar {}#yiv9554249896 .yiv9554249896MsoChpDefault {font-size:10.0pt;}#yiv9554249896 filtered {margin:1.0in 1.0in 1.0in 1.0in;}#yiv9554249896 div.yiv9554249896WordSection1 {}#yiv9554249896
    1-Visitor
    February 26, 2015
    Hmmm ... If the last page of a chapter could be a recto page that is the last page in the document, then the last page number needs to be saved in the recto page model as with the verso page. Code each savetext in a usetext in the page footer.
    In the e-i-c for chapter, code a savetext with placemnt=after that saves this last page number string[BO] to a tiv scoped to chapter. Then the tiv can be output at the beginning of the chapter.
    Clear as mud? Please let me know your questions.
    Good luck!Suzanne
    kmccain1-VisitorAuthor
    1-Visitor
    February 27, 2015

    Suzanne,


    I had already tried creating another counter for the blank pages (that is how I am getting my #/# blank type page number on my rectobb page and had been saving the last page value on the verso and rectobb pages already, but I think your last suggestion about saving the last page value in the recto page has fixed it somehow because my chapter page counters are now working correctly!


    I had also tried adding info to the footer of the blank page as someone else suggested, but that never had any effect.


    Thanks for your expert advice! I'll probably be back here for some help with the numerical index next after I try a few more things. I've got it creating the index, but not in the right sort order.


    Thanks again,


    Kim

    1-Visitor
    February 28, 2015
    Hi Kim,
    Glad to hear it is working. The relevant code is at the end for the archives.
    Regarding indexing, it is covered in Chapter 5 of my book, which is atfosiexpert.com/Practical-fosi.html.
    Good luck!Suzanne
    The final page number of each chapter, including a blank page at the end of the chapter, is contained in thetime-independent variable finalpage.tiv. In any e-i-c in context of chapter, finalpage.tiv can beoutputand/orsaved to another string variable.


    <counter initial="0" style="arabic" enumid="folioct"><counter initial="1" style="arabic" enumid="nextpageblankct"><stringdecl textid="folioct.txt"><stringdecl textid="finalpage.txt"><stringdecl textid="finalpage.tiv" status="1" scope="chapter"><stringdecl textid="nextpageblankct.txt">
    <pageres>
    <enumerat increm="1" enumid="folioct"><savetext textid="folioct.txt" conrule="folioct"><enumerat increm="1" enumid="nextpageblankct"><savetext textid="nextpageblankct.txt" conrule="nextpageblankct">
    <footer><usetext><subchars><savetext textid="finalpage.txt" conrule="folioct.txt">
    <versopg><footer><usetext><subchars><savetext textid="finalpage.txt" conrule="folioct.txt">
    <footer><usetext><subchars><savetext textid="finalpage.txt" conrule="nextpageblankct.txt">
    <e-i-c gi="chapter"><savetext placemnt="after" textid="finalpage.tiv" conrule="finalpage.txt[BO]">