4.5 Using Mif2Go configuration templates
You can designate a configuration file to be used as a template for a new project configuration, or to hold general-purpose settings that you can direct Mif2Go to import. Configuration templates follow the same rules as other configuration files; see §4.1.4 Understanding the rules for configuration settings.
To create a configuration template:
1. Copy one of your configuration files (one that has the most commonly used settings) to another folder, and give it a different name with extension .ini; for example MyTemplate.ini.
2. Delete from MyTemplate.ini any settings that apply only to the particular project from which you copied the configuration file. Also delete all macro definitions.
3. Delete from all your project configuration files any unused sections that have settings in MyTemplate.ini.
4. Delete from all your project configuration files any settings that occur in MyTemplate.ini, unless a setting has a different value. Settings in a project configuration file override those in a configuration template.
5. In each project configuration file, specify the following to reference the template:
; ConfigTemplate = path to configuration template file
ConfigTemplate=path/to/MyTemplate.ini
The idea is to have as little as possible in individual project configuration files, and keep most common settings in the template. However, there are a few settings that can appear only in the project configuration file; see §32.2.1 Deciding what to include in a configuration template.
If the same setting has different values in the template and in a project configuration file, the value in the project configuration file takes precedence, allowing you to override the template when necessary:
• The referenced configuration template overrides default values.
• The local project configuration file overrides the referenced template.
• Any chapter-specific configuration file overrides the project configuration file, for its FrameMaker chapter only.
See §31.1.2 Understanding precedence of configuration settings.
You can chain template files together by including in a template file a ConfigTemplate setting that references yet another template. You can have as many referenced templates chained as you please; each overrides the one it references, and all others above it in the chain. The most specific configuration rules. See §32.2.3 Chaining configuration templates.
For example, the chain of configuration files and templates for the cover-page file of the Mif2Go User's Guide, ugmif2go.fm, looks like this for the standard HTML edition:
UGcfgALL.ini Template for all Mif2Go User's Guide projects
+-UGcfgHTM.ini Template for all Mif2Go User's Guide HTML projects
+-mif2htm.ini Configuration file for the standard HTML edition
+-ugmif2go.ini Configuration file for the cover page
The cover page has its own chapter configuration file for standard HTML (ugmif2go.ini) with settings specific to the cover page alone; those settings override any values for the same settings in the HTML project configuration file (mif2htm.ini).
The HTML project configuration file (mif2htm.ini) for the Mif2Go User's Guide references (and overrides settings in) a configuration template named UGcfgHTM.ini that contains settings common to projects for all HTML output types.
In turn, UGcfgHTM.ini references (and overrides settings in) UGcfgALL.ini, which contains settings common to all Mif2Go User's Guide projects, including those for RTF output types.
§2.3 Working with Mif2Go configuration files
§31.1 Using a different configuration for selected files
§32.2 Importing settings from configuration templates
> 4 Setting configuration options > 4.5 Using Mif2Go configuration templates
