Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

28 Working with macros > 28.2 Accessing Mif2Go macro libraries > 28.2.4 Including macro definitions in your own macro library > 28.2.4.3 Creating a chain of macro libraries


28.2.4.3 Creating a chain of macro libraries

A macro library file can include a setting for [Templates]Macros, so the chain of libraries for Mif2Go to search for macro definitions can be any length. However, all files in the chain must have distinct names; the chain stops if Mif2Go finds a repeated macro library name.

Precedence of macro definitions

In a chain of macro libraries, if the same macro appears in more than one library file but has a different definition in each file:

A definition in a library closer in the chain to the project configuration file overrides a definition in any library farther away in the chain.

A definition in the project configuration file overrides the final library value.

A definition in an individual chapter configuration file (see §33.1 Using a different configuration for selected files) overrides a definition in the project configuration file, for that chapter only.

Mif2Go builds a set of macros for each FrameMaker file in your project by starting with the most specific macro definitions: those in the chapter.ini configuration file, if there is one. Next come macro definitions in your project configuration file.

Next, if chapter.ini includes a value for [Templates]Macros, definitions in the referenced macro library (and any additional libraries chained to it) are applied. If chapter.ini does not reference a macro library, next come definitions in any macro library referenced by the project configuration file; then on up the chain from that library.

In other words, a chain of macro libraries is applied to chapter.fm either from chapter.ini (preferentially) or from the project configuration file, but not from both. In either case, definitions from a chain of macro libraries are applied after macro definitions from the project configuration file, which are applied after definitions from the chapter configuration file. For the same macro with different definitions in different configuration files or macro libraries, the definition in the most specific file takes precedence.



28 Working with macros > 28.2 Accessing Mif2Go macro libraries > 28.2.4 Including macro definitions in your own macro library > 28.2.4.3 Creating a chain of macro libraries