10 Replies Latest reply on Sep 25, 2011 5:30 AM by Peter Spier

    TOC picking up character styles from chapters

    pixeltech

      This question is probably answered elsewhere in the forum, but I'm not finding it… most frustrating.

       

      I have a table of contents, which is successfully generating the correct TOC for me but where the referenced Chapter header has a character style applied, that character style is also being picked up in the TOC listing.

       

      For example, most pages have a chapter name with black text color, as defined in the paragraph style for the chapter headers, but on page 24, the designer is calling out that chapter with red type, which has been applied as a character style.

       

      So when I generate my TOC, the listing has picked up the character style from the original referenced header...

       

      22          Typography Lockup Alternates

      23          Pattern

      24          Pattern Don’ts

      25          Typography/Print

      26          Typography/Digital

       

      How do I keep the TOC from picking up character styles from the referenced entries? This should not require a kludge...

       

      Paul Rosenberg

      Seattle

        • 1. Re: TOC picking up character styles from chapters
          Peter Spier Most Valuable Participant (Moderator)

          If the character styles are applied as some sort of override to the paragraph style they carry forward into the TOC. If applied as a nested style as part of the paragraph style, they do not. I'm not sure about Line styles or GREP styles -- you'd have to try it to find out.

          1 person found this helpful
          • 2. Re: TOC picking up character styles from chapters
            pixeltech Level 1

            That's interesting, and it's always good to learn something new about ID, but the paragraph styles for chapter and section headers include all the type info they need. The character styles applied to a handful of chapters are exceptions to the rule, not consistently applied to each instance of the style...

             

            This may enable a kludge, but this should not be so complicated to resolve. The picking up of character styles may make sense to a software engineer, but not to a designer...

            • 3. Re: TOC picking up character styles from chapters
              pixeltech Level 1

              Okay, Peter… I was able to use this information to create a kludge that works, involving the insertion of an indent-to-here character in one place and both an indent-to-here character and an end nested style character elsewhere.

               

              This was helpful, but it's a bad solution in my estimation, because it depends upon fully understanding the kludge to make it work by anyone other than me. It is overly-complex. A better option would be to make "ignore referenced character styles" or "honor referenced character styles" a simple checkbox option in the TOC Styles set-up...

               

              So you get points for giving the info tat made a kludge possible.

              • 4. Re: TOC picking up character styles from chapters
                Peter Spier Most Valuable Participant (Moderator)

                Why an indent to here? A pair of end nested styles characters on either side of the text you want to change should work fine. Since there should never be an endo fo nested style character in any paragraph without the character style,  nesting as None thought 1 end nested style, then your character style through 1 end nested style should work perfectly. Or you could check to see if a GREP style behaves the same way and use that to apply the style to a specific string.

                • 5. Re: TOC picking up character styles from chapters
                  pixeltech Level 1

                  The way the chapters are formatted, it makes zero difference whether I used an indent to here or an end nested style or both of either. It is still a workaround for something that should be simple, intuitive and visible. This file is one of many used by a collaborative group, 99% of whom couldn't GREP their way out of a paper bag to save their life... Designers are—with near uniformity—not as technically adept as production artists or prepress specialists, and the file I'm working on is not mine, but "ours." Any one of 50 different people in the studio could try to pick this up next month or years from now and they will not be able to figure it out, because the markers are invisible. Even if I leave invisibles on, they can and will turn them on and off at will, and when they go to change chapters, and apply changes to text either with or (more likely) without using styles, the TOC will break and they will waste hours or days trying to resolve it. I can predict that down the road, someone will just recreate the TOC manually and update every entry by hand

                   

                  So this information did provide a strategy to construct a workaround, but this is a flaw in the logic of the software engineers who set up TOCs to work this way. It is a conspicuously non-intuitive way of getting to a result that should be simple and obvious, and a built in option in the TOC style set-up. I appreciate you letting me know about the nested style option, but while it got me where I needed to go, it is the kind of unsatisfying workaround I was trying to avoid.

                   

                  And thank you for it. Sorry if I seem ungracious...

                  • 6. Re: TOC picking up character styles from chapters
                    peter minneapolis Level 4

                    pixeltech wrote:

                     

                    The way the chapters are formatted, it makes zero difference whether I used an indent to here or an end nested style or both of either. It is still a workaround for something that should be simple, intuitive and visible. This file is one of many used by a collaborative group, 99% of whom couldn't GREP their way out of a paper bag to save their life... Designers are—with near uniformity—not as technically adept as production artists or prepress specialists, and the file I'm working on is not mine, but "ours." Any one of 50 different people in the studio could try to pick this up next month or years from now and they will not be able to figure it out, because the markers are invisible. Even if I leave invisibles on, they can and will turn them on and off at will, and when they go to change chapters, and apply changes to text either with or (more likely) without using styles, the TOC will break and they will waste hours or days trying to resolve it. I can predict that down the road, someone will just recreate the TOC manually and update every entry by hand

                     

                    So this information did provide a strategy to construct a workaround, but this is a flaw in the logic of the software engineers who set up TOCs to work this way. It is a conspicuously non-intuitive way of getting to a result that should be simple and obvious, and a built in option in the TOC style set-up. I appreciate you letting me know about the nested style option, but while it got me where I needed to go, it is the kind of unsatisfying workaround I was trying to avoid.

                     

                    And thank you for it. Sorry if I seem ungracious...

                    Maybe I'm missing something, but is there any compelling reason that there can't be more than one chapter heading paragraph style? Say, a red one based on  a black one? Those pages needing red headings would use the red paragraph style, and the black on the rest of the chapters. Set the TOC to extract the two (or more, if there are more colors) paragraph styles. They'll appear in the TOC without any character styles.

                     

                    This isn't a kludge, it's a straightforward use of the InDesign features.

                     

                    HTH

                     

                    Regards,

                     

                    Peter

                    _______________________

                    Peter Gold

                    KnowHow ProServices

                    • 7. Re: TOC picking up character styles from chapters
                      Peter Spier Most Valuable Participant (Moderator)

                      I see the other Peter has already posted about this, but I was thinking more about this in the shower this morning, and I think there are a couple of things that you might want to do differently.

                       

                      First, if the ENTIRE paragraph has a character style applied on top of the paragraph style, you are abusing, or misusing the character style function. Character styles should be applied to isolated "special case" text strings, not entire paragarphs. If you are changing an entire paragraph, or even the bulk of an entire paragraph, you should create a new paragraph style with the correct formatting (and possibly some nested style or styles) and use that instead of wholesale application of a character style which will remain unchanged even if you alter the underlying paragraph style definition. You can include as many paragraph styles as you need in the TOC.

                       

                      Which brings us to point two. While you can use the style applied in the body of the book for your listing paragraphs, that's seldom a good idea. Instead you should create a set of TOC paragraph styles to use for various listing levels. These can be based on other styles if you wish, but having independent styles for the TOC allows you to change the formatting inside the TOC with affecting the rest of the book, and vice versa, and also allows you to apply the same TOC paragraph style to multiple listings based on different paragraph styles in the book.

                       

                      In your example above, if Pattern Don'ts had a paragraph style whose basic formatting included a red character color (based on the style used for other headings where the color is black, so the only difference is the color and you only need to edit one style to change other attributes) rather than apply a character style to apply red to the whole thing, you could assign the same TOC Paragraph style to it and the ones that are already black, and if the character color in that style is black, your red will never show up.

                      • 8. Re: TOC picking up character styles from chapters
                        pixeltech Level 1

                        Well, in this case, an "entire paragraph" is just one to three words. When TOC picks up a style as a chapter reference, it picks up the entire paragraph. I have about 40 chapters and 35 of them are black. One reverses out of a dark background, and four are red. The simple way to apply the color without changing the paragraph style is to use a character style, and yes, use it on the entire one-to-three word paragraph.

                         

                        To instead use nested styles is to work around ID's logic that character styles in referenced listings in a TOC should also be in the TOC itself is just clunky. I have applied the workaround to complete the assignment and am now routing the book for approval. The nested style option solved the problem.

                         

                        There may be other solutions as well (line styles, GREP styles, whatever styles), and some will work better than others. All I am saying now is that this particular decision to engineer TOC styles to pick up character styles from the referenced entry without a simple way out is a poor one. A better solution would be to give designers the option to EASILY, without workarounds, either honor or ignore references character styles.

                         

                        I'm using invisible markers to signal the color change. It works. Kludge accomplished. The next epro, designer or prepresser to open up this file will not understand it, and will waste time figuring it out. That is the problem with workarounds in general. The best solution is always to look at why a workaround is necessary and find a way to make it unnecessary. This is a request to send to Adobe: Allow a simple toggling of the character style pickup in TOC styles.

                         

                        I know we thrive on these arcane workarounds in the forums. It is satisfying to make things work when they don't and should. Anyone who works in long documents with any regularity should agree with me on this: Eventually, developers should make some workarounds unnecessary. This is one of those.

                         

                         

                        Sent from my iPhone 4. Deal with it.

                        • 9. Re: TOC picking up character styles from chapters
                          Peter Spier Most Valuable Participant (Moderator)

                          And in this case you are making things harder for yourself and everyone else who will work on the file later.

                           

                          You clearly have three styles for the headings. The number of words is irrelevant. You need three paragraph styles, one for black, one for reverse, and one for red. That's less work than your kludge (which is exactly what it is since you are jumping through hoops to use character styles in a way that they were not intended). This wouldn't be an issue except that you are including these paragraphs in your TOC.

                           

                          It is, by the way, NOT a design flaw that overrides to a paragraph style are preserved in a TOC. When used correctly this allows for differentiation and emphasis of PART of the paragraph in both the body of the text and the TOC listing. GREP and line styles won't help you any more than the nested style in a case where you should be using a differnt paragraph style to change the format of the entire paragraph.

                          • 10. Re: TOC picking up character styles from chapters
                            Peter Spier Most Valuable Participant (Moderator)

                            I want to apologize for the tone of my last post. I found your last response a little annoying first thing in the morning after a bad night's sleep.

                             

                            Up to now I was focused on answering the question you asked -- how to prevent the styles from being picked up --  dealing with explaining how to use nested styles and character styles in relation to making a TOC, and I continue to believe that you should have paragraph styles for each color heading, but if you want to use charactrer styles to alter the entire paragraph, you don't need to do anything at all to attempt to keep them out of the TOC. Let me explain:

                             

                            There are three levels in the heirarchy of text formatting. At the bottom, is the paragraph style, which sets the basic parameters for all text in any paragraph. Anything other than this is considered an override.

                             

                            The first level of override is the character style. This does not generate a plus sign in the paragraph style name, and unless you intervene character styles are preserved when when you change the paragraph style. This is true in running text or anywhere else icluding TOC or indexes, and it is a design feature. If you've applied a character style, for example, to make your company name appear in bold italics, the odds are pretty good that you would want to preserve that if you decide to change the format of the rest of the text in the paragraph.

                             

                            The highest level is local formatting, where you select some text and make a change. This is what generates the plus sign next to a paragraph style name, and is also preserved when editing or changiing a style EXCEPT if the new style definition has the same attribute as the local override.

                             

                            There is a subtle difference here in behavior. Local formatting overrides that match the new paragraph style definition are lost and will not be reapplied if you subsequently change the paragraph style again, while character styles are durable and are preserved, so will be invisible if the paragraph style attributes match, but are still applied, and will continue to be applied through further changes.

                             

                            Which brings us to the TOC. You've applied a character style. It's preserved, as it is intended, but you don't want it. Rather than "work around" ways to keep it from being picked up, just select the TOC and remove the character style. You can do that by setting the character style to none for the whole block or by putting the cursor in a paragraph and right-clicking the paragraph style name in the panel and choosing Apply [Style Name], Clear character Styles or Alt (Opt) + Shift click the style name to clear both local formatting and character styles. You'll have to do this again each time you update, but there is no need to alter your paragraph styles at all to "fix" the TOC.

                             

                            This is a different situation than the one I presumed originally, where you had some text in your paragraphs that was different from the rest. In such a case using a nested style would save the trouble of having to remove the applied character style inside the TOC, but I probably wouldn't bother unless there were multiple cases where you were emphasizing selected strings and could establish a trigger pattern of some sort so the nested style would automate application of your character style in the body of the work.