I’ve figured out how to do a series of Find and Replaces to fix double hyphens and add a fixed space in a certain way:
Fixed space, e.g.:
Text find et al. and replace with et^sal.
Double hyphen:
Grep find \w+?- and replace with ~-$0 (inserts a discretionary hyphen before the hyphenated words)
find -\w+? and replace with ~k~-$0 (inserts a discretionary line break and discretionary hyphen before the hard hyphen)
find ~k~– and replace with -~k~- (transposes the discretionary line break and discretionary hyphen with the hard hyphen)
This results in the words being allowed to break but only at the hyphen.
I know it’s possible to add these to the FindChangeList to execute the series of actions much more quickly, but I have no experience with scripting and am at a loss as to how to edit the text file. I’ve tried using RecordFindChange and then adding the resulting text to FindChangeList but keep getting error messages.
Can anyone help or point me in a better direction? It drives me crazy to have to go through all these steps all the time when I know that there’s a better way…
Thanks!