Fixing Typos Automatically

All this talk about editorial style sheets in the past couple of newsletters got me thinking again about lists of automatic corrections. Long ago, I wrote about this and provided a couple of such lists:

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

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

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

I now realize, however, that those lists don't include nearly as many typographical errors as they could. I'm talking about errors like these:

abbout (about)

yeild (yield)

yera (year)

yoiu (you)

yoiur (your)

So here, for your editorial pleasure, is a giant list (more than 1,200 entries) compiled from various typo and AutoCorrect collections:

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

The list is currently set up for use with our MegaReplacer program, with entries like this:

abbout|about+w

yeild|yield+w

yera|year+w

yoiu|you+w

yoiur|your+w

Words before the pipe symbol (|) contain the typos. Words after the pipe symbol are their replacements. And the +w at the end of each entry tells Word to search for "Whole words only." MegaReplacer will run such a list on the active document, all open documents, or all documents in a folder, fixing all of the typos in one fell swoop.

Of course, Word's spell checker will also catch these typos--if you want to click, click, click through them all manually. But why not put MegaReplacer to work while you do something more worthwhile? Of course, running that giant list on a bunch of documents could take a while, so you might want to (1) pare down the list to include only those entries you think you'll really need and (2) run it on fewer documents at a time. You can learn more about MegaReplacer here:

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

