Home | Tips | Library | Other Authors | Other WP Sites | Writer's Links | Contact | Site Map | Donate |
![]() Toolbox for WordPerfect |
|
Macros, tips, and templates for Corel®
WordPerfect® for Windows® © Copyright 1996-2024 by Barry MacDonnell. All Rights Reserved. |
Page updated Jun 30, 2024 |
Overstrike (a.k.a. "overtype"; "type over") a block of text characters with any character or symbol | ||
Note WordPerfect menu choices refer to the <WordPerfect> menu (right-click on the top menu bar for a choice of menus). If you use a <Microsoft Word> menu, the choices might be absent from your menu (but not from the program), or they might be found under another menu selection. See here for more. |
Note The Overstrike feature (Format, Typesetting, Overstrike) demonstrated by this macro can also be used manually to create new characters (overbars, dotted characters, etc.). See the Tips section below. Purpose This small macro overstrikes every character
in a selection of text, similar to the WordPerfect
Format, Font, Strikeout function, but with the option of using any
character or symbol as the overstrike character. It also can overstrike
many blocks of text at once, not just single characters. See this sample screen shot after using a slash mark on the keyboard as the overstrike character. Tips ☼ To overstrike a single character and insert it at the cursor location when needed, you can simply use WordPerfect's built-in function: Format, Typesetting, Overstrike. [See an example in the tip below that uses a horizontal bar above a character.] You can turn the result into a QuickWord for easy access in the future. ☼ To overstrike a frequently needed
character and immediately insert it at the cursor location, you can write a one-line macro. Important note about using Overstrike numerals in tables ... Using overstrike numerals -- such as a slash zero -- in a WordPerfect table will prevent them from being
calculated correctly, since they are format codes and not true numbers. However ... a slash zero can also be inserted simply by using the standard Windows monospaced font Consolas (included with Windows since Windows Vista: see Wikipedia here for more). Instructions Download the macro and place it on your
system. See the left sidebar for the download link and also the
"Downloading..." instructions (if you need help). Play the macro (Tools, Macro, Play). A small dialog opens to let you choose the overstrike character or symbol (use Ctrl+W to access symbols to insert in the dialog). Notes ¤ The macro first deletes all
underlying characters in the selected block of text and then replaces
them with a code (i.e., with WordPerfect's Overstrike code
(Format, Typesetting, Overstrike)). As noted, it can overstrike
many blocks of text at once, not just single characters; however, a
whole document might take a few seconds or a minute or two to process
(you should see its progress in the WordPerfect status bar.)
¤ The overstrike code displays as the original character with the overstrike character or symbol superimposed on it. [Sample screen shot.] ¤ Also, any bookmarks inside the selection are moved outside it. This should let you delete the selection without deleting the bookmark. (Use Reveal Codes to be sure.) ¤ You can usually undo any changes to your document with Edit>Undo or Ctrl+Z. ¤ You can also save the changed document under a different name to preserve your original. (Recommended.) ¤ See also Redactor, which can "block out" text. Tips ☼ Slashes ("/"), pipes ("|"), or asterisks
("*") as overstrike characters help reveal the text underneath. (If you
really want to obliterate the underlying text in a printout, use Redactor.)
Some characters (e.g., slash;
pipe) do a better job of maintaining the original length of the
selected text when using proportional fonts.
Also experiment with WordPerfect symbols as overstrike characters, which can be entered in the dialog with <Ctrl+W>. For example:
• Symbol 3,19 in the Box Drawing set might make a good replacement for an equals sign ("=") since it doesn't seem to leave gaps between each character, but it does stretch the selection of text a bit. • Symbol 6,231 in the Math/Scientific set is a double slash symbol ("//") and often does a good job in both striking out the text so it is still readable and maintaining the length of the selected text. [See this sample screen shot after using the double slash mark symbol as the overstrike character.] ☼ To modify the macro, open it like any other document (or use Tools, Macro, Edit). See the redlined comments in the macro's code to (1) change the default overstrike character or symbol; (2) remove the dialog to speed operation; or (3) remove the informational message that appears at the end of processing. You can also add redline or other text attributes to the over-struck stext. ☼ Need to create a horizontal bar symbol (an "over bar" or "overline") or other symbol over a single letter, such as an "X-bar"? Use WordPerfect's built-in Overstrike feature. • Click Format, Typesetting, Overstrike and type the letter in the field (e.g., "x").
• Then press <Ctrl+W>. Look for symbol 1,21 and choose it. • Click Insert & Close, then OK. The symbol should appear in your document, something like this: ![]() Note that you can double-click on the [OvrStk] code later in Reveal Codes to edit these items. In Reveal Codes you'll see an [Ovrstk] code which can be selected and turned into a QuickWord for easy access later. Related tips: ☼ For another method to create a horizontal bar over more than one letter, see "Continuous Overbar on Multiple Characters" in this thread on WordPerfect Universe. ☼ Using the WordPerfect Overstrike feature you can also apply some text format codes (bold, superscript, Large, etc.) with the Codes button on the Overstrike dialog. (These are paired "On/Off" codes.) This might be useful to emphasize, elevate, or depress the symbol in a vertical relation to the letter. For example, to put a small right arrow symbol above a letter: • Click Format, Typesetting, Overstrike and type the letter in the field (e.g., "x"). • Optionally click the Codes button on the Overstrike dialog and choose (e.g.) Bold. Repeat this step for other attributes such as Large and Superscript. • Then press <Ctrl+W>. Look for the arrow symbol 6,21 and choose it. [It should appear between any optional "On" format codes and "Off" format codes.] • Click Insert & Close, then OK. Here's a screen shot of the result. Note that you can double-click on the [OvrStk] code later in Reveal Codes to edit these items. In Reveal Codes you'll see an [Ovrstk] code which can be selected and turned into a QuickWord for easy access later. ☼ How about creating a character underneath another character? For example, you can put a period (full stop) underneath a selected letter with a small macro. See my posts in this WordPerfect Universe thread entitled "dotting".
☼ Need to create check boxes? See here.
☼ Alternative to the Overstrike feature: Instead of over-striking a character, you could use WordPerfect's Typesetting, Advance feature to physically move (i.e., Advance) the over-strike character(s) location on the page -- left, right, up and/or down in relation to the target character. Then reverse the Advance measurement(s) to compensate for the first movement(s). For example, here's a small, plain-text macro (posted on WordPerfect Universe thread here) that uses this method (i.e., not Overstrike) to produce a nuclear notation. ("This is a chemical symbol with both a superscript and a subscript to the left of the chemical symbol. Shown at https://en.wikipedia.org/wiki/Isotope#Notation.")
The method used in the macro types several characters at different positions relative to the target character, but the general technique can also be used to type a character symbol (from the Insert, Symbol sets). at a different position, similar to using an overstrike. // PURPOSE: Types a nuclear notation at the cursor location.
// NOTE: You might need to adjust the measurement values // to your preference, depending on the font type and font size // in effect at the cursor location. OnCancel(EndNN@) // Note that each of these 3 GetString() commands is on // its own line in the macro code - GetString(vMassNumber; "Enter the Mass number:"; "Nuclear Notation") GetString(vAtomicNumber; "Enter the Atomic number:"; "Nuclear Notation") GetString(vIsotope; "Enter the Isotope symbol (e.g., C):"; "Nuclear Notation") // Create the nuclear notation - AttributePosition(Superscript!) Type(vMassNumber) PosCharNext Advance(Where: Left!; Amount: 0.08") Advance(Where: Down!; Amount: 0.03") AttributePosition(Subscript!) Type(vAtomicNumber) PosCharNext Advance(Where: Right!; Amount: 0.05") Advance(Where: Up!; Amount: 0.03") Type(vIsotope) Label(EndNN@) Return |
|