Program and documentation are Copyright (c) September 1988 by Randall D. Jones
Macro Translator (MT) was written to overcome WP5.0's inability to print macro files. MT reads the macro file indicated on the command line and writes a WP5.0 document file containing the image of the macro as it would appear on WP5.0's internal macro editor screen.
The Input ---
MT expects to be directed to a WP5.0 macro file. When specifying the macro file on the command line, the ".WPM" filename extension may be omitted (example: "MACRO.WPM" will be dumped if "MACRO" is specified). If you wish to translate a macro with other than the default extension, include it when entering the filename; to force a blank extension, include the dot (example: "MACRO.").
The input file named on the command line will be located using the method WP5.0 uses. If the input filespec includes path information, the specified directory is checked. If no path information is included in
the input filespec, the Keyboard/Macro directory specified in your Setup is checked; if no Keyboard/Macro directory is listed, the "current" directory is checked. If the input file is not found in whichever directory is chosen using the above rules, the WP system directory is checked for a file with the specified name.
The Output ---
MT creates a WP5.0 document. To use MT's output, name the file on WP5.0's command line or Retrieve it. It is not an ASCII text file. No printer-dependent information is included in the file.
The first line of the macro translation shows the macro's file name in the form used to open the file, therefore it may include more path information than you specify on the command line. The second line shows the macro's "description" text, as entered when creating the macro or as shown on the macro editor screen. The third line is blank. The text showing the macro's contents, as shown on the WP5.0 internal macro editor screen, begins on the fourth line of the translation.
If an append is requested ("-a" on the command line), MT will insert a [HPg] before appending the translation from the new run. If a macro is more than one page in length, WP5.0 will insert [SPg]'s where necessary; MT does not attempt to do pagination other than between appended translations.
MT uses "hard spaces" within macro elements to prevent WP5.0 from wrapping the text in the middle of an element. Since this use of hard spaces could cause very long continuous strings, MT inserts [ISRt] codes in strings of macro elements to prevent WP5.0 from hacking lines with [DSRt]'s.
The Tabs ---
Tabs are a problem. On an empty line in WP5.0's internal macro editor, entering a tab will move the cursor from column one to column five, and subsequent tabs move the cursor in three-column intervals, giving settings of 1,5,8,11, etc.
An idiosyncrasy of the macro editor is that tabs move the cursor a minimum of two columns. If the macro editor is waiting for the character to place in column 7 and a tab is entered, word processors have trained us to expect that the tab would occupy column 7 and that the cursor would advance to the tab stop at column 8. Unfortunately, in this example, the cursor would skip past column 8 and stop at column 11.
The document created by MT can be printed in any of the fonts supported by any of the printers supported by WP5.0. That in itself precludes MT's assigning tab stops due to differing font widths, but the "two- column tab" effect compounds the problem. You will need to experiment with this on your own.