7 Replies Latest reply on Mar 12, 2015 5:52 PM by Peter Spier

    Text Flowing across columns and pages

    Jack Level 1

      Finally have a new version of my book of photo images.


      Each image is accompanied by text in paragraph styles called Description, Caption and Owner.


      Caption and Owner appear connected as a single line of text under the image.


      Description is a more verbose discussion, to be published in a TOC called Descriptive Contents, near the end of the book. Each description is collocated with its parent image for continuity and portability, in case an image is moved to a different page, etc. On publication, the collocated copy of the image needs to be hidden. 


      Because TOC entries have their own styles, I expected that hiding the collocated description text would allow the corresponding TOC entry to persist, but that is not happening.  TOC Description entries are being hidden along with collocated versions. I’m scratching my head to find a better approach to this.


      Each TOC entry begins with page number, followed by Caption and Description.


      In the generated TOC, Description appears as a new paragraph with trailing page number. In this instance I need to defeat the display of page number entirely. Best I can do at the moment is to have page number follow description.


      Two questions:


      1 - Could one of you point me to an example of a script or macro routine that can be made a part of the TOC-generator, that iterates through all the TOC entries and deletes the unwanted, ending page number. Or could you lead me to a better workflow for getting this done.


      2 - Could you show me how to format TOC entries uniquely. i.e., so as not to inherit a “hidden” property of source text? Or is there a better way to get this done?

        • 1. Re: Text Flowing across columns and pages
          Peter Spier Most Valuable Participant (Moderator)

          1, TOC entries don't have to have a page number. Just click the Show More Options button in the TOC dialog, and set the number dropdown to no page number.


          2, If I understand this, you should define a style for the TOC entries, not use the exiting style of the paragraph in the text.

          • 2. Re: Text Flowing across columns and pages
            Jack Level 1

            Thanks Peter, finally "cracked the code" in this regard.


            Next issue is the ordering of TOC entries.


            About 7 .d ago I noticed that TOC displayed description entries ahead of captions, rather than vice versa. Fixed this by moving some descriptions lower in the page, below the captions. That worked at the time. I only moved a few of those at the time, just a a proof of concept. Noted that the revised TOC correctly reflected this change.


            Then I began contending with page-number location, which is now resolved.


            Now returning to the sequencing, I no longer seem to have any control of that, whatsoever. Have tried reversing the order of styles in the TOC style form, as well as locations of descriptions on pages. Nothing affects the sequencing of TOC entries.


            Any ideas appreciated.

            • 3. Re: Text Flowing across columns and pages
              Peter Spier Most Valuable Participant (Moderator)

              TOC picks up paragraphs according to how they are located, starting in the upper left corner and scanning down before moving right.  Mis-ordering is usually the result of the heading being further to the right than the things that should fall below it.

              • 4. Re: Text Flowing across columns and pages
                Jack Level 1

                Perfect Peter. One last issue for completion of the desired table:


                I need to remove CR-LF between (pg nr) + spc + genus-species, and note immediately following, which always begins with the period and a space. I recall some earlier instructions on searching for certain characters in order to remove (line-feed + char return) in all instances where (as I have arranged it in this table) the next line begins with [Pd + Spc].


                I'm guessing this might involve searching source code for all instances of the character combination described above, and combining all pairs of source lines that include them. Manual solution is last resort, but would prefer a script if that can be done.


                With thanks in advance.

                • 5. Re: Text Flowing across columns and pages
                  Peter Spier Most Valuable Participant (Moderator)

                  You lost me. CR-LF to my mind is a paragraph break, or hard return, which implies two paragraphs. Since TOC works on paragraphs, it makes a listing item for each paragraph. Perhaps you are using a "soft return" (it's been about 20 years since I wrote code that used CR-LF), but in either case, you would need to either use Find/Change on the TOC itself to remove the unwanted characters, or find another way to force the line break in the text that does not require the insertion of a break character. I don't write scripts, but I don't see any reason why the find/change could not be scripted if you can isolate the case where it needs to be applied.

                  • 6. Re: Text Flowing across columns and pages
                    Jack Level 1

                    Sorry if some of my terminology is a bit dated.


                    What I'm trying to describe is a collection of indexed items into my custom table of contents. Captions are followed by image descriptions. CR-LF comes from typewriter days, but there were/are ascii characters for this. Not sure I can correctly recall the ascii symbols for those? #32#10 is just a guess.


                    From your comments, I’m taking it that CR-LF is not used in modern (i.e., inDesign) documents.


                    Need to find all instances of trailing cr-lf-like characters/tags in para. style ImageID or the corresponding, leading characters/tags in para. style imgDescTOCentry.


                    Idea is, by deleting those, that text will flow smoothly from ImageID to imgDescTOCentry (which begins with “. “).


                    Thanks for your help, Peter.




                    706.974.6049 t&v

                    • 7. Re: Text Flowing across columns and pages
                      Peter Spier Most Valuable Participant (Moderator)

                      If you are trying to work with code, you need to talk to coders. The SDK  forum, or the scripting forum are the places you'll find them.