You might also want to use some of these entries (minus the pipe symbols and +w's) in your AutoCorrect list (some of them are probably already there). Feel free!

_

FROM WORD 2K TO 2003: WORD'S TASK PANES VBA REFERENCE

Wordmeister Steve Hudson sent his most recent article in his series about Word 2003--a sneak preview especially for Editorium Update readers before the article is published elsewhere. The article covers one of Word's most important features, the Task Pane, with an emphasis on VBA, and Steve covers the topic in almost unbelievable detail. If you want the real scoop, look no further. You can download Steve's article by clicking here:

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

Steve also 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.

If you are happy to live with plain text emails, you get fewer problems. Not none, fewer. Rules are broken, insofar as there are several options that crash Outlook when you select them. Contacts has a few problems that sporadically cause crashes; even picking names from your address book goes belly up regularly. 🙁 No Service Packs as of yet.

I'm putting up with it, as the rest of Office 2003 is very nice.

Many thanks to Steve for doing intense research on Office 2003 and making it available for our use.

_________________________________________

READERS WRITE

Andrew Savikas wrote:

Two quick tips came to mind while I was checking out your archives that might interest readers of your newsletter:

1. The primary motivation for most users when re-assigning the Insert key is to avoid accidental invocation of the cursed Overtype feature; adding a new function to the Insert key is just a bonus. To accomplish the former semi-permanently, just intercept the command:


Sub Overtype()
' Do nothing (or do something else)

End Sub

Then users can re-assign or un-assign the Insert key at will, without any fear of Overtype returning.

[For more information, see the past newsletters here:

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

http://lists.topica.com/lists/editorium/read/message.html?mid=1701366500]

2. Style aliases are indispensable but can cause problems when exporting to a different format. This macro removes them (Word 2000+ for Windows):


Sub RemoveStyleAliases()
Dim sty As Style
For Each sty In ActiveDocument.Styles
sty.NameLocal = Split(sty.NameLocal, ",")(0)
Next sty
End Sub

[For more information, see the past newsletter here:

http://lists.topica.com/lists/editorium/read/message.html?mid=1703188741]

If you don't know how to use such macros, you can find out here.

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

Meg Cox wrote:

Some editors don't like to alphabetize an editorial style sheet as they go along. For me, it's essential if the style sheet is to be usable--especially in a book with a million personal and place names, and especially if it's about an unfamiliar geographical region.

Without keeping the style sheet in alphabetical order, I'm not going to spot the close-but-not-quite situations. Case in point: in my style-sheet-nightmare project, the author was rendering the names every which way. Was it Leon Mba or Leon M'ba? With an accent on the e or not? Denis Sassou-Nguesso with or without the accent, with or without the hyphen? Sassou-Nguesso as surname only, or just Nguesso? Or Sassou Nguesso? Some names appeared infrequently enough that I never would have been able to remember whether they had come up before and how they had been rendered. (This 700-page manuscript covered politics in 14 francophone African countries over a period of 120 years.)

Even in easier projects, it's the alphabetization that enables me to spot the inconsistencies as I go along so I can change them all to the same thing. In the 14-countries project, it would have been no easy matter to go back and search and replace later because the versions of the names varied too widely, so I had to decide on the first occasion of each inconsistency. If the author wanted to go with a version different from what I had settled on, once they were all consistent I would have been able to do a global search and replace. (Thank goodness in this case cleanup was in-house!)

If I wasn't working in history and political science, this wouldn't be as much of an issue.

As it turned out, I didn't come up with a good way to do what I wanted to do. Maybe I could have with more fiddling, but I finally needed to just give up and keep moving through all the names.

Many thanks to Andrew and Meg for their helpful tips and comments.

_________________________________________

RESOURCES

The Design Science site has some marvelous advanced tutorials on Word's AutoCorrect feature:

http://www.dessci.com/en/support/tutorials/autocorrect/tutorial.htm

http://www.dessci.com/en/support/tutorials/autocorrect/advanced.htm

Restoring Superscript to Note Numbers

I get manuscripts with all kinds of weird formatting, but recently I got one from which all formatting had been removed. That might have been all right, but the note reference numbers were no longer superscript; they all looked something like this.42 I wasn't about to fix all those by hand, so I came up with this solution, which I hope you'll find as useful as I did:

1. Back up your documents, just in case.

2. Call up Word's Replace dialog (Edit > Replace).

3. In the "Find What" box, enter this (just copy and paste it from this article):

([! 0123456789,:$(])([0-9]{1,})

4. In the "Replace With" box, enter this:

12

5. Click the "More" button if it's available.

6. Put a check in the "Use wildcards" checkbox.

7. Click the "Replace All" button.

8. In the "Find What" box, enter this:

(*)

9. In the "Replace With" box, enter this (formatted as superscript):

1

10. Click the "Replace All" button.

All of your note numbers should now be in glorious superscript.

Want to know more about two-step finding and replacing?

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

Want to know more about wildcard searching?

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

Want to know how to remove directly applied document formatting without removing superscript, italic, bold, and so on?

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

_________________________________________

READERS WRITE

After reading last week's newsletter with its editorial style sheet macros, Jim Pinkham wrote:

You can also overcome the limitation on having only two Word docs open to make Hilary's macro run by simply specifying the windows you wish to switch between in the macro. For example, here's a snippet from one of mine:

Selection.SelectRow

Selection.Cut

Windows("Blue Rows.doc").Activate

Selection.Paste

Windows("Weekly Improvement Analysis March 22-28.doc").Activate

When I use this macro, I'll create a new "Weekly Improvement Analysis" doc each time--so I simply edit the file name accordingly.

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

Pamela Angulo wrote:

As I read today's newsletter, 2004/05/05: Editorial Style Sheet Macro, I wondered why anyone editing and creating a style sheet on a computer would be concerned about pasting copied style terms by letter or in alphabetical order. (Organizing terms by type--names, places, scientific terminology, etc.--now, that I understand.)

I copy terms to my style sheet as I go, in the order they present themselves--more or less from top to bottom of the manuscript. For some jobs (e.g., chapters by multiple authors for the same book, or individual articles for inclusion in a single magazine issue), I keep track of chapter, article, or author for each term as well. But however I handle the initial list, I sort the terms alphabetically later, *not* while I'm copying and pasting (too much time, and too much brain!).

I create different versions of the style sheet for different purposes: A single comprehensive alphabetical list for a multiple-part project allows me and the proofreader to cross-check terms across the entire project, which is always helpful; several individual alphabetical lists sorted by chapter, article, or author allow me to send only the relevant list to each author for review.

With Table > Sort in Word, arranging my style sheet in alpha order is a no-brainer, and I like that after a long day at the helm. 🙂 BTW, some people don't realize that this command will work on *any* list; the list doesn't have to be in a table.

A while back, a copyeditor posted to Freelance asking how to convert her style sheet into a table so she could sort it. It struck me *hard* then that one person's "no duh!" (it's soooo obvious) is very often another person's "no way!" (never would have thought of that).

Many thanks to Jim and Pamela for their helpful tips and observations.

_________________________________________

RESOURCES

The EServer TCLibrary of editing articles has a wealth of information on all kinds of publishing topics. Wow, look at all this great stuff!

http://tc.eserver.org/dir/Articles/Editing

Editorial Style Sheet Macro

Last week's newsletter provided a style sheet that editors can use to keep track of style decisions while editing in Microsoft Word. If you didn't get that style sheet, you can download it here:

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

Hilary Powers was kind enough to provide her StyleThat macro in last week's newsletter, and this week I've adapted that macro to work with the editorial style sheet. If you select some text in a document you're editing and then run this macro, it will switch to your editorial style sheet and paste the text under the alphabetical heading where it belongs: ABCD, EFGH, and so on. See last week's newsletter for more information:

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

And now, here's the macro:

'THE MACRO STARTS HERE
Sub StyleThat()
'Macro adapted by Hilary Powers 1/30/04; updated 4/6/04
'Adapted by Jack M. Lyon for use with editorial style sheet
If Selection.Type = wdSelectionIP Then  'No selection
GoTo HedBack
Else
FirstChar = Asc(Selection.Characters.First)
If FirstChar > 64 And FirstChar < 69 Then MySearch = "ABCD^p"
If FirstChar > 68 And FirstChar < 73 Then MySearch = "EFGH^p"
If FirstChar > 72 And FirstChar < 77 Then MySearch = "IJKL^p"
If FirstChar > 76 And FirstChar < 81 Then MySearch = "MNOP^p"
If FirstChar > 80 And FirstChar < 85 Then MySearch = "QRST^p"
If FirstChar > 84 And FirstChar < 91 Then MySearch = "UVWXYZ^p"
If FirstChar > 96 And FirstChar < 101 Then MySearch = "ABCD^p"
If FirstChar > 100 And FirstChar < 105 Then MySearch = "EFGH^p"
If FirstChar > 104 And FirstChar < 109 Then MySearch = "IJKL^p"
If FirstChar > 108 And FirstChar < 113 Then MySearch = "MNOP^p"
If FirstChar > 112 And FirstChar < 117 Then MySearch = "QRST^p"
If FirstChar > 116 And FirstChar < 123 Then MySearch = "UVWXYZ^p"
If FirstChar > 90 And FirstChar < 97 Then MySearch = "Comments:^p"
If FirstChar < 65 Or FirstChar > 122 Then MySearch = "Comments:^p"
Selection.Copy
WordBasic.NextWindow
WordBasic.StartOfDocument
Selection.Find.ClearFormatting
With Selection.Find
.Text = MySearch
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute
Selection.MoveRight
Selection.Paste
Selection.TypeParagraph
GoTo Final
End If
HedBack:
WordBasic.NextWindow
Selection.MoveRight Unit:=wdCharacter, Count:=1
Final:
End Sub
'THE MACRO ENDS HERE

If you don't know how to use such macros, you can find out here.

And you can learn how to assign them to a hot key here:

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

Note that you don't have to use the macro with *my* style sheet. It will work with any document in which you've included the following headings, each followed by a carriage return:

ABCD

EFGH

IJKL

MNOP

QRST

UVWXYZ

Comments:

_________________________________________

READERS WRITE

Last week, expert word whacker Hilary Powers sent her StyleThat macro, which I proceeded to gum up. The problem was, it didn't want to work correctly in Word 2000; possibly some of the commands are specific to Word 2003. At any rate, here is Hilary's macro in its pristine state, and many thanks to her for providing it.

Hilary wrote, "The macro relies on having two [and only two] files open at a time. The truly charming thing is that you can use one hot key for both chores: putting something on the style sheet and also priming the style sheet for its next use and returning to the main document.

'THE MACRO STARTS HERE
Sub StyleThat()
' Macro adapted by Hilary Powers 1/30/04; updated 4/6/04
If Selection.Type = wdSelectionIP Then
GoTo HedBack
Else
Selection.Copy
WordBasic.NextWindow
Selection.PasteAndFormat (wdPasteDefault)
GoTo Final
End If
HedBack:
Selection.TypeParagraph
WordBasic.NextWindow
Selection.MoveRight Unit:=wdCharacter, Count:=1
Final:
End Sub
'THE MACRO ENDS HERE

If you don't know how to use such macros, you can find out here.

And you can learn how to assign them to a hot key here:

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

_________________________________________

RESOURCES

I've been fighting the battle against spam (junk email) but not very effectively, even though I've tried a couple of top-notch spam-fighting programs. Then this week I decided to try SpamArrest, and I'm thrilled to say it's actually won the war. Boy, has my inbox been quiet.

When people send me an email message, they receive an email message in return that asks them to click a link to register themselves (a one-time operation) as someone who can send me messages. Spammers, of course, won't bother to do this, which basically means no more spam. It's easy to preregister family, friends, associates, and email newsletters to which I subscribe. The completely online program (no software involved) gives me complete control over how spam is handled, and it's very easy to use.

If you'd like to know more, click here:

http://spamarrest.com/affl?1403707

And if you decide to sign up, please do so through the link above. Since I'm now a SpamArrest affiliate, your support will help keep Editorium Update alive and kicking. Thanks!