/ Id-Extras Forum / Remove Dropwords

  • Author
  • #6973 Reply
    Yosef Wexler

      First of all great script!

      Extremely helpful and works great most of the time.

      Recently was using the “remove dropwords” function and all of a sudden I noticed that where the linebreak and tab were being removed it wasn’t putting in a space there and I was ending up with two words now being combined into one. I’m pretty sure this isn’t the first time I’ve used the remove dropwords function and don’t recall that happening in the past.

      This obviosly is not what’s supposed to be happening.
      Am I doing something wrong in the way I’m running “remove dropwords”?

      Thanks for your help

      #6974 Reply
      ~~Ariel~~
      Participant

        Hi Yosef,
        Thanks!
        When you run Dropword, it adds (inserts) a forced line break followed by a tab at the end of the line. (Well, the forced line break is at the end of the line, and obviously the tab as at the beginning of the next line.)
        When you run the “Remove” command, it removes the forced line break and tab.
        It does not replace them with a space, because it did not delete any spaces.
        So the result is that the text returns to its original state. Try this on a new file with new text, and you’ll see how it works.
        If you’re finding that there’s a space missing after running “Remove”, my guess is that that’s because you ran a find/change that removes all spaces at the end of the line, something like that. Could that be?
        Or else at some point you manually deleted those spaces.
        In any case, if those spaces are really missing, you could simply run your own find/change in InDesign. Search for a forced line-break followed by a tab, and replace with a space.

        Ariel

        • This reply was modified 8 months, 3 weeks ago by ~~Ariel~~.
        #6976 Reply
        Yosef Wexler

          Thanks!!

          “If you’re finding that there’s a space missing after running “Remove”, my guess is that that’s because you ran a find/change that removes all spaces at the end of the line, something like that. Could that be?”

          That’s EXACTLY what had happened, unintenionally of course.

          I tested out a new file and discovered if after running Dropword you use InDesign’s built in GREP of “Remove Trailing Whitespace” that will erase the space before the linebreak.
          That must have been what I had done and was then afterwards using “remove dropword” and getting words together.
          Thanks for your help, now I know to me more careful about using “remove trailing whitespace” after Dropword.

           

          • This reply was modified 8 months, 3 weeks ago by ~~Ariel~~.
          #6979 Reply
          ~~Ariel~~
          Participant

            Great, glad you figured it out.
            So, yes, one needs to a find a way to modify that GREP to exclude spaces before forced line breaks.

            #6980 Reply
            Yosef Wexler

              I think this should work:

              Find \s+\r

              Change \r

              If you put in the \r instead of the $ which ID has in there it doesn’t find spaces before line breaks.
              Only thing is since \r isn’t a location like $ you need to in the change but back in the paragraph mark \r if not you’ll end up with paragraphs grouped together.

              Not sure if anything else the built in “remove trailing whitespace” is finding which is missing in above GREP.

               

            Viewing 5 posts - 1 through 5 (of 5 total)

            Tagged: 

            Reply To: Remove Dropwords form6
            Your information: