-
1. Re: EmDash Spacing - Find & Replace
Eugene Tyson Sep 26, 2012 7:37 AM (in response to BlueFunk74)This is probably not the neatest way but
Find
~_(?!\s)|\s+~_|~_\s+
Change
~_
Change Format
Insert the tracking value
-
2. Re: EmDash Spacing - Find & Replace
BlueFunk74 Sep 26, 2012 7:42 AM (in response to Eugene Tyson)Thanks Eugene!
That is excellent, thank you so much.
Just one quick question, how do I apply the 100 kerning either side within the Tracking Value please,
Thanks
Steve
-
3. Re: EmDash Spacing - Find & Replace
Jump_Over Sep 26, 2012 7:52 AM (in response to BlueFunk74)Hi,
1. Create Character Style with tracking set to 100.
2. choose it in Change Format field
-
4. Re: EmDash Spacing - Find & Replace
BlueFunk74 Sep 26, 2012 7:58 AM (in response to Jump_Over)I have created a Character Style and selected it, but it see's the kerning as auto - ignores the 100 set either side
-
5. Re: EmDash Spacing - Find & Replace
P Spier Sep 26, 2012 7:59 AM (in response to BlueFunk74)You cannot do this in one step, I think, but you can use the following to find and remove whitespace around the dash in the middle of a line:
Find (.)\s*(~_)\s*(.) and change to $1$2$3
This will not work, though if the dash starts or ends a paragraph because the \s wildcard picks up the paragraph return and will delete it. If you need to include thoses cases, you'd need to build a class for the spaces instead of using the wildcard.
The reason you need to use a second step is that you only want to change the kerning betweeing the dash and the surrounding characters, and not change the kerning on the third character itself. Also you can't assign a kerning value via find/change/ so you have to settle for assigning None to kerning and adding a tracking value to simulat the kerning you want, in this case 100. If you were to apply that to the whole found string from the first query it would also space out the two characters following the dash.
So now Find .~_ and in the cahnge formatting section under basic text formatting set kerning to None and tracking to 100. You can leave the change field blank.
-
6. Re: EmDash Spacing - Find & Replace
BlueFunk74 Sep 26, 2012 8:07 AM (in response to P Spier)Thanks Peter, and everyone else reading and helping.
That nearly works....only issue I have now is that the 100 tracking is applied to the right hand side of the EmDash, I need it to be on both sides.
Thanks
Steve
-
7. Re: EmDash Spacing - Find & Replace
P Spier Sep 26, 2012 8:21 AM (in response to BlueFunk74)Did you look for .~_ or just ~_ ? You need that dot to pick up the chracter in front.
-
8. Re: EmDash Spacing - Find & Replace
Eugene Tyson Sep 26, 2012 8:54 AM (in response to BlueFunk74)I think it's best to leave the Change Format to simply nothing.
Then in the Paragraph Style - I'd use a GREP style or similar to apply the kerning wherever a em-dash is.
-
9. Re: EmDash Spacing - Find & Replace
Eugene Tyson Sep 26, 2012 8:55 AM (in response to Eugene Tyson)That way the find and replace works.
Plus the paragraph style should automatically apply the kerning around the em-dash.
-
10. Re: EmDash Spacing - Find & Replace
P Spier Sep 26, 2012 9:14 AM (in response to Eugene Tyson)That's probably a good idea. Same query string: .~_
-
11. Re: EmDash Spacing - Find & Replace
Jump_Over Sep 26, 2012 10:00 AM (in response to P Spier)Hi,
It should work in one step, but not for dashes, which start or end paragraph:
Find: (\w)\>\x{20}*(~_)\x{20}*\< // only keyword's Spacebars
Change: $1$2 // CharStyle is applied to last word char and to em-dash
Change format: CharStyle {kerning: None, tracking: 100}
hope...
-
12. Re: EmDash Spacing - Find & Replace
shem.eu Sep 26, 2012 3:06 PM (in response to BlueFunk74)I would set up a GREP style, it would always follow the rule when the character appears.
-
13. Re: EmDash Spacing - Find & Replace
BlueFunk74 Sep 27, 2012 8:03 AM (in response to shem.eu)Thank you all so much for assisting me with this. It works a treat and I have been able to achieve my desired file.
If I may ask one more thing of you knowledgable people please. I would very much like to understand the 'script' which I was given to find the spacing issues. Within the same document I have to achieve this for forward & backward slashes also and I would like the knowledge to be able to manipulate the information you have given me here to achieve this.
Knowledge is power, and saves me hassling you guys for help all the time!
Thanks in advance,
Steve
-
14. Re: EmDash Spacing - Find & Replace
P Spier Sep 27, 2012 8:39 AM (in response to BlueFunk74)Jongware has written a nifty script to translate GREP expressions: http://www.jongware.com/idgrephelp.html and that's one good place to start. I also recommend getting a copy of Peter Kahrel's excellent eBook (available in several formats, including PDF, from OReilly.com) on GREP in InDesign: http://shop.oreilly.com/product/9780596156015.do Best ten bucks you can spend to learn about GREP in ID.



