Many people have asked, when they use our Q2ID or PDF2DTP products,
once they've converted their file into InDesign,
how they can replace certain characters, in either large sections,
or for an entire document.
So, this short tutorial will show you how to use
GREP in InDesign to replace characters.
And I'm running InDesign CS6 under Mac OS X 10.8.2.
So, let's say I want to replace,
in these first couple paragraphs, the space character
with an "m-space" character, which is the space of an M.
In order to do that,
what I first need to do is bring up my "Info" window here, in InDesign.
And if I highlight a character,
which I'll highlight a space,
it's going to show me the hexadecimal value
of that character,
which, in this case, is 20,
and then I want to replace that
with, say, an m-space.
Now, I don't know what an m-space looks like,
so, I'm going to come down here
to the end of this line and I'm going to insert one to figure out what it's
hexadecimal value is.
So, I've now inserted an m-space here,
that's a hex 2003.
So with those two bits of information, we're ready to go ahead and do the
Find and Replace.
So, first, let's highlight
the sections I want to replace.
Then, I'm going to do a Command-F, bring up the "Find and Replace" window,
click on the GREP tab,
and I want to find
the space, which was a hexadecimal 20, so I type in a backslash,
x for hexadecimal,
a curly brace, and then the hexadecimal value,
and close that off with a curly brace.
I can tab down to the next area and I want to replace that with an m-space,
as in mother,
so backslash x again,
curly brace,
that one, when we looked up, was a 2003 value in hex.
And I want to select
Selection,
and then go ahead
and Change All.
And you can see that it found 116
spaces and then we'll replace them with an m-space.
So, when I click OK,
and I've turned on Show,
or Show Hidden Characters, here,
so that we can see the m-spaces.
So, all of these spaces have now been replaced with an m-space.
We can go ahead,
if you don't want to look at that, and just turn that off, and that's how your
document will look.
So, you need to first look up your hex value,
and then replace it with another hex value. So, for instance, if I want to
replace all the lowercase Qs
and make them all uppercase,
the lower case Q is a hex 71,
so, we'll put a 71 in here.
And for an uppercase Q, I don't know what that is, so let's just go type one
and then we'll highlight that.
That shows as a hex 51.
We'll add that in, 51. We'll change the selection from...
from "Selection" to the entire "Document".
We'll go ahead and do a Change All.
We have 1841.
We'll go ahead and
click OK, and now you can see that all of the lowercase Qs have been made
into uppercase.
So, a quick tutorial on how to use GREP in InDesign to replace characters.