Wordperfect Weirdness

I work with lots of authors who use WordPerfect. Sometimes they pass their documents on to colleagues who use Microsoft Word. That wouldn't be a problem if the authors would first save their documents in Word format. But they don't, and their colleagues work on the documents in Word, pass them around to others, and then give them back to the authors, who send them to me.

When I open these documents they look okay--except that some of the characters look kind of funny. The quotation marks and apostrophes are a little crooked, and the em dashes are thick and bold. What's going on here?

What's going on is that these aren't regular ANSI characters. You can prove this by selecting one and then pressing CTRL + SPACEBAR to remove any directly applied formatting. When you do, the character will turn into some other character. With this particular kind of weirdness, an opening quotation mark (for example) will become a capital A. You could Find and Replace these with real quotation marks, but your document may have hundreds--even thousands--of *real* capital A's that you want to preserve.

Here's a list of the pseudo-characters (the ones I've identified; there could be more) and their corresponding true identities:

CHARACTER DISGUISED AS TRUE IDENTITY (sort of)

Em dash C

En dash B

Opening quotation mark A

Closing quotation mark @

Opening single quotation mark >

Closing single quotation mark

(apostrophe) =

Another way to prove something weird is happening is to put your cursor in front of one of these characters and then run the macro you'll find here:

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

The macro will tell you that the ANSI number is 40--which is really the number for an opening parenthesis. That will be true whether you're checking a pseudo-quotation mark, em dash, en dash, whatever. So you can't Find and Replace them by using character number 40, either, since your document may contain legitimate parentheses.

What's needed is a way to Find and Replace a character that is an A (or whatever) *and* has the ANSI number 40. At the end of this article is a macro (one for Word 97 and above; one for Word 6 and 95) that will do just that, for all the weird characters in question.

Now, if you run into this WordPerfect weirdness, you'll have a way to fix it. If you know about other characters that act the same way, please let me know and I'll include them in a future newsletter with a revised macro.

If you remove directly applied formatting and the character (such as an em dash) *doesn't* change to something else (such as a C) but instead to a less-bold version of the same thing (which can happen), then the macro won't fix it. It if you know what's going on with *these* weird characters and how to fix them, please let me know and I'll share your solution in the newsletter.

If you don't know how to use macros like the following, you can learn how here.

'MACRO FOR WORD 97 AND ABOVE STARTS HERE

Dim a

Dim i

Dim FalseChar$

Dim TrueChar$

Dim ThisChar

WordBasic.EditFindClearFormatting

WordBasic.EditReplaceClearFormatting

WordBasic.StartOfDocument

'Check for platform

a = InStr(WordBasic.[AppInfo$](1), "Macintosh")

For i = 1 To 6

'Set find and replace variables

Select Case i

Case 1

FalseChar$ = "C"

If a Then

TrueChar$ = Chr(209)

Else

TrueChar$ = Chr(151)

End If

Case 2

FalseChar$ = "B"

If a Then

TrueChar$ = Chr(208)

Else

TrueChar$ = Chr(150)

End If

Case 3

FalseChar$ = "A"

If a Then

TrueChar$ = Chr(210)

Else

TrueChar$ = Chr(147)

End If

Case 4

FalseChar$ = "@"

If a Then

TrueChar$ = Chr(211)

Else

TrueChar$ = Chr(148)

End If

Case 5

FalseChar$ = ">"

If a Then

TrueChar$ = Chr(212)

Else

TrueChar$ = Chr(145)

End If

Case 6

FalseChar$ = "="

If a Then

TrueChar$ = Chr(213)

Else

TrueChar$ = Chr(146)

End If

Case Else

End Select

'Find and replace

WordBasic.EditFind Find:=FalseChar$, MatchCase:=1, PatternMatch:=0

While WordBasic.EditFindFound()

ThisChar = Asc(WordBasic.[Selection$]())

If ThisChar = 40 Then

WordBasic.WW6_EditClear

WordBasic.Insert TrueChar$

End If

WordBasic.EditFind

Wend

Next i

'MACRO ENDS HERE

'MACRO FOR WORD 6 and 95 STARTS HERE

EditFindClearFormatting

EditReplaceClearFormatting

StartOfDocument

'Check for platform

a = InStr(AppInfo$(1), "Macintosh")

For i = 1 To 6

'Set find and replace variables

Select Case i

Case 1

FalseChar$ = "C"

If a Then

TrueChar$ = Chr$(209)

Else

TrueChar$ = Chr$(151)

End If

Case 2

FalseChar$ = "B"

If a Then

TrueChar$ = Chr$(208)

Else

TrueChar$ = Chr$(150)

End If

Case 3

FalseChar$ = "A"

