27.1.1.2 Understanding where you can define named macros
You can put Mif2Go macro definitions in any of the following places:
• toward the end of a configuration file (or configuration template), before any [MacroVariables] section
• individually in separate macro files (see §27.1.6 Storing a macro definition in a separate file)
• in a macro library file (see §27.1.7 Including macro definitions in a library).
The relative order in which macro definitions appear is not important; what matters is the order in which they are invoked (see §27.1.2 Invoking a macro).
Do not end a file with a macro
Do not put a macro at the very end of a configuration file or library file. If you have no macro variables to define, and no [MacroVariables] section, end the file with a dummy section; for example:
Do not include macro definitions in a configuration template (see §32.2.1 Deciding what to include in a configuration template).
Put complex macros in a separate file
If you create lengthy macros (for example, with a lot of conditional expressions), and you indent the code for readability, put the macros in a library file separate from the configuration file; or put each macro in its own macroname.txt file. That way the indentation is preserved. When Mif2Go updates the main configuration file as a consequence of changes you make to Export options, Windows rewrites the file, and deletes all leading spaces in the settings.
Do not put Mif2Go macro definitions on the HTML reference page in your FrameMaker document; Mif2Go does not look there. |
> 27 Working with Mif2Go macros > 27.1 Defining and invoking macros > 27.1.1 Defining macros > 27.1.1.2 Understanding where you can define named macros
