Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Script to find consecutive paragraphs with space below and space above

Return to Forums

  • Author
    Posts
    • #65603

      I’ve come to InDesign from an application that overlapped spacing between consecutive paragraphs. If the first paragraph had 12 points below and the second 24 points above, the resulting space was 24 points. That’s almost always what I wanted. Unless I’m missing some trick, ID doesn’t work that way — it adds the space together, requiring either paragraph by paragraph overrides or the creation of alternate styles. The problem is, how do I find all instances of two paragraphs that cause the problem? In a given book, there may be a dozen styles with space below assigned and as many or more with space above assigned. The possible combinations are enormous. So rather than searching through a perhaps 600 page book to manually check each element with space above assigned, is there a way to construct a script that would search for any paragraph with space below greater than zero followed immediately by a paragraph with space above greater than zero? Apologies if this has been addressed before. I’ve read the discussions about the hope for context sensitive formatting (first or last element in a list should be treated differently from internal elements, for example), but that doesn’t really address what we do here and now.

      Thanks

    • #65604
      David Blatner
      Keymaster

      Hm… no, I think InDesign works the way you want it to. If you give a paragraph .25″ space after, and then the next paragraph .25″ space before, then you have .5″ between them. No?

    • #65606

      What I want is actually the larger of the two spaces specified, whether it’s the below or the above setting. If 12 points below and 24 above, I want 24. If .25 inches below and .25 inches above, I want only .25 inches total, not .5 inches. If I have a block quote that typically has 12 points below, for example, I will get (and want) 12 points below when it’s followed by body text, which has no space above designated. If that block quote is followed by a subhead that typically carries 24 points above, however, I want only 24 points total, not 12 + 24. So I want the spaces to overlap, not add to each other. To accomplish this manually requires scouring through a document visually or searching for every instance of every style that has a space above designated. I hope that makes sense.

    • #65607
      David Blatner
      Keymaster

      Ah, interesting. No, I don’t know of anything like that. Yes, I’m sure a script could be written, though!

Viewing 3 reply threads
  • You must be logged in to reply to this topic.
Forum Ads