If a Then

TrueChar$ = Chr$(210)

Else

TrueChar$ = Chr$(147)

End If

Case 4

FalseChar$ = "@"

If a Then

TrueChar$ = Chr$(211)

Else

TrueChar$ = Chr$(148)

End If

Case 5

FalseChar$ = ">"

If a Then

TrueChar$ = Chr$(212)

Else

TrueChar$ = Chr$(145)

End If

Case 6

FalseChar$ = "="

If a Then

TrueChar$ = Chr$(213)

Else

TrueChar$ = Chr$(146)

End If

Case Else

End Select

'Find and replace

EditFind .Find = FalseChar$, .MatchCase = 1, .PatternMatch = 0

While EditFindFound()

ThisChar = Asc(Selection$())

If ThisChar = 40 Then

WW6_EditClear

Insert TrueChar$

End If

EditFind

Wend

Next i

'MACRO ENDS HERE

_________________________________________

READERS WRITE

Donna Payne wrote:

In response to readers write about Track Changes in Word 2002:

Although Microsoft has removed the option for how deleted text should appear in this version due to markup balloons, we have a free pdf file at the following location that explains how to get around this:

http://www.payneconsulting.com/public/tips/TipDetail.asp?nTipID=82.

Donna Payne

President

Payne Consulting Group, Inc.

www.payneconsulting.com

___________________

Johanna Murphy wrote:

In answer to Mary Eberle's comments regarding AutoCorrect in you previous newsletter, I would like to give you my comments on this subject. I also have been using AutoCorrect heavily in Word 97, and I copied my normal over. The problem I have is just the opposite. The formatted entries freeze up the program, but the unformatted all work. Especially the entries I have for inserting fields. For instance, I create a date by using the field Month Date and Year. I then copy it into the AutoCorrect box and tell it to be formatted, but it will turn it into unformatted or freeze up the program. I really hate that! Any suggestions would be appreciated.

While I've got your attention, I am also hoping you or your readers could help me with a problem in Word XP. I work for a law firm and when we had Word 97, I had created the firm's letterhead templates, pleading templates, etc. I inserted comments into the templates for the other users' convenience. When the templates were transferred to Word XP, the comments showed up as a thin vertical line on the screen, and the lines ALSO PRINTED! Every time I open a template it is set to "Final Markup." Since then, I have learned to use the Reviewing Toolbar to set the document to "Final Document." This procedure is very tiresome to always have to remember to switch to Final Document. Staff and attorneys call me all the time to ask why these vertical lines show up when they print something. I have deleted the comments out of the templates, but the lines still show up unexpectedly on the printed documents even though they don't show on the screen anymore. Is there help for this? Thanks.

Thanks to Donna for the additional information and to Johanna for her questions.

_________________________________________

RESOURCES

If you're having problems importing documents from other word processing programs into Microsoft Word, some of the document converters from Microsoft may help:

http://office.microsoft.com/downloads/default.aspx?Product=Word&Version=95|97|98|2000|2002&Type=Converter|Viewer

Button Bonanza

Stars, pencils, light bulbs, puppy dogs, faces, diamonds, and hearts. What am I talking about? Toolbar buttons! Lots and lots of toolbar buttons!

If you like assigning macros to toolbar buttons, you're probably tired of the paltry 42 images you can use on those buttons by default. But fear not! Word has hundreds of images available. You just have to know how to get to them. The only way I know is with a macro, and I'm perfectly happy to share it with you:


'MACRO FOR WORD 97 AND ABOVE STARTS HERE
Sub MAKEBUTTONS()
HowManyToolBars = 10
HowManyButtons = 150
first = 1
last = HowManyButtons
On Error GoTo -1: On Error GoTo Warning
For toolbar = 10 To HowManyToolBars * 10 Step 10
TbarName$ = "Buttonbar " + _
WordBasic.[LTrim$](Str(toolbar / 10))
WordBasic.NewToolbar Name:=TbarName$, Context:=0
For button = first To last
WordBasic.AddButton TbarName$, 1, 1, "Bold", button, 0, ""
Next button
first = first + HowManyButtons
last = last + HowManyButtons
WordBasic.SizeToolbar TbarName$, 600
WordBasic.MoveToolbar TbarName$, 0, toolbar, (toolbar * 2) + 100
Next toolbar
GoTo Endmacro
Warning:
WordBasic.MsgBox "Buttonbar " + _
WordBasic.[LTrim$](Str(toolbar / 10)) + " already exists.", "Delete Toolbar"
Endmacro:
End Sub
'MACRO ENDS HERE

If you don't know how to use macros like that one, you can learn how here.

