I would like to build a macro to cleanup my text, especially when I've imported some paragraphs where the typography isn't right in French. There might be one on this forum, but in that case I have missed it and would be grateful for any suggestion.
Basically, in order to avoid creating double spaces or spaces+non breakable spaces, etc, since I will have some "good" paragraphs and some defective ones, I think the macro would need to
-- remove all kinds of spaces, simple and/or non-breakable, before "double" punctuations (;:!?) + inside guillemets.
-- add such unbreakable spaces before such signs and inside guillemets.
I'm well aware that this must be ridiculously simple for some of you (judging from the cleanup punctuation macro) but if you had an example it would help! Thanks in advance!
EDIT: I see that in Find and Replace, Powerfind REGEX, I can find all positions just before double punctuations, then insert a non-breaking space just there, and add a round where I replace all double non-breaking spaces by a single one. Then a third round where I replace all sequences of simple space+non-breaking space (resulting from punctuations where a simple space was mistakenly inserted). The command is the following in the search box:
Code: Select all
(?=([;:!?]))
