Numbers by Chicago

I recently worked on a manuscript with lots of source citations, many of which had page numbers formatted like this:

122-123

I prefer the shorter style recommended in the Chicago Manual of Style (8.69):

122-23

And besides, the manuscript was inconsistent, sometimes using one style, sometimes the other. Not wanting to fix all of these by hand, I decided to put the old wildcard search to work. You can learn about searching with wildcards in my free paper "Advanced Find and Replace in Microsoft Word":

http://www.editorium.com/ftp/advancedfind.zip

The first thing I needed to do was simplify things. Consider the style for even hundreds:

100-109

100-119

100-201

In all such cases, the numbers were already in the correct style, so I decided to just get them out of the way, like this:

Find What:

00-

Replace With:

~~-

(Those tildes are just arbitrary placeholders to be turned back to zeroes later.)

With that taken care of, I originally thought I could change all the other numbers like this:

Find What:

([0-9]{3}-)[0-9]([0-9]{2})

Replace With:

12

That "Find What" string finds any set of three {3} numbers [0-9] followed by a hyphen, followed by a single number [0-9], followed by any set of two {2} numbers [0-9]. The items in parentheses are treated as as a group.

The "Replace With" string replaces the first 1 parenthetical group with itself and the second 2 parenthetical group with itself, leaving out any number [0-9] that was not grouped in parentheses.

That will definitely change 122-123 to 122-23, but it will also change 308-309 to 308-09, so we'll need to get a little fancier. How about this?

Find What:

([0-9]{3}-)[0-9]([1-9]{2})

Replace With:

12

Notice that I've changed that last number range to [1-9] rather than [0-9]. That means numbers like 308-309 will not be found but numbers like 308-319 will. (Come to think of it, that single number in the middle could probably be [1-9] as well, since there shouldn't be any page numbers like 308-019. Of course, you never know.) Now, does that solve the problem?

Well, no. We still need to deal with numbers like this:

398-415

We certainly don't want that changing to 398-15. And what about this?

247-517

Unlikely, I'll admit, but still possible.

And that means we can't do our find and replace all in one shot. Instead, we'll have to do 18 specific searches:

(1[0-9]{2}-)1([1-9][0-9])

(2[0-9]{2}-)2([1-9][0-9])

(3[0-9]{2}-)3([1-9][0-9])

(4[0-9]{2}-)4([1-9][0-9])

(5[0-9]{2}-)5([1-9][0-9])

(6[0-9]{2}-)6([1-9][0-9])

(7[0-9]{2}-)7([1-9][0-9])

(8[0-9]{2}-)8([1-9][0-9])

(9[0-9]{2}-)9([1-9][0-9])

(10[1-9]-)10([1-9])

(20[1-9]-)20([1-9])

(30[1-9]-)30([1-9])

(40[1-9]-)40([1-9])

(50[1-9]-)50([1-9])

(60[1-9]-)60([1-9])

(70[1-9]-)70([1-9])

(80[1-9]-)80([1-9])

(90[1-9]-)90([1-9])

At least that's how it looks to me. If you have a better way, I'd love to hear about it.

You can do the searches by hand if you like. You've got 20 chapters, all in separate files? Let's see--20 x 18 = 360 separate searches. Ouch! Of course, you could use my MegaReplacer program to do them all at once, freeing up your time for something more interesting:

http://www.editorium.com/14843.htm

Don't forget, we still need to turn those tildes back into zeroes:

Find What:

~~

Replace With:

00

Now all of those page numbers should be in Chicago style. How beautiful!

"What about four-digit numbers?" you ask. I leave it as an exercise for you to work out.

If you'd like this whole thing ready to run in MegaReplacer, here it is:

00-|~~-

(1[0-9]{2}-)1([1-9][0-9])|12+m

(2[0-9]{2}-)2([1-9][0-9])|12+m

(3[0-9]{2}-)3([1-9][0-9])|12+m

(4[0-9]{2}-)4([1-9][0-9])|12+m

(5[0-9]{2}-)5([1-9][0-9])|12+m

(6[0-9]{2}-)6([1-9][0-9])|12+m

(7[0-9]{2}-)7([1-9][0-9])|12+m

(8[0-9]{2}-)8([1-9][0-9])|12+m

(9[0-9]{2}-)9([1-9][0-9])|12+m

(10[1-9]-)10([1-9])|12+m

(20[1-9]-)20([1-9])|12+m

(30[1-9]-)30([1-9])|12+m

(40[1-9]-)40([1-9])|12+m

(50[1-9]-)50([1-9])|12+m

(60[1-9]-)60([1-9])|12+m

(70[1-9]-)70([1-9])|12+m

