2 Replies Latest reply on Sep 14, 2017 1:01 AM by Obi-wan Kenobi

    Need a script to detect lines that flow to the next line

    adtypeanddesign Level 1

      I posted this in the InDesign forum, but was directed to try here, as no clear answer was given.

       

      I'm attaching a screen shot of one entry in a membership directory I'm putting together. I need to quickly find via Find/Change, GREP, whatever, any lines that flow to the next line, as illustrated in the screen shot below in yellow. Each line except the last line of a member entry has a soft return at the end. The last line of each member entry has a hard return plus some space below to keep member entries separated. That's the way the style sheet is set up.

       

      The data that breaks between lines is not hyphenated - it's a break between words, as hyphenation is turned off.

       

      Note the data 1973 C 6CD49 SDV that is highlighted in yellow. I need to be able to quickly spot these kinds of breaks and track the text tighter so SDV goes back to the end of the previous line. Thank you in advance.

       

      Screen+shot.jpg

        • 1. Re: Need a script to detect lines that flow to the next line
          winterm Level 4

          no clear answer was given

          It was. Use GREP to apply no break to those pieces of data - they have consistent structure, so it can be done.

           

          Each line except the last line of a member entry has a soft return at the end

          As you already were told in InDesign forum, "the idea of using soft returns in every paragraph is very bad practice". You're going to have a hard time seeking anyone who tell you the opposite.

           

          I need to quickly find via Find/Change, GREP, whatever, any lines that flow to the next line

          There's no regex for 'end of a line', period. Your best friend here is no break.

          • 2. Re: Need a script to detect lines that flow to the next line
            Obi-wan Kenobi Adobe Community Professional

            Hi,

             

            Here, we could suppose each "entity" including a no-break setting [logical!]!

            its "semantic" structure is simple, … no need soft-returns!

             

            … So, apparently 2 entities per line!

             

            … To avoid a "even number" entity to "jump" to the next line, it's really simple and you could "correct" this just in 1-click on all the doc!

             

            How?    Search for all entities couples; if their "lines" parent = 2, modify their "justification" until = 1!

             

            … To do that, you'll need a [simple] script!

             

            [Bad news: I don't write scripts for free! … but I can do it! If interested, contact me by PM.]

             

            (^/)