6 Replies Latest reply on Feb 16, 2015 11:14 AM by John Mensinger

    Table of Contents based on Character Style?

    Jack Level 1

      Trying to do an annotated table of contents containing captions of all photos in a book, followed by verbose descriptions. Purpose is to avoid cluttering pages bearing the photos, which will have only a brief caption is followed by the name of the owner of the object in the caption, in the same paragraph.

       

      Book will include a listing of the captions in page order (i.e., table of contents) without the owner names, followed by verbose descriptions. Can I get around this by making character styles for each (caption, owner, respectively), and create a TOC based one character style? If not, can I configure the para. style of the caption to omit the line-feed, and base the TOC on that?

       

      Plan is then manually to add descriptions to each TOC entry, immediately following captions. Will that stay intact, if any subsequent photo locations are changed?

        • 1. Re: Table of Contents based on Character Style?
          John Mensinger Adobe Community Professional & MVP

          The TOC feature only hooks on Paragraph Styles, so you won't be able to do an automated TOC with Character Styles.

          ...followed by the name of the owner of the object in the caption, in the same paragraph.

          If you only want the caption and not the owner in the TOC, you'll have to find a way to separate those.

          Plan is then manually to add descriptions to each TOC entry, immediately following captions. Will that stay intact, if any subsequent photo locations are changed?

          No. Only the automatic entries stay automatic. The intermingled descriptions will vanish when you update.

           

          Here's how I'd do it:

          • Set a caption and assign a dedicated Paragraph Style (will link to level 1 of the TOC).
          • Add the owner name in a separate paragraph and assign a separate Paragraph Style (applied formatting can be identical to the caption style if desired)
            • If the owner name absolutely must appear on the same line as the caption, I'd fake it by simply arranging them "inline" in separate frames
          • Set the corresponding description in a separate frame on the same page in its own Paragraph Style (will link to level 2 of the TOC), threaded from the caption frame and positioned to hide behind the picture, which will be placed on a layer above (which will allow you to hide the picture layer when text editing is needed).

          This way your captions and descriptions will take up levels 1 and 2 respectively in a fully automated TOC (where they can be assigned TOC Paragraph Styles), and will update together every time.

          • 2. Re: Table of Contents based on Character Style?
            Willi Adelberger Most Valuable Participant

            With such requirements like additional text between the entries or even different text in the entries than in the target paragraph or having a text or tabulator before the entry I use cross references to create a Table of Content. These will be actualized when page number or referenced content changes and in interactive PDFs you have also the benefit of a live link.

             

            If I need bookmarks in the PDF, I use additionally a TOC, but I place it somewhere outside a page,

             

            Another method is, that I put the text of the headlines as they should appear somewhere on the page, it can be inside or outside the text string. As long as I work I make visible attributes, but before output I change the text color to none, if needed I change font size to 0.1pt, scale it to 1%, this all depends on the situation.

            • 3. Re: Table of Contents based on Character Style?
              TᴀW Adobe Community Professional & MVP

              I also use cross-references, which I get our script to generate:

              http://www.id-extras.com/products/livetoc

               

              If you can use InDesign to generate the initial text of the TOC, then

              set up and run LiveTOC, all the page numbers will become live

              cross-references very smoothly. At that stage you can forget about

              jumping through loops to make InDesign's TOC feature do what it doesn't

              want to, and simply edit and format that TOC exactly as you want, and

              the page numbers will simply update automatically as the book is edited

              and pages are added, removed, and moved.

              • 4. Re: Table of Contents based on Character Style?
                Jack Level 1

                OK, have done that, and all required content is now showing up in the TOC.

                 

                Is it possible to omit the line breaks between elements referring to the same page? That is, on any given page, the caption is followed by the description in a separate text box. In the TOC, that is appearing in a new paragraph. I need it to appear as a continuation of the para. containing the description.

                 

                Could one of you please show me how to format a TOC entry to allow this.

                • 5. Re: Table of Contents based on Character Style?
                  Jack Level 1

                  Last comment was in reply to John's of 4 d. ago.

                  • 6. Re: Table of Contents based on Character Style?
                    John Mensinger Adobe Community Professional & MVP

                    Jack wrote:

                     

                    OK, have done that, and all required content is now showing up in the TOC.

                    I'm glad you managed to sort that out.

                    Is it possible to omit the line breaks between elements referring to the same page?

                    Hmmm...the thing is...a paragraph is a paragraph is a paragraph. By nature, it breaks to the next line. There are ways to fake it but none (that I can think of) which will hold up to an automated TOC update. Maybe someone else will come along with a trick I don't know about.

                     

                    So then, for the moment let's assume the only way to get the caption and the description into the same TOC paragraph is to put them in the same paragraph on the document page. Also still assuming I truly understand the end-result you want; here's how I would do it:

                    • If you set the separate-but-threaded caption and description frames as I first proposed, you'll need to go back and take out the paragraph break between the caption and the description. It will have to be replaced by a simple "frame break" which will push the description (now the same paragraph and paragraph style as the caption), into its own hidden frame as before.
                      • If, in the TOC, you want the caption and the description to have differing formatting, it would also be useful to insert (between the caption and the description on the document page) an End Nested Style Here character before that frame break. (If the caption and the description can be formatted identically, you won't need this step, and they can simply be formatted by your simple TOC Entry Style paragraph style.)
                    • All above can be done using Find/Change. Find: End of Paragraph (^p). Change to: End Nested Style Here (^h) Frame Break (^R). So here's what it looks like in the dialog.

                              Untitled-1.gif

                    If the captions and descriptions are the only text in your document, you probably get away with Change All, otherwise it may be best to step through finding and changing one instance at a time.

                     

                    Now if you update your TOC, the descriptions should be pulled up into the same paragraph as the captions.

                     

                    Take advantage of the Nested Style possibility to vary the formatting of the caption and description by adding a nested style to your TOC Entry Style. Set it to style the description portion of the entry. Then add a Nested Style and set a Character Style to format the caption portion of the entry... "through 1 End Nested Style Character".