Two-Step Searching

While editing in Microsoft Word, I often need to find something that's *partially* formatted and replace it with something else. For example, let's say a manuscript has a bunch of superscript note numbers preceded by a space that's *not* in superscript. Here's an example (with carets indicating superscript):

Lorem ipsum dolor sit amet. ^1^

I'd like to have Word find all such spaces and replace them with nothing (in other words, delete them), but that doesn't seem possible. I can open Word's Replace dialog (Edit > Replace) and set the "Find What" box to superscript, but the space isn't superscript, and the manuscript has thousands of spaces that *don't* precede a superscript number. It also has numbers that aren't superscript (like 2001), so I can't just find spaces preceding numbers. What's an editor to do?

Find and replace the spaces in two steps rather than one:

1. Mark the superscript with codes.

2. Delete the spaces and codes.

STEP 1

To mark the superscript with codes, do this:

1. Open Word's Replace dialog by clicking the "Edit" menu and then "Replace."

2. Put your cursor in the "Find What" box and make sure the box is empty.

3. Click the "Format" button. (You may need to click the "More" button first.)

4. Click "Font."

5. Put a checkmark in the "Superscript" box.

6. Click the "OK" button. The "Find What" box should now be set to superscript.

7. Put your cursor in the "Replace With" box.

8. Type the following string in the "Replace With" box:

^&

9. Click "Replace All."

All of your superscript numbers will be replaced with themselves, preceded by , which is a code I just made up to indicate superscript. In other words, your sentences will now look like this:

Lorem ipsum dolor sit amet. ^1^

Feel free to make up your own codes for whatever you need (italic, bold, paragraph styles, and so on).

The other code in the "Replace With" box, ^&, is Microsoft Word's "Find What Text" code, which represents the text that was found (the superscript numbers). You can learn about it here:

http://www.topica.com/lists/editorium/read/message.html?mid=1703525514

STEP 2

To delete the spaces and codes, do this:

1. Open Word's Replace dialog by clicking the "Edit" menu and then "Replace."

2. Put your cursor in the "Find What" box by clicking it.

3. Type the following string in the "Find What" box:

(You can't see it very well in this newsletter, but there's a space in front of that code, and it needs to be there.)

4. Click the "No Formatting" button so you're no longer finding superscript, which is now represented by the code.

5. Put your cursor in the "Replace With" box and make sure the box is empty.

6. Click "Replace All."

All of the spaces in front of the codes (and thus in front of the superscript numbers) will be deleted, as will the codes themselves, leaving your sentences looking like this:

Lorem ipsum dolor sit amet.^1^

You can use this little two-step trick any time you need to find and replace partially formatted text. Now that you know how, that will probably be quite often.

ERRATA

In the April 18, 2001, issue of Editorium Update, I gave the following find-and-replace pattern for putting last name first in a list of names:

Pattern: G. B. Harrison, Ph.D.

Find What: ^013([A-z].) ([A-Z].) ([A-z]@,) (*)^013

Replace With: ^p3 1 2, 4^p

That first [A-z] wildcard range should have been given as [A-Z] (with a capital Z) to indicate a capital letter. [A-z] (with a lowercase z) will work, but it doesn't make the example as clear as it should have been.

_________________________________________

READERS WRITE

After reading last week's newsletter, subscriber Nancy Adess (naedit@earthlink.net) wrote, "Why would there be periods at all at the end of references in parens in the text? Why not just (Thoreau, Walden, p. 10)?"

I responded:

I realize I'm at odds with the Chicago Manual of Style (10.77) on this, but I think Chicago is wrong. Chicago style is like this, with no period at the end of the quotation and a period after the source citation:

"The improvements of ages have had but little influence on the essential laws of man's existence" (Thoreau, Walden [New York: Time Reading Program, 1962], p. 10).

To me, the period is *part* of the quotation--but we've just put it after the citation. However, if the sentence ends with a question or exclamation mark, Chicago keeps it with the quotation where it belongs:

"What is the nature of the luxury which enervates and destroys nations?" (Thoreau, Walden [New York: Time Reading Program, 1962], p. 13).

The placement of the question mark reveals the faulty reasoning behind moving the period--we didn't move the question mark, right? Also, we now have another problem: Since we're not going to move the question mark, how do we punctuate our citation? Chicago does it by leaving that period there--but in this case the period was never part of the sentence to begin with. This makes no sense at all--and besides, the period looks stupid hanging out there by itself. I think the sentence and the citation should be punctuated independently, like this:

"The improvements of ages have had but little influence on the essential laws of man's existence." (Thoreau, Walden [New York: Time Reading Program, 1962], p. 10.)

"What is the nature of the luxury which enervates and destroys nations?" (Thoreau, Walden [New York: Time Reading Program, 1962], p. 13.)

Simple. Sensible. Neat. Consistent. And not ugly.

And besides, I was trained by a marvelous, independent-thinking editor, and that's the way she did it. 🙂

In addition, using this style makes electronic manipulation simple because the sentence and the citation are both self-contained. For example, it's now an easy matter to write a macro that will turn parenthetical source citations into footnotes--or vice versa. If we take our first sentence, punctuated like this--

"The improvements of ages have had but little influence on the essential laws of man's existence." (Thoreau, Walden [New York: Time Reading Program, 1962], p. 10.)

--we can use a macro to:

1. Delete the space before the citation.

2. Delete the opening parenthesis.

3. Cut to the closing parenthesis.

4. Delete the closing parenthesis.

5. Create a footnote.

6. Paste the cut citation into the footnote.

7. Close the footnote.

That leaves our sentence looking like this (with carets indicating superscript):

"The improvements of ages have had but little influence on the essential laws of man's existence."^1^

And our note looking like this:

^1^Thoreau, Walden [New York: Time Reading Program, 1962], p. 10.

We could also use the macro successfully on our second sentence (the one with the question mark). But if we had followed Chicago style, we'd have to create separate macros for each kind of sentence and citation, and they'd be more complicated, too. (Our NoteStripper program includes macros that do this kind of stuff.)

This entry was posted in Editing. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

You must be logged in to post a comment.

  • The Fine Print

    Thanks for reading Editorium Update (ISSN 1534-1283), published by:

    The EDITORIUM, LLC
    http://www.editorium.com

    Articles © on date of publication by the Editorium. All rights reserved. Editorium Update and Editorium are trademarks of the Editorium.

    You may forward copies of Editorium Update to others (but not charge for it) and print or store it for your personal use. Any other broadcast, publication, retransmission, copying, or storage, without written permission from the Editorium, is strictly prohibited. If you’re interested in reprinting one of our articles, please send an email message to editor@editorium.com

    Editorium Update is provided for informational purposes only and without a warranty of any kind, either express or implied, including but not limited to implied warranties of merchantability, fitness for a particular purpose, and freedom from infringement. The user (you) assumes the entire risk as to the accuracy and use of this document.

    The Editorium is not affiliated with Microsoft Corporation or any other entity.

    We do not sell, rent, or give our subscriber list to anyone. Period.

    If you’d like to subscribe, please enter your name and email address below. We publish the newsletter once a week, and on rare occasions we may send an important announcement. We never, ever send spam. Thank you for signing up!