Applying a Paragraph Style found after 3 hard returns

Learn / Forums / General InDesign Topics / Applying a Paragraph Style found after 3 hard returns

Viewing 7 reply threads
  • Author
    Posts
    • #68145
      Rivkah Lewis
      Member

      I’m typesetting a book with many short stories and anecdotes. I have a body text style and a first paragraph style that has a drop cap and some small caps text in the first line. There is a triple return after each story (3 “enters”) – that’s how it was sent to me. Is there a way to set a GREP or other style that finds the paragraph after 3 returns and then applies the “first paragraph” style that I made?

      Thanks!

    • #68162

      Hi Rivkah,

      See if this GREP will work using Find and Replace, while applying the paragraph style in the Change Format section at the same time.

      (?<=\r{3}).*

      Good Luck!

      Kimmi

    • #68163
      Rivkah Lewis
      Member

      Thanks for the reply, Kimmi.

      I tried it and it cannot find a match :( Any other ideas?

    • #68164

      That’s weird. Are there any other things going on besides the 3 paragraph returns and then the paragraph?

      Also, I hate to ask the “is the computer plugged in” question, but did you check to be sure you were in the GREP tab on the Find/Change dialog box?

      It’s gotten me before…

      … also that the Search is set to Document or Story and not Selection

    • #68166
      Rivkah Lewis
      Member

      Yes, I was in GREP and its set to document, but you’re smart for asking :)

      Here’s a sample of the text:

      …they were raising funds to build showed the building surrounded by trees that weren’t included in the plan. (<end par. here – what regular search and replace would write as ^p)
      (<end par. here)
      (<end par. here)
      A poor person came…. (this is where the “first paragraph” style is supposed to be applied)

      • #68168

        Unfortunately I am lousy at GREP, but I’m pretty good with search and replaces. I think you can accomplish what you want in three search and replaces.

        1) Search for ^p^p^p and replace with ^p^p^p« (I used a French Quote mark but you can use anything that is not used elsewhere)

        2) Search for that « (or whatever character you used) and in the replace field, just choose the style sheet you want and nothing else.

        3) The paragraph will now be tagged, so all you need to do now is search for the « and replace with nothing. Be sure you “clear” the style sheet from the previous replace that you did.

        I tried it real quick as a test because I was worried about local formatting on the newly styled paragraph, but they remain so you’ll be okay.

        Hope that helps.

      • #68169

        Oh, I wanted to add. I hope those extra returns won’t be a problem if the book goes to e-book or something. Also–what are you going to do if it breaks page to page?

        I’d suggest that after you do those search and replaces (unless the Kimmis GREP to work), that you search for three returns and replace with one. AND change that style sheet to have a fixed space above it.

    • #68171

      I agree with Dwayne. Instead of using returns to build space above or below, build it into your styles. You could use the find change to style the paragraphs, then run it again to replace or delete them.

      Personally I prefer to delete them so you’re not fighting with them at the top or bottom of the next column :)

    • #68176
      Rivkah Lewis
      Member

      Dwayne – that was a fantastic idea.
      It worked amazingly (only shame is that I had already done everything by hand due to upcoming deadline and lack of immediate responses :))

      That will certainly come in handy in the future as I do a lot of typesetting.

      I can’t believe I didn’t think of space before on my own! I was thinking that if I did space after, I would have to find all the last paragraphs before new sections… Feeling silly :) I added that now as well and its great.

      I can’t thank you and Kimmi enough for your help!

      As a side, they have no plans to print as an ebook but I guess its always good to have the file set up properly in case they change their mind.

      • #68193

        I’m glad it’s working for you. So far as the space above–sometimes one forgets the simple stuff

        Again–I’m glad it will come in handy in the future.

    • #68239
      Rivkah Lewis
      Member

      That was fast – I used it again today to typeset a diary-style book. It was fantastic!
      Now if the people typing up the Word file would be 100% consistent, that would make life EVEN easier.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.
>
Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo