12 Replies Latest reply on Jan 16, 2015 10:46 AM by lvogt48

    Table of contents displaying wrong font... Sometimes

    lvogt48

      When I generate a TOC, it generally works OK but sometimes text comes in the size and color of the source text instead of the assigned TOC font.

      I have a My "TOC 1" paragraph style set to 9/18 pts black.  One of my headers is partially oversized and reversed out text at 36pt white. It is not saved as a character style, just made to be larger.  Instead of following the assigned TOC 1 style, that text comes in 36pt white. I have other places where headers are reversed and or resized and it displays fine in the TOC.  In some cases the TOC just comes in the color of the source text... but most of the time it comes in as it should, as the TOC 1 color. 

       

      Why the inconsistency? 

        • 1. Re: Table of contents displaying wrong font... Sometimes
          Peter Spier Most Valuable Participant (Moderator)

          That sort of problem indicates either a character style or a local format override is applied to the text the TOC is picking up.

          • 2. Re: Table of contents displaying wrong font... Sometimes
            lvogt48 Level 1

            That does appear to be the case since, as I said, the font in the TOC matches the source.   If it happened every time I'd get it. There would be little purpose in assigning a font to the TOC but at least it would be consistently wrong in an understandable way. But it only happens sometimes.

            • 3. Re: Table of contents displaying wrong font... Sometimes
              Peter Spier Most Valuable Participant (Moderator)

              Because only sometimes whoever stet the text unnecessarily added a character style or local override...

              • 4. Re: Table of contents displaying wrong font... Sometimes
                lvogt48 Level 1

                No, I'm saying, for instance, if I have 20 lines in my TOC and I've changed the character style in 10 of the source headers, the TOC would reflect these local overrides only two or three times and the rest would be the assigned TOC style as they should.  If it was consistent I'd understand and deal with it - but it isn't.

                 

                In any case, it doesn't make sense for the TOC to display anything but the TOC style.  What's the point if  it's ignored.  If I wanted the TOC to reflect the actual style of the headers I have that option.

                • 5. Re: Table of contents displaying wrong font... Sometimes
                  Peter Spier Most Valuable Participant (Moderator)

                  Here's how it works...

                  TOC entries should be using the character formatting defined by the paragraph style assigned to them. The style hierarchy works like this, paragraph style at the bottom, character styles trump paragraph styles, and local formatting trumps everything. If you use character styles in the body text, those are not considered to be overrides of an assigned style, so they are always preserved if applied manually to selected text when you change paragraph styles. Local formatting is a paragraph style override, and likewise is preserved when changing styles.

                   

                  If you need to style part of a paragraph in your document body that will be picked up in a TOC with different formatting from the basic style definition, but you don't want the the special style to also appear in the TOC, you need to use a method that applies that special formatting as a part of the paragraph style. The methods available to do that are nested styles, line styles and GREP styles. Because these three options are part of the paragraph style definition, when you pick a different style for the text any special styling from the original paragraph style is no longer defined and will disappear.

                  • 6. Re: Table of contents displaying wrong font... Sometimes
                    lvogt48 Level 1

                    Thanks for the exhaustive response but...  


                    The table of contents dialogue box allows me to choose the style I want for the TOC that's different from the styles in the body of the document. Noted in yellow.  The whole point of the Style:xxx dialogue is to define a completely different style in the TOC.   But  it is not consistent. 


                    For example:  I can have 10 identical Headers. The document Header paragraph style is blue, I reverse four of them to white. No other changes.  Now in the TOC, all the text should be TOC 1 style and that is set as gray:  8 of the TOC lines will come out gray and two, for no apparent reason, will be white. They should all be gray. 


                    If all four went white I'd wonder why they have an option that doesn't apply—but it would at least have logical consistency. However, the changes appear completely random. This same problem has happened with text size.

                    TOC 1.jpg

                    Style color.png

                     

                    Screen Shot 2015-01-14 at 4.07.33 PM.png

                    The line "D. Secondary Information" and three previous lines were reversed to white in the doc and appear correctly as the TOC 2 style.    D was modified in the document to be white exactly like E & F,  but only D & F overwrote the TOC 2 style.   Why are E and the previous lines  correct but not D or F? 

                    • 7. Re: Table of contents displaying wrong font... Sometimes
                      Peter Spier Most Valuable Participant (Moderator)

                      lvogt48 wrote:

                      For example:  I can have 10 identical Headers. The document Header paragraph style is blue, I reverse four of them to white. No other changes.  Now in the TOC, all the text should be TOC 1 style and that is set as gray:  8 of the TOC lines will come out gray and two, for no apparent reason, will be white.

                      As soon as you do any sort of override to the paragraph style in your text, that override will also be applied to the text picked up in the TOC.

                      • 8. Re: Table of contents displaying wrong font... Sometimes
                        lvogt48 Level 1

                        Did you not read my last paragraph?  Then it would happen all the time.  It is not.  It's happening some times but not others. 

                         

                        Thanks anyway.

                        • 9. Re: Table of contents displaying wrong font... Sometimes
                          Peter Spier Most Valuable Participant (Moderator)

                          Instead of trying to figure out what particular combination of manually applied formatting in the body of your text is messing up your TOC, define new paragraph styles for each heading format you need so that ALL of the formatting is handled in the style definition, either as part of the basic character format or as a nested character style or GREP style. You can base these "special" heading styles on the existing heading styles, and include them in the styles to be picked up by the TOC, assigning the same entry style to all of them.

                          • 10. Re: Table of contents displaying wrong font... Sometimes
                            lvogt48 Level 1

                            That seems like a doable workaround.  It's actually been easy enough to just reapply the TOC font size and/or color to the whole TOC after it's updated; which is what I'd been doing.  It doesn't answer the question: Why does the TOC style option work sometimes and not others?  I guess it just doesn't work very well.

                             

                            Thanks

                            • 11. Re: Table of contents displaying wrong font... Sometimes
                              Peter Spier Most Valuable Participant (Moderator)

                              I don't have your file so I can't dig into it, but I'm confident that if you look deep enough you'll find this is all down to local formatting, OR the file has some minor corruption.

                              • 12. Re: Table of contents displaying wrong font... Sometimes
                                lvogt48 Level 1

                                I did keep digging and I found the answer. It's more than "local formatting"; it's "partial local formatting" that overrides the TOC style.

                                I didn't see this initially because it was only a blank space at the end of the Header that was different so it was invisible to me.

                                 

                                If all the text in a Header in the doc is exactly the same, no matter how it is locally modified, the TOC style is applied in full.

                                If any portion of that text is different, the TOC will be modified... BUT:

                                Different modifications affect different parts of the line in the TOC. So, one can't predict how some untried modification will be applied.

                                 

                                If this is supposed to be a feature rather than a glitch it's a pretty bad one; too many inconsistent variables.

                                The chart below shows only some of the possible outcomes.  At least I know now what the problem is and how to avoid it.

                                Screen Shot 2015-01-16 at 12.21.28 PM.png