Nisus Software, Inc.

NOTE: this software is for Classic Mac OS (eg: OS 9) and cannot be used on Mac OS X.
Nisus Writer Classic is no longer for sale. This page is only for archival purposes.

Final Details Macro


You may remember Ben Hurmak who left Nisus Software to work in the academic world. We recently heard from him. He's been doing some collaborative work with colleagues who send him files produced in other word processors and sometimes they have both "Smart" and "Dumb" quotes in their documents. Ben has a quick and easy way to clean up their mess before he prints the document so that people can read it. (BTW, he also does this with email messages he gets to make them more readable.)

Yes, friends, Nisus Writer can clean up your documents for you automatically. Once you've learned how to do those fancy Find/Replace operations you can amaze your colleagues and perhaps, even, make friends and influence people. Nisus Writer enables you to line up those various Find/Replace expressions one after another. Those little Find/Replace commands you can consider "micro". Put them together and you have a "macro". Set this macro loose and have it work its magic on a file, one task after another, as you get your favorite cup of java.

This following macro performs a variety of final cleanup tasks. Feel free to copy all of the following and paste it into a new macro command (called Final Details). Those funny slash characters tell the macro tool to ignore what follows and treat it as comments, not commands.


//This first section replaces almost all (exceptions noted below) single
//and double quotes with "Smart Quotes." It does not replace a single quote
//following a digit (feet designator) and two single quotes at the end of a
//digit (inches designator).
//Replace double quotes preceded by a space, a return, tab,
//left parenthesis, brace or bracket, with smart opening quotes.
//(Because The Web can't display the smart open quote character
//easily, you need to change the red character in the following
//line to the "smart open quote" character.)
Find/Replace ":<[\s\r\t([{]""" """ "a-wAgt"
//Replace all remaining double quotes with smart closing quotes.
//(Because The Web can't display the smart open quote character
//easily, you need to change the red character in the following
//line to the "smart closed quote" character.)
Find/Replace """" """ "a-wAgt"
//(Because The Web can't display the smart open quote character
//easily, you need to change the red character in the following
//line to the "smart open single quote" character.)
//The same for single opening quotes.
Find/Replace ":<[ \r\t([{]'" "'" "a-wAgt"
//Replace closing quotes which are not preceded by a digit or another single quote with closing single quote.
//(Because The Web can't display the smart open quote character
//easily, you need to change the red character in the following
//line to the "smart closing single quote" character.)
//The same for single closing quotes.
Find/Replace ":<[^'0-9]\>'" "'" "a-wAgt"
//(Because The Web can't display the smart open quote character
//easily, you need to change the red character in the following
//line to the "smart closing single quote" character.)
//The remaining single quotes not preceded by a digit must be apostrophes.
Find/Replace ":<[^'0-9]':>[^']" "'" "a-wAgt"



To the FAQ (Frequently Asked Questions).
To the Tips Table of Contents.