14 Replies Latest reply: Jan 29, 2010 11:22 PM by Eddie Liao RSS

    Right page only numbering

    Pedro Vareta

      Hi everyone,

       

      My question is:

       

      I want to automatically number my pages, but to always have both page numbers on the right page only (pgs 4-5 for example), leaving the left hand page blank.

       

      Is there a way to do this?

       

      Thanks

       

      Pedro

        • 1. Re: Right page only numbering
          Kenneth Benson Community Member

          On the right master page, draw a text box where you want the page numbers and Type > Insert Special Character > Markers > Previous Page Number, then a hyphen, then Type > Insert Special Character > Markers > Current Page Number.

           

          Ken Benson

          • 2. Re: Right page only numbering
            Peter Spier CommunityMVP

            BUT... you have to thread that to an empty frame (except for possibly a frame break to force the text to the right page) on the previous page or the previous page marker won't work. This was covered a couple of weeks ago (but in reverse, I think) if you do a search.

            • 3. Re: Right page only numbering
              Kenneth Benson Community Member

              Thanks, Peter, I didn't know that part.

               

              Ken Benson

              • 4. Re: Right page only numbering
                Peter Spier CommunityMVP

                The "next" and "previous" page markers are primarily used for jump lines in newspapers or magazines, and they work by reading the page number of the next or previous frame in a thread. Normally they are placed in a separate frame from the flowing text (so they won't move with it), but they'll work inline too. The only caveat is whatever frame they are in must touch the threaded frame from which you want to draw the reference, otherwise they just show the current page number.

                • 5. Re: Right page only numbering
                  Pedro Vareta Community Member

                  Sorry Ken and Peter, but none of your tips have worked.

                   

                  Maybe I'm doing something wrong, because not even a simple thing like creating a text frame on the left master page and inserting a next page number marker works. I always get the current page number and I've tried all your options...

                   

                   

                  Any more ideas?

                   

                  Thanks anyway for the tips

                  • 6. Re: Right page only numbering
                    Kenneth Benson Community Member

                    Yeah, I can't make it work either. I can make it work on a live spread, but when I put the same threaded frames on the left and right master pages, it just shows the current page.

                     

                    Peter, have you seen this work? I never used previous or next page before (obviously, since I gave such simplistic advice first time around).

                     

                    Ken Benson

                    • 7. Re: Right page only numbering
                      Peter Spier CommunityMVP

                      It's starting to come back to me now. You'll recall I said this had been discussed recently?

                       

                      It turns out that it only works if you override the master frame onto the live document page. You can put it onto the master for convenience, but you'll have to go through and override all the pages to make it work.

                       

                      It might be worth looking for that other thread. It's possible Dave or someone suggested a scripting solution, but I'm afraid I really don't recall. I think there was a reference to an InDesign Secrets article, though, and maybe there was a better technique in the comments.

                       

                      Peter

                      • 8. Re: Right page only numbering
                        Peter Spier CommunityMVP

                        OK, here's the link to the ID Secrets article. http://indesignsecrets.com/previousnext-page-number-on-same-page.php

                         

                        One suggestion was to put a cross-spine frame on the master and use a current page marker, but we've had a couple of posts today about cross-spine master objects not printing or exporting to PDF correctly, soooooo....

                         

                        I'm afraid the only answer is to override. Does it make you feel any better that this is one of the things that USED TO WORK in CS3?

                        • 9. Re: Right page only numbering
                          Kenneth Benson Community Member

                          This particular kind of cross-spine frame isn't going to cause a problem; it was, for whatever reason, text in a frame on the right page on top of a cross-spine frame that was getting covered by the cross-spine frame that should have been underneath it.

                           

                          That said, I can't make this work with a cross-spine frame anyway.

                           

                          I like the idea in the article to anchor a current page number in a frame on the left page and then push the anchored frame over the spine to the right page.

                           

                          Ken Benson

                          • 10. Re: Right page only numbering
                            Peter Spier CommunityMVP

                            I can't make ANY of them work without overriding the frame on the left page, but all work if you do.

                             

                            The secret to the cross-spine technique is there has to be more of the frame on the left page than on the right.

                             

                            I'm filing a bug on this.

                            • 11. Re: Right page only numbering
                              Pedro Vareta Community Member

                              Well, have tried everything (except overiding) and nothing works...even all the different solutions I found in the comments of the Indesign secrets file you sent.

                              Nothing worked. I guess it probably is a bug, like you said, it used to work in CS3....

                               

                              Thanks anyway.

                              • 12. Re: Right page only numbering
                                Peter Spier CommunityMVP

                                You have to override the correct frame, which is the one on the left page, not the one on the right, if that helps.

                                • 13. Re: Right page only numbering
                                  John Hawkinson Community Member

                                  Bob Bringhurst posted about this on his blog in June, in Page Numbering on a Single Spread Page. His solution requires a manual override on every page where you'd want to do this (which could be a lot).

                                   

                                  I wrote a quick script that does all the overriding for you.

                                   

                                  It walks each master spread and finds all the text frames with current (auto)/prev/next page number markers, and then walks all the pages that master spread is applied to and overrides each of those text frames.

                                   

                                  Unfortunately it appears that the textFrame.override() method somehow breaks story/text Frame threading (is this a bug?). So the script has to workaround it. I do so with labels, by assigning a label to each master page textFrame that needs to be overriden, and then finding those overriden labels on each document spread and re-establishing the threading that existed between the same labels on the master page.

                                   

                                  This script doesn't do anything clever if you have a spread with 1 or 3+ pages, so you'd have to deal with such cases by hand. It also removes any existing labeled overrides before it runs, which I guess might not be desirable in some cases, in which case you could comment out section (3.).

                                   

                                  If anyone wants to do this (I'm not sure why…), enjoy:

                                   

                                  // John Hawkinson <jhawk@mit.edu>
                                  // 
                                  // For each master spread:
                                  // 1. Find textFrames on the master spreads with threaded next/prev story frame, label them
                                  // 2. Find the set of spreads with the master applied
                                  // 3. Remove existing overrides
                                  // 4. Override the item on all such pages.
                                  // 5. Restablish threading for labeled items on such pages
                                  
                                  var debug = 0;
                                  
                                  var d = app.activeDocument;
                                  for (n=0; n<d.masterSpreads.count(); n++) {
                                       var ms = d.masterSpreads[n];
                                       if (debug)
                                         $.writeln("Processing master spread " + ms.name);
                                       var tfTodo = new Array();
                                       var labels = 0;
                                       // 1. Find textFrames on the master spreads with threaded next/prev story frame, label them
                                       for (m=0; m< ms.textFrames.length; m++) {
                                            var tf = ms.textFrames[m];
                                            if (tf.parentStory.textContainers.length > 1)
                                              for (l=0; l<tf.parentStory.characters.length; l++) {
                                                if (tf.parentStory.characters[l].contents==SpecialCharacters.AUTO_PAGE_NUMBER ||
                                                tf.parentStory.characters[l].contents==SpecialCharacters.NEXT_PAGE_NUMBER ||
                                                tf.parentStory.characters[l].contents==SpecialCharacters.PREVIOUS_PAGE_NUMBER) {
                                                   tfTodo.push(tf);
                                                   tf.label="MP"+(++labels);
                                                   break;
                                                 }
                                            } // for … tf.parentStory.characters
                                       } // for … ms.textFrames
                                  
                                       // 2. Find the set of spreads with the master applied
                                       for (m=0; m<d.spreads.length; m++) {
                                            var ds =d.spreads[m];
                                            if (ds.pages.length==2 &&  // Don't mess with single-page or 3+ page spreads
                                                ds.appliedMaster && ds.appliedMaster.id==ms.id) {
                                              if (debug) 
                                                $.writeln("  Document spread "+m+" ("+
                                                   ds.pages.everyItem().name+") has this master");
                                              
                                             // 3. Remove existing overrides
                                              for (l=1; l<=labels; l++) { //  1-indexed
                                                 try { ds.pageItems.itemByName("MP"+l).removeOverride(); }
                                                 catch (e) { if (e!="ReferenceError: Object is invalid") throw(e); }
                                              }
                                  
                                             // 4. Override the item on all such pages.
                                              for (l=0; l<tfTodo.length; l++)
                                                   if (tfTodo[l].parent.side == PageSideOptions.LEFT_HAND)
                                                      tfTodo[l].override(ds.pages[0]);
                                                   else
                                                      tfTodo[l].override(ds.pages[1]);
                                         
                                              // Unfortunately threading is not preserved by the textFrame.override() method 
                                              // 5. Restablish threading for labeled items on such pages
                                              var masterNext;
                                              for (l=1; l<=labels; l++) //  1-indexed
                                                      if ((masterNext=ms.pageItems.itemByName("MP"+l).nextTextFrame) != null)
                                                        ds.pageItems.itemByName("MP"+l).nextTextFrame =
                                                          ds.pageItems.itemByName(masterNext.label);
                                         
                                          } // if … ds.appliedMaster.id
                                       } // for … d.spreads
                                  } // for … d.masterSpreads
                                  exit;
                                  
                                  • 14. Re: Right page only numbering
                                    Eddie Liao

                                    I have an alternative to set the page-numbering for spread page correctly.

                                     

                                    1. Create Master pages 'A', and insert current page number on the right page.

                                     

                                    1.png

                                    2. Create another master pages 'B', and create an very wide text box, which started from the bleed area of the left page and across the spine. Please refer my attached pictures.

                                    2.png

                                    3. When add pages to your contents, you just need to apply Master page 'B' to all the 'left' pages and Master page 'A' to the 'right' pages. You don't need to activate the page number from the master page.