25 Replies Latest reply: Sep 8, 2009 1:56 PM by Anna Nmty RSS

    Section Numbering in Header

    Anna Nmty Community Member

      On a master page, I need the section number and section title to show in a header. I am setting up a template for a multi-section document and making the transition from Word to InDesign templates has been a bit of a leap.

       

      I created a text variable for my Heading 1 style and used it in my header to show the title of the section. For the number, all I could think of was that I needed use a section marker character in the header and had to specify it manually in the Section Marker box in my Numbering & Sections options window.

       

      (1) Is this the only/best way of accomplishing this task?

       

      and while we're talking about the window...

       

      (2) Is entering the Section Prefix manually the only/best way of getting the section number to show in my footer page numbers?

       

       

      screenshot.48.jpeg

        • 1. Re: Section Numbering in Header
          P Spier CommunityMVP

          Sounds like "Yes" on both counts to me, but there might be some sort of scripting solution I don't know about.

          • 2. Re: Section Numbering in Header
            Bob Bringhurst - Adobe Adobe Employee

            It depends on how you're setting up your document. If your section numbering should be based on the information you enter in the Numbering & Section Options dialog box, then yes, Peter's right -- this is the right method. But if your section numbering should be based on a title or heading instead of section numbering, you can create a heading paragraph style that defines a numbered list. See this article for details. Then you would create a running header on your master page that grabs the heading.

            • 3. Re: Section Numbering in Header
              Anna Nmty Community Member

              My section titles are set up as paragraph styles (Heading 1, Heading 2, etc.) that all have numbering based on a list I named Sections.

               

              I do have my page's header pulling a running header based on my Heading 1 style (as set up in the image below), but only the text of Heading 1 will appear in the header, not the number. (The numbering does what it should in the main document.)

               

              Though I can get the number to show in the header in a separate text box (works fine for my layout) once I define a section marker, I wanted to see if there was a better way. I'd hate to get weeks into my group using this template only to have someone ask why I did not do Obvious Thing X.

               

              screenshot.51.jpeg screenshot.50.jpeg

              (we use CS 3)

              • 4. Re: Section Numbering in Header
                Jeremy bowmangraphics-DQuh1B Community Member

                I’m interested in answers to this problem too, and pleased that two of the “top minds” of this forum are on the case...

                 

                I’ve had to deal with a similar problem while typesetting Shakespeare plays. Basically, I need a running header on every page that displays the act number and scene number. And it must all go into a single document (rather than an InDesign “book”).

                 

                My own “solution” to this problem seems so clunky I hesitate to mention it. I use GREP to add numbers (using invisible character styles) to almost every line. One invisible number is the act number, the other is the scene number. The running header grabs the first occurrences on each page of these two character styles, and displays them at the top of the page -- which is the only place where they are visible.

                 

                There simply has to be a better way. Alas, so far I’m unaware of it.

                 

                I’ll modestly admit, however, that this method isn’t as bad as it sounds. The invisible numbers add a negligible amount to the size of the document, and it only took about ten minutes to add them to Hamlet, a l-o-n-g play.

                 

                But tell me: what is the better way?

                 

                Jeremy

                • 5. Re: Section Numbering in Header
                  Harbs. CommunityMVP
                  But tell me: what is the better way?

                  You had to ask?

                   

                  http://in-tools.com/plugin.php?p=16

                   

                  Paragraph numbering in headers is a new feature in version 1.0.7 the current version available for download is version 1.0.6. The new version can transfer either: just numbers/bullets, or numbers/bullets and text, or just the text.

                   

                  Until  the new version is up on the site for download, you can contact me.

                  • 6. Re: Section Numbering in Header
                    P Spier CommunityMVP

                    Jeremy,

                     

                    I'm sure Harbs plugin is an absolute marvel, but don't the act and scene numbers appear visibly somewhere? Could you not simply add a character style to those (character styles can be completely blank, having only a name) and use those styles in your variables?

                    • 7. Re: Section Numbering in Header
                      Jeremy bowmangraphics-DQuh1B Community Member

                      I'm sure Harbs plugin is an absolute marvel

                      Agreed -- but for me life (and InDesign, and color management) is a learning process, so I'm allergic to all plugins that I didn't write myself. (And I need hardly add that I have written precisely none so far.) Plugins are perfect for big commercial producers, but I'm just a little guy who needs to work with unadorned, sparse original materials.

                      don't the act and scene numbers appear visibly somewhere? Could you not simply add a character style to those (character styles can be completely blank, having only a name) and use those styles in your variables?

                      Yes, they appear on the first page of each new scene. I can see how I might add a cross-reference in CS4, but not sure how this would lessen the workload (and accompanying human error). With my (rubbishy, clunky) method, it takes just ten minutes to simply select each act, then each scene, and add the invisible numbers.

                       

                      Then off we go with the real work -- removing widows/orphans, preventing badly-split speeches, adding explanatory notes, and so on, all producing ridiculous amounts of text re-flow. As the text washes back and forth, it's good to have faithful, reliable headers !

                       

                      Jeremy

                      • 8. Re: Section Numbering in Header
                        P Spier CommunityMVP

                        I don't think you need a cross-reference, just an ordinary character style running header (if you apply the style to the act and scene headings). The variable should carry on page after page until there is a change, I think.  You could easily use GREP to apply the style.

                        • 9. Re: Section Numbering in Header
                          peter at knowhowpro Community Member

                          ID's running header text variables won't capture the numeric portion of numbered-list paragraphs. Harbs' will. That's the important difference here.

                           

                          So, for example, if a paragraph contained the literal text "Section 1,"  or "Act I," then a paragraph-based running header variable would display Section 1 or Act I. The author would need to manually type the appropriate text. While sections may be moved around in a document, which requires diligent observation and maintenance, it's rare that Shakespeare's acts and scenes are rearranged<G>.

                           

                           

                          HTH

                           

                          Regards,

                           

                          Peter

                          _______________________

                          Peter Gold

                          KnowHow ProServices

                          • 10. Re: Section Numbering in Header
                            Anna Nmty Community Member

                            Lively discussion. Thanks to all

                             

                            For a while at least, I will have to stick with my current solution. I need to keep my template compatible with other users at work and we are currently at the budget-squeezing level of cutting costs by buying cheaper coffee supplies, etc., so I am guaranteed a rejection for a purchase-a-script pitch, no matter how cool and useful.

                            • 11. Re: Section Numbering in Header
                              Bob Bringhurst - Adobe Adobe Employee

                              The numbering should be included in the header. I logged a bug internally. FYI, you can log bugs here:

                              www.adobe.com/go/wish

                              • 12. Re: Section Numbering in Header
                                Anna Nmty Community Member

                                Thank you for the follow-up. I did not realize it was a bug (new to setting up InDesign templates).

                                 

                                BTW, very impressed with your diligence reading and responding to forum posts (and help file comments). Your website is also greatly appreciated!

                                • 13. Re: Section Numbering in Header
                                  peter at knowhowpro Community Member

                                  I thought this was "as designed." IIRC, it has been reported to the feature request wish list. Thanks for pushing it.

                                   

                                  Regards,

                                   

                                  Peter

                                  _______________________

                                  Peter Gold

                                  KnowHow ProServices

                                  • 14. Re: Section Numbering in Header
                                    Harbs. CommunityMVP

                                    I also thought it was "as-designed".

                                     

                                    I'm not sure that picking up the number should be correct default 

                                    behavior.

                                     

                                    Harbs

                                    • 15. Re: Section Numbering in Header
                                      peter at knowhowpro Community Member

                                      Harbs. wrote:

                                       

                                      I also thought it was "as-designed".

                                       

                                      I'm not sure that picking up the number should be correct default 

                                      behavior.

                                       

                                      Harbs

                                       

                                      I think it should be possible, whether it's the default, or at the user's option. FrameMaker's been doing it for almost 20 years!

                                       

                                      Regards,

                                       

                                      Peter

                                      _______________________

                                      Peter Gold

                                      KnowHow ProServices

                                      • 16. Re: Section Numbering in Header
                                        Harbs. CommunityMVP

                                        Yes, it should be possible -- as an option. Frame's building blocks 

                                        are pretty versatile from what I understand.

                                         

                                        If Adobe decides to "fix this", it'll mess up a lot of existing 

                                        documents...

                                         

                                        If it's not an option, what should happen with bullets?

                                         

                                        Harbs

                                        • 17. Re: Section Numbering in Header
                                          Jeremy bowmangraphics-DQuh1B Community Member

                                          While sections may be moved around in a document, which requires diligent observation and maintenance, it's rare that Shakespeare's acts and scenes are rearranged

                                           

                                          Their order stays the same, but there's a great deal of moving text from one page to the next, or back again, especially if explanatory notes and images are also included. A good typesetter won't just avoid widows and orphans -- he'll also try to avoid splitting short speeches, avoid "interruptions" (i.e. linked speeches) that straddle pages, and so on. In my experience, a play is the most time-consuming sort of typesetting of all, and it involves a lot of re-arranging and re-pagination (even though the order of the scenes and acts stays the same).

                                           

                                          So it's a great help if the running header can "look after itself". If cross-references were used, each page would have to be set up to refer to the correct bit of text, which would probably take up as much time as simply using a large number of master pages. I'd guess that automatic numbering would have similar shortcomings, even if variable text contained numbers as hoped.

                                           

                                          I'm sure Harbs' plugin is very good, but I need to use a number of my own scripts during this process, and I wouldn't trust my own scripts to work in concert with the plugin. I barely trust them without it!

                                           

                                          Jeremy

                                          • 18. Re: Section Numbering in Header
                                            Harbs. CommunityMVP

                                            I'm sure Harbs' plugin is very good, but I need to use a number of 

                                            my own scripts during this process, and I wouldn't trust my own 

                                            scripts to work in concert with the plugin. I barely trust them 

                                            without it!

                                             

                                            I'm much more confident than you about that...

                                             

                                            If you want, you can feel free to discuss your concerns with me on 

                                            priv (with regards to the plugin or otherwise).

                                             

                                            Harbs

                                            • 19. Re: Section Numbering in Header
                                              P Spier CommunityMVP

                                              Jeremy,

                                               

                                              Did you even try what I suggested? It does work.

                                               

                                              Make a character style called Act and apply it to every act heading. Make a second called Scene and apply it to all scene headings. These two styles should be based on None and have nothing changed in them other than the name. You can use GREP to find all Act and Scene headers ( Act [IVX]+ should find Acts with Roman numerals, Scene \d+ should find Arabic numbers), or include a GRep style or nested style in the paragraph style. If the headers are completely self contained, you don't even need the character styles, use Paragraph Style running header variables instead.

                                               

                                              This will not work if the headings are numberd lists, but then there is no way to put the number after the text in a list, so I don't think that's an issue for you.

                                               

                                              Peter

                                              • 20. Re: Section Numbering in Header
                                                Jeremy bowmangraphics-DQuh1B Community Member

                                                Peter, that is brilliant!

                                                 

                                                I didn't realize that the running header would continue even on pages that didn't contain the styles in question. The words "First on Page" give me the impression that there had to be at least one occurrence on any page with a running header. I suppose I was also misled a bit by the fact that if there aren't any occurrences on page 1, the text variable boxes are empty.

                                                 

                                                Now that I know it retains a "memory" of the variables on the most recent preceding page where the style did occur, my life takes a turn for the better.

                                                 

                                                That is a great help. Thanks!

                                                 

                                                Jeremy

                                                 

                                                Edit PS: Ten imaginary points from me (they're better than the real ones).

                                                • 21. Re: Section Numbering in Header
                                                  Harbs. CommunityMVP

                                                  Great work Peter.

                                                   

                                                  To tell you the truth I didn't follow exactly what was going on. I 

                                                  didn't quite understand what was going on with all the numbers that 

                                                  Jeremy put in, but I figured, I was just reading too quickly...

                                                   

                                                  I usually have a hard time following when there's no pictures...

                                                   

                                                  Harbs

                                                  • 22. Re: Section Numbering in Header
                                                    Jeremy bowmangraphics-DQuh1B Community Member

                                                    I didn't quite understand what was going on with all the numbers that

                                                    Jeremy put in,

                                                    And evidently, neither did I! -- I was putting all those invisible numbers in to guarantee that at least one of them would occur on any page whose running header referred to it, but thanks to Peter I now see that the running header "remembers" the last occurrence of the number on a previous page.

                                                     

                                                    For me, it opens up whole new vistas of possibility...

                                                     

                                                    To return to Anna's original question, I would have thought the best way to achieve what she wants is simply to have a neutral (i.e. non-actively formatting) character style applied to the number part of each section title. Then have a running header (on a master page) refer to that character style where the section number should appear. Since it "remembers" the number on the most recent previous page where the special character style occurred, the number should be correct in the running header.

                                                     

                                                    Apologies if someone has said this already. I make a habit of overlooking the obvious, and I re-invent the wheel every Tuesday afternoon.

                                                     

                                                    Jeremy

                                                    • 23. Re: Section Numbering in Header
                                                      P Spier CommunityMVP

                                                      I'm going to say that I don't believe the method I explained to Jeremy will work for Anna if she tries to use the numbered list because, as I understand the previous discussion, the variable doesn't pick up the number.

                                                      • 24. Re: Section Numbering in Header
                                                        Jeremy bowmangraphics-DQuh1B Community Member

                                                        I don't believe the method I explained to Jeremy will work for Anna if she tries to use the numbered list because, as I understand the previous discussion, the variable doesn't pick up the number.

                                                         

                                                        Agreed, but isn't it fairly easy to turn numbered paragraphs into what is needed for the running header?

                                                         

                                                        I'm thinking of something like this:

                                                         

                                                        1. Convert numbers to text

                                                        2. Use GREP to look for ^\d+\t (or whatever -- loads of GREP experts here) in the given paragraph style, and apply a special new character style (that does not do anything to formatting, it's simply for the variable text to grab)

                                                        3. Make a running header that grabs that style, and "remembers" it over pages that don't even contain instances of the style

                                                         

                                                        And then you've got what you want -- incrementing numbers in a running header.

                                                         

                                                        And as far as I can see so far, there can be any number of them, all incrementing independently of each other -- definitely something new to my conceptual space, and worth exploring a bit!

                                                         

                                                        Jeremy

                                                        • 25. Re: Section Numbering in Header
                                                          Anna Nmty Community Member

                                                          Once the numbers are converted to text, they will show in the running header. They are no longer automatic, though, which affects future insertions and any table of contents updates.

                                                           

                                                          While the argument could be made that it would be a task to be done at the end of the document process, it is no small feat to get the authors and reviewers to a pens-down stage and a zero-hour section addition is not unlikely. Also, my division frequently uses reports as building blocks for other versions and other reports. The less manual fiddling on my part, the better my workflow. The numbers-to-text could end up helping out during upcoming crunches, though.

                                                           

                                                          As another tactic, I am looking for a way to pull the section number in from the pages panel Numbering & Section Options area, as I can get the page and section numbers to pull from here. Getting pages to number for a section-based document rather than a chapter based document was quite torturous and I would like to get everything I can from that battle.

                                                           

                                                          I love these forums. My husband's eyes glaze over like an Easter ham whenever I talk about the intricacies of software programs, page layout, formatting,
                                                          etc. It's refreshing to have a flow of ideas.