7 Replies Latest reply on Jul 26, 2011 7:18 PM by peter minneapolis

    Need help with Table of Contents

    Citadel1996

      I've run in to a problem that I can't quite figure out.  I suspect there is an easy fix, but it is beyond my limited skills and I'm looking for a little advise.

       

      I have a journal (InDesign book) composed of articles.  The articles each have a title and author, both of which I would like in the TOC.  Easy so far.  But, I am trying to include the author's company as a sort of footnote under the author's name.  This is particularly helpful when there are multiple authors and/or multiple companies, which can get a bit messy if just listed after the names  So, here is what I'm trying to do:

       

      John Doe a,b, Joe Blow a,c, and Jane Doe c

       

      a Doe Incorporated, b Kangaroo Enterprises, c Scorpion Electronics

       

      (a, b, and c are all in superscript.)

       

       

      But, the problem I have is that in the TOC I only want it to read "John Doe, Joe, Blow, and Jane Doe" as authors and omit the superscript characters and the company names.  I initially thought this would be easy to do by just unlinking the unwanted parts from the paragraph style.  But, that's not working.  When I unlink the superscript, then none of it shows up in my TOC.  How can I get around this so that TOC works as desired?

       

      I look forward to reading your suggestions.

        • 1. Re: Need help with Table of Contents
          Peter Spier Most Valuable Participant (Moderator)

          Any time you want something different in the TOC from what is in the body of the document you have some manual work cut out for you.

           

          In this case, I think you have two options, either edit the listings to remove the notations after the TOC is generated (and every time it is updated), or link instead to non-printing tags that have exactly the text you want to use (apply a unique style to those and include it instead of the style assigned to the "real" text.

           

          Non printing tags can be anchored to the text as an anchored object so they move with it, or you can set up a non-printing layer to hold them.

          • 2. Re: Need help with Table of Contents
            Citadel1996 Level 1

            Peter,

             

            Thanks.  I was hoping to avoid having to edit the TOC, so your suggestion about the non-printing tags sounds like a great idea.  I have done something similar with some section headings that repeat on each article, but I only want to appear once in the TOC.  What I did was make a new style for that heading that had text that was paper color so basically invisible.

             

            So, my follow-up question is if that is the same thing as the "non-printing tags" you mentioned?  I suspect not and that your solution is probably a little better. How do you do the non-printing tags?

             

            Thanks,

             

            Stephen

            • 3. Re: Need help with Table of Contents
              Peter Spier Most Valuable Participant (Moderator)

              Paper color is not invisible if it's in front of something other than paper.

               

              I much prefer to either put tags on a non-printitng layer, or make them bright red or something else obvious, then set them to non-printing in the Attributes panel. I think it's safer to have them obvious to everyone who might want to edit in the future.

              1 person found this helpful
              • 4. Re: Need help with Table of Contents
                Citadel1996 Level 1

                Peter,

                 

                You are right about that paper on background tip.  I learned that the hard way once.  It is admitedly not the most elegant solution.

                 

                I appreciate your advise.  That is really helpful and I will probably go back and change some of those paper-color tags to non-printing tags like you suggested.  I really appreciate the quick reply.  I'm sure you saved me countless hours of fiddling and some graceless solution like paper-color tags.

                 

                Thanks,

                 

                Stephen

                • 5. Re: Need help with Table of Contents
                  peter minneapolis Level 4

                  Citadel1996 wrote:

                   

                  I've run in to a problem that I can't quite figure out.  I suspect there is an easy fix, but it is beyond my limited skills and I'm looking for a little advise.

                   

                  I have a journal (InDesign book) composed of articles.  The articles each have a title and author, both of which I would like in the TOC.  Easy so far.  But, I am trying to include the author's company as a sort of footnote under the author's name.  This is particularly helpful when there are multiple authors and/or multiple companies, which can get a bit messy if just listed after the names  So, here is what I'm trying to do:

                   

                  John Doe a,b, Joe Blow a,c, and Jane Doe c

                   

                  a Doe Incorporated, b Kangaroo Enterprises, c Scorpion Electronics

                   

                  (a, b, and c are all in superscript.)

                   

                   

                  But, the problem I have is that in the TOC I only want it to read "John Doe, Joe, Blow, and Jane Doe" as authors and omit the superscript characters and the company names.  I initially thought this would be easy to do by just unlinking the unwanted parts from the paragraph style.  But, that's not working.  When I unlink the superscript, then none of it shows up in my TOC.  How can I get around this so that TOC works as desired?

                   

                  I look forward to reading your suggestions.

                   

                  Peter S, as usual, is on target with the suggestion to create a difference in the document text that suppresses or deletes the same text in the TOC.

                   

                  Although I don't' know nearly enough GREP to write one, I suggest a GREP script or Find/Replace operation that deletes the unwanted text from the TOC, after each TOC generation. It should do something like find and delete the first instance of one or more occurrences of space-single character-comma, followed by single-character-space, followed by word or a tab character (the tab character inserted by the TOC between the entry text and the page number), then repeat one or more times until no more targets are found.

                   

                  To avoid affecting the original instances in the main text, create a paragraph style for TOC entries, and specify this style in the GREP Find'/Replace, or GREP script.

                   

                  Other approaches involve applying a character style with a nested character style or GREP style to the unwanted text in the TOC-entry paragraphs, then delete the found character style with Find/Replace. A GREP paragraph style can't delete text, only apply a character style, but it can find the unwanted text with much the same GREP logic as a GREP Find/Replace. A nested character style in a paragraph style can apply a character style by finding the unwanted text. It's not as smart about finding the single-characters separated by commas, but it can find End Nested Style Here characters. You can insert these in the source text to mark the beginning and ending of the text to keep and the text to eliminate later in the TOC.

                   

                  You'll also need to incorporate logic in these methods that finds the superscripted text; applying it with a named character style will help.

                   

                  Search Google for terms like "using InDesign nested styles," "using InDesign GREP styles," "using InDesign GREP queries," "using InDesign scripts," and similar phrases.

                   

                  HTH

                   

                  Regards,

                   

                  Peter

                  _______________________

                  Peter Gold

                  KnowHow ProServices

                  • 6. Re: Need help with Table of Contents
                    Peter Spier Most Valuable Participant (Moderator)

                    @ Peter G, I think you make this more complex than necessary. If you haver alternate text to use, there's no reason to have the original appear in the TOC at all, so there should be nothing to delete, but perhaps I misunderstood you.

                     

                    @ Stephen, While Paper is does not make text transparent, using a fill of [None] will do the trick. As I said, though, I don't like to leave truly invisible text hanging around in a document. It inevitably comes back to bite you at some point. If it's reaaly obvious and oout of place, you can't miss it.

                    • 7. Re: Need help with Table of Contents
                      peter minneapolis Level 4

                      P Spier wrote:

                       

                      @ Peter G, I think you make this more complex than necessary. If you haver alternate text to use, there's no reason to have the original appear in the TOC at all, so there should be nothing to delete, but perhaps I misunderstood you.

                       

                      @ Stephen, While Paper is does not make text transparent, using a fill of [None] will do the trick. As I said, though, I don't like to leave truly invisible text hanging around in a document. It inevitably comes back to bite you at some point. If it's reaaly obvious and oout of place, you can't miss it.

                      Hi, Peter S:

                       

                      It's six of one or half a dozen.

                       

                      One way or another, text in the main document must be hidden from the TOC. It can be done in the main document, before the TOC is generated, or it can be done afterwards, in the TOC itself. Any method that needs manual attention can be overlooked and mess something up, so the most comfortable choice for the user and the workflow team is the one to use.

                       

                      One automated solution would be to use GREP styles in the TOC entry paragraph styles, IF GREP styles could replace found content, and/or apply a condition that could be set to hidden, not just apply character styles. You'd just run the TOC process and the unwanted text would disappear in the generated TOC. The long way to solve this is to repeatedly submit feature enhancement requests to make GREP paragraph styles more capable, and hope that some day in some future release, InDesign could do this.

                       

                      A script that ran the TOC process and performed the text removal by whatever method suits the workflow users, would be semi-automated; the script needs to be invoked, but, then, so does the TOC process. It's possible to mark the unwanted text in the source, with a nested character style, that passes through to the TOC, and run a find/replace query in the TOC that applied a hidden condition to the found character-styled text.

                       

                      As you noted above, overlooking any necessary manual step invites a bite.

                       

                      Frankly, it's always amazing to me, how easy it is to think up a useful task, like distinguishing between a chunk of main-source text and its resulting TOC entry, and how a seemingly-simple tool that's missing in InDesign (and other applications) can spur the flow of creative juices to solve the shortcoming.

                       

                      Regards,

                       

                      Peter

                      _______________________

                      Peter Gold

                      KnowHow ProServices