An American Editor

March 27, 2017

The Business of Editing: The AAE Copyediting Roadmap VI

So far I’ve created a stylesheet and cleaned the document (see The Business of Editing: The AAE Copyediting Roadmap II), and tagged the manuscript by typecoding or applying styles (see The Business of Editing: The AAE Copyediting Roadmap III), inserted bookmarks for callouts and other things I noticed while tagging the manuscript (see The Business of Editing: The AAE Copyediting Roadmap IV), and created the project- or client-specific Never Spell Word dataset and run the Never Spell Word macro (see The Business of Editing: The AAE Copyediting Roadmap V). Now it’s time to tackle the reference list.

Fixing Reference Callouts

Before I get into the reference list itself, I need to mention another macro that I run often but not on all files — Superscript Me. Nearly all of the manuscripts I work on want numbered reference callouts superscripted and without parentheses or brackets. The projects usually adhere to AMA style. Unfortunately, authors are not always cooperative and authors provide reference callouts in a variety of ways, including inline in parentheses or brackets, superscripted in parentheses or brackets, with spacing between the numbers, and on the wrong side of punctuation. Superscript Me, shown below, fixes many of the problems. (You can make an image in this essay larger by clicking on the image.)

Superscript Me

I select the fixes I need and run the macro. Within seconds the macro is done. One note of caution: It is important to remember that macros are dumb — macros do as instructed and do not exercise any judgement. Consequently, even though Superscript Me fixes many problems, it can also create problems. My experience over the decade that I have been using this particular macro has been that the fixing is worth the errors that the macro introduces, even though they require manual correction during editing. The introduced errors are few, whereas the fixes are often hundreds.

Tip: Superscript Me is a powerful, timesaving (and therefore profitmaking) macro, but as noted above, it is dumb and just as it can do good, it can do harm — especially to reference lists. Before using Superscript Me on the manuscript, move the reference list to its own file. Doing so will ensure that Superscript Me makes no changes to the reference list, only to the main text material, saving a lot of undo work.

Wildcarding the Reference List

By this point, the reference list has been generally cleaned and moved to its own file.

Tip & Caution: Wildcard macros can be a gift from heaven or a disaster from hell. I like to do what I can to ensure they are a gift and not a disaster. Consequently, I move the reference list to its own file. I know I have said this before, but wildcarding is another reason for separating the reference list from the manuscript file. Often what I want changed in a reference list, I do not want changed in the primary text; similarly, what I want changed in the primary text, I do not (usually) want changed in the reference list. But like all other macros, wildcards are dumb and cannot tell text from reference list. It can do no harm moving the reference list to its own file and working on it separately from the main text, so be cautious and move it.

Individual problems, however, have not been addressed. I scan the list to see what the problems are and whether the problems are few or many. For example, if author names are supposed to be

Smith AB, Jones EZ

but are generally punctuated like

Smith A.B., Jones E. Z.

or in some other way not conforming to the correct style, I will use wildcard macros and scripts to correct as many of these “errors” as I can. Wildcards can address all types of reference format errors, not just author-name errors. For example, a common problem that I encounter is for the cite information to be provided in this format:

18: 22-30, 1986.

or

1986 Feb 22; 18: 22-30.

when it needs to be

1986;18:22–30.

These formatting errors are fixable with wildcards and scripts.

Scripts are like a supermacro. A script is a collection of many individual wildcard macros that have been combined into one macro — the script — and run sequentially. One of my reference scripts is shown here:

Wildcard Find & Replace Script