After you run it, you'll have 10 new toolbars, named Buttonbar 1, Buttonbar 2, and so on. Each toolbar will have 150 buttons. For the sake of programming simplicity, each button does the same thing: turn on bold formatting. But you can see a button's original function by resting your mouse pointer over it and waiting a few seconds for its tooltip to appear. You can also copy the images from any of the buttons to paste on any other buttons you want. For example, if you want to assign macros to custom toolbar buttons, you now have lots of button images to choose from. You can learn more about assigning macros to toolbar buttons here:

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

If you decide you no longer need the toolbars and their many buttons, you can delete them by running this macro:


'MACRO FOR WORD 97 AND ABOVE STARTS HERE
Sub DELETEBUTTONS()
HowManyToolBars = 10
On Error GoTo -1: On Error GoTo Warning
For toolbar = 10 To HowManyToolBars * 10 Step 10
WordBasic.ViewToolbars toolbar:="Buttonbar " + _
WordBasic.[LTrim$](Str(toolbar / 10)), Delete:=1
Next toolbar
GoTo Endmacro
Warning:
WordBasic.MsgBox "The toolbar does not exist.", "No Such Toolbar"
Endmacro:
End Sub
'MACRO ENDS HERE

If you really want to go crazy, you can step up the "10" in this line to create more than 10 toolbars:

HowManyToolbars = 10

And you can step up the "150" in this line to create more than 150 buttons on each toolbar:

HowManyButtons = 150

If you want to play around with this, please be judicious. The higher you set those numbers, the longer it will take to create the toolbars and buttons, and the more unwieldy they will become. I think 150 is pretty manageable for the number of buttons on a toolbar. You can set this to, say, 500, but that makes a *big* toolbar. And how many toolbars do you really need? The highest I've gone is 30, but I think 10 is plenty. It would be interesting to know how many images are actually available. After a while, quite a few of the images will be blank, and many of them will be duplicates.

WARNING: Be sure to adjust the macro that *deletes* buttons to correspond with the macro that *makes* buttons. To be more specific, the line "HowManyToolbars" should be set to the same number in both macros. If you ignore this, you could end up deleting all those toolbars by hand (under View > Toolbars).

Here are the corresponding macros for Word 6 and 95, which have only 366 images altogether, so don't try to make the macro go any higher. If you do, you'll just get an error message. The name of the toolbar here is "Buttons."


'MACRO TO CREATE TOOLBAR IN WORD 6/95 BEGINS HERE

Sub MAIN On Error Goto Warning NewToolbar "Buttons" AddButton "Buttons", 1, 1, "Bold", 0 For button = 1 To 366 AddButton "Buttons", button, 1, "Bold", button Next button SizeToolbar "Buttons", 600 Goto Endmacro Warning: MsgBox "The toolbar already exists.", "Delete Toolbar" Endmacro: End Sub 'MACRO ENDS HERE


'MACRO TO DELETE TOOLBAR IN WORD 6/95 BEGINS HERE
Sub MAIN
On Error Goto Warning
ViewToolbars .Toolbar = "Buttons", .Delete
Goto Endmacro
Warning:
MsgBox "The toolbar does not exist.", "No Such Toolbar"
Endmacro:
End Sub
'MACRO ENDS HERE

Thanks to Frazer Wright for suggesting this topic.

_________________________________________

READERS WRITE

Responding to last week's article on setting Word 2002's tracking format, Keith Soltys wrote:

I was interested to note your macro for setting Word 2002 to mark deleted text as strikethrough. In versions of Word prior to 2002, I've usually set deleted text to be hidden. I was surprised to see that Word 2002 didn't allow you to change the option for this; I guess they really want you to use the balloons, a "feature" that I detest. (They also broke comments; there's a market for an addon to make Word 2002 comments work the same way that Word 2000 did).

However, I did run into a really interesting bug that you might not be aware of. If you are using Word 2000 and have your revision tracking options set so that revision tracking is on and deleted text is shown as hidden, this setting gets carried forward into your Word 2002 document. You can't change it through the interface, only through VBA.

In this case, and if you are not using balloons, you may run into pagination issues. What happens is that in print layout view, Word may insert spurious blank pages when it finds deleted text. Pagination will be OK in normal view, but in print layout you will get any number of blank pages added into your file. It gets even more interesting--if you go to print preview, your file may balloon in size to several thousand pages.

The conditions for this to happen are quite specific. You must have revision tracking set so that deleted text is marked as hidden and revision tracking must be set to Final Showing Markup, and you must be in Print Layout view and not using balloons.

The fix is to use VBA to change how Word shows deleted text from hidden to strikethrough. You can also accept the changes in the file. Or set revision tracking to Final, or use balloons.

I encountered this bug not long after "upgrading" to Word 2002. I posted a message about the problem to the word-pc list and was contacted by someone from Microsoft, who eventually confirmed that it was indeed a bug.

_______________

Adding to Rohn Solecki's technique (explained in last week's newsletter) of using formatting to emulate text on a green-screen computer monitor, Stephen Riley wrote:

