29 Replies Latest reply: Sep 17, 2010 8:49 AM by [Jongware] RSS

    Trouble with tabs (index edition) - CS4

    mattaca Community Member

      I'm curring laying out a 136-page cumulative index for a magazine and I'd like to limit the amount of manual work as much as possible. The paragraphs are set up with a .875" right indent and a -.875" last line indent, which helps keep the entries from encroaching into the space where issues appear. However, I'm still seeing instances where the entries are not responding to the tab stops as I would like (see below).

       

      Is there any solution that will keep the text from being pushed into the gutter without me having to manually put in forced line breaks? Techincally, this is the last line of the paragraph so there is nothing to make it "hang" the way I want. Ideas? Am I setting up my tab stops incorrectly?

       

      Screen shot 2010-09-15 at 3.41.12 PM.png

        • 1. Re: Trouble with tabs (index edition) - CS4
          [Jongware] Community Member

          What happens when you add an em space right before the first tab, after "American home cooking, kookbooks on"?

          • 2. Re: Trouble with tabs (index edition) - CS4
            peter at knowhowpro Community Member

            mattaca wrote:

             

            I'm curring laying out a 136-page cumulative index for a magazine and I'd like to limit the amount of manual work as much as possible. The paragraphs are set up with a .875" right indent and a -.875" last line indent, which helps keep the entries from encroaching into the space where issues appear. However, I'm still seeing instances where the entries are not responding to the tab stops as I would like (see below).

             

            Is there any solution that will keep the text from being pushed into the gutter without me having to manually put in forced line breaks? Techincally, this is the last line of the paragraph so there is nothing to make it "hang" the way I want. Ideas? Am I setting up my tab stops incorrectly?

             

            Screen shot 2010-09-15 at 3.41.12 PM.png

            Would this help:

             

            http://blog.gilbertconsulting.com/2009/03/creating-table-of-contents-part-2.html

             

             

            HTH

             

            Regards,

             

            Peter

            _______________________

            Peter Gold

            KnowHow ProServices

            • 3. Re: Trouble with tabs (index edition) - CS4
              mattaca Community Member

              Unfortunately, that just pushes the text further. Adding a second em-space does push it to a two-line entry, but then the leader dots don't start where they should.

               

              Screen shot 2010-09-15 at 4.56.16 PM.png

              Screen shot 2010-09-15 at 4.56.31 PM.png

               

              The only reason for the hidden em space in my first screenshot is to create a faux–hanging indent when there's a second reference to the same entry. Last year I had it set up to repeat styles and used forced line breaks to maintain the hanging indent, but adding the right indent was preventing the first line from being flush right. Sorry if that threw you off.

               

              Any other ideas? I'm really stumped on this one.

              • 4. Re: Trouble with tabs (index edition) - CS4
                mattaca Community Member

                I have already put that feature to use but it doesn't solve the problem of single-line entries. Because the last line indent is -.875", the right indent won't push the text to a second line line if it still fits.

                 

                I'm still unclear on why this is happening at all. If I've defined my tab stops as shown in my first screenshot, why does it not force the text to align to that stop when a tab character appears? Is there a better way I should be setting up my tabs?

                • 5. Re: Trouble with tabs (index edition) - CS4
                  Eugene Tyson CommunityMVP

                  I've read and read this thread and I can't figure out what it's about?

                   

                  Sorry to ask, others seem to get it, but can  you elaborate on what you're trying to do?

                  • 6. Re: Trouble with tabs (index edition) - CS4
                    mattaca Community Member

                    It would be great if I could search for instances where this happens, but I can't think of how that could even be done. The index requires there to be at least two leader dots before the issue name, so unless there's a workaround I'm going to have to look through 28,000 lines of text manually.

                    • 7. Re: Trouble with tabs (index edition) - CS4
                      mattaca Community Member

                      The text in the original screenshot which says "American Home Cooking, Cookbooks on" is pushing the associated magazine issue into the gutter between the issue and page number. I'm looking for a way to prevent this from happening. There should always be at least two leader dots before the issue name, and I'd like to avoid review the entire document visually to ensure this is condition is always met. Does that make more sense?

                      • 8. Re: Trouble with tabs (index edition) - CS4
                        Eugene Tyson CommunityMVP

                        How about NOT using leader dots

                         

                         

                        Make a character style and give it an underline using a dotted stroke

                         

                        Then give the tab character the character style

                         

                        You could do this using GREP styles or a nested style.

                         

                        Does that work for you?

                         

                         

                        If the dotted stroke isn't just right, you can make a new stroke in the Strokes Panel via the flyout menu in the top right of the panel.

                        • 9. Re: Trouble with tabs (index edition) - CS4
                          [Jongware] Community Member

                          I'd need to try a few things. Can you post a small part of this file somewhere?

                           

                          At the very least, I ought to be able to drum up a Javascript to locate run-offs.

                          • 10. Re: Trouble with tabs (index edition) - CS4
                            mattaca Community Member

                            Hmm...I thought using a GREP search to find character strings of a certain length would help me narrow them down, but there's just too much variability. Plus, I'd still have to enter the forced line breaks manually.

                             

                            ^[\w ]{30,42} *?"tab"

                             

                            Even with a broad range, it's missing some and finding others it doesn't need to. Ugh.

                             

                            OK, time to stop talking to myself. Will await more intelligent solutions.

                            • 11. Re: Trouble with tabs (index edition) - CS4
                              Eugene Tyson CommunityMVP

                              mattaca wrote:

                               


                              Will await more intelligent solutions.

                              See post no.8

                              • 12. Re: Trouble with tabs (index edition) - CS4
                                peter at knowhowpro Community Member

                                mattaca wrote:

                                 

                                The text in the original screenshot which says "American Home Cooking, Cookbooks on" is pushing the associated magazine issue into the gutter between the issue and page number. I'm looking for a way to prevent this from happening. There should always be at least two leader dots before the issue name, and I'd like to avoid review the entire document visually to ensure this is condition is always met. Does that make more sense?

                                I'm not sure where the associated magazine issue is created - is it manually entered in each index entry as a sub-entry?

                                 

                                Just wildly guessing at possible solutions gave me the idea that perhaps a combination of a non-breaking space as the first character of the associated magazine issue, and a leader comprised of something like dot-nonbreakingspace-dot space dot-nonbreakingspace-dot might produce a workable "glue." My thought is that the two dots bound by a non-breaking space would meet one of your requirements.

                                 

                                 

                                HTH

                                 

                                Regards,

                                 

                                Peter

                                _______________________

                                Peter Gold

                                KnowHow ProServices

                                • 13. Re: Trouble with tabs (index edition) - CS4
                                  mattaca Community Member

                                  Do you have a private email I could send it to? I created a file with just the letter "A" (582KB) but apparently you can't attach non-image files here or email files via PM? Seems odd... Anyway, PM me if you don't want it out there for all to see.

                                  • 14. Re: Trouble with tabs (index edition) - CS4
                                    mattaca Community Member

                                    Man, I thought you had something there, Peter...only problem is that there are no leader dots to glue it together. If only there were a non-breaking tab character!

                                     

                                    Eugene, very creative solution but this does not solve the problem of pushing the entries that overlap the "issue area" (for lack of a better name) to two lines. That is the primary problem. I want all text preceeding the issue to stop short of that space so when you look at the page the issue names have a little space on both sides with nothing crashing into them.

                                     

                                    I do have to say, though, I never cease to be amazed by the creative solutions people come up with here! Makes me proud to be an InDesigner.

                                    • 15. Re: Trouble with tabs (index edition) - CS4
                                      peter at knowhowpro Community Member

                                      mattaca wrote:

                                       

                                      Man, I thought you had something there, Peter...only problem is that there are no leader dots to glue it together. If only there were a non-breaking tab character!

                                       

                                      Eugene, very creative solution but this does not solve the problem of pushing the entries that overlap the "issue area" (for lack of a better name) to two lines. That is the primary problem. I want all text preceeding the issue to stop short of that space so when you look at the page the issue names have a little space on both sides with nothing crashing into them.

                                       

                                      I do have to say, though, I never cease to be amazed by the creative solutions people come up with here! Makes me proud to be an InDesigner.

                                      Are the associated issue items generated with the index, or are they manually inserted? I can't see how you are able to create the dot leaders between the topic entry and the issue item. Am I missing something?

                                       

                                      Regards,

                                       

                                      Peter

                                      _______________________

                                      Peter Gold

                                      KnowHow ProServices

                                      • 16. Re: Trouble with tabs (index edition) - CS4
                                        mattaca Community Member

                                        The issues were included in the RTF file I received. If you look at the tab bar in my original screenshot you can see there are two tabs set up: one for the issues with a . leader, and one for the page numbers without a leader.

                                        • 17. Re: Trouble with tabs (index edition) - CS4
                                          mattaca Community Member

                                          Sorry...I JUST realized what you were trying to ask. There ARE leader dots, but when the text is pushing the issue name into the gutter no leader dots APPEAR. That's why having non-breaking spaces as part of my leader doesn't seem to help.

                                          • 18. Re: Trouble with tabs (index edition) - CS4
                                            peter at knowhowpro Community Member

                                            mattaca wrote:

                                             

                                            The issues were included in the RTF file I received. If you look at the tab bar in my original screenshot you can see there are two tabs set up: one for the issues with a . leader, and one for the page numbers without a leader.

                                            Maybe I'm the only one who began with the assumption that the index was generated by InDesign from the marked content in an InDesign file, but that's where my suggestions were based. I asked about the source of the issues entries when I couldn't find a way to generate an InDesign index whose entries were followed by leaders followed by additional content followed by a tab and page number. Apologies if I've wasted folks' time with suggestions that weren't appropriate to the material.

                                             

                                            I haven't seen a right-aligned tab and/or right-aligned tab stop suggested.

                                             

                                            I think that a right-aligned tab stop at the right margin, to align the page numbers, and a non-breaking special space (em, en, third, etc - non-standard spaces are non-breaking) between the dots, to keep at least two dots together across a line break might help.

                                             

                                            A nested or GREP no-break character style that's applied starting at the first tab character through the end of the paragraph would keep that section together across a line wrap. If you precede the tab character with a non-breaking space, the word prior to the tab should also move across the wrap. I'm not sure how this might chain with the no-break section that starts at the tab character.

                                             

                                            You'll probably need to experiment with various widths of nonbreaking spaces between, and perhaps after, the leader dots. You'll probably need to copy/paste your special space(s) in the tab leader definition box; I can't get Quick Apply or other keystroke shortcuts to work there.

                                             

                                            HTH

                                             

                                            Regards,

                                             

                                            Peter

                                            _______________________

                                            Peter Gold

                                            KnowHow ProServices

                                            • 19. Re: Trouble with tabs (index edition) - CS4
                                              mattaca Community Member

                                              Peter, thanks, and sorry if I wasn't clear initially about the fact that this index was created from in an imported doc, not automatically generated. Based on some of the responses here, it seems I have not been very clear in my explaination, so let me try again. I want ALL text that is neither issue (Jul/Aug 00) nor page number (31) to stop BEFORE the cyan guide in the screenshot below. That is the summum bonum of the whole matter.

                                               

                                              Screen shot 2010-09-16 at 1.31.32 PM.png

                                               

                                              The paragraph has a right indent set to the cyan guide which keeps two- or three-line entries from crossing it. (See first entry in above screenshot and note that there is no forced line break after the C.A.) The last line has a negative indent so the issue and page number can extend all the way to the edge of the column, and there is indeed a right-justified tab at the right margin for the  page numbers to align to. This works wonderfully when the text is long enough to push the entry to two lines. The problem I am encountering is when the text is not long enough to bump to a second line, but too long to leave enough room for leader dots and the issue. In these entries, the first line IS the last line so it doesn't know I want it to break if it crosses the guide.

                                               

                                              Your suggestion to use non-breaking spaces,  while appreciated, does not solve the problem. Even when there is only a non-breaking space between the words "on" and "Jul" it does not have any effect because the text is not long enough to push the entry to two lines. I am not trying to keep things together; I am trying to force them to break apart.

                                               

                                              Does this make any more sense? I'm beginning to think I'm going to have to do this manually.

                                              • 20. Re: Trouble with tabs (index edition) - CS4
                                                peter at knowhowpro Community Member

                                                mattaca wrote:

                                                 

                                                Peter, thanks, and sorry if I wasn't clear initially about the fact that this index was created from in an imported doc, not automatically generated. Based on some of the responses here, it seems I have not been very clear in my explaination, so let me try again. I want ALL text that is neither issue (Jul/Aug 00) nor page number (31) to stop BEFORE the cyan guide in the screenshot below. That is the summum bonum of the whole matter.

                                                 

                                                Screen shot 2010-09-16 at 1.31.32 PM.png

                                                 

                                                The paragraph has a right indent set to the cyan guide which keeps two- or three-line entries from crossing it. (See first entry in above screenshot and note that there is no forced line break after the C.A.) The last line has a negative indent so the issue and page number can extend all the way to the edge of the column, and there is indeed a right-justified tab at the right margin for the  page numbers to align to. This works wonderfully when the text is long enough to push the entry to two lines. The problem I am encountering is when the text is not long enough to bump to a second line, but too long to leave enough room for leader dots and the issue. In these entries, the first line IS the last line so it doesn't know I want it to break if it crosses the guide.

                                                 

                                                Your suggestion to use non-breaking spaces,  while appreciated, does not solve the problem. Even when there is only a non-breaking space between the words "on" and "Jul" it does not have any effect because the text is not long enough to push the entry to two lines. I am not trying to keep things together; I am trying to force them to break apart.

                                                 

                                                Does this make any more sense? I'm beginning to think I'm going to have to do this manually.

                                                More assumption checking to deal with the summum bonum: It's common to set word- and letter-spacing ranges in the Justification properties panel of the paragraph style (or manually - bad practice, though). The result is automatic fiddling to fit text on lines and adjust line wrap where necessary. So, InDesign is working against you when text has a chance to squeeze together on one line, rather than flow to the next.

                                                 

                                                I'm out of my personal experience zone here, but I think one option might be to set the justification range values to the same single value - IOW, no automatic adjusting - or choose the single-line composer, which doesn't compute line breaks as smartly as the multi-line composer. Perhaps a combination? I think, if lines couldn't adjust, it would be quite rare to find a line that was an exact one-line fit with no room for tab leaders.

                                                 

                                                If this doesn't work, maybe it's got a clue to a technique that can.

                                                 

                                                 

                                                HTH

                                                 

                                                Regards,

                                                 

                                                Peter

                                                _______________________

                                                Peter Gold

                                                KnowHow ProServices

                                                • 21. Re: Trouble with tabs (index edition) - CS4
                                                  [Jongware] Community Member

                                                  (WIP) I experimented with the Single-Line composer, and got this very unexpected result. Top long line, Paragraph composer, Freaked Out Line, Single-Line Composer. No other changes.

                                                   

                                                  This turns out to be a conundrum wrapped into a headache.

                                                   

                                                  Screen shot 2010-09-16 at 9.57.49 PM.png

                                                  • 22. Re: Trouble with tabs (index edition) - CS4
                                                    mattaca Community Member

                                                    The single line composer was causing problems for me too. Setting the word and character space so there is no range didn't help either. The only thing that would help is something to push the text to two lines when it runs too long...some sort of "right pre-indent," which I don't think exists.

                                                     

                                                    I'm beginning to think this is a wild goose chase, gentlemen. I really appreciate your help but it may be time to throw in the towel on this one.

                                                     

                                                    Matt

                                                    • 23. Re: Trouble with tabs (index edition) - CS4
                                                      [Jongware] Community Member

                                                      At least I could write a script that appears (*!) to be able to identify dud lines. It adds an Underline to the tab and reports how much it found, so you could run the script, search for underlining, then decide whether and how you want to fix each one.

                                                      Click your cursor inside the story to check and run the script to let it Do its Thang.

                                                       

                                                      [*] Note the italics -- I glanced over the file and couldn't spot any ones it missed, but perhaps my math is flawed.

                                                       

                                                      app.findGrepPreferences = null;
                                                      app.findGrepPreferences.findWhat = "(?<=\\u\\l\\l/\\u\\l\\l \\d\\d)\\t";
                                                      if (app.selection[0].length > 0)
                                                           list = app.selection[0].findGrep();
                                                      else
                                                           list = app.selection[0].parentStory.findGrep();
                                                      
                                                      bummed = 0;
                                                      for (i=0; i<list.length; i++)
                                                      {
                                                           pos = list[i].horizontalOffset - list[i].lines[0].horizontalOffset + list[i].leftIndent;
                                                           if (list[i].lines[0].index > list[i].paragraphs[0].index)
                                                                pos -= list[i].firstLineIndent;
                                                           if (pos > 2.41)
                                                           {
                                                                list[i].underline = true;
                                                                bummed++;
                                                           }
                                                      }
                                                      
                                                      alert ("Found "+bummed+" duds -- Look for the underlined tabs ...");
                                                       
                                                      

                                                      • 24. Re: Trouble with tabs (index edition) - CS4
                                                        P Spier CommunityMVP

                                                        Just free associating here, but if you can find the x-coordinate of the last character before the tab, can you script adding a forced line break if the value is greater than something?

                                                        • 25. Re: Trouble with tabs (index edition) - CS4
                                                          [Jongware] Community Member

                                                          Okay, I think I have a solution that can be applied with find & change only.

                                                           

                                                          1. Add a tab into the tab ruler, right before the Right Indent setting:

                                                           

                                                          Screen shot 2010-09-16 at 11.15.41 PM.png

                                                           

                                                          You need to do this for all of the styles, if not every style is based upon one common base style.

                                                          After this, the document goes out of whack:

                                                          Screen shot 2010-09-16 at 11.16.09 PM.png

                                                           

                                                          2. Use Search-and-Replace: GREP to look for this

                                                           

                                                          \t(?= *\u\l\l/\u\l\l \d\d)

                                                          and replace with this

                                                          \t\t

                                                          with the added attribute of No Break.

                                                           

                                                          Screen shot 2010-09-16 at 11.16.30 PM.png

                                                           

                                                          3. Now it ought to be fixed -- nothing extends beyond the tab you just set

                                                           

                                                          Screen shot 2010-09-16 at 11.16.49 PM.png

                                                           

                                                          4. It creates a new problem, though. (Which I spotted just in time, too.) Look at the dots -- the 'left half' is bold, presumably picked up from the bold text, the right half is not, and there is a little amount of space between the two tabs. No sweat: apply a character style to just the tabs, using a GREP style:

                                                           

                                                          Screen shot 2010-09-16 at 11.29.17 PM.png

                                                           

                                                          -- you can just add this to your paragraph styles.

                                                          • 26. Re: Trouble with tabs (index edition) - CS4
                                                            [Jongware] Community Member

                                                            Ah -- be sure to run my script anyway

                                                            It found a few occurrences where the styles weren't updated properly, probably because they were overridden before.

                                                            • 27. Re: Trouble with tabs (index edition) - CS4
                                                              mattaca Community Member

                                                              YOU ARE A GENIUS! It totally worked! I wish could give you more than the available 15 points...you reall went above and beyond on this one. I tried running the script but it had an error on line two. I really don't think I needed it though. The only exception was that some of the entries refer to "Charter Issue" rather than MMM/MMM YY. I simply adjusted the GREP to accomodate and, from the looks of it, everything was captured!

                                                               

                                                              This is going to make things so much easier for us, not just this year, but in future years when we lay out this project. THANK YOU SO MUCH!

                                                              • 28. Re: Trouble with tabs (index edition) - CS4
                                                                [Jongware] Community Member

                                                                Does the 'genius bit' also apply when you have no idea why adding yet another tab works, but several variants of the same, and of different tab settings, and of different paragraph settings do not?

                                                                 

                                                                The Single-Line composer weirdness is one thing (it's so weird I'm not even sure if it's a bug), but surely tab settings should not simply get ignored ... and/or not run into the Right Indent space either.

                                                                 

                                                                But I must admit it's not that common a situation, having an index with not one tab but two 'on the outside' .

                                                                • 29. Re: Trouble with tabs (index edition) - CS4
                                                                  mattaca Community Member

                                                                  Well, however it works, I'm just glad it does. Thanks for your experimentation. I guess you just never know what's going to work.