🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.incopy.macintosh
8 messages
8 total messages Started by Ben_Reichman Mon, 26 Jan 2009 16:29
InCopy GREP: how can I search for a single space after a sentence?
#140
Author: Ben_Reichman
Date: Mon, 26 Jan 2009 16:29
5 lines
1008 bytes
In the Find/Change box in InCopy, there's a preset GREP command: "Multiple Space to Single Space." In the books I'm working on, we need to do the opposite. I know I should learn regular expressions, and I'd like to, but frankly I'm pressed for time, so here's my question:

What is the exact regular expression I should paste into the Find/Change box to find single spaces before sentences?

Thanks!
Re: InCopy GREP: how can I search for a single space after a sentence?
#141
Author: Anne-Marie Concepcion
Date: Mon, 26 Jan 2009 18:02
16 lines
1227 bytes
In Find, in the GREP area, you need to enter

Find What: \. \S

backslash-period = find a period
tap the spacebar for a space ...there's a space after the period above
backslash-cap S = not whitespace

If you want to change it to two spaces after a period, group the Find expression so you can replace the Found text in the Change to field.

Find What: (\. )(\S)
Change To: $1 $2

(I added a space after $1 so IC adds a second space after the period)

AM
Re: InCopy GREP: how can I search for a single space after a sentence?
#144
Author: Anne-Marie Concepcion
Date: Mon, 26 Jan 2009 18:28
13 lines
1068 bytes
Also ... if you want to find a single space following a period, a question mark, or an exclamation point, you could use this:

([\.?!] )(\S)

That first group in brackets finds:
a period, or a question mark, or an exclamation point

following the bracketed group is a single space (tap on the spacebar)

So the first found set -- $1 -- is:
a single space after a period, question mark, or an exclamation point.

AM
Re: InCopy GREP: how can I search for a single space after a sentence?
#146
Author: Ben_Reichman
Date: Mon, 26 Jan 2009 18:50
5 lines
824 bytes
Anne-Marie,

Thanks so much! I'm going to use this many times today, and tomorrow, and the day after, and... ;)

Ben
Re: InCopy GREP: how can I search for a single space after a sentence?
#147
Author: Anne-Marie Concepcion
Date: Mon, 26 Jan 2009 19:48
5 lines
810 bytes
Cool!

But I have to ask, what sort of books are you working on that require you find sentences beginning with single spaces (and what are you changing them to?)

AM
Re: InCopy GREP: how can I search for a single space after a sentence?
#148
Author: Ben_Reichman
Date: Mon, 26 Jan 2009 20:11
1 lines
711 bytes
Middle school literature textbooks, and the publisher wants two spaces before each sentence.
Re: InCopy GREP: how can I search for a single space after a sentence?
#149
Author: Bob Levine
Date: Mon, 26 Jan 2009 20:23
8 lines
962 bytes
It would likely look better if simply created a character style with a 
horizontal scale of about 70% and applied that. Two spaces is just ugly.

Another possibility would be an em space.

Just my $0.02,

Bob
Re: InCopy GREP: how can I search for a single space after a sentence?
#150
Author: Ben_Reichman
Date: Mon, 26 Jan 2009 20:45
1 lines
823 bytes
I agree that it's ugly--and those are great suggestions. But we're working in the template a client created, so we don't have any leeway to modify anything at all. Oh, well.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads