■ Purpose
This macro (included in the download QC.ZIP file above) -
- converts existing regular ("straight") double or single quote marks
to typographical quote marks (a.k.a. smart quotes or curly quotes)
- or the opposite: it
converts existing typographical quote
marks to regular quote marks.
Tips
WordPerfect's
Tools, QuickCorrect, SmartQuotes options — if
enabled — can automatically convert existing regular
("straight") double or single quote marks to typographical quote marks by simply finding and replacing them. Here's how.
1. Use Edit, Find and Replace
and insert the same regular double marks in the "Find:" and "Replace with:" fields
using your keyboard (i.e., do not insert WordPerfect symbols for these
items).
2. Then, with the cursor at the top of the document, click Replace
All.
3. Repeat 1 and 2 using regular single quote marks.
There's no need for a macro with this method, but you may prefer to
use the Convert quote marks macro instead for its convenience and added
functions.
■
Instructions
Once the Convert quote marks.wcm macro file is located in either your
default or supplemental macro folder (as shown in Tools, Settings,
Files, Merge/Macro) you can just play it with Tools, Macro, Play. (If you need detailed instructions about locating such custom macros, see here.)
A menu pops up to let you choose which
conversion type, where to start converting, etc.
■ Notes, cautions, and suggestions
• If text is selected before you play the
macro, it will convert just the quote marks that are inside the selected
text.
• The macro takes advantage of
WordPerfect's Tools, QuickCorrect, SmartQuotes feature to convert the quote
marks to those that you have previously specified on the SmartQuotes tab. [Advanced users: See the macro's code for the technique.]
• You can set default values for the
macro's menu at the top of the macro code.
• You can assign any macro to a menu,
toolbar button, or keyboard shortcut ("hot key"). See here.
• As with using WordPerfect's native SmartQuotes feature (i.e., Tools, QuickCorrect, SmartQuotes), an option (check box) on the Convert
quote markks.wcm macro's menu lets you
use regular [i.e., straight] quote marks after numbers (e.g., 10'5").
CAUTION: Be aware that the program's native SmartQuotes setting for the "...quote marks after numbers" setting will be left On after the macro plays if you choose that option with the checkbox on the Convert
quote markks.wcm macro's menu.
Reason: Currently there is no way in the PerfectScript macro language to detect the initial
state
of that specific WordPerfect setting and change it back to that state
when the macro is finished. In other words, it will ignore your
preference for the setting. So you might want to manually turn it Off later (if desired) with Tools, QuickCorrect, SmartQuotes if you used the this macro with the option enabled.
Suggestion: The need to quickly
restore the use of typographical quotes when typing in regular documents after editing a macro file is another reason why you might want to use the QC.wcm
macro above, personalized to your needs. You can then restore this and
any other QuickCorrect/QuickWords settings to your preferences with a
mouse click.
Related CAUTION: If you (or the macro) have turned (or left) On
the "use regular quote marks after numbers" setting in WordPerfect's
SmartQuotes section, that setting will also use regular, straight quote marks if they are typed immediately after a numeric date (e.g.: ...the year was 2006"...) instead of typographical marks even when the first two SmartQuotes settings are turned On.
Suggestion: While this issue of straight quote marks following date numerals is generally not
desirable when using typographical marks for quotes elsewhere in the
document, the program doesn't know that, so more caution is advised
when turning this specific option On (or leaving it On) when editing
such documents. [Or see the next suggestion.]
Suggestion:
If straight quote marks are needed when typing certain numbers (e.g.,
to indicate feet, inches, etc.) you can simply use WordPerfect symbols
(shortcut key: Ctrl+W) as needed to insert a double (") or single quote
('). These straight quote mark symbols are found at the top of the ASCII set
in the Symbols dialog (0,34 and 0,39).
[Tips:
You can use shortcut keys to insert the symbols: press
Ctrl+W, then press 3 keystroke in sequence: 034 or 039, then press
Enter.
These symbols can also be accessed with a mouse more
quickly if they were recently used by adding the "Symbols MRU" button
on a toolbar (it is found under the Insert feature category on the
Toolbar Editor; see here for details on creating new buttons on a toolbar and to start (launch) a WordPerfect feature with them.]
Tip: There's a macro by Marc-André Roberge, a senior member on WordPerfect Universe (WPU) that might help in these situations: See "A macro to fix straight or curly quotation marks after numbers". (I have not extensively tested it, but it's fairly popular with WPU members.)
• Advanced users: If you have edited a
macro file
during the session the macro editor will turn SmartQuotes Off — and
they may remain off even after rebooting. If you then use quote
marks you may find that you are entering straight, non-typographical
quote marks into the current document instead of typographical quotes!
This is by
design since macro code requires regular quote marks wherever quote
marks are used in macro commands. And the program doesn't know if you
need to return to the open macro document during the session so it
leaves the SmartQuotes settings off.
Suggestion: If this happens — especially after typing significant amounts of text — you can use the QC.wcm macro above to turn SmartQuotes (and other optional QuickCorrect
settings) back on, then play Convert
quote marks.wcm to convert all regular quote marks that you typed into
typographical quotes.
|