-
1. Re: GREP question
Doc Maik Feb 28, 2014 2:23 AM (in response to SueCampbell54)For my understanding: what are "first graph style" and "body styled graph"?
-
2. Re: GREP question
Peter Kahrel Feb 28, 2014 2:39 AM (in response to SueCampbell54)'Graph' probably stands for 'paragraph', right?
The answer to you question is yes, but you need several steps. Here's why: you can search for any Header Styled Line¶, but then you're stuck: you can't get to the following paragraph. To find the paragraph following the head, you'd have to search for Header Styled Line\r. ( \r is the paragraph break). That dot at the end is part of the grep and stands for 'any character', here the first character of the next paragraph. And because that will be a different paragraph style, you won't find anything.
Here's the two-step method:
1. Search \r in your header styled paragraph style, and replace with \r###
2. Now all the paragraphs following the header-styled line start with ###
3. Search ^### replace with nithing, and apply Body Style paragraph style
Peter
-
3. Re: GREP question
Obi-wan Kenobi Feb 28, 2014 3:00 AM (in response to Doc Maik)Hi,
3 regex into a Multi-Find/Change:
Regex 1:
Search: \r
Replace: $0@
Search format: Head style
// Use a character not otherwise used! //
Regex 2:
Search ^@
Replace format: New style
Regex 3:
Search ^@
replace: nothing
Obviously, with MFC: only one click!
-
4. Re: GREP question
Obi-wan Kenobi Feb 28, 2014 3:02 AM (in response to Obi-wan Kenobi)Hi Peter,
Sorry, I don't see your answer !
-
5. Re: GREP question
Doc Maik Feb 28, 2014 3:41 AM (in response to Obi-wan Kenobi)@Peter: I don't see why anyone would say "body style paragraph style". There is no "body" in Indesign. You got text boxes (or frames) and objects. You can apply styles to paragraphs or characters or objects. Please don't confuse people trying to help.
@Obi-wan: Multi-Find/Change?
-
6. Re: GREP question
Peter Kahrel Feb 28, 2014 3:47 AM (in response to Doc Maik)'Body' as in 'body text', as opposed to secondary text. That's normal usage.
-
7. Re: GREP question
Obi-wan Kenobi Feb 28, 2014 4:09 AM (in response to Peter Kahrel)See: http://www.automatication.com
MFC is a very helpful script written by Martinho Da Gloria with which we can make multiple search-replace in ID.
Otherwise, x Regex (in a "set") but only one click!
-
8. Re: GREP question
Doc Maik Feb 28, 2014 5:25 AM (in response to Peter Kahrel)Peter Kahrel wrote:
'Body' as in 'body text', as opposed to secondary text. That's normal usage.
Hmm...Never heard of both. But my mother language is German, so this can happen. I searched Google and learned that body text is also main or primary text. But what is secondary text? However, "body text" may be common, but "body style" is not. Paragraph styles are paragraph styles, no matter if they are for body text, secondary text or even footnotes.
@Obi-wan: I see. A script. Will have a look. Thanks.
-
9. Re: GREP question
Peter Kahrel Feb 28, 2014 5:32 AM (in response to Doc Maik)Secondary text is e.g. tables, notes, references, quotations.
'Body style' is just shorthand for 'a paragraph style for body text'.
-
10. Re: GREP question
SueCampbell54 Feb 28, 2014 10:32 AM (in response to Peter Kahrel)Peter,
Thank you. This I can understand. The problem with most GREP manuals is that they seem to be written in another language. It should make sense but doesn't because I don't even know what "Regex" means!
I did th steps precisely as you wrote them. However, strangely, it is leaving the ### in the re-styled paragraph after the last step. It shouldn't! I have used "nothing" in the "Change to" field. I tried this last step in the GREP tab and in the Text tab think that could be it. But it leaves the ### either way! I do not understand. I've done this sort of find/change before and it usually works? Clueless what to do now.
I am going to find your book though, Peter. It was recommened to me by Erica Gamet.
Obi-wan, is Multi-find/change a plug in? Oh, a script. I'll go look for it. Thanks. I'm going to try your solution too. I will report back.
Sorry for the imprecise way I described my paragraph styles—Peter's interpretation was correct.
Bear with me! I'm trying!
Sue Campbell
-
11. Re: GREP question
Obi-wan Kenobi Feb 28, 2014 11:00 AM (in response to SueCampbell54)Hi Sue,
Peter forgot the third step (see my proposal). We thought and wrote exactly the same process - which is a "classic" one. Peter uses ###, I prefer to use @ (if not otherwise used). With MFC, you have only 1 click to do to run automatically the 3 regex one after the other.
-
12. Re: GREP question
Peter Spier Feb 28, 2014 11:20 AM (in response to Obi-wan Kenobi)Obi-wan Kenobi wrote:
Hi Sue,
Peter forgot the third step (see my proposal).
Actually, Peter incorporated your steps 2 & 3 together in his step 2, but for some reason it's not working for Sue as it should. My bet would be that she's eithger limited the scope of the search improperly, or she left some Find Format in place that shouldn't be there.
-
13. Re: GREP question
SueCampbell54 Feb 28, 2014 11:46 AM (in response to Peter Spier)Peter S., No, I really didn't—I replicated Peter K's steps exactly. I did find that it was trying to remove the ### and change the body text (indented) style to 1st body text (not indented) style in one step—that was the problem.
Obi-Wan I finally did figure out what your instructions meant and switching the order of step 2 and 3 (as you did) was the key in getting this to work. Thanks.
I guess the reason I don'tuse GREP much is that I could have gone through the entire book and implemented the change in the time it's taken to try to troubleshoot this. Sigh.
I appreciate you guys helping a newbie at GREP. I will check out the Multi F/C script. But understanding the steps is what I needed right now. As I have to hand the file back I can't expect them to use a script (but I can!)
Sue Campbell
-
14. Re: GREP question
Obi-wan Kenobi Feb 28, 2014 11:48 AM (in response to Peter Spier)Hello Peter,
This does not work for me too! It is the reason I use 3 regex.
-
15. Re: GREP question
Peter Spier Feb 28, 2014 11:59 AM (in response to SueCampbell54)OK, I tried it here and get the same failure in both CS5 and CS6 when combining the steps. Now that I think about it, it actually does seem correct, though, that it should behave this way. Leaving the change field blank and adding formatting is really telling ID you want to change the formatting only.
-
16. Re: GREP question
Obi-wan Kenobi Feb 28, 2014 12:13 PM (in response to Peter Spier)Fine! We can go to sleep!
Multi-Find/Change have changed my approach in ID. It is so much easier and faster associate simple (and intuitive) regex rather than find the "Holy Grail" in one!
-
17. Re: GREP question
SueCampbell54 Feb 28, 2014 12:17 PM (in response to Obi-wan Kenobi)Ha. Thanks for staying up! It's my work day now. Good night!