(80[1-9]-)80([1-9])|12+m

(90[1-9]-)90([1-9])|12+m

~~|00

_________________________________________

READERS WRITE

Mary Russell wrote:

I'm working on a revision of an encyclopedia on world religions that already has a 108-page word list and a 1,000-page index of terms I need to check *everything* against. I'm using your style sheet macro to slap each term I want to check into the style sheet as I go and then doing a separate pass to check them all--and having them alphabetized saves me a lot of scrolling around in those files. By the way, I *love* your macro. I run the style sheet minimized and don't even have to switch back to my original document. You should really be selling this one. I'm usually more restrained, but this really is a great idea.

--------------------------------

Meg Cox wrote:

Joy Freeman on Freelance suggested a new approach that I think will alleviate the style sheet challenge considerably. I haven't tried it yet, but I'm going to on the next chapter I start. She gave her permission to repeat the approach here:

With each occurrence of a new name, search for the same and replace it with itself in a different color (say, blue). Then you know you've already encountered it and don't need to check it against the style sheet. That way you only have to take action with variations and first occurrences. If it's blue, move on through!

I suspect this approach will come in very handy the next time I have a manuscript with hundreds of unfamiliar personal, place, and organizational names, and it will help in simpler projects as well.

Another way it will help: Sometimes in a long chapter it's hard to remember whether the full name of a person or organization has appeared yet (my clients routinely ask for full version on first occurrence in each chapter, then shortened version thereafter). If the changing to blue is done chapter by chapter (and I think it could be handled quickly--I need to think macro on this), blue will mean the full version has already occurred and an abbreviation or last-name-only may be called for. Could be useful for long sets of notes too so I know when it's time to go with a short citation! (Lately I'm seeing plenty of chapters with 70 or more notes.) Oh, and good for parenthetical citations too, so I know what I've already checked against bibliography.

[Editor's note: Our RazzmaTag program would be very useful for this kind of thing: http://www.editorium.com/razzmatag.htm.]

--------------------------------

Brad Hurley wrote:

Steve Hudson wrote:

I'd like to advise you and your readers to avoid Outlook

2003. It has more bugs than the NSW locust plague here in

Australia at the moment. I could fill an article with simple

features that cause immediate failures.

This is almost the opposite of my experience. I've been using Outlook 2003 daily on my Windows 2000 machine since last October, and it has never crashed. I have encountered several bugs and design flaws, but overall my experience has been positive. The much-improved spam filtering and the new three-pane design make it a far better program than previous versions. The upgrade from Outlook 2000 went flawlessly and it handles my large e-mail archive files (300-600 megabytes each) without a complaint. The only serious problems I've noticed so far are:

1. Editing a message in your outbox makes it impossible to send; you have to transfer it to a different folder and send it from there.

2. E-mail address auto-complete doesn't work if your contact's address book entry also has a fax number listed (this is a very frustrating flaw because Outlook should be smart enough to know you're not trying to send a fax when you've composed an e-mail message to someone).

3. Hitting the return button to start a search only works once a session; after that you have to use your mouse to click the "find now" button.

Other than that, I'm satisfied with Outlook 2003; in fact it's the only element in the Office suite that I've found worth upgrading from the 2000 versions.

Many thanks to Mary, Meg, and Brad for their helpful tips and comments.

_________________________________________

RESOURCES

Bruce Koehler wrote:

Another approach to handling accidental press of the Insert key and other keys (e.g. Caps Lock) is a small freeware program called FirstCap. It allows you to set up these potentially problematic keys in various ways such as:

* Disable

* Disable--but with a work-around to re-enable once or continuously sound an alert when pressed

Terrific little program. Just Google search on "FirstCap" for many sites that offer it.

And while I'm at it, here are a few more that would be useful to Word users:

Memokeys: "MemoKeys can help you to fill forms faster, to execute repetitive tasks without having to type every time the same text or keystrokes. The principle is simple: MemoKeys creates associations between key combinations on your keyboard and some predetermined texts or system actions . . . " Uses a Function key (F12, for example) plus an alphanumeric key. Works in all programs.

MinMax extender: adds icons by the "-" and "X" icons at the upper right of a window to allow rollup, expand window to full screen width or height (and undo), etc.

FileEx (shareware--not free): can expand most dialog boxes--a great help in Word--also allows a different default Save destination (great when you're opening a lot of files in one folder but want to save them to another location).

Many thanks to Bruce for suggesting these programs. Bruce also suggested asking newsletter readers if they know of other editing or Word-related shareware and freeware. If you do, please let us know, and we'll list them in the next newsletter: mailto:resources [at symbol] editorium.com

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!