I used to do something very similar "back in the day". Another great advantage is being able to cheat and edit the data you have captured.

It's sometimes a heck of a lot easier to do this than to setup meaningful data in whatever application you are documenting.

As an extra snippet this was when I was documenting green screen Unix apps. Screen capture was via a terminal emulator (Reflection?) running on a PC.

For report files, print to .txt file and ftp from server to PC. Similar Style definition tweaked for 132 chars and using a landscape page.

_______________

Mary Eberle sent in a question that some astute reader may be able to answer:

I have been using AutoCorrect in Word 97 a lot lately. I have two approaches to the item that replaces what I type: (1) unformatted and (2) formatted (i.e., including a word or phrase in italics, bold, or something like that).

I just bought a laptop and copied my Normal.dot file onto the laptop. The "formatted" items in the AutoCorrect list copied, but the "unformatted" items did not. Do you know how to make the "unformatted" ones copy as well?

Mary also provided the following tip:

The reason I've been using AutoCorrect so much is that I've found a way to simplify my editing considerably. For example, if the author has used the verb "is" but the verb should be "are," I have an AutoCorrect entry that changes "isz_" (where the _ represents a space--the trigger for AutoCorrect to make the change) to "are"; I place the cursor right after the "is" and then access the AutoCorrect feature with a function key that types "z space backspace" and the "is" toggles to "are." By using the same function key I can toggle "are" back to "is" ("arez" becomes "is"). I have set up numerous such pairs in my original AutoCorrect file. I used "z" because in English it doesn't form many words at the end of a word; if one just uses a space, AutoCorrect jumps in to "help" when it is not wanted.

You may wonder how I'm using a function key to accomplish the "z" thing. Well, I was actually using a key on my programmable X-keys keyboard.

One reason the z_space approach and the X-keys are helping me speed up my editing is that I don't have to take my right hand off the mouse, so I can quickly move to the next thing that needs to be fixed.

Further information: Just typing "z" and then "space" will invoke the "isz to are" or "arez to is" toggle. No backspace or macro is needed. I've been using the programmable X-keys for so long now that I'm not used to just using the regular keyboard. Anyway, I hope that this toggle idea is useful to you.

_______________

Susan Bullowa asked the following questions. Any takers?

1. On rare occasions that I cannot seem to reproduce on my own, a screen tip appears when my cursor hovers over a paragraph (not the same as pressing SHIFT+ F1). The yellow box summarizes all of the formatting information for that paragraph. I love it but cannot seem to get it to appear consistently. Would anyone know what it is?

2. Your recent newsletters on styles that you and other book editors use have been very helpful. I had evolved to creating a template for the freelance work I do for a publisher. The compositor there uses Quark on a Mac. I've tried to make it easy for him to convert my PC Word files (RTF naturally) into Quark. I'd like to make a template for the authors who often do not know how to use styles. Has anyone created a basic template for the poor dears who reformat all of their Normal-style paragraphs manually? A template that also guides them?

Thanks to all for their comments and tips.

_________________________________________

RESOURCES

Some people enjoy creating and making available even more toolbar buttons. Here's one commercial source:

http://www.amfsoftware.com/word/icons.html

And a free one:

http://www.softpile.com/Business/Miscellaneous/Review_01543_index.html

Revision-Tracking Format in Word 2002

Before Word 2002, it was possible to set revision-tracking colors and formatting separately for inserted and deleted text. The procedure was simple:

1. Click Tools / Track Changes / Highlight Changes / Options.

2. Select "Mark" (bold, italic, underline, or double underline) for "Inserted text."

3. Select "Color" (various) for "Inserted text."

4. Select "Mark" (bold, italic, underline, or double underline) for "Deleted text."

5. Select "Color" (various) for "Deleted text."

6. Click the "OK" button.

In Word 2002, however, this feature works only for "Inserted Text." "Deleted text" automatically follows suit, and there seems to be no way to set the two independently. To make matters worse, Strikethrough is no longer among the listed marking options. How annoying! Fortunately, there's a hidden way to overcome these limitations. I've exploited it in the following macro, which you can easily modify to meet your own needs:


Sub SetTrackingFormat()
With Options
.InsertedTextMark = wdInsertedTextMarkUnderline
.InsertedTextColor = wdBlue
.DeletedTextMark = wdDeletedTextMarkStrikeThrough
.DeletedTextColor = wdRed
End With
End Sub

