-
1. Re: Grep style: x words, maybe with punctuation
Michael Witherell Feb 8, 2013 1:07 PM (in response to RobertKyle)Don't do a GREP style. You merely need a nested paragraph style that says apply a certain character style UP TO or THROUGH the em dash.
-
2. Re: Grep style: x words, maybe with punctuation
RobertKyle Feb 8, 2013 1:47 PM (in response to Michael Witherell)Tried that. But I couldn't figure out how to keep the character style from firing off when there is no dash. Not every paragraph will have a dateline.
-
3. Re: Grep style: x words, maybe with punctuation
P Spier Feb 8, 2013 1:53 PM (in response to RobertKyle)Is there a compelling reason not to use two paragraph styles? Presumably it's the first graph in a story (or the one after the byline, or wahtever -- some predictable position) that carries the dateline and you could use "next style" to switch into, possibly, and out of the Dateline style.
-
4. Re: Grep style: x words, maybe with punctuation
RobertKyle Feb 11, 2013 1:16 PM (in response to P Spier)A very logical suggestion and we may very well go down that road if I can't come up with a reliable word-counter. The folks who supply these paragraphs often don't pay attention to paragraph styles at all. It's been something of a journey to get them to use one style for bylines and another for text. So a second text style might not be popular.
-
5. Re: Grep style: x words, maybe with punctuation
P Spier Feb 11, 2013 1:32 PM (in response to RobertKyle)With the use of the 'next style' in the definition, byline can be followed by dateline can be followed by story body and all they have to do is hit the enter key and type, or if you import the stories unformatted, select all, right click the byline style in the panel, and choose Apply Byline, Then Next Style.
-
6. Re: Grep style: x words, maybe with punctuation
SRiegel Feb 11, 2013 2:22 PM (in response to RobertKyle)If you datelines are consistant how they are set up, you could write a grep to match that. For instance: the grep below with style both datelines below, but leave the un-datelined text alone. (note the spaces in the code)
^.+ \(\d{1,2}/\d{1,2}/\d{1,2}\) —
The paragraph style with this GREP style included is applied to all three paragraphs, and functions properly. It find any text at the beginning of the paragraph, followed by the date format and the em dash.
-
7. Re: Grep style: x words, maybe with punctuation
[Jongware] Feb 11, 2013 3:51 PM (in response to RobertKyle)\w indeed only picks up alphabetics and numerals. Since you are dealing not only with words, but actually with anything-except-space, separated by real spaces, you can use \S instead (which is, effectively, "not-a-space"):
^\S+(\s\S+){0,5}~_
-
8. Re: Grep style: x words, maybe with punctuation
RobertKyle Feb 23, 2013 8:59 PM (in response to [Jongware])Thanks, Jongware. "not-a-space" is exactly what I needed.
I realized, while reading SReigel's suggestion, just how imprecise our jargon can be. I'm sure that once upon a time, datelines had actual dates in them. But nowadays they usually just include the city and the state, and all that not-a-space punctuation that was driving me crazy,





