Applying a Paragraph Style found after 3 hard returns
Learn / Forums / General InDesign Topics / Applying a Paragraph Style found after 3 hard returns
Tagged: find and replace, GREP, paragraph style
- This topic has 10 replies, 3 voices, and was last updated 9 years, 11 months ago by Rivkah Lewis.
-
AuthorPosts
-
-
April 28, 2014 at 1:20 am #68145Rivkah LewisMember
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!
-
April 28, 2014 at 1:15 pm #68162Kimmi PattersonMember
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
-
April 28, 2014 at 1:17 pm #68163Rivkah LewisMember
Thanks for the reply, Kimmi.
I tried it and it cannot find a match :( Any other ideas?
-
April 28, 2014 at 1:30 pm #68164Kimmi PattersonMember
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
-
April 28, 2014 at 1:50 pm #68166Rivkah LewisMember
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)-
April 28, 2014 at 2:37 pm #68168Dwayne HarrisMember
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.
-
April 28, 2014 at 2:45 pm #68169Dwayne HarrisMember
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.
-
-
April 28, 2014 at 4:51 pm #68171Kimmi PattersonMember
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 :)
-
April 29, 2014 at 12:05 am #68176Rivkah LewisMember
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.
-
April 29, 2014 at 7:30 am #68193Dwayne HarrisMember
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.
-
-
May 1, 2014 at 3:03 am #68239Rivkah LewisMember
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.
-
-
AuthorPosts
- You must be logged in to reply to this topic.