If you don't know how to use macros like that one, you can learn how here.

The macro is currently set to mark insertions as blue text with underline, and to mark deletions as red text with strikethrough. To change this, replace the "Underline" on the end of "wdInsertedTextMarkUnderline" or the "StrikeThrough" on the end of "wdDeletedTextMarkStrikeThrough" with any of the following:

Bold

ColorOnly

DoubleUnderline

Italic

None

StrikeThrough

Underline

Then replace "wdBlue" or "wdRed" with any of the following:

wdBlack

wdBlue

wdBrightGreen

wdByAuthor

wdDarkBlue

wdDarkRed

wdDarkYellow

wdGray25

wdGray50

wdGreen

wdNoHighlight

wdPink

wdRed

wdTeal

wdTurquoise

wdViolet

wdWhite

wdYellow

Then run the macro (Tools / Macro / Macros). Hah, hah! Once again Microsoft Word must bend to your will!

_________________________________________

READERS WRITE

Readers have sent so many great tips and comments that it's taking a while to go through them all. They'll be appearing in the newsletter over the next few weeks. Today's issue makes a good start, however. Many thanks to Bill Rubidge, Rohn Solecki, and Rebecca Evans for their terrific comments and tips.

Referring to the December 18, 2002, issue of Editorium Update, which featured styles and style lists from readers, Bill Rubidge (wbr@aya.yale.edu) wrote:

Eric Fletcher explains that he uses an "Editorial Note" style. We use something similar, but the style is called "Open Issue". (Actually, the name has a prefix, so that all the styles we use are sorted together in the list and distinguishable from styles that may come from other templates or users). The style highlights items with color, as Eric's does, but we do one thing more.

At the end of our documents, we insert a page break and then type a title "Open Issues". Below that, we generate a TOC based only the Open Issue style (not any headings--TOC field {TOC t "wbrOpenIssue,1"}). This gives us a complete list of these open issues for the entire document, to ensure that none are overlooked.

By the way, we also insert these Open Issue paragraphs (which are sometimes just queries) ABOVE the item in question, and the Open Issue style has the paragraph set to "keep with next". This helps make the page number refs in the Open Issue TOC more accurate.

