cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

blank page and chapter page counter

kmccain
3-Newcomer

blank page and chapter page counter

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 14

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!"

Attachment included this time.
kmccain
3-Newcomer
(To:kmccain)

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

Hi Kim,
I don't recall encountering this problem before. I'll have to do a little testing.
Suzanne

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

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>


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

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
kmccain
3-Newcomer
(To:kmccain)

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

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]">


kmccain
3-Newcomer
(To:kmccain)

So I've run into a problem with this again. When I have a chapter with only one page of text (followed by a blank), I again don't get the correct chapter page count (it counts only the text page and not the blank), and I also don't get the Page/Blank Page page number in my footer.


I suspect this has something to do with my pageset. I had to add in a second recto page to capture page ranges for each chapter loep,so I now have this: recto1, recto2,verso, rectobb, blank page set. The loep page range also doesn't work with a one-page chapter.


Any suggestions??

The solution is the same as before. Two counters, one initialized to 0 for the current page number, the other to 1 for the next page number. On the rectobb page model, save the next page number. On the other page models, save the current page number.
Good luck!
Suzanne Napoleon
www.FOSIexpert.com"WYSIWYG is last-century technology!"



kmccain
3-Newcomer
(To:kmccain)

The strange thing is that I was able to get the page count total and lep to work but only by adding the savetexts to the first recto page. I still get no blank page footer. It seems like the FOSI doesn't see the first page in a single page chapter as a rectobb page at all, but as the recto1 page instead. The rectobb stuff only gets called if there is a 2nd recto page in the chapter. I ended up having to add the blank page number footer in the composed PDF to get the TM out the door.


There must be some way to make this work, but it will take more experimentation I guess.

The attached PDF shows how to code a FOSI to identify page models for debugging purposes. An ACL variable controls whether the debugging information is output.
Please let me know any questions or comments.
Thanks!
Suzanne Napoleonwww.FOSIexpert.com"WYSIWYG is last-century technology!"
Announcements

Top Tags