In the image, the active script file (#1) is identified and what it does (broadly) is described in the description field (#2). The wildcard macros that are included in the script and the order in which they will run are shown in the bottom field (#3). Included is a description of what each of the included wildcard macros will do (#4). For example, the first wildcard macro that the script will run will change Smith, C., to Smith C, and the second wildcard macro to run will change Smith, A.B., to Smith AB,.

The wildcard macros were created using the Wildcard Find and Replace (WFR) macro shown below. In the image, the example wildcard macro (arrow) is the same as the second macro in the script above, that is, it changes Smith, A.B., to Smith AB,.

Wildcard Find & Replace

Creating the macros using WFR is easy as the macro inserts the commands in correct form for you (for more information, see the online description of WFR). Saving the individual wildcard macros, assembling them into scripts, and saving the scripts, as well as running individual wildcard macros or scripts, is easy with WFR. (For some in-depth discussion of wildcards, see these essays: The Business of Editing: Wildcarding for Dollars; The Only Thing We Have to Fear: Wildcard Macros; and The Business of Editing: Wildcard Macros and Money.)

With some projects I get lucky and the authors only have a few references that are a formatting mess and when there are only a messy few, I fix them manually rather than run the macros.

Fixing Page Ranges

If the references are in pretty decent shape (formatwise) so that I do not need to run WFR, I will run the Page Number Format macro (shown below) to put the page range numbering in the correct format For example, the macro will automatically change a range of 622-6 to 622–626, 622–6, or 622.

Page Number Format

Making Incorrect Journal Names Correct

At long last it is time to run the Journals macro. As my journals datasets have grown, they have made reference editing increasingly more efficient. It takes time to build the datasets, but the Journals Manager (shown below) lets me build multiple datasets simultaneously.

The Journals Manager

As shown in the image, I can build five datasets (arrows) simultaneously. My primary dataset — AMA with Period — has 212,817 journal entries (see circled items).

Tip: Move the reference list to its own file to shorten the time it takes to run the Journals macro. The larger your journals dataset, the more time the Journals macro requires to complete a run. Each iteration of the Journals macro searches from the top of the document to the end as it looks for matches. Leaving the reference list in the manuscript means the macro has that much more to search. In a recent timing test of the Journals macro using my primary dataset and a 50-page document with 110 references without separating out the list, the macro was still running after 2 hours and was not near completion. Running the Journals macro with the same dataset and on the same reference list — but with the list in its own file — took less than 10 minutes. (Think about how long it would take you to manually verify and correct 110 Journal names.)

The Journals macro searches through the reference list for journal names and compares what is in the reference list against what is in the chosen dataset. If the name in the reference list is correct, the macro highlights it in green (#5), as shown below; if it is incorrect, the macro corrects it and highlights the change in cyan (#6). All changes are done with Tracking on.

The Reference List After Running Journals Macro

The Journals macro does two things for me: First, if the incorrect variation of the journal name is in the dataset, it corrects the incorrect journal name so that I do not have to look it up and fix it myself (see #6 above). If the incorrect variation is not in the dataset, the macro makes no change. For example, if the author has written New Engand J. Med but that variation is not in the dataset, it will be left, not corrected to N Engl J Med. When I go through the reference list, I will add the variation to the dataset so it is corrected next time. Second, if the journal name is in the dataset, it highlights correct names, which means that I know at a glance that the journal name is correct and I do not have to look it up (see #5 above).

It is true that the names of some of the more frequently cited journals become familiar over time but there are thousands of journals and even with the frequently cited ones with which I am familiar, correcting an incorrect name takes time.

It is important to remember that time is money (profit) and that the less time I need to spend looking up journal names, the more profit I make.

After I run the Journals macro, I open the Journals Manager (see above) and I go through the reference list, doing whatever editing is required and fixing what needs fixing that my macros didn’t fix. Because of the current size of my journals datasets, there aren’t usually many journal names that are not highlighted. When I come to one that is not highlighted either green (indicating it is correct) or cyan (indicating it was incorrect but is now correct), I look up the name and abbreviation in the National Library of Medicine online catalog and other online sources. When I locate the information, I add it and the most common author variations (based on my experience editing references for more than 30 years) to the five datasets via the Journals Manager.

I take the time to add the journal and variations because once the variations have been added, I’ll not have to deal with them again. Spend a little time now, save a lot of time in the future.

In addition to editing the references for format and content, I also keep an eye out for those that need to be removed from the reference list and placed in text — the personal communication–type reference — and for those that need to be divided into multiple references. When I come across one, I “mark” it using a comment. For example, using the Insert Query macro (which is discussed in the later essay The Business of Editing: The AAE Copyediting Roadmap X), I insert the comment shown below for unpublished material:

Query for Unpublished Material

When I come to the in-text callout during the manuscript editing, I move the reference text to the manuscript, delete the callout and the reference, and renumber using the Reference # Order Check macro (which is discussed in the later essay The Business of Editing: The AAE Copyediting Roadmap VIII).

Now that the Journals macro has been run and the references edited, the next stop on my road is the search for duplicate references, which is the subject of The Business of Editing: The AAE Copyediting Roadmap VII.

Richard Adin, An American Editor

Advertisement

February 15, 2016

EditTools & My Editing Process: Part II

Part I introduced the preediting steps (Steps 1 to 3). Part II discusses the remaining two preediting steps (Steps 4 and 5) and then discusses the first editing step (Step 6) in my editing process, which is editing the references.

Step 4: Moving the References

Most of the projects I work on have extensive reference lists. Sometimes a chapter will have a relatively short reference list of 50 or so, but most are at least 100 references, and sometimes are more than 1,000 references.

After the preliminary steps and before running Never Spell Word (Step 5), I move the reference list to its own file. I do this for several reasons. First, some of the macros that I use during editing can affect the references, creating undo work for me. Moving the references to their own file avoids this problem.

Second, I like to edit with Spell Check on. However, Spell Check sees many author names and foreign spellings in journal names and article titles as misspellings. That wouldn’t matter except that it often leads to the message that Spell Check can’t be used because there are too many spelling errors and so Word will turn off Spell Check — for the entire document. By moving the references to their own file, I almost always avoid that particular problem. (Yes, I am aware that I could turn off Spell Check just for the references — for example, by modifying the styles used in the references, which is what many editors do — but I like Spell Check to be on even for the references.)

Third, I want to be able to run my Journals macro unimpeded and as quickly as I can. The more material the Journals macro has to run through, the longer it takes to complete.

Fourth, I want to be able to run Wildcard Find & Replace on the references without having the macro also affect other parts of the document.

And fifth, moving the references to their own file makes it easier to check text reference callouts against the references because I can have both the primary document and the references open concurrently and on different monitors.

I do not edit the references in this step; I simply move them to their own file.

Step 5: Project-Specific Never Spell Word

The next preedit step is to create my project-specific Never Spell Word (NSW) dataset, which is shown below. Every project has its own NSW dataset (#13). The only time I use a previously created dataset is when I have edited a previous edition of the book. I assume that word usage decisions made in previous editions will continue in the current edition. This is generally reinforced when the client also sends me a copy of the stylesheet I prepared for the prior edition (or tells me to use it, knowing I have it available on my website). I do, however, go through the NSW dataset to make sure there are no changes that need to be made as a result of changes in the applicable style guide or in other pertinent guidelines (e.g., changing over-the-counter and OTC to nonprescription).

Never Spell Word dataset

Never Spell Word dataset

If I cannot use a previously created NSW dataset, I create a new one using the Never Spell Word Manager shown above. Note that when I speak of the NSW dataset, I am really speaking about the one tab in the Manager — the Never Spell Words tab (circled). Although the other tabs are part of the NSW macro, they are not project specific as I use them; however, they can be project specific, as each tab can have multiple datasets, and the tabs also can be renamed.

In the example NSW, the dataset has 70 items (#15). These items were specifically mentioned by the client or the author(s) (e.g., changing blood smear to blood film, or bone marrow to marrow) (#14), or things I noticed that will need changing (e.g., changing Acronyms and Abbreviations that appear in this chapter include: to Acronyms and Abbreviations:) (#14). As I edit and discover more items that should be added, I add them through this Manager.

The NSW macro has multiple tabs, some of which may not be relevant to the current project. Running the NSW macro brings up the NSW Selector, shown below. Here I choose which tabs to run. The default is Run All, but if I need to run only the NSW and Commonly Misspelled Words tabs for the particular project, I check those two and click OK and only those two parts of the macro will run.

Never Spell Word Selector

Never Spell Word Selector

After the NSW macro is run, it is time to begin editing.

Editing Steps

Step 6: The References

My first task is to edit the references that I moved to their own file in Step 4. I deal with the references before editing the text so I can determine whether there are “a,b,c” references (e.g., 57a, 57b) or if the references are listed alphabetically even though numbered. This is important to know for setting up the Reference # Order Check macro, found on the References menu and shown below, for tracking callout order and for renumbering if needed.

Reference # Order Check

Reference # Order Check

After I set up the Reference # Order Check macro, it is time to look at the references and see if the author followed the required style. Occasionally an author does; usually, however, the author-applied or -created style is all over the place. So the next macro I run is Wildcard Find & Replace (WFR) (shown below) and the appropriate scripts I created using WFR. The scripts focus on specific problems, such as author names and order-of-cite information (e.g., year first or last).

Wildcard Find & Replace Scripts

Wildcard Find & Replace & WFR Scripts

The scripts cure a lot of problems, but not all of them. Following the scripts, I run the Journals macro. Depending on which dataset I use, running the Journals macro may well fix nearly all of the journal names.

After running the Journals macro, I go through the references one by one, looking for remaining problems that need fixing, such as completing incomplete citations. If I come across a journal that was not in the Journals dataset, which I know because it is not color coded, I verify the journal’s name. I also go to the Journals Manager enhanced screen, shown below, so I can add the journal to multiple datasets concurrently.

Journals Manager Enhanced Screen

Journals Manager Enhanced Screen

Once I have finished editing the references, it is time to begin editing the main text (Step 7), which is the subject of Part III.

Richard Adin, An American Editor

_______________

Looking for a Deal?

You can buy EditTools in a package with PerfectIt and Editor’s Toolkit Plus 2014 at a special savings of $78 off the price if bought individually. To purchase the package at the special deal price, click Editor’s Toolkit Ultimate.

July 20, 2015

Lyonizing Word: From Easy to Impossible — Three Variations on a Theme

by Jack Lyon

Rich Adin just keeps on escalating the difficulty of his requests. That’s okay, because I appreciate a good challenge. Here’s his latest:

Okay, Jack, you solved the problem of reducing the number of authors from more than three down to three.

To see what Rich is talking about, please see my previous posts here: Lyonizing Word: We Can Do This the Easy Way, or . . . and Lyonizing Word: The Easy Way, Not So Easy.

Rich continues:

But there is a caveat: the list of names needs to end with “et al:”. So let me pose three more variations.

Three?! Oh, all right. Here we go:

Variation 1

How do I handle instances where the ending is punctuation other than “et al:”? For example, it could be a different punctuation mark than the colon or it could end with an author name and not “et al” (e.g., “Lyon J, Adin R, Carter TO, Jackson TT, Doe J, Smith K, Winger W:” or “Lyon J, Adin R, Carter TO, Jackson TT, Doe J, Smith K, Winger W, Hoffnagle TTP.”)

How do we handle instances where the ending is punctuation other than “et al:”? Here are Rich’s examples, all laid out for our inspection:

Lyon J, Adin R, Carter TO, Jackson TT, Doe J, Smith K, Winger W:

Lyon J, Adin R, Carter TO, Jackson TT, Doe J, Smith K, Winger W, Hoffnagle TTP.

As usual, the key is to find the “handle,” the unique elements we can grab to carry out our search. (For more on this, please see my article “What’s Your Handle?” [2003] at the Editorium Update.)

In Rich’s examples, the “handles” would have to be the colon that ends the first entry and the period that ends the second. Let’s try modifying the wildcard string from the previous post for Lyonizing Word:

([!^013]@, [!^013]@, [!^013]@, )[!^013]@([:.])

Here’s what that means:

Find any characters except a carriage return: [!^013]
repeated any number of times: @
followed by a comma
followed by a space
repeated three times
and enclosed in parentheses to form a “group.”
Then find any character except a carriage return: [!^013]
repeated any number of times: @
followed by [:.] (specifying a colon or a period) in parentheses to form a group.

And we can use the following in the “Replace With” box:

\1\2

Here’s what that means:

Replace everything that was found
with the text represented by group 1: \1
followed by the text represented by group 2: \2

But does that actually work? Well, sort of, Here’s what we get:

Lyon J, Adin R, Carter TO, :
Lyon J, Adin R, Carter TO, .

Maybe that’s close enough, as it would now be an easy matter to search for comma space colon and replace it with a colon, and to search for comma space period and replace it with a period. But if we want to refine our search string even further, we could use this:

([!^013]@, [!^013]@, [!^013]@), [!^013]@([:.])

Here, we’ve placed the comma and space following the third name outside the parenthetical group, so they’re not included when the group is replaced by /1. That actually solves the problem, if you want to get precise, giving us a result like this:

Lyon J, Adin R, Carter TO:
Lyon J, Adin R, Carter TO.

Variation 2

Rich wrote:

How can I revise the string to work even if there is no consistency in punctuation of names? For example, suppose the names are: “Lyon, J, Adin R, Carter T.O., Jackson TT, Doe, J.; Smith K; Winger, W; Hoffnagle TTP.”

As given, this can’t be done. Why? Because we’ve lost the uniqueness of the comma “handles” that separate the names. For example, instead of this —

Lyon J,

— we have this:

Lyon, J,

And instead of this —

Smith K,

— we have this:

Smith K;

So again, as given, we can’t fulfill Rich’s request. But can we change the “as given”? Why, yes, we can!

We can search for a lowercase letter followed by a comma (at the end of a last name) and replace it with just the lowercase letter (and no comma):

Find what: ([a-z]),
Replace with: \1

We can search for a semicolon (which sometimes follows initials) and replace it with a comma:

Find what: ;
Replace with: ,

Then we can use the same wildcard string we used earlier to fulfill Rich’s request:

Find what: ([!^013]@, [!^013]@, [!^013]@), [!^013]@([:.])
Replace with: \1\2

You may be wondering if these wildcard strings will affect the article titles and journal names and not just the author names. The answer is, it depends. I’m assuming, for example, that the article titles and journal names don’t include commas (just for purposes of illustration). But if they do, you may have to get creative. Let’s take this as an example:

Levy, D, Ehret G, Rice K, Verwoert G, Launer L, Dehghan A, Glazer N, Morrison A, Johnson A, Aspelund T, Ganesh S, Chasman D: Genome-wide association study of blood pressure, stress, and hypertension. Nature 2009, 41(6): 677-687.

See that comma after “Levy”? Above, we got rid of it with the following strings:

Find what: ([a-z]),
Replace with: \1

But notice that this will also remove the commas after “pressure” and “stress” in the article title, which we don’t want to do. The solution, again, comes down to handles. What do we have that sets off the article title and journal name? In this example, they’re preceded by the colon after the author names (“Chasman D:”) and followed by a carriage return (at the end of the citation). So here’s a rather sneaky solution: Search for a colon followed by anything that isn’t a carriage return until you come to a carriage return. Then replace whatever was found with itself (^&) formatted as Hidden:

Find what: :[!^013]@^013
Replace with (use Hidden formatting): ^&

If you don’t know how to replace using formatting, here’s the secret:

1. Put your cursor in the “Replace with” box.
2. Click the “More” button if it’s showing.
3. Click the “Format” button on the bottom left.
4. Click “Font.”
5. Put a check in box labeled “Hidden.”
6. Click the “OK” button.

Notice that you can replace with all kinds of formatting: styles, paragraph alignment, and so on. You can also use formatting in the “Find what” box! This is really powerful stuff, and if you didn’t know about it before, now you can add it to your bag of tricks.

At any rate, with the article titles and journal names formatted as Hidden, you can make sure they actually are hidden by clicking the “Show/Hide” button (with the pilcrow icon: ¶) on Word’s “Home” tab. Then run your find and replace to remove commas from last names:

Find what: ([a-z]),
Replace with: \1

Finally, unhide the article titles and journal names (after using “Show/Hide” to display them):

Find what: (Hidden formatting)
Replace with: (Not Hidden formatting)

At that point, the commas will be gone from the authors’ last names but preserved in the article titles and journal names.

By the way, if you’re working on a Macintosh, you’ll find that Word doesn’t recognize the standard code for a carriage return (^013) while searching with wildcards. But never fear: you can still do what you need by “escaping” the code with a backslash and treating it as a range using square brackets. In other words, use this:

[\ˆ013]

To specify not a carriage return, use the following:

[!\ˆ013]

Variation 3

Rich wrote:

How can I adapt the wildcard string to delete those in excess of a certain number? For example, I have one client who wants up to ten author names listed and “et al” used only for names eleven and following. I would like to specify how many names I want retained and replace the excess with “et al.” For example, if there are fifteen names, delete the last five if ten are okay and replace them with “et al.”

Theoretically, we could do that as long as there’s a “handle” that marks the end of the names. Let’s take this example:

Levy D, Ehret G, Rice K, Verwoert G, Launer L, Dehghan A, Glazer N, Morrison A, Johnson A, Aspelund T, Ganesh S, Chasman D: Genome-wide association study of blood pressure and hypertension. Nature 2009, 41(6): 677-687.

There are actually twelve names there, so we want to keep the first ten and replace the last two with “et al.” What’s our handle? The colon after the last name (“Chasman D:”) and before the article’s title. So let’s try an expansion of the wildcard search string we used in the previous post for Lyonizing Word. Instead of grouping three comma-separated names, we’ll group ten:

Find what: ([!^013]@, [!^013]@, [!^013]@, [!^013]@, [!^013]@, [!^013]@, [!^013]@, [!^013]@, [!^013]@, [!^013]@,)[!^013]@(:)
Replace with: \1 et al.\2

That would work if Word could handle it. But if you try it, Word will complain: “The Find What text contains a Pattern Match expression which is too complex.” So now what? Honestly, I’m not sure. I tried several other possibilities, none of which were successful. So if you, Gentle Reader, have any ideas about how to accomplish this seemingly impossible feat, I’d love to hear them.

Wildcard searching can’t do everything, but it can do an awful lot. As I’ve said before, after all these years of editing, wildcard searching is the tool I rely on the most. I encourage you to invest the time needed to learn to use this tool, which will repay your efforts many times over. A good place to start is my free paper “Advanced Find and Replace in Microsoft Word.”

I hope you’ll also watch for my forthcoming Wildcard Cookbook for Microsoft Word. I’m still trying to find more real-life examples for the book, so if you have some particularly sticky problems that might be solved using a wildcard search, I hope you’ll send them my way. Maybe I can save you some work and at the same time figure out solutions that will help others in the future. Thanks for your help!

Jack Lyon (editor@editorium.com) owns and operates the Editorium, which provides macros and information to help editors and publishers do mundane tasks quickly and efficiently. He is the author of Microsoft Word for Publishing Professionals and of Macro Cookbook for Microsoft Word. Both books will help you learn more about macros and how to use them.

For other Lyonizing Word essays at An American Editor, Lyonizing Word at AAE.

May 6, 2015

Business of Editing: Cite Work Can Be Profitable

A recent “Tip of the Week” at Copyediting Newsletter, “Citing Work: What Do Editors Really Need to Do?” by Erin Brenner, discussed the problem of editing citations. As the article pointed out, “what you do to citations and how long that takes can greatly affect your bottom line.” Unfortunately, the article repeated and reinforced the shibboleth that editing citations is not (and perhaps cannot be) profitable.

As I am sure you have already guessed, I disagree.

The Problem

The problem with references is that too many authors put them together in a slapdash manner, ignoring any instructions that the publisher may have given about formatting. And Ms. Brenner is right that straightening out the author’s mess can be both a nightmare and unprofitable.

Let me step back for a moment. I want to remind you of what I consider a fundamental rule about profitability in editing: the Rule of Three, which I discussed 3 years ago in “The Business of Editing: The Rule of Three.” Basically, the rule is that profitability cannot be judged by a single project; profitability needs to be judged after you have done three projects for a client. Yes, I know that most freelancers look at a single project and declare profitability or unprofitability, but that doesn’t make it the correct measure. Anyway, the reason I raise this here is that it is true that for a particular project, having to edit and format citations can make a project unprofitable. But then so can editing the main text.

I have edited many projects over my 31 years where I wished there were more references and less text because the text was badly written but the references were pristine. References are not the automatic key to unprofitability.

Also part of the problem is not being clear what is your role as editor when it comes to the references. Copyeditors, for example, do not (should not) “fact check” references. When I have been asked to do so, I have clarified what the client really means, because I have no way of knowing if a cite actually supports the proposition to which it is attached. If the client really does mean “fact check,” which has yet to be the case, then I decline the project; I am simply not able to devote the time needed to read the cite and determine if it supports the author’s proposition and the client is not prepared to pay me to do so.

The copyeditor’s role is to conform the format of the cites to the designated style and to ensure the cite is complete. Whether the editor is supposed to complete the cite is a matter of negotiation. In my case, I limit that responsibility to a quick look at PubMed. If the cite isn’t readily found there, a quick author query is inserted and it becomes the author’s responsibility. I use EditTools’ Insert Query macro (see “The Business of Editing: The Art of the Query“) and selecting a prewritten query to insert so that a comprehensive query can be inserted within a couple of seconds. One example query is this:

AQ: (1) Please confirm that cite is correct. Unable to locate these authors with this article title on PubMed. In addition, PubMed/NLM Catalog doesn’t list a journal by this name. (2) Also, please provide the following missing information: coauthor name(s), year of publication.

It is much quicker to select a prewritten query than to write it anew each time.

One Solution

Cite work can be very profitable. As with most of editing, whether it is profitable or not often comes down to using the right tool for the job at hand.

I just finished working on a chapter (yes, a single chapter in a 130-chapter book) that is 450+ manuscript pages of which about 230 pages are citations. In fact, there are 1,827 cites for the chapter, and all the journal cites (roughly 1,800 of the references) were similar to this:

6. Jackson, S.P., W.S. Nesbitt, and E. Westein, Dynamics of platelet thrombus formation. J Thromb Haemost, 2009. 7 Suppl 1: p. 17-20.

7. Roth, G.J., Developing relationships: arterial platelet adhesion, glycoprotein Ib, and leucine-rich glycoproteins. Blood, 1991. 77(1): p. 5-19.

8. Ruggeri, Z.M., Structure and function of von Willebrand factor. Thromb Haemost, 1999. 82(2): p. 576-84.

when they needed to be like this:

6. Jackson SP, Nesbitt WS, Westein E: Dynamics of platelet thrombus formation. J Thromb Haemost 7 Suppl 1:17–20, 2009.

7. Roth GJ: Developing relationships: Arterial platelet adhesion, glycoprotein Ib, and leucine-rich glycoproteins. Blood 77(1):5–19, 1991.

8. Ruggeri ZM: Structure and function of von Willebrand factor. Thromb Haemost 82(2):576–584, 1999.

As you can see by comparing what the authors provided and what the book style was, a lot of work needed to be done to go from the before to the after. Conforming 1,800 references the standard/usual way editors do this type of work — that is, manually, period by period — could take many hours and thus be a losing proposition — or by using the right tools for the job, it could take a few hours and be a money-making proposition. I was able to conform the references in less than 4 hours and for 3.5 of those 4 hours, I was able to do other editing work while the references were being conformed.

How? By using the right tools for the job, which, in this case, was EditTools’ Wildcard Find & Replace and Journals macros, which were topics of recent essays (see “The Business of Editing: Wildcarding for Dollars” and “The Business of Editing: Journals, References, & Dollars,” respectively).

[There is an important caveat to the above: I was able to conform the references in less than 4 hours because I already had my datasets built. Over the course of time, I have encountered these problems and I have added, for example, scripts to my Wildcard dataset and journal names to my Journals dataset (which now has 78,000 entries). If I didn’t already have the scripts, or if I had fewer scripts that would address fewer problems, it would have taken me longer. But a professional editor tries to plan for the future and the key to successful use of a tool is the tool’s ability to handle current-type problems in the future.]

To clean up the author names and the cite portion (i.e., 1991. 77(1): p. 5-19) I used EditTools’ Wildcard Find & Replace Macro. Because it lets me write and save a find-and-replace string and put multiple strings together in a single “script,” with the click of a button I was able to run several dozen macros that cleaned up those items. In addition, EditTools’ Page Number Format macro let me change partial page ranges (e.g., 110-19) to full page ranges (e.g., 110-119) automatically. It took less than 15 minutes for the full reference list to be conformed and should I face a similar task next week, I already have the necessary scripts; I just need to load and run them.

What took the most time was fixing the journals. My journals dataset is currently 78,000+ entries and the Journals macro has to run through 1,827 references 78,000+ times. But what it does is fix those incorrect entries it finds in the dataset and highlights them; it also highlights (in a different color) those journal names that are correct. What that means is that I can see at a glance which cites I need to check (in this case, just a handful). And while the EditTools Journals macro is running in the background, I can continue editing other files – which means I am getting paid twice (because I charge by the page, not the hour).

Is it Profitable?

Do I earn money on this? Yes, I do. Consider this example (the numbers have no relevance to what I actually charge; they are an example only): If I charge $3 per manuscript page and the references constitute 230 pages, it means the cost to the client is $690 regardless of whether the references take me 1 hour or 50 hours. In this case, to conform the references took about 4 hours. For those 4 hours, I earned $172.50 an hour as an effective hourly rate. The reality, of course, is that I still had to look over the references and lookup a few, and I actually spent  7 hours on the references altogether, which means my effective hourly rate would be $98.57 at $3 per page. (Had I charged $25 an hour, I would have earned just $25 an hour, approximately one-quarter of the per-page rate earnings, which is why I prefer a per-page rate.) As you can calculate, at a different per-page rate, the earnings would have been higher or lower.

And that doesn’t count what I earned while continuing to edit as the Journals macro ran in the background.

My point is that using the right tools and the right resources can make a difference. I do agree that if I had to fact check each reference, I would not have made any money at a per-page rate (nor at an hourly rate because no client would pay for the time it would take to fact check 1,827 references — especially when this is only one of 130 chapters), but then I wouldn’t have done the work at such a rate (or at all). Whether a task is profitable depends on many factors.

The notion that editing references cannot be profitable is no more true than is the notion that editing text is always profitable. Editing references may not be stimulating work, but with the right tools it can be profitable. The key to profitable editing, is to use the right tool for the job.

Richard Adin, An American Editor

_____________

Looking for a Deal?

You can buy EditTools in a package with PerfectIt and Editor’s Toolkit at a special savings of $78 off the price if bought individually. To purchase the package at the special deal price, click Editor’s Toolkit Ultimate.

February 18, 2015

The Business of Editing: Wildcarding for Dollars

Freelancers often lack mastery of tools that are available to us. This is especially true of wildcarding. This lack of mastery results in our either not using the tools at all or using them to less than their full potential. These are tools that could save us time, increase accuracy, and, most importantly, make us money. Although we have discussed wildcard macros before (see, e.g., The Only Thing We Have to Fear: Wildcard Macros, The Business of Editing: Wildcard Macros and Money, and Macro Power: Wildcard Find & Replace; also see the various Lyonizing Word articles), after recent conversations with colleagues, I think it is time to revisit wildcarding.

Although wildcards can be used for many things, the best examples of their power, I think, are references. And that is what we will use here. But remember this: I am showing you one example out of a universe of examples. Just because you do not face the particular problem used here to illustrate wildcarding does not mean wildcarding is not usable by you. If you edit, you can use wildcarding.

Identifying the What Needs to Be Wildcarded

We begin by identifying what needs a wildcard solution. The image below shows the first 3 references in a received references file. This was a short references file (relatively speaking; I commonly receive references files with 500 to 1,000 references), only 104 entries, but all done in this fashion.

references as received

references as received

The problems are marked (in this essay, numbers in parens correspond to numbers in the images): (1) refers to the author names and the inclusion of punctuation; (2) shows the nonitalic journal name followed by punctuation; and (3) shows the use of and in the author names. The following image shows what my client wants the references to look like.

references after wildcarding

references after wildcarding

Compare the numbered items in the two images: (1) the excess punctuation is gone; (2) the journal title is italicized and punctuation free; and (3) the and is gone.

It is true that I could have fixed each reference manually, one-by-one, and taken a lot of time to do so. Even if I were being paid by the hour (which I’m not; I prefer per-page or project fees), would I want to make these corrections manually? I wouldn’t. Not only is it tedious, mind-numbing work, but it doesn’t meet my definition of what constitutes editing. Yes, it is part of the editing job, but I like to think that removing punctuation doesn’t reflect my skills as a wordsmith and isn’t the skill for which I was hired.

I will admit that in the past, in the normal course, if the reference list were only 20 items long, I would have done the job manually. But that was before EditTools and its Wildcard macro, which enables me to write the wildcard string once and then save it so I can reuse it without rewriting it in the future. In other words, I can invest time and effort now and get a reoccurring return on that investment for years to come. A no-brainer investment in the business world.

The Wildcard Find

CAUTION: Wildcard macros are very powerful. Consequently, it is recommended that you have a backup copy of your document that reflects the state of the document before running wildcard macros as a just-in-case option. If using wildcard macros on a portion of a document that can be temporarily moved to its own document, it is recommended that you move the material. Whenever using any macro, use caution.

Clicking Wildcard in EditTools brings up the dialog shown below, which gives you options. If you manually create Find and Replace strings, you can save them to a wildcard dataset (1) for future recall and reuse. If you already have strings that might work, you can retrieve them (2) from an existing wildcard dataset. And if you have taken the next step with Wildcards in EditTools and created a script, you can retrieve the script (3) and run it. (A script is simply a master macro that includes more than 1 string. Instead of retrieving and running each string individually, you retrieve a script that contains multiple strings and run the script. The script will go through each string it contains automatically in the order you have entered the strings.)

Wildcard Interface

Wildcard Interface

As an example, if I click Retrieve from WFR dataset (#2 above), the dialog shown below opens. In this instance, I have already created several strings (1) and I can choose which string I want to run from the dropdown. Although you can’t see it, this particular dataset has 40 strings from which I can choose. After choosing the string I want to run, it appears in the Criteria screens (2 and 3), divided into the Find portion of the string and the Replace portion. I can then either Select (4) the strings to be placed in primary dialog box (see Wildcard Interface above) or I can Edit (5) the strings if they need a bit of tweaking.

Wildcard Dataset Dialog

Wildcard Dataset Dialog

If I click Select (4 above), the strings appear in the primary Wildcard dialog as shown below (1 and 2). Because it can be hard to visualize what the strings really look like when each part is separated, you can see the strings as they will appear to Microsoft Word (3). In addition, you know which string you chose because it is identified above the criteria fields (purple arrow). Now you have choices to make. You can choose to run a Test to be sure the criteria work as expected (4), or if you know the criteria work, as would be true here, you can choose to Find and Replace one at a time or Replace All (5).

The Effect of Clicking Select

The Effect of Clicking Select

I know that many readers are saying to themselves, “All well and good but I don’t know how to write the strings, so the capability of saving and retrieving the strings isn’t of much use to me.” Even if you have never written a wildcard string before, you can do so quickly and easily with EditTools.

Creating Our String

Let’s begin with the first reference shown in the References as Received image above. We need to tackle this item by item. Here is what the author names look like as received:

Kondo, M., Wagers, A. J., Manz, M. G., Prohaska, S. S., Scherer, D. C., Beilhack, G. F. et al.:

What we have for the first name in the list is

[MIXED case multiletter surname][comma][space][single UPPERCASE letter][period][comma]

which makes up a unit. That is, a unit is the group of items that need to be addressed as a single entity. In this example, each complete author name will constitute a unit.

This first unit has 6 parts to it (1 part = 1 bracketed item) and we have identified what each part is (e.g., [MIXED case multiletter surname]). To find that first part we go to the Wildcard dialog, shown below, click the * (1) next to the blank field in line 1. Clicking the * brings up the Select Wildcard menu (2) from which we choose we choose Character Menu (3). In the Character Menu we choose Mixed Case (4) because that is the first part of the unit that we need to find.

Wildcard First Steps

Wildcard First Steps

When we choose Mixed Case (4 above), the Quantity dialog below appears. Here you tell the macro whether there is a limit to the number of characters that fit the description for this part. Because we are dealing with names, just leave the default of no limit. However, if we knew we only wanted names that were, for example, 5 letters or fewer in length, we would decheck No Limit and change the number in the Maximum field to 5.

How many letters?

How many letters?

Clicking OK in the Quantity results in entry of the first portion of our string in the Wildcard dialog (1, below). This tells the macro to find any grouping of letters — ABCd, Abcde, bCdaefTg, Ab, etc. — of any length, from 1 letter to 100 or more letters. Thus we have the criteria for the first part of our Find unit even though we did not know how to write wildcardese. In the dialog, you can see how the portion of the string really looks to Microsoft Word (2) and how, if you were to manually write this part using Microsoft Word’s Find & Replace, it would need to be written.

How this part looks in wildcardese

How this part looks in wildcardese

The next step is to address the next part, which can be either [comma] alone or [comma][space]. What we need to be careful about is that we remember that we will need the [space] in the Replace string. If we do [comma][space] and if we do not have just a [space] entry, we will need to provide it. For this example, I will combine them.

Because these are simple things, I enter the [comma][space] directly in the dialog as shown below. With my cursor in the second blank field (1), I simply type a comma and hit the spacebar. You can verify this by looking below in the Find line of wildcardese (2), where you can see (, ):

Manually adding the next part

Manually adding the next part

The remaining parts to do are [single UPPERCASE letter][period][comma]. They would be done using the same techniques as the prior parts. Again, we would have to decide whether the [period] and [comma] need to go on separate lines or together on a single line. Why? Because we want to eliminate the [period] but keep the [comma]. If they are done together as we did [comma][space], we will manually enter the [comma] in the Replace.

For the [single UPPERCASE letter], we would follow the steps in Wildcard First Steps above except that instead of Mixed Case, we would select UPPER CASE, as shown here:

Selecting UPPER CASE from the Characters Menu

Selecting UPPER CASE from the Characters Menu

This brings up the Quantity dialog where we decheck No Limit and, because we know it is a single letter we want found, use the default Minimum 1 and Maximum 1, as shown here:

A Quantity of 1

A Quantity of 1

Clicking OK takes us to the main Wildcard dialog where the criteria to find the [single UPPERCASE letter] has been entered (1, below). Looking at the image below, you can see it in the string (2). For convenience, the image also shows that I manually entered the [period][comma] on line 4 (3 and 4).

The rest of the Find criteria

The rest of the Find criteria

The Wildcard Replace

The next step is to create the Replace part of the string. Once again, we need to analyze our Find criteria.

We have divided the Find criteria into these 4 parts, which together make up the Find portion of the string:

  1. [MIXED case multiletter surname]
  2. [comma][space]
  3. [single UPPERCASE letter]
  4. [period][comma]

The numbers represent the numbers of the fields that are found in the primary dialog shown above (The Rest of the Find Criteria). What we need to do is determine which fields we want to replace and in what order. In this example, what we want to do is remove unneeded punctuation, so the Replace order is the same as the Find order. We want to end up with this:

  1. [MIXED case multiletter surname]
  2. [space]
  3. [single UPPERCASE letter]
  4. [comma]

The way we do so is by filling in the Replace fields. The [space] and the [comma] we can enter manually. You can either enter every item manually or you can let the macro give you a hand. Next to each field in the Replace column is an *. Clicking on the * brings up the Select Wildcard dialog:

Select Wildcard

Select Wildcard

Because what we need is available in the Find Criteria, we click on Find Criteria. However, the Select Wildcard dialog also gives us options to insert other items that aren’t so easy to write in wildcardese, such as a symbol. When we click Find Criteria, the Use Find Criteria dialog, shown below, appears. It lists everything that is found in the Find criteria by line.

Use Find Criteria dialog

Use Find Criteria dialog

Double-clicking the first entry (yellow highlighted) places it in the first line of the Replace, but by a shortcut — \1 — as shown in the image below (1). If we wanted to reverse the order (i.e., instead of ending up with Kondo M, we want to end up with M Kondo,), we would select the line 3 entry in the Use Find Criteria Dialog above, and double-click it. Then \3 would appear in the first line of Replace instead of \1.

The completed wildcard macro

The completed wildcard macro

For convenience, I have filled the Replace criteria (1-4) as The Completed Wildcard Macro image above shows. The [space] (2) and the [comma] (4) I entered manually using the keyboard. The completed Replace portion of the string can be seen at (5).

The next decision to be made is how to run the string — TEST (6) or manual Find/Replace (7) or auto Replace All (8). If you have not previously tried the string or have any doubts, use the TEST (6). It lets you test and undo; just follow the instructions that appear. Otherwise, I recommend doing a manual Find and Replace (7) at least one time so you can be certain the string works as you intend. If it does work as intended, click Replace All (8).

You will be asked whether you want to save your criteria; you can preempt being asked by clicking Add to WFR dataset (9). You can either save to an existing dataset or create a new dataset. And if you look at the Wildcard Dataset dialog above (near the beginning of this essay), you will see that you can not only name the string you are saving, but you can provide both a short and a detailed description to act as reminders the next time you are looking for a string to accomplish a task.

Spend a Little Time Now, Save Lots of Time Later

Running the string we created using Replace All on the file we started with, will result in every instance of text that meets the Find criteria being replaced. I grant that the time you spend to create the string and test it will take longer than the second and subsequent times you retrieve the string and run it, but that is the idea: spend a little time now to save lots of time later.

I can tell you from the project I am working on now that wildcarding has saved me more than 30 hours of toiling so far. I have already had several chapters with 400 or more references that were similar to the example above (and a couple that were even worse). Wildcarding let me clean up author names, as here, and let me change cites from 1988;52(11):343-45 to 52:343, 1988 in minutes.

As you can see from this exercise, wildcarding need not be difficult. Whether you are an experienced wildcarder or new to wildcarding, you can harness the power of wildcarding using EditTools’ WildCard Find & Replace. Let EditTools’ WildCard Find & Replace macro system help you. Combine wildcarding with EditTools’ Journals macro and references become quicker and easier.

Richard Adin, An American Editor

Related An American Editor essays are:

_________________________

Looking for a Deal?

You can buy EditTools in a package with PerfectIt and Editor’s Toolkit at a special savings of $78 off the price if bought individually. To purchase the package at the special deal price, click Editor’s Toolkit Ultimate.

May 1, 2013

Business of Editing: The Logistics of Large Projects

As I wrote in my previous post, Business of Editing: Taking On Too Much, I have been hired to help edit a portion of a very large project. My portion runs to 5,000 manuscript pages, which have to be edited within 6 weeks.

After having written about the ethical issues of having undertaken a project that was bigger than the original editors could handle, I thought it would be worthwhile to discuss some of the logistical problems of massive projects. Let’s begin at the beginning: This project, before editing of any chapters, ran approximately 8,000 manuscript pages. (I use approximately deliberately as this was the in-house editor’s estimate; I only know with certainty the page count for the chapters I have actually received.)

Projects of that size are the types of project that I often receive and over the years, I have developed a system for working with such massive amounts of manuscript. In fact, it was because of my receiving projects of that size that I developed EditTools. As you can imagine, with such projects consistency becomes a problem, and the stylesheet seems to grow on its own.

The first logistical problem I address is that of editors: How many editors will be needed to edit the manuscript within the time allotted by the schedule? I built my business, Freelance Editorial Services, around the idea that a team of editors can do better financially than a solo editor. Although this notion has been disputed many times over the years, I still believe it to be true, based on discussions that I have with solo colleagues. It is this team concept that enables me to undertake such large projects with confidence, knowing that I will have a sufficient number of well-qualified editors to do the work.

The second logistical problem I address is the online stylesheet and giving access to it to the editors who will be working on the project. I discussed my online stylesheet in Working Effectively Online V — Stylesheets. When several editors work collaboratively on a project, this online stylesheet enables all of the editors to see what decisions have been made, and to conform their decisions with the decisions that have been made by coeditors. Consequently, if an editor makes new editorial decision (i.e., it has not been previously decided by an editor and inserted on the stylesheet) to use distension rather than distention, or to use coworker rather than co-worker, all of the other editors can immediately see that decision — within seconds of its being entered into the stylesheet — and can conform their editing to that decision or dispute it. It also means that errors can be caught and corrected. For example, if an editor enters adriamycin, another editor can correct it to Adriamycin (it is a brand name, not a generic drug) and immediately notify all editors of the original error and correction.

In addition, my client also has access to the stylesheet. The client can view and print it, but not modify it. This serves two purposes: (a) the client can provide proofreaders with up-to-the-minute copies of the stylesheet and (b) the client can look at our editorial decisions and decide that he would prefer, for example, distention rather than distension, notify an editor of the preference, and the editor can then make the change and notify all of the coeditors, who can then make any necessary corrections in chapters not already submitted to the client.

The third logistical problem I address is the creation of a starter NSW (Never Spell Word) file for the project. The Never Spell Word module of EditTools is where known client preferences are stored. For example, if I know that the client prefers distention to distension, I enter into the NSW file the information to change instances of distension to distention. Also into this file goes editorial decisions, such as marking DNA as an acronym that does not ever need to be spelled out but that the acronym US (for ultrasound) should always be spelled out as ultrasound. The NSW file also serves to remind editors of other editorial-decision–related information. I provide each editor with a starter NSW file and each editor will add to their NSW file as they edit.

The NSW macro is run before beginning editing a chapter. Its purpose is to promote consistency across chapters and to make it easier for an editor to visually see editorial decisions that have been made. The NSW macro includes several components. For example, my basic NSW for medical editing also includes a dataset for drugs and organisms. Its use helps speed editing by providing visual clues, such as an indication that a drug name is correct even though the spell checker is flagging it as erroneous — it becomes one less thing that I need to verify.

The fourth logistical problem I tackle is references. These projects often have lots of references. One chapter of the project that I just received, for example, runs 305 manuscript pages, of which there are 61 pages of references — a total of 652 references (most of the chapters have more than 300 references). Dealing with references can be time-consuming. My approach is to separate the references from the main chapter, putting them in their own file. This serves four purposes: (a) Microsoft, in its wisdom, has determined that if spell check determines there are more than some number of errors in a document, it will display a message that there are too many errors for Word to display and turns off spell check. Although spell check is not perfect, it is a tool that I do use when editing. I would prefer it to flag a correctly spelled word as misspelled, giving me an alert, than my possibly missing something. Spell check is a tool, not a solution. (However, it does help that EditTools helps me create custom dictionaries so that correct words that are currently flagged as errors by spell check can easily be added to a custom dictionary and not flagged in the future.) By moving the references to their own file, I eliminate this problem of Word turning off spell check for too many errors.

(b) It provides me with an opportunity to run my Journals macro. Every time I come across a new variation of a spelling of a journal name, I add it to one of my journal datasets. My PubMed (medical) journals dataset currently has more 14,675 entries. With the references in a separate file, I can run that dataset against the reference list and have my macro correct those journal names that are incorrect (assuming the information is in my dataset) and mark as correct those that are correct. What this means is that rather than having to check journal names for 652 references in a chapter, I have to do so for at most a handful. It also means that I can concentrate on the other reference errors, if any, such as missing author names. Instead of spending several hours on the references alone, I can edit the references in a much shorter amount of time. (It took 26 minutes for the Journals macro to check the 652 references against the 14,675 entries in the dataset.)

(c) The third purpose is that separating the references from the main text lets me run the Page Number Format macro. In less than a minute, I had changed the page numbers in the 652 references from 1607-10 to 1607-1610 format. How long would it take to do this manually? Having the references in their own file means I do not have to worry about the macro making unwanted changes in the main text, especially as this macro runs without tracking.

(d) The fourth purpose separating the references from the main body of the chapter serves is that it lets me run my Wildcard Find & Replace macro just on the references. There is no chance that I will use the macro and make unwanted changes to the main text. WFR is efficient because it lets me create a macro that works, such as one to closeup the year-volume-pages cite, and save it for future reuse. WFR even lets me combine several of the macros into a single script (that also can be saved for repeat use) so that the macros run sequentially in my designated order. As an example: I have created macros to change author names from the format Author, F. H., to Author FH,. If you have to do this manually for several thousand author names, you begin to appreciate the power and usefulness of WFR and how much time it can save. (I also will use WFR on the main text when appropriate. What I avoid by separating out the references is the possibility of something happening to either the main text or the references that shouldn’t.)

The above steps are among those I take that make handling of large projects easier and more profitable. There are additional things that I do for each chapter, but the point is that by dealing with manuscript in a logical way, projects become manageable. In addition, by using the right tools, editing is more accurate, consistent, and faster, which leads to a happy client, more work, and increased profitability.

Do you have any thoughts on how to handle large amounts of manuscript? Do you take any special steps for preparing a manuscript for editing or while editing?

November 7, 2012

The Business of Editing: Wildcard Macros and Money

I thought the mention of money might catch your interest :). But macros, especially wildcard macros, and money do go hand in hand. Consider the following two scenarios I recently experienced in the references of a project (same project, different chapters).

In the first scenario, there were, over two chapters, nearly 500 references that the authors had formatted like this:

Agarwal, S., Loh, Y. H., Mcloughlin, E. M., Huang, J., Park, I. H., Miller, J. D., Huo, H., Okuka, M., Dos Reis, R. M., Loewer, S., Ng, H. H., Keefe, D. L., Goldman, F. D., Klingelhutz, A. J., Liu, L. & Daley, G. Q. (2011) Telomere elongation in induced pluripotent stem cells from dyskeratosis congenita patients. Nature, 464, 292-6.

In the second scenario, the references were formatted like this:

Adhami F, G Liao, YM Morozov, et al: “Cerebral ischemia-hypoxia induces intravascular coagulation and autophagy.” Am J Pathol 2006;  169(2): 566-583.

What they need to look like is this:

Airley R, Loncaster J, Davidson S, et al. Glucose transporter glut-1 expression correlates with tumor hypoxia and predicts metastasis-free survival in advanced carcinoma of the cervix. Clin Cancer Res 2001;7(4):928-934.

The money question is how to I get the references from where they are to where they need to be quickly and efficiently so that I make money and not lose money? The answer lies in wildcard macros.

For most editors this is a daunting task that needs to be tackled manually. In the first scenario, the editor will manually remove each extraneous period, manually move the year to precede the volume number, and manually correct the punctuation problems in the citation. In other words, most editors will spend a good two or three minutes — if not longer — correcting each reference entry. I, on the other hand, spent less than 30 minutes cleaning up these references and verifying the journal names.

It is not that I am a brilliant macro writer — I am not. A skilled macro writer is someone like Jack Lyon, the creator of the Editorium macros that so many of us use. Instead, what I am is a smart user of the tools that will help me accomplish what needs to be done. In this case, I am a smart user of EditTools’ Wildcard Find & Replace (WFR) macro tool.

WFR has been designed to make creating and using wildcard macros easy. You do not need to know how to write the macros, the tool will do it for you; instead, you need to know how to tackle a problem, how to break it down into its component parts.

The first step is to find a pattern. Remember that macros are dumb and work on patterns. I began by analyzing the patterns in the author names: Agarwal, S., Loh, Y. H., Mcloughlin, E. M. I realized that, for example, each of the first names was represented by an initial followed by a period and a space except that the final initial was followed by both a period and a comma (e.g., Y. H.,). Thus each group was separated by a period-comma combination. I also noticed that some authors had a single initial and some had two initials (and I recalled from other reference lists that some authors had three initials).

Beginning with the single initial name, I used WFR to create the first macro. WFR lets me select from menus what I want (e.g., the Character menu gives me several options, including Exact Characters, Exclude Characters, lower case, UPPER CASE, Mixed Case) and based on my selection, WFR creates the entry for me (e.g., choosing UPPER CASE in the first field inserts an unlimited [A-Z]@ into the field, which WFR turns into ([A-Z]@), the correct form for a wildcard). I do not need to know how to write the entry, I need only give the correct instruction. Thus, the first thing I wanted the macro to find was the surname, which is mixed case. So from the menu of options, I chose Mixed Case and unlimited (unlimited because some surnames are short and others are long and I need to cover all of them) and WFR created ([A-Za-z]@) for me.

I continued to make my selections by filling in the fields in the WFR form so that in the end the fields were filled in for me like this (the @ indicates any number of the find criterion; the {1,1} indicates a minimum of 1 and a maximum of 1 of the find criterion; and in #3 and #7, preceding the { is a space):

Field #    Find                Replace
1              [A-Za-z]@       \1
2              ,                         \3
3               {1,1}                 \4
4             [A-Z]{1,1}          \6
5             .                           \7
6             ,
7               {1,1}

The Replace fields are where I tell the macro what to replace the find with. Again, this can be achieved by making selections from a menu. The \4, for example, indicates that what I want is found in field #4. So the Replace information tells the macro that I want the found criteria replaced with Surname (#1), a space (#3), the initial (#4), a comma (#6), and a space (#7). WFR creates a wildcard find string that looks like this:

([A-Za-z]@)(,)( {1,1})([A-Z]{1,1})(.)(,)( {1,1})

and a replace string that looks like this:

\1\3\4\6\7

and when the macro is run, every author name that looks like

Agarwal, S.,

becomes

Agarwal S,

Clearly, this one macro is not enough to clean up all the variations. In fact, for the first scenario it took 11 macros just for the name cleanup. But this is another feature of WFR. After I create a macro, I can save it, with a lengthy description, in a file with similar macros so I can use the macro again without having to create it again. But to have to run 11 macros individually is time-consuming, so WFR will let me create a script that will run all 11 macros in whatever order I want them to run.

A script is easy to create — you just double-click on the macros you want to add to a script and then save them. The script can be added to or subtracted from at any time.

Ultimately, I created another set of four macros to deal with the author names in the second scenario. All of these macros — those for scenario 1 and those for scenario 2 — can be modified to deal with different patterns as the need arises. I will not have to keep reinventing the macros.

Another feature of WFR is that the macros are editable. If you discover that you should have included or omitted something, you do not need to recreate the entire macro; just choose to edit it.

And WFR lets you test the macro to make sure it works as you expect. (One note of caution when working with wildcard macros: It is best to turn tracking off. With tracking on, wildcard macros often produce bizarre results. Run the same macro with tracking off and everything works fine.)

It took me about 30 minutes to write all of the macros for both scenarios. Once I wrote them, however, when I came to the next chapter that needed the cleanup, the cleanup was done in less than a minute. Compare a less-than-a-minute cleanup time to the time it would take to do the cleanup manually. The wildcard macros make me money by making my work easy, quick, and efficient.

The beauty of EditTools’ Wildcard Find & Replace macro is that you do not need to be a macro guru to create these macros. You simply need to break the tasks down into steps and use WFR to create the macros for you. One important point that is worth repeating: Macros are dumb. They will do what you tell them to do even if they shouldn’t. It is still your responsibility as an editor to check the items. Macros do make mistakes.

If you haven’t tried WFR, you should. It is an easy way to delve into the world of wildcard macros. And unlike using the wildcard feature of Word’s Find & Replace, WFR lets you save the macros for future use and gives you a way to run several wildcard macros sequentially without having to create them.

April 21, 2010

It’s the Little Things: Software Redux

Not discussed in my previous articles was Microsoft Word’s built-in macro language, Visual Basic for Applications (VBA). But this resource is exceedingly valuable to an editor. Every editor should at least master using wild cards and should try to learn the fundamentals of writing “simple” VBA macros.

I edit a lot of very long manuscripts — 2,000 to 10,000+ manuscript pages — in the STM (science, technical, and medical) fields. It is not unusual for these manuscripts to have chapters with 300 to 1,500 references, and the one thing I can almost universally rely on is that the references are not in proper form, and are even inconsistent among themselves.

For example, a manuscript I am currently working on has a citation style that looks like this for a journal article:

Surname Initials, Surname Initials. Article title. Journal vol;page-page, year.

In one chapter with nearly 500 references, not a single reference was in that form. The style was all over the place and it is my job to fix it.

Fixing the problems means I can do each reference individually or I can identify patterns and write a macro or use wildcards with Find & Replace. For most editors, the easier solution is to use wildcards with F&R. Using F&R means breaking down the references into their parts. It isn’t possible — at least as far as I have been able to determine — to create a single macro or F&R routine to take care of all of the variations that the authors provide. Consequently, I try to address parts of the problem.

 For example, if the authors have put some of the citations in this form:

26, 1988, 1101-1105.

and I want to change it to this form:

26:1101-1105, 1988.

I make use of wildcards as follows:

Find: ([0-9]@)(, )([0-9]{4})(, )([0-9]@)(-)([0-9]@)(.)

Replace: \1:\5\6\7\4\3\8

Similarly, if the authors have really made it complex by using the citation form

2005, Dec;24(12):2037-042.

which I need to become

24(12):2037-042, 2005.

I use a 2-step wildcard F&R as follows:

1st Find: ([0-9]{4})(, [A-z]@;)

 1st Replace: \1;

 2nd Find: ([0-9]{4})(; @)([0-9]@[(][0-9]@[)]:[0-9]@-[0-9]@)(.)

 2nd Replace: \3, \1\4

Every time I figure out the wildcard F&R, I copy the parameters to a word document that I keep handy for the next chapter. This way I only have to copy and paste and click Replace All. I do have to go through several F&Rs, which will correct most — but not all — of the variations; but it is better to have 90% corrected automatically than to have to do them all manually.

And to address problems where, for example, the authors give the reference author names as AW Smith instead of Smith AW, I write a simple macro that I assign to my keyboard (and my XKeys) to make that reversal:

Sub ReverseAuthorName1()

‘ ReverseAuthorName1 Macro
‘ Macro created 4/7/2010 by Freelance Editorial Services

    Selection.MoveRight Unit:=wdWord, Count:=1, Extend:=wdExtend
    Selection.Cut
    Selection.MoveRight Unit:=wdWord, Count:=1
    Selection.PasteAndFormat (wdPasteDefault)
End Sub

 As you can see, even a simple macro can make life easier and editing more productive. What do you do when an author has added punctuation following the journal name and there isn’t supposed to be any? For example, the author gives you

N Engl J Med. 1998;2:200-210

and the correct form for your client is

N Engl J Med 2:200-210, 1998?

We know how to move the year to the end globally but that doesn’t solve the problem of the punctuation following the journal name. You could modify your wildcard F&R but that won’t remove the punctuation where the rest of the cite doesn’t match the Find parameter. The answer is to write a macro.

Here is the macro I use. It works so I’ve not improved it as I’ve grown more knowledgable about VBA. This macro can be much more simply and efficiently written; it was one of my earliest attempts at macro writing.

Sub RefsRemovePuncAfterJournalName()

‘ Remove Punctuation After Journal Name in References Macro
‘ Macro created 10/7/2004 by Freelance Editorial Services

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = “/, ”
        .Replacement.Text = “/,Œ‰”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildCards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ Replace [number],[space] with [number],[smiley]‰

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = “([0-9])[, ]”
        .Replacement.Text = “\1,” & ChrW(9786) & “‰”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildCards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ Replace [space][number] with ¿‰[number]

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ” ([0-9]{4})(;)”
        .Replacement.Text = “¿‰\1\2”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildCards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ Replace ,¿ with [space]

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = “,¿”
        .Replacement.Text = ” ”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildCards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ Replace .¿ with [space]

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = “.¿”
        .Replacement.Text = ” ”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildCards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ Replace [smiley] with [space]

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ChrW(9786)
        .Replacement.Text = ” ”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildCards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ Replace ¿, Œ, and ‰ with [space]

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = “[¿Œ‰]”
        .Replacement.Text = ” ”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildCards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = “([A-z]@)(.)(^32)([0-9]@{4})(;)”
        .Replacement.Text = “\1\3\4\5”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildCards = True
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

    ‘ This section resets the wildcards to off

    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ”  ”
        .Replacement.Text = ” ”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildCards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
   
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = ”  ”
        .Replacement.Text = ” ”
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = True
        .MatchWholeWord = False
        .MatchWildCards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
   
End Sub

The macro looks more complex than it really is. The point is that you, too, can write these macros for your own needs if you make the effort to learn a little VBA. But even if you don’t want to go that far, you need to learn how to use wildcards. The time that wildcards and macros can save you puts money in your pocket. More importantly, it prevents the frustration you encounter when you face a lengthy reference list and discover that not one author-provided reference is in correct form.

I suggest picking up a book on VBA programming and also checking out the information on macros and wildcards found in Microsoft Word for Publishing Professionals by Jack Lyon (available at http://www.editorium.com and through bookstores via ISBN 9781434102362). Jack’s book is one of the best sources for introductory information on macro writing available.

Live, learn, and prosper!

Blog at WordPress.com.

%d bloggers like this: