Indexing with a Two-Column Concordance

Recent articles in this newsletter have discussed editing with a concordance, which may be confusing for some readers. Let me explain. In those articles, "concordance" really means "word list." It's simply a list of all the words in a document, and it can come in pretty handy in editing.

Experienced Word users know, however, that a concordance is also a list of words used to create an index. You can learn more in my article here:

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

That article explains how to use a one-column concordance, but it's also possible to use a two-column concordance to create an index in a Word document. Why would that be useful? Because it tells Word to index certain words and phrases differently than they appear in the text.

Let's say your text includes a sentence like this:

"George Washington was the first president of the United States of America."

You can create a concordance entry that looks like this:

George Washington Washington, George

Then, when Word comes to the words "George Washington" in your document, it will create an index entry for "Washington, George." And it will do that for each instance of "George Washington" in your document.

To create a two-column concordance:

1. Create a new document (CTRL + N).

2. Click Table > Insert > Table.

3. Under "Number of columns," enter 2.

4. Under "Number of rows," enter 1.

5. Click the OK button to create your table.

6. In the table, enter your first term and its replacement. For example, in the first column you could enter "George Washington," and in the second column you could enter "Washington, George." (Don't include the quotation marks.)

7. Press the Tab key to create a new row.

8. Enter more terms and replacements and rows as needed.

9. Save your concordance.

When you're finished, create your index:

1. Switch to your document.

2. Click Insert > Index and Tables > Index > AutoMark. (In Word 2002 and later, click Insert > Reference > Index and Tables > Index > Mark Entry.)

3. Navigate to your concordance file and click it to select it.

4. Click the Open button and wait while Word marks all of those index entries.

5. Generate your index as explained here:

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

If you're a professional indexer, you probably avoid indexing in this way, although Steve Hudson's Indexer program can help a lot with creating embedded indexes in Word:

http://www.geocities.com/word_heretic/Indexing.html

Next week, however, I'll show you the perfect example of when to use a double-column concordance in preparing an index--and an automatic way to create it.

Thanks to Mark Taylor for suggesting this article.

_________________________________________

READERS WRITE

Mark Taylor wrote:

"Using a concordance table allows you to index using an 'alias.' A table also allows you to index multiple instances of a word, regardless of capitalization. For example, you could find Delaware and DELAWARE in the same document, but both would be a separate entry because the concordance is case sensitive. Using a concordance table gives you a simple workaround to this problem. You could force the index to have both entries found under the heading Delaware, or under DELAWARE."

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

Last week's newsletter included a macro to count revised words in a Word document:

http://lists.topica.com/lists/editorium/read/message.html?mid=1717164663 (scroll down to the Readers Write column)

After looking through the macro (which included the line "For r = 1 To RevCount"), Wallace Sagendorph wrote, "What does that 'r' stand for, anyway?"

I responded:

It doesn't really stand for anything. It's just an incremental counter. Here's how it works:

RevCount = ActiveDocument.Revisions.Count

That counts the number of revisions in the active document and stores the count in a variable named RevCount. (Remember X in algebra? That's all a variable is; it's a placeholder for some number.)

Then we have this:

For r = 1 To RevCount

(Something happens here)

Next r

That says to Word, "Starting with the number 1, do (something) however many times RevCount is."

"Next r" just increments r by 1.

So, let's say RevCount = 3, and the (something) was "Insert 'hello' into my document." The macro would insert this:

hello

Then it would make r become 2 instead of 1 (Next r).

Then it would insert this:

hello

Then it would make r become 3 instead of 2 (Next r).

Then it would insert this:

hello

When r got to 4, the macro would stop, because 4 is one more than Revcount (3), and you'd have something like this in your document:

hello

hello

hello

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

Paul Robinson wrote:

"I've just got your update. It reminded me that I've been meaning to get in touch to thank you properly for the revisions-counting macro. I'm very grateful for your help.

"The macro takes a bit of getting used to. I find it takes an awfully long time to count the revisions in 5-10,000-word documents. In fact, so long, that at first I thought it wasn't working--one really should go and make a cup of tea and leave the computer to itself! This might be worth mentioning in the update."

I responded, "Yes, and I don't have a way around this--other than get a faster computer. 🙂 I've made the macro as efficient as I know how."

If you, gentle reader, know how to speed this up, I'd love to hear from you.

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

Bill Rubidge wrote:

It's a funny coincidence about your macro to count revisions. I have been tinkering with this a little myself, and had put together the following macro. It hasn't been optimized at all, in part because I'm still thinking about how to use it to quantify the degree of revision.

For example, I would consider replacing one word with another, in the same position, to be a very minor revision. A letter change within a word (colour to color) even more minor. But if a revision is long enough (X characters) to indicate a new sentence, that would be an indicator to my client that I had done more work.

The one weakness of the word revisions tracking tool is that it does not allow us to track a different kind of revision--where text is simply moved from one place to another in a document. (DeltaView from WorkShare can do this for you, but the license is designed for large organizations, so the tool is typically used by law firms. And I don't know whether that "moved" information would be accessible as a count, or through VBA.)

Anyway, as a work in process, here's my draft macro.

[If you don't know how to use such macros, you can learn how here:

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


Sub CountRevs()
Dim intWordCount As Integer
intWordCount = ActiveDocument.Words.Count
Dim intRevCount As Integer
intRevCount = ActiveDocument.Revisions.Count
If intRevCount = 0 Then
MsgBox ("This document has no revisions.")
Exit Sub
End If
Dim intCounter As Integer
intCounter = 1
Dim intInsertionCount As Integer
intInsertionCount = 0
Dim intInsertionLongestLen As Integer
intInsertionLongestLen = 0
Dim intDeletionCount As Integer
intDeletionCount = 0
Dim intDeletionLongestLen As Integer
intDeletionLongestLen = 0
Dim intOtherRevCount As Integer
intOtherRevCount = 0
Do While intCounter < intRevCount + 1
If ActiveDocument.Revisions(intCounter).Type = _
wdRevisionInsert Then
intInsertionCount = intInsertionCount + 1
If Len(ActiveDocument.Revisions(intCounter).Range) > _
intInsertionLongestLen Then
intInsertionLongestLen = _
Len(ActiveDocument.Revisions(intCounter).Range)
End If
Else
If ActiveDocument.Revisions(intCounter).Type = _
wdRevisionDelete Then
intDeletionCount = intDeletionCount + 1
If Len(ActiveDocument.Revisions(intCounter).Range) > _
intDeletionLongestLen Then
intDeletionLongestLen = _
Len(ActiveDocument.Revisions(intCounter).Range)
End If
Else
intOtherRevCount = intOtherRevCount + 1
End If
End If
intCounter = intCounter + 1
Loop
MsgBox ("Results of Revision Inventory: " & vbCrLf & _
"- " & intWordCount & _
" total words in the document (simple count)." & _
vbCrLf & "- " & intInsertionCount & _
" insertions, and longest insertion has " & _
intInsertionLongestLen & " characters." & _
vbCrLf & "- " & intDeletionCount & _
" deletions, and longest deletion has " & _
intDeletionLongestLen & " characters." & _
vbCrLf & "- " & intOtherRevCount & _
" other revisions (might be formatting, etc.).")
End Sub

Many thanks to Mark, Wallace, Paul, and Bill for their terrific comments and help.

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

Post a Comment

You must be logged in to post a comment.

  • The Fine Print

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

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

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

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

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

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

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

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