If you really want to get complicated, on multi-file projects (we deal with about 40 files per book), it may be easier to just extract the open issues from the file and put them into another document. For now, I just do this using the open issue TOC at the end of each file, but have a macro that copies it (fields unlinked) to the clipboard and then opens up our Open Issue file (in Excel, for easier sorting). Based on posts in the Word PC listserve, I think involving Maggie Seneca, I think you could also harvest all the Open Issue items in the file and automatically write them to another file (rather than the manual paste we're using).

You might refer to the macro that Bryan and Pieter helped Eve Golden with, back in the Daily Word Tips list. I think the last posts about it were from November 20. That macro searches for text highlighted in a certain way, and copies all that text and appends it to a separate file.

_______________

Rohn Solecki wrote:

I also have a favorite style you might want to pass on. Although it may not be useful to the publishing industry, it is handy for internal documentation in companies that still use "green screen" computer terminals. Green screen terminals are the old style fixed pitch font, by default 24 line by 80 character displays (but optionally up to 27 lines by 132 characters).

Rather than doing a graphic screen capture I do a Edit / Select All, Edit / Copy to capture the text, paste to Word, then apply my "Screen Print" paragraph style to reasonably simulate the appearance of text on the computer terminal. This style has 3 main advantages over pasting a graphic screen capture:

* It uses orders of magnitude less space, which is important if you have lots of screens to capture.

* It is editable, so if something on screen changes you don't have redo the capture.

* Since it is editable, it is easy to apply character formatting like highlighter or font colors to highlight specific sections (without having to use a separate graphics program).

Details of Screen Print Paragraph Style:

* Paragraph Formatting - Flush Left, Keep with Next, Keep lines together, Border: box (single line), Shading: 5%, Indent: Hanging 0.25 Right 0", Widow and Orphan Control. Font Formatting - Courier, 10 pt, Condensed 0.5 pt.

Reasons for choices:

* The Box Border and 5% Shading simulate the look of the screen.

* Keep Lines together and Keep with next ensure that the whole screen capture stays on same page.

* Hanging indent is optional if a line wraps for some reason, for example, capturing from a 132-character display.

* Courier is fixed pitch so characters line up as they did on screen.

* 10 pt Condensed 0.5pt so that an 80-character line will fit on a page with reasonable margins (less than the default 1.5" both sides) without wrapping.

_______________

Rebecca Evans (evansreb@earthlink.net) wrote:

I have been designing and typesetting books for a living since 1976. Being able to use style tags in today's programs is certainly a blessing compared to keeping a spec sheet beside you so you can hand key specs as you re-type a book from a typemarked manuscript.

My comment on the style naming issue is that I have found I do not need list tags that add space after the list (NL End), just the tag to begin the list and for the interior paragraphs. All I need after lists, boxes, and the like, are two Body Text tags with added space above them, one with a paragraph indent and one without, because any paragraph style other than Body Text--heads, extracts, boxes, summaries, other lists--already includes space above.

Of course this assumes that spacing is consistent within a design so that you don't have +12' below a BL and +6' below an NL. And, I realize this may not be applicable to documents other than books. However, in my experience with textbooks, I have found those two extra Body Text styles to be all the "exit" styles I need.

On another note, I use two character style names because that lets me reduce the width of the style tag window (I use Ventura Publisher and keep the style list docked and open on screen), leaving more screen width to display page spreads. This is not an issue if you use a style drop down menu but I thought I'd throw in my two cents on that one too.

I responded, "Not being a Ventura user myself, I'd like to know why Ventura users want to tag Word files before bringing them into Ventura. Won't Ventura import RTF files? Any light you could shed on that subject for me?"

Rebecca replied:

Ventura does import RTF files--it will even File:Open RTF files and build copies of all the Styles as closely as possible to how they are in Word. Irrespective of that, you elucidated the reasons for using raw codes very well in your recent essay.

Most books are Styled erratically by the author and there is usually so much junk left in text files that it's easier to clean up the text if you can see the raw codes. Much of what I clean up is taken care of by EKTPlus but I still like to see exactly what I'm importing before I import it.

Also, an author's Styles, even if perfectly applied, never match the design of the typeset book. It is far easier for me to type codes than to drop down the Style list and click each one. Assign Styles to buttons takes a long time and would be almost as much work to use as dropping down the style list.

I use XyWrite for coding text files because I can drop in coding with short-cut keys, which are incredibly easy to assign in XyWrite: no menus, just select the text, press F2, press the key you want to use for that shortcut (any key), then press F3 to deselect the text. Then it's just ALT+"that key" to insert the text. You can keep reassigning new text to your shortcut keys as you work.

XyWrite also has macro-scripting capabilities that let me build S&R tables for almost anything. I keep the S&R table open in a separate window while I work so I can change/add entries in it as I go along.

Unfortunately, XyWrite is ASCII and everything else in the world (seemingly) is ANSI so I've recently been converting over to coding in Word. Assigning and using shortcut keys is more of a process in Word because alphanumeric keys are used for Word function shortcuts.

I should tell you that XyWrite is an older program used mostly by programming types now. XyWrite is DOS-based so I don't know if it will even run under Windows XP. It's an old friend for me but someone trying to learn it today probably wouldn't know what to do with the command line at the top of the screen (very useful if you know DOS commands) and would have to adjust to using function keys rather than the CTRL/ALT keys to execute commands.

There are folks out there who write scripts for converting Word coding to Ventura--Allan Shearer in Canada comes to mind--but your programs are so well executed and beautifully interfaced that it's worth paying for them even if the same functions are available free from other sources.

_________________________________________

RESOURCES

RMIT University has an excellent collection of links related to editing and publishing:

http://www.rmit.edu.au/links/publish.htm

Wildcard Dictionary Entries

Some weeks ago I suggested the need for a "wildcard dictionary" and asked readers to send in their contributions. You can read that article here:

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

I heard from Rosalie Wells, Hilary Powers, Eric Fletcher, Allene Goforth, Michael Coleman, and Steve Hudson, who sent some great wildcard strings and commentary on their use. Many thanks to them, and, if I missed anyone, many apologies.

You can learn more about finding and replacing with wildcards in these back issues of Editorium Update:

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

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

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

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

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

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

And now, the wildcard dictionary entries! (Before using any of these in the real world, be sure to try them on some test documents to make sure they will do what you need. You should do that with any wildcard string, of course.)

___________________________________

ROSALIE WELLS wrote:

I use this one all the time in my translations into Spanish to change the decimal separator "period" to a "comma" separator as required for many Spanish-speaking countries:

Find what: ([0-9]).([0-9])

Replace with: 1,2

___________________________________

HILARY POWERS wrote:

I tend to design strings from scratch when needed, but here are a couple that I use often enough to more or less remember them:

.([A-Z])|. 1

opens up initials on reference lists; requires fixing things like U.S. and N.Y. after

([0-9]). |^t1.^t

indents hand-typed list numbers

[!.]^013 - review one by one and add periods by hand where needed. There's a way of scanning for more end-sentence punctuation and doing the change automatically, but I'm usually too lazy to look it up and this is what I remember. A complete punctuation scan would be quite welcome. . . .

It'd be a good idea to emphasize that the Wildcard and Revision Tracking features do bad things to each other, at least in Word 97. Some simple replaces will work with tracking on, but it's hard to predict which ones are safe and which ones will scramble the new info. Before running any wildcard replace operation, it's best to save the file and then turn the tracking off. Run the replace, check to see if it worked, then TURN THE TRACKING BACK ON.

___________________________________

ERIC FLETCHER wrote:

I have my favourites in various Word files I seem to never get around to consolidating. But here are a few I found without having to look very hard:

DESCRIPTION: Finding a telephone number formatted as 123-4567.

FIND WHAT: ([0-9]{3})(-)([0-9]{4})

REPLACE WITH:

KEY WORDS: Telephone number

BEFORE:

AFTER:

COMMENTS: This is handy for doing a quick review of phone numbers. In Word 2002, you can choose to select all occurrences so you can see them easily in context.

DESCRIPTION: Changing telephone numbers formatted as (123) 456-7890 or (123)456-7890 to 123-456-7890.

FIND WHAT: ([(])([0-9]{3})([)])(*)([0-9]{3})(-)([0-9]{4})

REPLACE WITH: 2-567

KEY WORDS: Telephone number

BEFORE: Telephone numbers formatted as (123) 456-7890 or (123)456-7890.

AFTER: Telephone numbers formatted as 123-456-7890 or 123-456-7890.

COMMENTS: Note that the (*) looks after catching situations where there may or may not be a space after the area code portion.

DESCRIPTION: Find formatted text and change it to use HTML codes.

FIND WHAT: Font=Italic

REPLACE WITH: ^&

KEY WORDS: Italic, HTML, formatting

BEFORE: Change the italicized words to use HTML codes.

AFTER: Change the italicized words to use HTML codes.

COMMENTS: If you include Font=Not italic in the Replace with, the italics will be removed as well. Use variations of this for any formatting and other HTML codes.

DESCRIPTION: Find text coded with HTML and change it to Word formatting.

FIND WHAT: ()(*)()

REPLACE WITH: 2 Font=Italic

KEY WORDS: HTML, italic, formatting

BEFORE: Change the italicized words to regular Word formatting.

AFTER: Change the italicized words to regular Word formatting.

COMMENTS: Use variations of this for any formatting and other HTML codes.

___________________________________

ALLENE GOFORTH wrote:

Here are five of my wildcard routines. I use more than those, but some are specific to various publishers, and others are of the half-baked variety.

DESCRIPTION: In APA-style references lists, find volume numbers in roman and change them to italic. Retain the issue numbers in roman.

FIND WHAT: , [0-9]{1,}

REPLACE WITH: [nothing]; change font to italic

KEY WORDS: APA, references, volume numbers

BEFORE: Developmental Neurobiology, 13(2)

AFTER: Developmental Neurobiology, 13(2)

COMMENT: Find string includes a space between the first comma and the bracket.

DESCRIPTION: In APA-style references lists, find issue numbers in italics and change to roman.

FIND WHAT: ([0-9]@)

REPLACE WITH: [nothing]; change format to roman

KEY WORDS: APA, references, issue numbers

BEFORE: Developmental Neurobiology, 13(2)

AFTER: Developmental Neurobiology, 13(2)

DESCRIPTION: In APA-style references lists, find initials in names that need a space inserted after the period.

FIND WHAT: ([A-Z].[!A-Z])

REPLACE WITH: 1

KEYWORDS: APA, references, initials

BEFORE: Brown, A.C.

AFTER: Brown, A. C.

COMMENTS: A space is needed at the beginning of the Replace string.

DESCRIPTION: In APA-style references lists, find name strings containing "&" that need commas inserted before the "&."

FIND WHAT: ( [&])

REPLACE WITH: ,1

KEY WORDS: APA, references, &, comma

BEFORE: Smith, A. B. & Gordon, D. J.

AFTER: Smith, A. B., & Gordon, D. J.

COMMENTS: In the Find string, there is a space between the opening parenthesis and the bracket.

DESCRIPTION: Find and close up space between journal volume number and issue number in APA-style references lists.

FIND WHAT: (([0-9]@))

REPLACE WITH: 1

KEY WORDS: APA, references, space, volume, issue

BEFORE: 45 (3)

AFTER: 45(3)

COMMENTS: In the Find string there should be a space before the opening parenthesis. There should not be a space before the first character in the Replace string.

___________________________________

MICHAEL COLEMAN wrote:

Right now I'm working on an index. There's not a lot of work to be done, but it was exported from Quark to Word, so all the formatting was stripped. (If there's a way to avoid that, I'd love to learn about it.) So I set styles for the four levels. Simple enough. The only other trick is to get back all of the italics. There are a few titles that need to be italicized, and fortunately I know that they all have names with at least three words, so I searched for a string

[A-Z]([a-z]@) [A-Z]([a-z]@) [A-Z]

I didn't make any automatic changes because several titles fit the string but don't get italicized.

We used to have a lot of tables, figures, and exhibits in our books, but now they're all called figures. In the index, the appropriate first letter--t, f, or e--appeared in italics after the page number, such as 11-11e. (We use chapter-page pagination.) So I searched for

([0-9])[e,f,t]

I set the replace string to italic and replaced with

1f

Then I searched for ([0-9]) formatted as italic and changed it back to roman using 1.

Our old style was to use en dashes to show a range of pages, but that was hard to read because of the hyphens in the chapter-page pagination format. So we changed it to "to." I therefore searched for

^=([0-9])

And replaced it with

to 1

___________________________________

STEVE HUDSON wrote:

Remove Time stamping from most logs:

F: [[]*[]]

R: nothing

Kill excessive blank paras

F: ^p^p^p

R: ^p^p

Locate some passive voice instances

Find: be <*ed>

Convert a list of Firstname Lastname to Initial. Lastname

Find <(?)(*)> <(*)>

Replace 1. 3

Find manually formatted numbering (hand tweak)

F: [0-9]@.^t

R: Pass 1 List style, pass 2, nil.

Straight Quotes to Curly Quotes

To turn curlies to straight:

1. Turn off the Autocorrect

2. Go to your find and replace dialog and replace " with ".

Sharon Key wrote asking why, after selecting smart quotes, her find and replace of quotes with themselves didn't work to trigger the replacement from straight to curly. Yes, your FnR (find and replace) is NOT triggering the smart quote function. To do that it needs something before or after the quote to help the smart quote system dope it out. It's actually triggered by an "end of word" condition. So to replace straight quotes with curly quotes, use these FnR's with Wildcards enabled (select More and then look at options near the lower left)

Find: "(<*>)

Replace: "1

Find: ([! ])"

Replace: 1"

Both formulae use the () to force capture of that segment to be referred to in the replace section as 1 (or whatever left -> right position it holds if there are multiple bracketed entries).

The first finds quotes followed by a word ( a < is a start of a word, * is anything, a > is the end of a word), and replaces the quote with the word (now referred to as 1 from being bracketed) after it. You can't use that same trick for the second, as it selects the whole string of words afore it, and the smart quote feature is confused as the last typed character was in a range. So, we find any non blank character followed by a quote, and replace the single character and the quote. This will take care of most of your problems.

FnR CheatSheet

?= Any 1 character

*=Any string of characters

@ any number of repeats of the previous character

<=the beginning of a word

=the end of a word

{n}=n repeats of the previous char

{n,}=at least n repeats

{n-m}= between n and m repeats

[ ] marks a set of characters. A - used inside this means an ascending range between the two hyphenated characters. A !, only valid at the set's start, means 'any character except'.

() groups the expressions and indicates the order of evaluation. It is used with the n wildcard to rearrange expressions. The result of the 1st () pair is represented by 1, the next pair 2 and so on.

The easiest way is to use a special character as a literal, e.g. to find a bracket character, use ASCII code 40 instead. ASCII codes are specified in ANY sort of search with the caret ^.

= ^92

(=^40

)=^41

?=^63

{=^123

}=^125

[=^91

]=^93

@=^64

<=^60

=^62

*=^42

^=^94

To find some relevant information in Word's help file, Contents > Editing and Sorting text > Finding and Replacing Text. A few links later you can get some wildcard information.

10{1,3} finds "10", "100", and "1000".

[10]@ finds any binary number

<[a-zA-Z]{1,3}> finds words of three letters or less.

<[A-Z][a-z]@> finds any title-cased word.

<[0-9]@> finds any whole number, <[0-9]{1,3}> from 0-999

Find: <([0-9]@[/.-])([0-9]@[/.-])([0-9]@>)

Replace with: 2 1 3

Changes all numeric dates from DD/MM/YY(YY) to MM/DD/YY(YY) and back again.

_________________________________________

READERS WRITE

Readers have sent so many great tips and comments that it's taking a while to go through them all. They'll be appearing in the newsletter over the next few weeks. Thanks for your patience.

_________________________________________

RESOURCES

There's an excellent explanation of how to find and replace with wildcards at the Microsoft Word MVP site:

http://www.mvps.org/word/FAQs/General/UsingWildcards.htm