The Basics

Before getting to the fancy bits, let’s be sure we know what options we have for straightforward searches. Many of the buttons in Find/Change are small and cryptic, but useful. There are also well-intentioned but risky features, too.

To start, let’s find a word everywhere it occurs in a document and not change it all. In the image above, only the Find what field is populated. When I clicked Find Next, InDesign found the first instance of the word “beast.” Since the search wasn’t case sensitive, it would also have found “Beast.”

Adding “dragon” to the Change to field, I clicked Change All. I hadn’t specified that “beast” should be sought only if it is a whole word, so “beastly” became “dragonly.” A quick -Z/Ctrl-Z fixes that. Using the Whole Word button ensures a less silly result.

As you can see, that small, easily missed button is pretty useful when you need it. Since Find/Change retains settings somewhat tenaciously, I sometimes fail to notice that I’ve left this function (or others) active when I search for something hours later.

Setting Scope

Similarly useful, and treacherous, is the Search menu, where we specify how broadly Find/Change should search. It defaults to Document if nothing is selected, Story if a text frame is selected or your text cursor is blinking within one, and Selection if text is highlighted. Think about that: just by changing what’s selected, you automatically change the scope of a search. I sometimes highlight a word, copy it, then paste it into the Find what field to be sure I haven’t misspelled it. I hit Change All and InDesign reports that one change was made, which is puzzling when I know that word is used many times throughout a document. But when I highlighted the word, it became the only part of the document InDesign was searching!

Tip: Before clicking Change All, cut your eyes over to the Search menu and buttons.

Find/Change Formatting

A quick way to remove content is to enter it in Find what, and leave both Change to and Change Format blank when clicking Change All. If you wish to find and format some content, leave Change to blank, but click on the Change Format box to configure its numerous settings. In the example below, I set Find what to “dragon,” and when I clicked on the Change Format box, I chose a Character Color of red and, in Basic Character Formats, a Font Style of Bold.

Once those settings are specified, click OK in that dialog and then click Change All. Because settings tend to be sticky here, it’s important to clear them when you’re done. Those icons that look like cupcakes are actually trash cans that clear settings. Using them prevents later searches from changing more than words.

I often leave both Find what and Change to blank, and use only the formatting boxes. In a recent document, I used a format-only find/change to replace all text that was manually formatted as bold with a character style that made the text red but kept it in a normal weight. Specifically, I clicked in the Find Format box, went to Basic Character Formats in the resulting Find Format Settings dialog, and chose Bold in the Font Style menu. When I clicked the Change Format box, I remained in the Style Options section of the Change Format Settings dialog so I could choose a Character Style I made previously called “just red.” I was fortunate that nothing else was bold except what I wanted to change, so I clicked Change All and it was done!

If I had to be more careful about where the search was done, I could have highlighted the text to search and set the scope of the search to Selection, or specified that only a certain paragraph style be searched when I configured Find Format Settings.

There is a somewhat common practice for workflows in which writers just write, and the styling and layout is in other hands. The writer will add a unique code or symbol at the beginning of paragraphs that are different than standard body copy. This keeps their fingers on the keyboard and minds on the words. For example, in front of a chapter header, a writer may add “<h1>” (a common way to mark up a top-level header, as in HTML). That would be a fine thing to put into the Find what field, and then you can click on Change Format and select a paragraph style that decorates chapter headers.

This would have to be followed up with a second find/change with the formatting cleared so that each use of “<h1>” is removed (replaced with nothing).

Special Characters and Metacharacters

Sometimes we need to search for or change to a character we don’t know how to type (something like a trademark symbol, for example), or a character that literally cannot be typed in the Find what or Change to fields (like a tab character). To the right of those fields is a menu that looks like an @. In it is a list of many symbols, typographic spaces and characters, InDesign markers, and more. With this, you can replace tabs with em spaces, for example. However, what appears in the Find what or Change to fields won’t look like the thing you’re looking for; instead, InDesign uses metacharacters. So a tab is rendered as “^t” (without the quotes, of course), and a copyright symbol as “^2.” The caret character itself is rendered as “^^.” Once you know the metacharacter for a symbol, you may type it in those fields yourself, too.

Wildcards are also useful. For example, the wildcard for any letter (^$) followed by “hat” would find “chat,” “phat,” “that,” and “what,” (and maybe something else), but not “+hat,” since “+” isn’t a letter. But using the wildcard for any character (^?) would find “+hat.” When it comes to more abstract searches that involve things like wildcards, there’s an entire section of Find/Change that is awesomely powerful, if a little geeky: GREP (coming up shortly).

Another clever feature is the ability to use the contents of the clipboard for Change to. So anything in a flow of text that you can copy or cut, including inline graphics, can be used. In the example below, I copied an inline (anchored) graphic of a hat and an em space from one text frame to my clipboard. In Find what, I entered a bullet and space, and in Change to I chose (from the special character menu) Other > Clipboard Contents, Formatted.

Tip: Save queries that you may need again. To do so, click the Save Query button at the top-right of the Find/Change dialog.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset