28.1.1.8 Obtaining RTF code for macro definitions
RTF coding is arcane, especially for tables. Unless you are an RTF expert, your best bet might be to copy existing RTF code. Here are some ways to obtain RTF code for your macros:
Generate RTF code with Mif2Go.
You can pretty-print RTF output from Word to mine for code (if you open a Word RTF file directly in a text editor, you see only unbroken lines of unreadable code):
1. In Word, create an example of the output you want.
3. At a Windows command prompt, run pretty-printer program pprtf.exe on the saved RTF. The pprtf.exe program is included in your Mif2Go distribution directory.
The RTF pretty-printer, pprtf.exe, takes either one or two arguments:
• the name of the RTF file, with extension
• optionally, a different name for the output file, with extension
pprtf ExampleFile.rtf NewFile.txt
If you omit the second argument, the output is a file of the same name as the RTF file, but with extension .txt.
Another way to obtain RTF code is to create an example in FrameMaker, run Mif2Go, and then copy/paste the resulting RTF code into your m2rtf.ini configuration file or into a macro library file. Mif2Go produces RTF output that is even more readable than the output from pprtf.exe.
For paragraphs, you can use CodeStore to generate RTF code; see §28.3.7.2 Inserting code with the CodeStore property.
> 28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.8 Obtaining RTF code for macro definitions