2 Replies Latest reply on Sep 29, 2011 6:02 AM by Czajka

    leaders and where I want to put them

    Czajka Level 1

      I have a line that I want to put leaders after, but only if the text is on one line. If the text breaks to a second line, I do not want leaders. Any experts out there know how I can style this?

       

      Is there a way to "grep" where InDesign is breaking a line? I want to put a tab after the text if the text fits on one line, but not if the line wraps to a second or more.

        • 1. Re: leaders and where I want to put them
          [Jongware] Most Valuable Participant

          Can't be done using GREP. InDesign's GREP cannot locate soft line breaks.

           

          (But there might be other solutions not involving GREP.)

          • 2. Re: leaders and where I want to put them
            Czajka Level 1

            I've learned if a style can't be created that most of the time a script can do it. I wrote a javascript to import XML into an InDesign document using XML rules, a technique that Adobe has documented and provided sample scripts for. What I did is after the table was placed, I ran a second pass, looking for the XML elements for the second 2 columns, and utilize a XMLelement property called "lines" and a method called "count()" to look for only the XML elements with one line where I then insert a tab after the element. The scripting capabilities of InDesign are very powerful.

             

            cloture.jpg