Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.2 Understanding where you can define named macros


28.1.1.2 Understanding where you can define named macros

You can put Mif2Go macro definitions in any of the following places:

Best place: in a macro library file; see §28.2 Accessing Mif2Go macro libraries.

If large or complex: individually in separate macro files; see §28.2.3 Storing a macro definition in a separate file.

Otherwise: toward the end of your project configuration file, before any [MacroVariables] section.

Order does not matter

The relative order in which macro definitions appear in a file is not important; what matters is the order in which they are invoked during conversion (see §28.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:

[End]

No macros in templates

Do not include macro definitions in a configuration template (see §30.6.2 Deciding what to include in a general 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 your project configuration file as a consequence of changes you make to Export options, Windows rewrites the file, and deletes all leading spaces in the settings.

Note:  Do not put Mif2Go macro definitions on the HTML reference page in your FrameMaker document; Mif2Go does not look there.



28 Working with macros > 28.1 Defining and invoking macros > 28.1.1 Defining macros > 28.1.1.2 Understanding where you can define named macros