14 Replies Latest reply on Jun 3, 2014 2:20 AM by Obi-wan Kenobi

    How do I make consecutive question and answer pages auto-numbered in InDesign?

    Queen Victoria too

      How do I make consecutive question and answer pages auto-numbered in InDesign?

      For example; Chap1-Q1 then next page Chap1-A1, Chap1-Q2 then next page Chap1-A2, etc.

      So, hopefully all odd-numbered pages will be question pages and all even-numbered pages will be answer pages.

        • 1. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
          gert verrept Level 2

          Go to the master pages and on the odd-numbered pages add the page number variable (ctrl alt shift N on windows) preceded by Chap1-Q. Do the same on the even-numbered page, but replace the Q by A. If you have more chapters, create more master pages so you can easily change Chap1 with Chap2 ...

          • 2. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
            Willi Adelberger Most Valuable Participant

            Create for each Q/A a single document.

            Put these documents in a book file. Each of these documents will be a "Chapter".

            Now you can use the variable "chapter" as placeholder in any text you want.

            Work with a single Master Page. I would strongly recommend not to confuse content (on the page) with master page items.

             

             

            /// Working with single documents in a book file INDB will allow you to easily change the order of chapters without manually renumbering anything.

            • 3. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
              Migintosh Level 4

              Gert Verrept wrote:

               

              Go to the master pages and on the odd-numbered pages add the page number variable (ctrl alt shift N on windows) preceded by Chap1-Q. Do the same on the even-numbered page, but replace the Q by A. If you have more chapters, create more master pages so you can easily change Chap1 with Chap2 ...

              I don't think that will work the way queen victoria too would like. What you will get is something like this:

              Screen Shot 2014-06-03 at 12.14.53 AM.png

              …where the questions and answers are alternating, but the page numbers are consecutive. You don't want answer 2 to come between questions 1 and 3 with no question 2.

               

              Willi's suggestion will work, but if you want one document for all of the questions and one for all of the answers (in order to use automatic page numbers), you would need to make a third document and place each page of the questions document on (for example) odd pages and each page of the answers document on even pages. This can be done by placing the original InDesign document directly, or placing the exported pages from a PDF (I would recommend the original InDesign if you go this way).

               

              In order to use the book function in InDesign, I don't know how you would make it work unless you made a different InDesign document for each page, and I don't think I would want to do that. If I have misunderstood Willi's answer, I'm sure he will correct me.

               

              Another option would be half-way automatic, but if there is a way to do this with fully-automatic page numbers, I don't know how to do that. Here's what you could do:

               

              Make a document with a text frame on each of the master pages, but don't thread them into a single story. I made a test document where the master frames are covering the page with very large text, but that's only to show you how it looks in screen shots. You would use a text frame and text size that fits your needs. If you don't already have document pages inserted, do them before the next step.

               

              Make a separate text document with a story containing all of the page numbers with the prefixes you need for questions, and another for answers. You can do this automatically with Excel or any spreadsheet very quickly. Once you have two text files, place the text document with all of the questions into the master frame of the first document page. Make sure to click into the master frame, which will show with a dotted line on the document page. Once the text is placed, the master frame will be overridden on the document page. Do the same with the answers text document, but on the second document page. It will look something like this:

              Screen Shot 2014-06-03 at 12.16.49 AM.png

              Use Find/Change to change the paragraph returns into Next Frame Breaks. The text will go into overset, leaving only the first number in each frame, like this:

              Screen Shot 2014-06-03 at 12.17.11 AM.png

              Now, click the out port of the questions story and Shift-Click into the master text frame on the third document page. Shift will make the overset text flow to the next available frame in the chain, and because the text frames on the master spread are not linked to each other, it will skip all of the even-numbered pages. When all of the text in the story has been placed, do the same with the answers story, and continue it to the fourth document page, and it will flow into all of the even pages, like this:

              Screen Shot 2014-06-03 at 12.17.41 AM.png

              I assume that this is what you want, but if I'm wrong, you can disregard my answer and use Willi's suggestion.

              • 4. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                Willi Adelberger Most Valuable Participant

                With my solution you get also automatic page numbers. But you can include in automatic page numbers the chapter number, which is not possible with a single document.

                And in this case, where each Question has to beginn at a new page, it is a good solution, because the big disadvantage of book files is that you cannot thread stories between document, but here it is not needed.

                • 5. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                  Migintosh Level 4

                  I'm not sure I fully understand what you are suggesting.

                  Willi Adelberger wrote:

                   

                  Create for each Q/A a single document.

                  Do you mean:

                  1. One document for all of the questions, and another document for all of the answers, or…
                  2. One document for each page?

                   

                  Willi Adelberger wrote:

                   

                  Put these documents in a book file. Each of these documents will be a "Chapter".

                  Unless each page was a separate InDesign document, how would you get the question pages and answer pages to alternate, as shown in my last screen shot?

                  • 6. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                    gert verrept Level 2

                    This doesn't solve the auto numbering, but in order to get the Q's and the A's right, you could use this script made by someone on the forum:

                    put all the Q's in the document, then put all the A's, make sure the you have the same number of Q and A's.

                    Run this script :

                    #target "indesign"

                     

                     

                    /**

                    * shuffle fronts-then-backs page order into interleaved fronts and backs order/

                    */

                    main();

                    function main()

                    {

                              // get the active document

                              var doc = app.activeDocument;

                     

                              // start moving pages around

                     

                              var n = doc.pages.length;

                     

                              var half = n/2;

                     

                              for (var ix = 0, jx = half; jx < n - 1; ix += 2, jx++) // yup, "< n-1"

                     

                              {

                     

                                        var front = doc.pages[ix];

                     

                                        var back = doc.pages[jx];

                     

                                        back.move(LocationOptions.AFTER, front);

                     

                              }

                     

                              return;

                     

                    }

                    you'll end up with Q1-A1, Q2-A2 ...

                    • 7. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                      Willi Adelberger Most Valuable Participant

                      One document for each pair of Q&A.

                      One document for all pairs of Q&A in one chapter.

                      Each document will have an automatic chapter number. In InDesign one document can contain only a Chapter in the term of InDesign.

                      You can use the Chapter as automatic number in a paragraph style. The automatic number comes from the current level = ^# .

                      ID-Paragraph-Style-Autonumber.png

                      The very same document has to contain Question and Answer. Because this is the same document, it has to have the same chapter. It has to be part of the same list (here q&a)

                      When it comes to the answers, it should be a level below. The numeric place holder has to be the same as the question, here Level 1 =  ^1 .

                      Answer.png

                      And when it comes to a second question in the same chapter, the number will increase.

                      With the keep options in the Paragraph Style you can determine that ever answer or question has to start with a new/even/odd page/frame.

                      • 8. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                        Willi Adelberger Most Valuable Participant

                        I think it is too erratic when it comes to changes after applying this script and I think it is to complicated for many users.

                        • 9. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                          Migintosh Level 4

                          I don't know how large the page count is in queen victoria too's book, but two pages per document seems like a bad workflow to me. Maybe if the page count were low, but even a relatively-low page count of 64 pages would mean using 32 different documents for one book. My solution can be done with one document, but it's up to queen victoria too to decide what works best.

                          • 10. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                            Willi Adelberger Most Valuable Participant

                            When several documents are bundled in one book, then it is not a bad workflow. Why should it be. There is not even one disadvantage. Only if you see several documents as disadvantage. But they are bundled in one book file! You are way more flexible to work with chapters what you could not do with a single document. You have access to every export function from the book panel's flyout menu (except SWF). I don't see how your solution will work, when chapters have to be moved, when changes are done. I think it is way to complicated. To set up one single document as template, and let InDesign do all automatic numbers.

                             

                             

                            /// And your solution has one huge problem: You have to override items from the master page. In my solution not even one override is needed.

                            Overrides are always to be avoided because it will mix content with items from the master which is not logical permitted in a workflow and it will it make difficult to export PDF/UA where content and master is strictly divided.

                            • 11. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                              Queen Victoria too Level 1

                              Wow. Gert, Migintosh and Will. Thank you! You all are much smarter than I.

                              It's obvious that this particular function is not as intuitive as I'd hoped, but I'll certainly give these suggestions a try.

                              Many thanks.

                              ~ QVtoo

                              • 12. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                                Obi-wan Kenobi Adobe Community Professional

                                Hi,

                                 

                                I think 3 auto-numbering para styles with only one file would be another simple way to kindly treat this question. 

                                 

                                Capture d’écran 2014-06-03 à 10.48.30.png

                                 

                                Capture d’écran 2014-06-03 à 10.48.53.png

                                • 13. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                                  Willi Adelberger Most Valuable Participant

                                  But how will you specify the change of a chapter, there has to be a first Question in a chapter paragraph style, different form the following questions in a chapter to indicate that a chapter starts here.

                                  • 14. Re: How do I make consecutive question and answer pages auto-numbered in InDesign?
                                    Obi-wan Kenobi Adobe Community Professional

                                    Hi Willi,

                                     

                                    My approach is simplistic: I use 3 auto-numbering para styles: one for "ChapterXX", one for "QYY" and the third for "AZZ".

                                     

                                    That looks like:

                                     

                                    Capture d’écran 2014-06-03 à 11.13.52.png

                                     

                                     

                                     

                                    If I want to modify the numbering of the chapter, I only put the cursor in the flow, Cmd-Shift-End and modify the para numbering (here: 11).

                                    If I want to modify the numbering of a question/answer and the following, I put the cursor in one anchored text block and modify it, all behind are updated! As:

                                     

                                    Capture d’écran 2014-06-03 à 11.19.21.png